Re: DHCPd Will Not Listen on the Correct Interface
On Saturday 22 July 2006 21:27, Mikhail Goriachev wrote: Instead of PF, you can control serving interfaces from /etc/rc.conf: dhcpd_ifaces=fxp0 rl0 Sure, the dhcpd_ifaces variable instructs the rc script to add those interfaces as arguments to dhcpd. However, as I mentioned in the first post, dhcpd ignores those arguments and listens on all interfaces. Currently, I have this in /etc/rc.conf: dhcpd_enable=YES dhcpd_ifaces=fxp0 rl0 The rc script works correctly. ps shows: /usr/local/sbin/dhcpd -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.leases -pf /var/run/dhcpd/dhcpd.pid -user dhcpd -group dhcpd fxp0 rl0 However, netstat shows that dhcpd is listening on all interfaces: # netstat -nat | grep 67 udp4 0 0 *.67 *.* For me, that's no big deal. PF will make sure that no DHCP traffic will go through on the third interface. Cheers, --Serban Giuroiu ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
DHCPd Will Not Listen on the Correct Interface
Hello, everybody. I have a fresh install of FreeBSD 6.1-RELEASE on a machine with several NICs, and I need to run different DHCP servers for different subnets on different NICs. I installed isc-dhcp3-server-3.0.4_2 from ports with the default options enabled (of importance: DHCP_PARANOIA and DHCP_JAIL). These are the interfaces I need to run DHCPd on: fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 options=8VLAN_MTU inet6 fe80::2d0:b7ff:fee1:620f%fxp0 prefixlen 64 scopeid 0x1 inet 172.16.2.9 netmask 0xfc00 broadcast 172.16.3.255 ether 00:d0:b7:e1:62:0f media: Ethernet autoselect (100baseTX full-duplex) status: active rl0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 options=8VLAN_MTU inet6 fe80::250:baff:fed1:a75a%rl0 prefixlen 64 scopeid 0x2 inet 10.0.0.1 netmask 0xfc00 broadcast 10.0.3.255 ether 00:50:ba:d1:a7:5a media: Ethernet autoselect (100baseTX full-duplex) status: active According to the man page, dhcpd takes as a last argument the interface it should bind to. I run one dhcpd for the interface rl0 like so: /usr/local/sbin/dhcpd -cf /usr/local/etc/dhcpd.conf.rl0.10.0.0.0 -lf /var/db/dhcpd.leases.rl0.10.0.0.0 -pf /var/run/dhcpd.pid.rl0.10.0.0.0 -user dhcpd -group dhcpd rl0 ps ax | grep dhcp shows it running: 20463 ?? Is 0:00.00 /usr/local/sbin/dhcpd -cf /usr/local/etc/dhcpd.conf.rl0.10.0.0.0 -lf /var/db/dhcpd.leases.rl0.10.0.0.0 -pf /var/run/dhcpd.pid.rl0.10.0.0.0 -user dhcpd -group dhcpd rl0 However, it binds to all interfaces, not just rl0. netstat -nat | grep 67 confirms this: udp4 0 0 *.67 *.* Naturally, I cannot start any other DHCP servers on the other interface: # /usr/local/sbin/dhcpd -cf /usr/local/etc/dhcpd.conf.fxp0.172.16.0.0 -lf /var/db/dhcpd.leases.fxp0.172.16.0.0 -pf /var/run/dhcpd.pid.fxp0.172.16.0.0 -user dhcpd -group dhcpd fxp0 Internet Systems Consortium DHCP Server V3.0.4 Copyright 2004-2006 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Wrote 0 deleted host decls to leases file. Wrote 0 new dynamic host decls to leases file. Wrote 0 leases to leases file. Listening on BPF/fxp0/00:d0:b7:e1:62:0f/172.16.0/22 Sending on BPF/fxp0/00:d0:b7:e1:62:0f/172.16.0/22 Can't bind to dhcp address: Address already in use Please make sure there is no other dhcp server running and that there's no entry for dhcp or bootp in /etc/inetd.conf. Also make sure you are not running HP JetAdmin software, which includes a bootp server. After searching through Google, forums, and mailing lists, I have not encountered a post describing a similar situation. Does anybody know what the problem might be? Regards, --Serban Giuroiu ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: DHCPd Will Not Listen on the Correct Interface
Serban Giuroiu wrote: Hello, everybody. I have a fresh install of FreeBSD 6.1-RELEASE on a machine with several NICs, and I need to run different DHCP servers for different subnets on different NICs. I installed isc-dhcp3-server-3.0.4_2 from ports with the default options enabled (of importance: DHCP_PARANOIA and DHCP_JAIL). These are the interfaces I need to run DHCPd on: fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 [...] rl0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 What happens if you add them into /etc/rc.conf?: dhcpd_ifaces=fxp0 rl0 According to the man page, dhcpd takes as a last argument the interface it should bind to. I run one dhcpd for the interface rl0 like so: /usr/local/sbin/dhcpd -cf /usr/local/etc/dhcpd.conf.rl0.10.0.0.0 -lf /var/db/dhcpd.leases.rl0.10.0.0.0 -pf /var/run/dhcpd.pid.rl0.10.0.0.0 -user dhcpd -group dhcpd rl0 I prefer using: (necessary variables are declared in /etc/rc.conf) # /usr/local/etc/rc.d/isc-dhcpd.sh start After searching through Google, forums, and mailing lists, I have not encountered a post describing a similar situation. Does anybody know what the problem might be? I hope this helps. Cheers, Mikhail. -- Mikhail Goriachev Webanoide Telephone: +61 (0)3 62252501 Mobile Phone: +61 (0)4 38255158 E-Mail: [EMAIL PROTECTED] Web: http://www.webanoide.org PGP Key ID: 0x4E148A3B PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: DHCPd Will Not Listen on the Correct Interface
Serban Giuroiu wrote: I have a fresh install of FreeBSD 6.1-RELEASE on a machine with several NICs, and I need to run different DHCP servers for different subnets on different NICs. I installed isc-dhcp3-server-3.0.4_2 from ports with the default options enabled (of importance: DHCP_PARANOIA and DHCP_JAIL). Do you have a particular reason to run two daemons separately? In your dhcpd.conf you can specify multiple subnets and just start the daemon, dhcpd will send a reply matching the subnet of the interface a request was received on. It won't send replys on subnets it have no configuration for. The only advantage I see of your approach is that you can shut down the daemons separately, but I have never had a situation where I needed that Cheers, Erik -- Ph: +34.666334818 web: http://www.locolomo.org X.509 Certificate: http://www.locolomo.org/crt/8D03551FFCE04F0C.crt Key ID: 69:79:B8:2C:E3:8F:E7:BE:5D:C3:C3:B1:74:62:B8:3F:9F:1F:69:B9 smime.p7s Description: S/MIME Cryptographic Signature
Re: DHCPd Will Not Listen on the Correct Interface
On Saturday 22 July 2006 02:43, Erik Nørgaard wrote: Do you have a particular reason to run two daemons separately? In your dhcpd.conf you can specify multiple subnets and just start the daemon, dhcpd will send a reply matching the subnet of the interface a request was received on. It won't send replys on subnets it have no configuration for. I didn't think of that! I condensed my configuration into one file, and DHCPd is now happily serving both subnets. It's still listening on all interfaces, but a little PF magic will ensure that isn't a problem. Thanks for your help, --Serban Giuroiu ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: DHCPd Will Not Listen on the Correct Interface
Serban Giuroiu wrote: On Saturday 22 July 2006 02:43, Erik Nørgaard wrote: Do you have a particular reason to run two daemons separately? In your dhcpd.conf you can specify multiple subnets and just start the daemon, dhcpd will send a reply matching the subnet of the interface a request was received on. It won't send replys on subnets it have no configuration for. I didn't think of that! I condensed my configuration into one file, and DHCPd is now happily serving both subnets. It's still listening on all interfaces, but a little PF magic will ensure that isn't a problem. Instead of PF, you can control serving interfaces from /etc/rc.conf: dhcpd_ifaces=fxp0 rl0 Cheers, Mikhail. -- Mikhail Goriachev Webanoide Telephone: +61 (0)3 62252501 Mobile Phone: +61 (0)4 38255158 E-Mail: [EMAIL PROTECTED] Web: http://www.webanoide.org PGP Key ID: 0x4E148A3B PGP Key Fingerprint: D96B 7C14 79A5 8824 B99D 9562 F50E 2F5D 4E14 8A3B ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]