2 networks cards

So I have to use the console mode to configure the ip address of my VM ?

PS : I've attached the network map to be more explicit. I want to configure VM 1,2 and 3 to access to Internet by the address 10.0.0.1 (eth0 is connected to 10.0.0.0/24) and the VM 4 to access to Internet by the ip address 192.168.0.1 (eth1 is connected to 192.168.0.0/24)
 

Attachments

  • networ10.png
    networ10.png
    24.3 KB · Views: 32
Last edited:
I added the VETH "eth0" linked with the bridge vmbr1 in my VM.

But, when i start my VM, in /etc/network/interfaces, there is no eth0 !

Any idea ?
 
I added the VETH "eth0" linked with the bridge vmbr1 in my VM.

But, when i start my VM, in /etc/network/interfaces, there is no eth0 !

Any idea ?

you need to defined it manually

auto eth0
iface eth0 inet static
address X.X.X.X
netmask X.X.X.X
broadcast X.X.X.X
gateway X.X.X.X

or

auto eth0
iface eth0 inet dhcp
 
It doesn't work, I add the configuration in /etc/network/interfaces

auto eth0
iface eth0 inet static
address 10.0.0.189
netmask 255.255.255.0
broadcast 10.0.0.255
gateway 10.0.0.1


I restart networking service :
service networking restart

root@test:/# ifconfig
eth0 Link encap:Ethernet HWaddr a6:29:3c:d4:fe:b0
inet addr:10.0.0.189 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::a429:3cff:fed4:feb0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:34 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2355 (2.3 KB) TX bytes:720 (720.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:488 (488.0 B) TX bytes:488 (488.0 B)

root@test:/# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
root@test:/#


But on the local network, when I ping my VM from my computer on 10.0.0.153 :

adda@D2SS35J:~$ ping 10.0.0.189
PING 10.0.0.189 (10.0.0.189) 56(84) bytes of data.
From 10.0.0.153 icmp_seq=1 Destination Host Unreachable
From 10.0.0.153 icmp_seq=2 Destination Host Unreachable
From 10.0.0.153 icmp_seq=3 Destination Host Unreachable
From 10.0.0.153 icmp_seq=4 Destination Host Unreachable


And, no Internet access for the VM.
 
It doesn't work, I add the configuration in /etc/network/interfaces

auto eth0
iface eth0 inet static
address 10.0.0.189
netmask 255.255.255.0
broadcast 10.0.0.255
gateway 10.0.0.1


I restart networking service :
service networking restart

root@test:/# ifconfig
eth0 Link encap:Ethernet HWaddr a6:29:3c:d4:fe:b0
inet addr:10.0.0.189 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::a429:3cff:fed4:feb0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:34 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2355 (2.3 KB) TX bytes:720 (720.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:488 (488.0 B) TX bytes:488 (488.0 B)

root@test:/# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
root@test:/#


But on the local network, when I ping my VM from my computer on 10.0.0.153 :

adda@D2SS35J:~$ ping 10.0.0.189
PING 10.0.0.189 (10.0.0.189) 56(84) bytes of data.
From 10.0.0.153 icmp_seq=1 Destination Host Unreachable
From 10.0.0.153 icmp_seq=2 Destination Host Unreachable
From 10.0.0.153 icmp_seq=3 Destination Host Unreachable
From 10.0.0.153 icmp_seq=4 Destination Host Unreachable


And, no Internet access for the VM.

The conf seem to be ok inside the container.

Can you do a

#brctl show

on your host ? (to see if the veth is correctly plugged on the bridge)
 
This is the result of brctl show :

root@proxmox:~# brctl show
bridge name bridge id STP enabled interfaces
vmbr0 8000.74d4359ba5b0 no eth0
vmbr1 8000.000acd2414d3 no eth1
veth100.0
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!