LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-05-2020, 10:26 AM   #1
finalturismo
Member
 
Registered: May 2019
Posts: 120

Rep: Reputation: Disabled
Problems with ISC DHCP server on bonded IP


Help with boned adapter and DHCP ISC integration

So i have a bonded ethernet Adapter. The bond0 interface is working 100% correctly but the DHCP server refuses to hand out an IP when using a 2nd ethernet ethernet port for 77.77.77.1

For example i have a Dell R720XD with a 10GB SFP ethernet card with 2 ports.

My bond0 adapter is bonded across eths1-5.

Once i connect an ethernet cable into any of those 5 bonded ethernet ports to a client computer, i get an IP address with no problems.....

But as soon as i attempt to add a 2nd ethernet cable to eth ports 1-5 i do not get an IP.

It seems as if DHCP client IP address assignment is stopped halfway in-between the process.

I have confirmed the bonding is working with no problems and i have tried all bonding modes.

Anyone happen to know any good ways of debugging the kernel and the DHCP ISC server to see exactly where the problem is?

Also if i cant get this working with ICS DHCP is there another fast, high volume DHCP server i can use?

THE PROBLEM
DHCP ISC only allows me to only use 1 physical port for the set router in dhcpd.conf file regardless of the fact that 77.77.77.1 is the bond0 with the 5 selected ethernet ports.


THE GOALS
A
Get DHCP ISC working with a bonded interface while maintaining a single subnet

OR

B
Configure eth ports 1-5 as a switch pointing to, binded or bridged with 77.77.77.1 while maintaining a single subnet. I pretty much need to get the DHCP server running on ports 1-5. I need to somehow make ports 1-5 part of the 77.77.77.1 router without creating multiple router IPs for each port.

Why?
1. This allows me to have a 10GB DHCP network without purchasing a switch for an ungodly amount of money...
2. I do backups very often that exceed 1TB and sometimes i use my other R720XD to recover broken raids and i have to send the recovered data back over the network to my other R720XD that acts as my server and router.
3. I want to maintain a single small subnet for both performance and simplicity.


/etc/conf.d/net config
Tried with null setting enabled and disabled
Code:
#config_eth1="null"
#config_eth2="null"
#config_eth3="null"
#config_eth4="null"
#config_eth5="null"

slaves_bond0="eth1 eth2 eth3 eth4 eth5"
config_bond0="77.77.77.1 netmask 255.255.255.0"
mode_bond0="balance-alb"


/etc/dhcp/dhcpd.conf
Code:
subnet 77.77.77.0 netmask 255.255.255.0
{
range 77.77.77.2 77.77.77.254;
option routers 77.77.77.1;
option broadcast-address 77.77.77.255;
option domain-name FIXAPC;
option domain-name-servers 77.77.77.1, 8.8.8.8, 1.1.1.1;
default-lease-time -1;
max-lease-time -1;
}




My /etc/conf.d/dhcpd
I have set to bond only to bond0 interface or all interfaces involved in bonding.
Code:
# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd

# If you require more than one instance of dhcpd you can create symbolic
# links to dhcpd service like so
#   cd /etc/init.d
#   ln -s dhcpd dhcpd.foo
#   cd ../conf.d
#   cp dhcpd dhcpd.foo
# Now you can edit dhcpd.foo and specify a different configuration file.
# You'll also need to specify a pidfile in that dhcpd.conf file.
# See the pid-file-name option in the dhcpd.conf man page for details.

# If you wish to run dhcpd in a chroot, uncomment the following line
# DHCPD_CHROOT="/var/lib/dhcp/chroot"

# All file paths below are relative to the chroot.
# You can specify a different chroot directory but MAKE SURE it's empty.

# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf
# DHCPD_CONF="/etc/dhcp/dhcpd.conf"

# Configure which interface or interfaces to for dhcpd to listen on.
# List all interfaces space separated. If this is not specified then
# we listen on all interfaces.
DHCPD_IFACE="bond0 eth1 eth2 eth3 eth4 eth5"

# Insert any other dhcpd options - see the man page for a full list.
# DHCPD_OPTS=""


Output of route -n
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         47.183.193.1    0.0.0.0         UG    9      0        0 eth0
47.183.193.0    0.0.0.0         255.255.255.0   U     9      0        0 eth0
77.77.77.0      0.0.0.0         255.255.255.0   U     0      0        0 bond0
127.0.0.0       127.0.0.1       255.0.0.0       UG    0      0        0 lo
Output of ifconfig
Code:
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 77.77.77.1  netmask 255.255.255.0  broadcast 77.77.77.255
        inet6 fe80::92b1:1cff:fe45:368  prefixlen 64  scopeid 0x20<link>
        ether 90:b1:1c:45:03:68  txqueuelen 1000  (Ethernet)
        RX packets 2107785  bytes 285018996 (271.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7209388  bytes 9992799492 (9.3 GiB)
        TX errors 0  dropped 6 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 47.183.193.110  netmask 255.255.255.0  broadcast 47.183.193.255
        inet6 fe80::1301:bd2e:1dd2:8c2f  prefixlen 64  scopeid 0x20<link>
        ether 90:b1:1c:45:03:67  txqueuelen 1000  (Ethernet)
        RX packets 7540142  bytes 10034797552 (9.3 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2090695  bytes 435261352 (415.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 41

eth1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 90:b1:1c:45:03:68  txqueuelen 1000  (Ethernet)
        RX packets 2104771  bytes 284286007 (271.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7162619  bytes 9925116701 (9.2 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 44

eth2: flags=6147<UP,BROADCAST,SLAVE,MULTICAST>  mtu 1500
        ether 90:b1:1c:45:03:68  txqueuelen 1000  (Ethernet)
        RX packets 3014  bytes 732989 (715.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 46769  bytes 67682791 (64.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 45

eth3: flags=6147<UP,BROADCAST,SLAVE,MULTICAST>  mtu 1500
        ether 90:b1:1c:45:03:68  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 62

eth4: flags=6147<UP,BROADCAST,SLAVE,MULTICAST>  mtu 1500
        ether 90:b1:1c:45:03:68  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth5: flags=6147<UP,BROADCAST,SLAVE,MULTICAST>  mtu 1500
        ether 90:b1:1c:45:03:68  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 1445347  bytes 230974708 (220.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1445347  bytes 230974708 (220.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Last edited by finalturismo; 10-05-2020 at 12:04 PM.
 
Old 10-05-2020, 02:50 PM   #2
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,150

Rep: Reputation: 393Reputation: 393Reputation: 393Reputation: 393
Code:
DHCPD_IFACE="bond0 eth1 eth2 eth3 eth4 eth5"
Try this.

Code:
DHCPD_IFACE="bond0"
Those eth interfaces are just slaves to the bond. But you are trying to dhcp on both them and the bond. The slaves aren't specifically configured so they have nothing.

I've never bonded interfaces before but I'd think you would run all of the bonded interfaces to the same switch then go from there. Suppose it would depend on the mode.

*EDIT* Just thinking. Are you sure you want a bond? A bridge would let you do what you are trying to do, although at that point you'd probably be better off with a switch.

Last edited by jmgibson1981; 10-05-2020 at 03:05 PM.
 
Old 10-05-2020, 03:21 PM   #3
finalturismo
Member
 
Registered: May 2019
Posts: 120

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jmgibson1981 View Post
Code:
DHCPD_IFACE="bond0 eth1 eth2 eth3 eth4 eth5"
Try this.

Code:
DHCPD_IFACE="bond0"
Those eth interfaces are just slaves to the bond. But you are trying to dhcp on both them and the bond. The slaves aren't specifically configured so they have nothing.

I've never bonded interfaces before but I'd think you would run all of the bonded interfaces to the same switch then go from there. Suppose it would depend on the mode.

*EDIT* Just thinking. Are you sure you want a bond? A bridge would let you do what you are trying to do, although at that point you'd probably be better off with a switch.

Well with a bond you get the redundancy and speed benefits.

DHCPD_IFACE="bond0" i did try this i believe. Is there a command i can run to check what IP address and interfaces dhcpd is listening on.

I think it is listening across entire 0.0.0.0 and this would cause a problem, but iam not sure.
 
Old 10-05-2020, 09:04 PM   #4
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,150

Rep: Reputation: 393Reputation: 393Reputation: 393Reputation: 393
The problem is the bond is technically a single interface. So all of the eth are really only one interface. It doesn't know what to do with more than 1 separate thing as it can handle a single assignment at a time


Simple terms. You cant put 2 connections into a single port. And if the devices are separate then you dont get the redundancy and load balancing.

Last edited by jmgibson1981; 10-05-2020 at 09:06 PM.
 
Old 10-05-2020, 10:05 PM   #5
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,150

Rep: Reputation: 393Reputation: 393Reputation: 393Reputation: 393
Quote:
A
Get DHCP ISC working with a bonded interface while maintaining a single subnet
This will work but you need to understand that for a bond to work it needs all of the interfaces to achieve it's redundancy and maximum bandwith. Depending on how many interfaces each machine has determines how big your bond can be. If machine A has 4 interfaces but machine B has 2, then only 2 need be bonded on machine A. What I don't know is whether or not you can bridge to a bond.

*EDIT*

Code:
#config_eth1="null"
#config_eth2="null"
#config_eth3="null"
#config_eth4="null"
#config_eth5="null"

slaves_bond0="eth1 eth2"
config_bond0="77.77.77.1 netmask 255.255.255.0"
# some googling suggests this mode will not work with a bridge
mode_bond0="balance-alb"

bridge_br0="bond0 eth3 eth4 eth5"
routes_br0="default via 77.77.77.1"
bridge_forward_delay_br0=0
bridge_hello_time_br0=1000
In the case of this example... which I'm basing on some wiki reading. This would create a bond with 2 interface with load balancing. Then you have the other 3 interfaces bridged with the bond. This means that eth[12] wires would go directly to your other bond location where you want the highest bandwidth? The other 3 ports would effectively be switched and allow you to plug in smaller devices. This allows them to all be on the same subnet.

NOTE - My routes_br0 line is an educated guess at best. Took a shot based on the Gentoo wiki. I'm thinking that should probably be the router ip but I don't know.

*EDIT* looking at your op post you have 77.77.77.1 as the router ip in your dhcp config? That should be your router. Just because this is a DHCP server does not mean it is doing any routing.

Last edited by jmgibson1981; 10-05-2020 at 10:20 PM.
 
Old 10-06-2020, 02:53 PM   #6
finalturismo
Member
 
Registered: May 2019
Posts: 120

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jmgibson1981 View Post
This will work but you need to understand that for a bond to work it needs all of the interfaces to achieve it's redundancy and maximum bandwith. Depending on how many interfaces each machine has determines how big your bond can be. If machine A has 4 interfaces but machine B has 2, then only 2 need be bonded on machine A. What I don't know is whether or not you can bridge to a bond.

*EDIT*

Code:
#config_eth1="null"
#config_eth2="null"
#config_eth3="null"
#config_eth4="null"
#config_eth5="null"

slaves_bond0="eth1 eth2"
config_bond0="77.77.77.1 netmask 255.255.255.0"
# some googling suggests this mode will not work with a bridge
mode_bond0="balance-alb"

bridge_br0="bond0 eth3 eth4 eth5"
routes_br0="default via 77.77.77.1"
bridge_forward_delay_br0=0
bridge_hello_time_br0=1000
In the case of this example... which I'm basing on some wiki reading. This would create a bond with 2 interface with load balancing. Then you have the other 3 interfaces bridged with the bond. This means that eth[12] wires would go directly to your other bond location where you want the highest bandwidth? The other 3 ports would effectively be switched and allow you to plug in smaller devices. This allows them to all be on the same subnet.

NOTE - My routes_br0 line is an educated guess at best. Took a shot based on the Gentoo wiki. I'm thinking that should probably be the router ip but I don't know.

*EDIT* looking at your op post you have 77.77.77.1 as the router ip in your dhcp config? That should be your router. Just because this is a DHCP server does not mean it is doing any routing.

Wah ok i think that might just work, i did find 1 other rare google result someone mentions doing a bond and bridge at same time and he got his working on a dhcp server.
which would make only the ultimate router setup possible

Ok so i think iam going to go ahead and give this a try when i get home.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I perform maintenance on a master DNS/DHCP (BIND9/ISC-DHCP) Ubuntu server? Sniperm4n Linux - Server 2 09-09-2013 01:19 PM
Convert Linux ISC DHCP to Windows Netsh DHCP ravmohun Linux - Server 3 03-01-2012 04:29 AM
How to setup DHCP for two bonded NICs - or any advice! DTL86 Linux - Newbie 3 07-23-2009 04:23 AM
Migrate DHCP from Microsoft to ISC DHCP on Linux rsmccain Linux - Networking 4 10-27-2006 07:47 PM
ISC DHCP Server MAC Address dlucas10 Linux - Networking 1 05-25-2004 05:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration