LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-04-2011, 08:47 AM   #1
suprstar
Member
 
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, debian
Posts: 142
Blog Entries: 2

Rep: Reputation: 23
dhcp failover with 'shared network'


I have 2 subnets in a shared network, I'm deciding which ip's to give out by the mac address. When 1 server is working by itself, no problems. When I add the failover piece, I get 'load balancing to peer' in syslog, but syslog on server 2 shows nothng. server 1 & 2 are identical except the failover piece has 'secondary' on server 2, ips/ports switched, 'split' commented out on server 2. With a tcpdump, I can see traffic going back and forth, dhcpd is running, just the failover is acting like it can't hear server 1....


The relevant chunks of dhcpd.conf are:
Code:
failover peer "dhcp-failover" {
  primary;
  address 10.250.0.8;
  port 519;
  peer address 10.250.0.9;
  peer port 520;
  max-response-delay 60;
  max-unacked-updates 10;
  mclt 600;
  split 128;
  load balance max seconds 3;
}

log(info, concat( "DEBUG-", binary-to-ascii(16,8,":",substring(hardware,1,3))));
class "RD2-MGMT" {
        match if binary-to-ascii(16,8,":",substring(hardware, 1, 3)) = "0:10:e7";
}

subnet 10.250.0.0 netmask 255.255.255.192 {}

shared-network customers {
        # This is one subnet 10.0.0.0/22
        subnet 10.0.0.0 netmask 255.255.252.0  {
                default-lease-time 86400;
                max-lease-time 86400;
                option subnet-mask 255.255.252.0;
                option broadcast-address 10.0.3.255;
                option routers 10.0.0.1;
 
                pool {
                  failover peer "dhcp-failover";
                  deny members of "RD2-MGMT";
                  range 10.0.0.10 10.0.3.199;
                }

        }

        # This is the another subnet 192.168.0.0/21
        subnet 192.168.0.0 netmask 255.255.248.0 {
                default-lease-time 86400;
                max-lease-time 86400;
                option subnet-mask 255.255.248.0;
                option broadcast-address 192.168.7.255;
                option routers 192.168.0.1;

                pool {
                    failover peer "dhcp-failover";
                    range 192.168.0.1 192.168.7.252;
                    allow members of "RD2-MGMT";
                }
        }
}

Thanks in advance,

Last edited by suprstar; 10-04-2011 at 09:23 AM.
 
Old 10-04-2011, 03:23 PM   #2
suprstar
Member
 
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, debian
Posts: 142

Original Poster
Blog Entries: 2

Rep: Reputation: 23
An update:

Is there something wrong with my failover declarations? I'm defining ports 519 and 520 as per the numerous examples on the net. But when I tcpdump it later on, I see that the primary server is using some arbitrary port, while the second server is using the port I tell it to. A tcpdump on both servers shows the same thing..

primary server:
Code:
failover peer "dhcp-failover" {
  primary;
  address 10.250.0.8;
  port 519;
  peer address 10.250.0.9;
  peer port 520;
  max-response-delay 60;
  max-unacked-updates 10;
  mclt 600;
  split 128;
  load balance max seconds 3;
}
secondary server:
Code:
failover peer "dhcp-failover" {
  secondary;
  address 10.250.0.9;
  port 520;
  peer address 10.250.0.8;
  peer port 519;
  max-response-delay 60;
  max-unacked-updates 10;
  mclt 600;
  #split 128;
  load balance max seconds 3;
}

tcpdump on primary server:
------------------------------------------
16:13:34.960694 IP svc2.local.520 > svc1.local.33077: Flags [P.], seq 265:277, ack 420, win 124, options [nop,nop,TS val 1038201325 ecr 1037458126], length 12
16:13:34.960715 IP svc1.local.33077 > svc2.local.520: Flags [.], ack 277, win 142, options [nop,nop,TS val 1037458614 ecr 1038201325], length 0
16:13:53.010044 IP svc1.local.33077 > svc2.local.520: Flags [P.], seq 420:432, ack 277, win 142, options [nop,nop,TS val 1037463126 ecr 1038201325], length 12
16:13:53.010282 IP svc2.local.520 > svc1.local.33077: Flags [.], ack 432, win 124, options [nop,nop,TS val 1038205837 ecr 1037463126], length 0
16:13:54.960715 IP svc2.local.520 > svc1.local.33077: Flags [P.], seq 277:289, ack 432, win 124, options [nop,nop,TS val 1038206325 ecr 1037463126], length 12
16:13:54.960736 IP svc1.local.33077 > svc2.local.520: Flags [.], ack 289, win 142, options [nop,nop,TS val 1037463614 ecr 1038206325], length 0
16:14:13.018180 IP svc1.local.33077 > svc2.local.520: Flags [P.], seq 432:444, ack 289, win 142, options [nop,nop,TS val 1037468128 ecr 1038206325], length 12
16:14:13.018350 IP svc2.local.520 > svc1.local.33077: Flags [.], ack 444, win 124, options [nop,nop,TS val 1038210839 ecr 1037468128], length 0
16:14:14.960707 IP svc2.local.520 > svc1.local.33077: Flags [P.], seq 289:301, ack 444, win 124, options [nop,nop,TS val 1038211325 ecr 1037468128], length 12
16:14:14.960728 IP svc1.local.33077 > svc2.local.520: Flags [.], ack 301, win 142, options [nop,nop,TS val 1037468614 ecr 1038211325], length 0


tcpdump on secondary server:
------------------------------------------
16:13:35.002085 IP svc2.local.520 > svc1.local.33077: Flags [P.], seq 1:13, ack 12, win 124, options [nop,nop,TS val 1038201325 ecr 1037458126], length 12
16:13:35.002372 IP svc1.local.33077 > svc2.local.520: Flags [.], ack 13, win 142, options [nop,nop,TS val 1037458614 ecr 1038201325], length 0
16:13:53.051706 IP svc1.local.33077 > svc2.local.520: Flags [P.], seq 12:24, ack 13, win 142, options [nop,nop,TS val 1037463126 ecr 1038201325], length 12
16:13:53.051727 IP svc2.local.520 > svc1.local.33077: Flags [.], ack 24, win 124, options [nop,nop,TS val 1038205837 ecr 1037463126], length 0
16:13:55.002107 IP svc2.local.520 > svc1.local.33077: Flags [P.], seq 13:25, ack 24, win 124, options [nop,nop,TS val 1038206325 ecr 1037463126], length 12
16:13:55.002352 IP svc1.local.33077 > svc2.local.520: Flags [.], ack 25, win 142, options [nop,nop,TS val 1037463614 ecr 1038206325], length 0
16:14:13.059817 IP svc1.local.33077 > svc2.local.520: Flags [P.], seq 24:36, ack 25, win 142, options [nop,nop,TS val 1037468128 ecr 1038206325], length 12
16:14:13.059837 IP svc2.local.520 > svc1.local.33077: Flags [.], ack 36, win 124, options [nop,nop,TS val 1038210839 ecr 1037468128], length 0
16:14:15.002101 IP svc2.local.520 > svc1.local.33077: Flags [P.], seq 25:37, ack 36, win 124, options [nop,nop,TS val 1038211325 ecr 1037468128], length 12
16:14:15.002326 IP svc1.local.33077 > svc2.local.520: Flags [.], ack 37, win 142, options [nop,nop,TS val 1037468614 ecr 1038211325], length 0

Last edited by suprstar; 10-04-2011 at 03:42 PM.
 
  


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
Debian DHCP on Shared Network jatkidal Linux - Networking 3 02-21-2010 01:07 AM
A question about DHCP failover 22978316 Linux - Server 1 05-02-2009 03:16 PM
DHCP failover? rsmccain Linux - Networking 2 10-24-2006 05:38 PM
DHCP failover to static IP addr rf_willi Linux - Networking 0 10-25-2004 05:31 PM
[DHCP] Failover state fabrice Linux - Networking 0 04-30-2002 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:30 PM.

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