0

I can't seem to get the last NIC on my server working just right. I have an HP Proliant server with 4 NICs currently serving as my home router. Eth0 is my WAN interface, eth1 and eth2 are setup to serve dhcp on two different subnets. Everything is working fine except for the last NIC on the server, eth3. I am wanting this to be bridged to the first subnet on eth1. I have tried numerous bridging configurations but I am doing something wrong. Here is my interfaces script found in /etc/networking, please note this is how it is currently working and have removed the bridging configurations some time ago since I have been researching this for awhile, so eth3 isn't setup at all right now.

#Loopback lo
auto lo
iface lo inet loopback

#WAN on eth0
auto eth0
iface eth0 inet dhcp

#Subnet 1 on eth1
auto eth1
iface eth1 inet static
    address 192.168.1.1     
    netmask 255.255.255.0
    broadcast 192.168.1.255
    network 192.168.1.0

#subnet 2 on eth2
auto eth2
iface eth2 inet static
    address 10.13.0.1
    netmask 255.255.255.240
    broadcast 10.13.0.15
    network 10.13.0.0

#alias on eth1:0
auto eth1:0
iface eth1:0 inet static
    address 192.168.1.2
    netmask 255.255.255.0
    broadcast 192.168.1.255
    network 192.168.1.0

The Alias is for a webserver serving my internal network, it is also just a face for dnsmasq to using port 53 on.

Ubuntu Server 18.04 LTS, Netplan is disabled, using ifupdown. ISC-DHCP-SERVER serving dhcp.

7
  • I don't see any script for eth3. Is eth1 and eth1:0 supposed to be the same port? Why are you running dnsmasq AND isc-dhcp-server? They're both acting as dhcp servers. Did you add dns=dnsmasq in /etc/NetworkManager/NetworkManager.conf? Why aren't you using netplan for this... that's the norm for servers now.
    – heynnema
    Dec 26, 2018 at 21:52
  • FYI: systemd-resolvd (not dnsmasq) uses 127.0.0.53, and if running dnsmasq AND systemd-resolved, you have to edit a systemd-resolved config file to help them co-exist.
    – heynnema
    Dec 26, 2018 at 23:01
  • As i said, there isn't an entry for eth3 currently. Dnsmasq is running under pihole for dns filtering, not serving dhcp. The Alias is on the same interface as eth1, hence the eth1:0. This alias is really so just for convenience when i need to log into the webpage for pihole. Isc is running my dhcp server. Again, I'm just curious for a correct config for bridging eth3 with eth1 so that isc will serve dhcp on subnet 1 on that port. It's the same thing as having lan ports on a router, they are bridged to the other lan ports and all get addresses from the same local network.
    – Sudo
    Dec 27, 2018 at 16:39
  • OK, please edit your question, and add another code section, that shows the eth3 code that you were trying to use. Maybe we'll see what's wrong with it. Question... is there a reason that you're using NetworkManager instead of netplan? netplan is usually used on servers.
    – heynnema
    Dec 27, 2018 at 17:10
  • What im trying to get working is eth3 to be another port for the first subnet on eth1, as if both were ports on a ethernet switch. Wanting eth2 to be complete separate from these. I really am at a loss for what to put for eth3 script wise lol. As for netplan, I am just so terribly unfamiliar and, yes, that needs to change. Regardless, thanks for your help btw. I hope I am making sense.
    – Sudo
    Feb 6, 2019 at 15:40

1 Answer 1

0

The quickest and easiest route to bridging an interface that is being used by many services (like dhcp, dns or iptables etc.) is to rename the interface (Changing Network Interfaces name Ubuntu 16.04). Then proceed to name the bridge with the original interface name. This worked for me with everything that I am running on linux. Its not elegant but hey, beats setting everything up again. Here is my current script where I renamed eth1 to phys1 from the script in the question and the bridge is now named eth1:

#Loopback lo
auto lo
iface lo inet loopback

#WAN on eth0
auto eth0
iface eth0 inet dhcp

#phys1
auto phys1
iface phys1 inet manual

#Subnet 1 bridge interface on eth1
auto eth1
iface eth1 inet static
    address 192.168.1.1
    netmask 255.255.255.0
    broadcast 192.168.1.255
    network 192.168.1.0
    bridge_ports phys1 eth3

#subnet 2 on eth2
auto eth2
iface eth2 inet static
    address 10.13.0.1
    netmask 255.255.255.240
    broadcast 10.13.0.15
    network 10.13.0.0

#eth3
auto eth3
iface eth3 inet manual

#alias on eth1:0
auto eth1:0
iface eth1:0 inet static
    address 192.168.1.2
    netmask 255.255.255.0
    broadcast 192.168.1.255
    network 192.168.1.0

I personally don't like netplan, so I hope this helps anyone with similar tastes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .