View previous topic :: View next topic |
Author |
Message |
Kalin Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/5347601853e9d846a98f6c.jpg)
Joined: 22 Dec 2002 Posts: 130 Location: Germany
|
Posted: Tue Dec 04, 2012 11:19 am Post subject: dhclient problem with multiple interfaces |
|
|
Hello,
I recently started using two interfaces connected at the same time and am having problems with running dhclient on both at the same time. It seems that two separate dhclient processes are started, but they both try to DHCPREQUEST on both interfaces.
Starting net.eth0 here is the relevant syslog:
Code: |
2012-12-04T19:52:22+09:00 (daemon.info) [dhclient] DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
2012-12-04T19:52:23+09:00 (daemon.info) [dhclient] DHCPREQUEST on eth0 to 255.255.255.255 port 67
2012-12-04T19:52:23+09:00 (daemon.info) [dhclient] DHCPOFFER from 10.81.1.1
2012-12-04T19:52:23+09:00 (daemon.info) [dhclient] DHCPACK from 10.81.1.1
2012-12-04T19:52:23+09:00 (daemon.info) [dhclient] bound to 10.81.1.194 -- renewal in 36475 seconds.
|
then start net.wlan0
Code: |
2012-12-04T19:53:06+09:00 (user.notice) [wpa_cli] interface wlan0 CONNECTED
2012-12-04T19:53:08+09:00 (daemon.info) [dhclient] DHCPREQUEST on eth0 to 255.255.255.255 port 67
2012-12-04T19:53:08+09:00 (daemon.info) [dhclient] DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
2012-12-04T19:53:08+09:00 (daemon.info) [dhclient] DHCPREQUEST on wlan0 to 255.255.255.255 port 67
2012-12-04T19:53:08+09:00 (daemon.info) [dhclient] DHCPOFFER from 192.168.100.254
2012-12-04T19:53:08+09:00 (daemon.info) [dhclient] DHCPACK from 192.168.100.254
2012-12-04T19:53:08+09:00 (daemon.info) [dhclient] bound to 192.168.100.101 -- renewal in 43021 seconds.
2012-12-04T19:53:08+09:00 (daemon.info) [dhclient] DHCPACK from 10.81.1.1
2012-12-04T19:53:08+09:00 (daemon.info) [dhclient] bound to 10.81.1.194 -- renewal in 35384 seconds.
|
At this moment there are two dhclient processes which seems OK:
Code: |
# ps -Af|grep dhclient |grep -v grep
root 24575 1 0 19:52 ? 00:00:00 /sbin/dhclient -e PEER_NTP=no -e IF_METRIC=2 -q -1 -pf /var/run/dhclient-eth0.pid eth0
root 24949 1 0 19:53 ? 00:00:00 /sbin/dhclient -e PEER_NTP=no -e IF_METRIC=2003 -q -1 -pf /var/run/dhclient-wlan0.pid wlan0
|
But if I stop net.wlan0:
Code: |
2012-12-04T20:05:06+09:00 (daemon.info) [dhclient] DHCPRELEASE on eth0 to 10.81.1.1 port 67
2012-12-04T20:05:06+09:00 (daemon.info) [dhclient] DHCPRELEASE on wlan0 to 192.168.100.254 port 67
|
eth0 is also DHCPRELEASEd :(
Relevant config:
Code: |
# uname -a
Linux ss3 3.6.3 #1 SMP Tue Oct 23 00:46:51 JST 2012 x86_64 Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz GenuineIntel GNU/Linux
# cat /etc/conf.d/net
modules="wpa_supplicant iproute2 dhclient"
config_eth0="dhcp"
dhcp_eth0="release nontp nonis"
config_wlan0="dhcp"
dhcp_wlan0="release nontp nonis"
# eix_related
[I] net-misc/dhcp
Installed versions: 4.2.4_p2(2012-12-04 19:31)(client server ssl -ipv6 -ldap -selinux -vim-syntax KERNEL="linux")
[I] net-wireless/wpa_supplicant
Installed versions: 1.0-r2(2012-11-27 05:01)(dbus gnutls qt4 readline ssl wimax -ap -eap-sim -fasteap -madwifi -p2p -ps3 -selinux -wps KERNEL="linux -FreeBSD")
[I] net-wireless/wireless-tools
Installed versions: 29(2012-11-17 01:39)(nls -multicall)
[I] sys-apps/baselayout
Installed versions: 2.1-r1(2012-06-02 15:02)(-build KERNEL="linux")
[I] sys-apps/sysvinit
Installed versions: 2.88-r4(2012-11-09 13:26)(-ibm -selinux -static KERNEL="-FreeBSD")
|
Any ideas? How to tell dhclient to release only IPs that are bound to the interface it binds to? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Kalin Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/5347601853e9d846a98f6c.jpg)
Joined: 22 Dec 2002 Posts: 130 Location: Germany
|
Posted: Tue Dec 04, 2012 11:29 am Post subject: |
|
|
I tried fiddling with /lib64/rc/net/dhclient.sh and passing a separate leasefile per interface (-lf), but when the 2nd dhclient is started it records both eth0 and wlan0 in there :( |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|