I wish to setup and a router CT and have two NICs on the server, one internal and one USB. The USB NIC connects to the broadband modem and the internal NIC is for the local LAN.
Both interfaces appear in ProxMox and I have created two bridges, one for each NIC. Bridge0 has the local LAN IP for Proxmox and Bridge1 has no IP information and is connected to eth1.
In the CT I have created two NICs connected to each bridge. eth0 works fine and gets an IP as expected whereas eth1 is unable to get an IP from the modem. With a static IP it is unable to ping them modem.
In Proxmox if Bridge1 is set to DHCP then it gets an IP form the modem fine.
root@pve:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.1.9
netmask 255.255.255.0
gateway 192.168.1.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet manual
bridge_ports eth1
bridge_stp off
bridge_fd 0
root@pve:~# brctl show
bridge name bridge id STP enabled interfaces
vmbr0 8000.e03f49ac8d9c no eth0
vmbr1 8000.008a8d6a2b2b no eth1
root@pve:~# ifconfig
eth0 Link encap:Ethernet HWaddr e0:3f:49:ac:8d:9c
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:791 errors:0 dropped:0 overruns:0 frame:0
TX packets:674 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:173242 (169.1 KiB) TX bytes:406682 (397.1 KiB)
eth1 Link encap:Ethernet HWaddr 00:8a:8d:6a:2b:2b
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:414 (414.0 B) TX bytes:908 (908.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:65536 Metric:1
RX packets:469 errors:0 dropped:0 overruns:0 frame:0
TX packets:469 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:291051 (284.2 KiB) TX bytes:291051 (284.2 KiB)
vmbr0 Link encap:Ethernet HWaddr e0:3f:49:ac:8d:9c
inet addr:192.168.1.9 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::e23f:49ff:feac:8d9c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:789 errors:0 dropped:0 overruns:0 frame:0
TX packets:674 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:162064 (158.2 KiB) TX bytes:406682 (397.1 KiB)
vmbr1 Link encap:Ethernet HWaddr 00:8a:8d:6a:2b:2b
inet6 addr: fe80::28a:8dff:fe6a:2b2b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:230 (230.0 B) TX bytes:868 (868.0 B)
In the CT the settings are:
root@vm1:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
root@vm1:~# ifconfig
eth0 Link encap:Ethernet HWaddr 66:36:32:30:61:30
inet addr:192.168.1.213 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::6436:32ff:fe30:6130/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:150 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15572 (15.5 KB) TX bytes:1746 (1.7 KB)
eth1 Link encap:Ethernet HWaddr 36:64:37:38:34:32
inet6 addr: fe80::3464:37ff:fe38:3432/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:648 (648.0 B) TX bytes:7146 (7.1 KB)
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:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Both interfaces appear in ProxMox and I have created two bridges, one for each NIC. Bridge0 has the local LAN IP for Proxmox and Bridge1 has no IP information and is connected to eth1.
In the CT I have created two NICs connected to each bridge. eth0 works fine and gets an IP as expected whereas eth1 is unable to get an IP from the modem. With a static IP it is unable to ping them modem.
In Proxmox if Bridge1 is set to DHCP then it gets an IP form the modem fine.
root@pve:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.1.9
netmask 255.255.255.0
gateway 192.168.1.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet manual
bridge_ports eth1
bridge_stp off
bridge_fd 0
root@pve:~# brctl show
bridge name bridge id STP enabled interfaces
vmbr0 8000.e03f49ac8d9c no eth0
vmbr1 8000.008a8d6a2b2b no eth1
root@pve:~# ifconfig
eth0 Link encap:Ethernet HWaddr e0:3f:49:ac:8d:9c
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:791 errors:0 dropped:0 overruns:0 frame:0
TX packets:674 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:173242 (169.1 KiB) TX bytes:406682 (397.1 KiB)
eth1 Link encap:Ethernet HWaddr 00:8a:8d:6a:2b:2b
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:414 (414.0 B) TX bytes:908 (908.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:65536 Metric:1
RX packets:469 errors:0 dropped:0 overruns:0 frame:0
TX packets:469 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:291051 (284.2 KiB) TX bytes:291051 (284.2 KiB)
vmbr0 Link encap:Ethernet HWaddr e0:3f:49:ac:8d:9c
inet addr:192.168.1.9 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::e23f:49ff:feac:8d9c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:789 errors:0 dropped:0 overruns:0 frame:0
TX packets:674 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:162064 (158.2 KiB) TX bytes:406682 (397.1 KiB)
vmbr1 Link encap:Ethernet HWaddr 00:8a:8d:6a:2b:2b
inet6 addr: fe80::28a:8dff:fe6a:2b2b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:230 (230.0 B) TX bytes:868 (868.0 B)
In the CT the settings are:
root@vm1:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
root@vm1:~# ifconfig
eth0 Link encap:Ethernet HWaddr 66:36:32:30:61:30
inet addr:192.168.1.213 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::6436:32ff:fe30:6130/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:150 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15572 (15.5 KB) TX bytes:1746 (1.7 KB)
eth1 Link encap:Ethernet HWaddr 36:64:37:38:34:32
inet6 addr: fe80::3464:37ff:fe38:3432/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:648 (648.0 B) TX bytes:7146 (7.1 KB)
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:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)