Re: about dhcpd and carp device

2008-07-07 Thread Richard Daemon
On Mon, Jun 30, 2008 at 3:54 PM, Imre Oolberg [EMAIL PROTECTED] wrote:
 Hallo!

 I have been using for some time now carp failover and i am very content with
 it, thank you!

 I run some tests and i just wanted to confirm that in order to run dhcpd
 service one has to run it on a physical interface (which has ip address
 configured) like

 # dhcpd fxp0

 and not on a carp device which in turn uses fxp0 like that, right?

 # dhcpd carp1


 Best regards,

 Imre

 PS I learned from the archives that dhcp v.3 has so to say master and slave
 functionality but this is not an issue yet for me how to sync leases
 database and etc.



I'm just curious, why run dhcpd on a carp interface? What's the reason
for wanting to do this?



Re: about dhcpd and carp device

2008-07-07 Thread Imre Oolberg

Richard Daemon wrote:


I'm just curious, why run dhcpd on a carp interface? What's the reason
for wanting to do this?



If you point to the fact that since dhcpd is a service which from the 
client's point of view does not run on fixed ip address but rather so to 
say in a broadcast domain and when client shoots it's request 
broadcasting it it doesnt matter much by itself from what specific ip 
address the answer comes from, then it is also my understanding.


But my intent to run dhcpd on carp interface comes from indirect reason 
to not have corresponding physical interface an ip address configured to 
it. I did some testing and found out that if carp interface's physical 
interface doesnt have ip address configured then packets that left have 
carp's address as src address, otherwise they have physical interface's 
ip address as src. True, it aint hard to apply some pf and fix src 
addreses. But if i am not overlooking something here then it seems to me 
more straitforward to not configure ip address to physical interface and 
have src ip addresses set without need to mend them with pf.



Best regards,
Imre



Re: about dhcpd and carp device

2008-07-03 Thread Imre Oolberg

Hi!

 (private) HKS wrote:

Your carp interface won't be doing much for you if it doesn't have an
IP address configured.


Yes, i think so, too and i have carp device configured ip aadress.

To present my case more clearly here is my little experiment.

CASE ONE, dhcpd is bound to physical interface, everything works as expected

dchpserver# ifconfig rl0 


rl0: ...
 inet 10.0.10.250 netmask 0xff00 broadcast 10.0.10.255

dhcpclient# dhclient -d rl0
DHCPREQUEST on rl0 to 255.255.255.255 port 67
DHCPACK from 10.0.10.250
bound to 10.0.10.32 -- renewal in 21600 seconds.

dhcpserver# dhcpd -d rl0
DHCPREQUEST for 10.0.10.32 from 00:c0:26:27:4d:fe via rl0
DHCPACK on 10.0.10.32 to 00:c0:26:27:4d:fe via rl0

dhcpserver# tcpdump -nettti rl0 not proto carp
tcpdump: listening on rl0, link-type EN10MB
Apr 24 06:35:01.251249 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
10.0.10.32.68  255.255.255.255.67: xid:0x9d19635d [|bootp] [tos 0x10]
Apr 24 06:35:01.252596 00:e0:4c:02:89:18 00:c0:26:27:4d:fe 0800 342: 
10.0.10.250.67  10.0.10.32.68: xid:0x9d19635d Y:10.0.10.32 
S:10.0.10.250 [|bootp] [tos 0x10]
Apr 24 06:35:01.267923 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0806 60: arp 
who-has 10.0.10.32 tell 10.0.10.32


CASE TWO, dhcpd is bound to carp device (which runs on rl0 which doesnt 
ip address configured any more), client isnt getting an answer


dchpserver# ifconfig carp4
carp4: ...
   inet 10.0.10.250 netmask 0xff00 broadcast 10.0.10.255

dhcpclient# dhclient -d rl0
DHCPREQUEST on rl0 to 255.255.255.255 port 67
DHCPREQUEST on rl0 to 255.255.255.255 port 67
DHCPDISCOVER on rl0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on rl0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on rl0 to 255.255.255.255 port 67 interval 13

dhcpserver# dhcpd -d carp4

dhcpserver# tcpdump -nettti rl0 not proto carp
tcpdump: listening on rl0, link-type EN10MB
Apr 24 06:43:57.758341 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
10.0.10.32.68  255.255.255.255.67: xid:0x7a3c2ff [|bootp] [tos 0x10]
Apr 24 06:44:05.764199 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
10.0.10.32.68  255.255.255.255.67: xid:0x7a3c2ff secs:8 [|bootp] [tos 0x10]
Apr 24 06:44:13.774456 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
0.0.0.0.68  255.255.255.255.67: xid:0x5e5dc1b3 [|bootp] [tos 0x10]
Apr 24 06:44:16.784416 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
0.0.0.0.68  255.255.255.255.67: xid:0x5e5dc1b3 secs:3 [|bootp] [tos 0x10]
Apr 24 06:44:22.794616 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
0.0.0.0.68  255.255.255.255.67: xid:0x5e5dc1b3 secs:9 [|bootp] [tos 0x10]


# tcpdump -nettti carp4 not proto carp
tcpdump: listening on carp4, link-type EN10MB
And dhcpserver and dhcpclient both have pf disabled.

If somebody could confirm that this is expected behavior with carp 
device and dhcpd i would be very glad to know!



Imre



You should be able to run dhcpd off carp1 without any trouble, though
I can't speak from experience.

-HKS


On Mon, Jun 30, 2008 at 3:54 PM, Imre Oolberg [EMAIL PROTECTED] wrote:

Hallo!

I have been using for some time now carp failover and i am very content with
it, thank you!

I run some tests and i just wanted to confirm that in order to run dhcpd
service one has to run it on a physical interface (which has ip address
configured) like

# dhcpd fxp0

and not on a carp device which in turn uses fxp0 like that, right?

# dhcpd carp1


Best regards,

Imre

PS I learned from the archives that dhcp v.3 has so to say master and slave
functionality but this is not an issue yet for me how to sync leases
database and etc.




Re: about dhcpd and carp device

2008-07-03 Thread Heinrich Rebehn

Oops, i forgot to Cc the list!

Imre Oolberg wrote:

Hi!

  (private) HKS wrote:

Your carp interface won't be doing much for you if it doesn't have an
IP address configured.


Yes, i think so, too and i have carp device configured ip aadress.

To present my case more clearly here is my little experiment.

CASE ONE, dhcpd is bound to physical interface, everything works as 
expected


dchpserver# ifconfig rl0
rl0: ...
 inet 10.0.10.250 netmask 0xff00 broadcast 10.0.10.255

dhcpclient# dhclient -d rl0
DHCPREQUEST on rl0 to 255.255.255.255 port 67
DHCPACK from 10.0.10.250
bound to 10.0.10.32 -- renewal in 21600 seconds.

dhcpserver# dhcpd -d rl0
DHCPREQUEST for 10.0.10.32 from 00:c0:26:27:4d:fe via rl0
DHCPACK on 10.0.10.32 to 00:c0:26:27:4d:fe via rl0

dhcpserver# tcpdump -nettti rl0 not proto carp
tcpdump: listening on rl0, link-type EN10MB
Apr 24 06:35:01.251249 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
10.0.10.32.68  255.255.255.255.67: xid:0x9d19635d [|bootp] [tos 0x10]
Apr 24 06:35:01.252596 00:e0:4c:02:89:18 00:c0:26:27:4d:fe 0800 342: 
10.0.10.250.67  10.0.10.32.68: xid:0x9d19635d Y:10.0.10.32 
S:10.0.10.250 [|bootp] [tos 0x10]
Apr 24 06:35:01.267923 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0806 60: arp 
who-has 10.0.10.32 tell 10.0.10.32


CASE TWO, dhcpd is bound to carp device (which runs on rl0 which doesnt 
ip address configured any more), client isnt getting an answer


dchpserver# ifconfig carp4
carp4: ...
   inet 10.0.10.250 netmask 0xff00 broadcast 10.0.10.255

dhcpclient# dhclient -d rl0
DHCPREQUEST on rl0 to 255.255.255.255 port 67
DHCPREQUEST on rl0 to 255.255.255.255 port 67
DHCPDISCOVER on rl0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on rl0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on rl0 to 255.255.255.255 port 67 interval 13

dhcpserver# dhcpd -d carp4

dhcpserver# tcpdump -nettti rl0 not proto carp
tcpdump: listening on rl0, link-type EN10MB
Apr 24 06:43:57.758341 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
10.0.10.32.68  255.255.255.255.67: xid:0x7a3c2ff [|bootp] [tos 0x10]
Apr 24 06:44:05.764199 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
10.0.10.32.68  255.255.255.255.67: xid:0x7a3c2ff secs:8 [|bootp] [tos 
0x10]
Apr 24 06:44:13.774456 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
0.0.0.0.68  255.255.255.255.67: xid:0x5e5dc1b3 [|bootp] [tos 0x10]
Apr 24 06:44:16.784416 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
0.0.0.0.68  255.255.255.255.67: xid:0x5e5dc1b3 secs:3 [|bootp] [tos 0x10]
Apr 24 06:44:22.794616 00:c0:26:27:4d:fe ff:ff:ff:ff:ff:ff 0800 342: 
0.0.0.0.68  255.255.255.255.67: xid:0x5e5dc1b3 secs:9 [|bootp] [tos 0x10]


# tcpdump -nettti carp4 not proto carp
tcpdump: listening on carp4, link-type EN10MB
And dhcpserver and dhcpclient both have pf disabled.

If somebody could confirm that this is expected behavior with carp 
device and dhcpd i would be very glad to know!




I cannot confirm that this is expected behaviour, but i observed the
same. For some reason, carp devices do not see broadcast
(255.255.255.255) packets. You have to assign an address to the physical
device and have dhcpd(8) work on that one.


Regards,

Heinrich



about dhcpd and carp device

2008-06-30 Thread Imre Oolberg

Hallo!

I have been using for some time now carp failover and i am very content 
with it, thank you!


I run some tests and i just wanted to confirm that in order to run dhcpd 
service one has to run it on a physical interface (which has ip address 
configured) like


# dhcpd fxp0

and not on a carp device which in turn uses fxp0 like that, right?

# dhcpd carp1


Best regards,

Imre

PS I learned from the archives that dhcp v.3 has so to say master and 
slave functionality but this is not an issue yet for me how to sync 
leases database and etc.




Re: about dhcpd and carp device

2008-06-30 Thread (private) HKS
Your carp interface won't be doing much for you if it doesn't have an
IP address configured.

You should be able to run dhcpd off carp1 without any trouble, though
I can't speak from experience.

-HKS


On Mon, Jun 30, 2008 at 3:54 PM, Imre Oolberg [EMAIL PROTECTED] wrote:
 Hallo!

 I have been using for some time now carp failover and i am very content with
 it, thank you!

 I run some tests and i just wanted to confirm that in order to run dhcpd
 service one has to run it on a physical interface (which has ip address
 configured) like

 # dhcpd fxp0

 and not on a carp device which in turn uses fxp0 like that, right?

 # dhcpd carp1


 Best regards,

 Imre

 PS I learned from the archives that dhcp v.3 has so to say master and slave
 functionality but this is not an issue yet for me how to sync leases
 database and etc.