I connected my rPi to my iPhone via Bluetooth and configured bluetooth interface in the following way in /etc/network interfaces:
# iPhone via Bluetooth
allow-hotplug bnep0
iface bnep0 inet dhcp
It gets an IP address from the phone and the internet connection works but for some reason dhclient keeps sending DHCP discovery requests to that interface even after the address was obtained. This extract is from /var/log/syslog:
Oct 18 08:00:36 raspberrypi dhclient: Internet Systems Consortium DHCP Client 4.2.2
Oct 18 08:00:36 raspberrypi dhclient: Copyright 2004-2011 Internet Systems Consortium.
Oct 18 08:00:36 raspberrypi dhclient: All rights reserved.
Oct 18 08:00:36 raspberrypi dhclient: For info, please visit https://www.isc.org/software/dhcp/
Oct 18 08:00:36 raspberrypi dhclient:
Oct 18 08:00:36 raspberrypi dhclient: Listening on LPF/bnep0/00:1b:10:00:2a:ec
Oct 18 08:00:36 raspberrypi dhclient: Sending on LPF/bnep0/00:1b:10:00:2a:ec
Oct 18 08:00:36 raspberrypi dhclient: Sending on Socket/fallback
Oct 18 08:00:36 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 8
Oct 18 08:00:36 raspberrypi dhclient: DHCPREQUEST on bnep0 to 255.255.255.255 port 67
Oct 18 08:00:36 raspberrypi dhclient: DHCPOFFER from 172.20.10.1
Oct 18 08:00:36 raspberrypi dhclient: DHCPACK from 172.20.10.1
Oct 18 08:00:36 raspberrypi dhclient: bound to 172.20.10.13 -- renewal in 40353 seconds.
…
Oct 18 08:05:45 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 5
Oct 18 08:05:50 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 7
Oct 18 08:05:57 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 10
Oct 18 08:06:07 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 10
Oct 18 08:06:17 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 14
Oct 18 08:06:31 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 15
Oct 18 08:06:46 raspberrypi dhclient: No DHCPOFFERS received.
Oct 18 08:06:46 raspberrypi dhclient: No working leases in persistent database - sleeping.
Oct 18 08:12:16 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 6
Oct 18 08:12:22 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 9
Oct 18 08:12:31 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 12
Oct 18 08:12:43 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 17
Oct 18 08:13:00 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 16
Oct 18 08:13:16 raspberrypi dhclient: DHCPDISCOVER on bnep0 to 255.255.255.255 port 67 interval 1
Oct 18 08:13:17 raspberrypi dhclient: No DHCPOFFERS received.
Oct 18 08:13:17 raspberrypi dhclient: No working leases in persistent database - sleeping.
And so on, ad infinitum. At this point the rPi already has the IP address and the internet connection works.
I also run dhcpdump and every minute or so there is an exchange of DHCP packets between the phone and rPi of this kind:
TIME: 2013-10-16 22:24:14.540
IP: 0.0.0.0 (0:1b:10:0:2a:ec) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: feee6720
SECS: 37
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:1b:10:00:2a:ec:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 50 ( 4) Request IP address 172.20.10.13
OPTION: 12 ( 11) Host name raspberrypi
OPTION: 55 ( 13) Parameter Request List 1 (Subnet mask)
28 (Broadcast address)
2 (Time offset)
3 (Routers)
15 (Domainname)
6 (DNS server)
119 (Domain Search)
12 (Host name)
44 (NetBIOS name server)
47 (NetBIOS scope)
26 (Interface MTU)
121 (Classless Static Route)
42 (NTP servers)
---------------------------------------------------------------------------
TIME: 2013-10-16 22:24:14.712
IP: 172.20.10.1 (66:4c:c:bc:68:64) > 172.20.10.13 (0:1b:10:0:2a:ec)
OP: 2 (BOOTPREPLY)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: feee6720
SECS: 0
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 172.20.10.13
SIADDR: 172.20.10.1
GIADDR: 0.0.0.0
CHADDR: 00:1b:10:00:2a:ec:00:00:00:00:00:00:00:00:00:00
SNAME: Ollies-iPhone.
FNAME: .
OPTION: 53 ( 1) DHCP message type 2 (DHCPOFFER)
OPTION: 54 ( 4) Server identifier 172.20.10.1
OPTION: 51 ( 4) IP address leasetime 85536 (23h45m36s)
OPTION: 1 ( 4) Subnet mask 255.255.255.240
OPTION: 3 ( 4) Routers 172.20.10.1
OPTION: 6 ( 4) DNS server 172.20.10.1
---------------------------------------------------------------------------
TIME: 2013-10-16 22:24:26.265
IP: 0.0.0.0 (0:1b:10:0:2a:ec) > 255.255.255.255 (ff:ff:ff:ff:ff:ff)
OP: 1 (BOOTPREQUEST)
HTYPE: 1 (Ethernet)
HLEN: 6
HOPS: 0
XID: feee6720
SECS: 49
FLAGS: 0
CIADDR: 0.0.0.0
YIADDR: 0.0.0.0
SIADDR: 0.0.0.0
GIADDR: 0.0.0.0
CHADDR: 00:1b:10:00:2a:ec:00:00:00:00:00:00:00:00:00:00
SNAME: .
FNAME: .
OPTION: 53 ( 1) DHCP message type 1 (DHCPDISCOVER)
OPTION: 50 ( 4) Request IP address 172.20.10.13
OPTION: 12 ( 11) Host name raspberrypi
OPTION: 55 ( 13) Parameter Request List 1 (Subnet mask)
28 (Broadcast address)
2 (Time offset)
3 (Routers)
15 (Domainname)
6 (DNS server)
119 (Domain Search)
12 (Host name)
44 (NetBIOS name server)
47 (NetBIOS scope)
26 (Interface MTU)
121 (Classless Static Route)
42 (NTP servers)
I don't think it should do this since the lease time is way longer than what those messages would imply. The question is – why does it do that and how to stop it?