2nd NIC no IP in CT

Henry

Member
Jan 1, 2016
83
0
6
51
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)
 
so your setup so far looks like this ?

Code:
Modem <-> Eth1(USB) <-> vmbr1 <-> vEth1 <-> CT <-> vEth0 <-> vmbr0 <-> Eth0 <-> LAN <-> Switch

You use "dhcp" on the CT to assign IP's. And a static IP assigned on vmbr0 assigned for proxmox.


Q1: What "Router-OS" are you running on the CT ?
Q2: that "Modem" is that a plain "Modem" or a "Modem/Router" combo ?
Q3: Where is this CT to get his IP's from ? Where is the DHCP server that is supposed to service those ?
Q4: have you performed the steps described to you to make the "Modem" forget its MAC-Assignment ?
Q5: Have you set your gateways correctly ?
 
Hi Q-wulf and thanks. I have narrowed down the problem to the modem itself.

The modem is configured to only allow connections from 172.28.57.122 and DHCP was locked to the first MAC to connect.

i.e. the VM/CT was unable to get a DHCP address as the pxe MAC was the first connection. If I set the PXE bridge to manual and the VM/CT ip to static 172.28.57.122/30 then it works.

Thanks for the interest.
 

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!