Linux dhcp client boot process with packets traffic


 
Thread Tools Search this Thread
Operating Systems Linux Linux dhcp client boot process with packets traffic
# 1  
Old 08-12-2010
Linux dhcp client boot process with packets traffic

Hi Everybody,

I would like to know the entire network packets exchange, sequence between a linux dhcp client workstation & dhcp server as client comes up starting from OS booting stage as network service starts to the time client gets dhcp IP address. This would be in a typical LAN environment.

Thanks in advance

Last edited by pludi; 08-12-2010 at 09:09 AM..
# 2  
Old 08-12-2010
The client doesn't really have much at all to do before DHCP happens. Without an IP address, all it can do is broadcast or non-IP communication.

Here's a dump of packets between a client and my DHCP server at work as it boots. There were also some IPv6 packets in there but they're irrelevant since we don't actually use IPv6 at present.
Code:
# The first non-ipv6 packet.
# The client, 00:08:c7:77:9a:a2, broadcasts a DHCP request across the
# entire network segment.
10:14:29.584192 00:08:c7:77:9a:a2 (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 342: 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:08:c7:77:9a:a2 (oui Unknown), length 300

# Our DHCP server, 00:23:54:d9:7f, gives a reply targeted specifically at
# 00:08:c7:77:9a:a2, to tell it to become IP 192.168.0.131.
# There may also be info such as default gateway, DNS servers,
# and PXE boot paths embedded in the reply.
10:14:29.584332 00:23:54:d9:7f:4e (oui Unknown) > 00:08:c7:77:9a:a2 (oui Unknown), ethertype IPv4 (0x0800), length 342: xxxx.xxxx.xxx.bootps > 192.168.0.131.bootpc: BOOTP/DHCP, Reply, length 300

# Here the client requests again for good measure, and gets the same reply.
10:14:29.586406 00:08:c7:77:9a:a2 (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 351: 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:08:c7:77:9a:a2 (oui Unknown), length 309
10:14:29.587720 00:23:54:d9:7f:4e (oui Unknown) > 00:08:c7:77:9a:a2 (oui Unknown), ethertype IPv4 (0x0800), length 342: xxxx.xxxx.xxx.bootps > 192.168.0.131.bootpc: BOOTP/DHCP, Reply, length 300

# Here the client, 00:08:c7:77:9a:a2, broadcasts an ARP who-has request
# across the segment to check if the DHCP server has given us a boneheaded
# occupied IP address.  Some DHCP clients, like windows ones, don't seem to
# check this, causing IP address conflicts should the DHCP server get
# rebooted.
#
# The downside to this doublethink is time wasted.  A process that
# hypothetically could be nearly instant can take many seconds when the
# client is paranoid.
10:14:29.590811 00:08:c7:77:9a:a2 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: arp who-has 192.168.0.131 tell 0.0.0.0
10:14:30.748326 00:08:c7:77:9a:a2 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: arp who-has 192.168.0.131 tell 0.0.0.0
10:14:32.670568 00:08:c7:77:9a:a2 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: arp who-has 192.168.0.131 tell 0.0.0.0

# About 5 seconds after the DHCP server sent its DHCP reply to the client,
# it sends an ARP request directly to the client's MAC address asking what
# IP address it has.
10:14:34.586710 00:23:54:d9:7f:4e (oui Unknown) > 00:08:c7:77:9a:a2 (oui Unknown), ethertype ARP (0x0806), length 42: arp who-has 192.168.0.131 tell xxx.xxx.xxx.xxx

# ...and does so again a second later.  The client missed the last one, busy contemplating the
# mysteries of life or something.
10:14:35.586665 00:23:54:d9:7f:4e (oui Unknown) > 00:08:c7:77:9a:a2 (oui Unknown), ethertype ARP (0x0806), length 42: arp who-has 192.168.0.131 tell xxxx.xxxx.xxx

# The client sends an ARP reply directed to the DHCP server finally.
10:14:35.586921 00:08:c7:77:9a:a2 (oui Unknown) > 00:23:54:d9:7f:4e (oui Unknown), ethertype ARP (0x0806), length 60: arp reply 192.168.0.131 is-at 00:08:c7:77:9a:a2 (oui Unknown)

# This particular interface on the client is configured for two IP addresses:
# one gets set by DHCP, the other is statically set to 192.168.0.2.
#
# To be polite, the client broadcasts an ARP request asking if anyone else
# has 192.168.0.2.
10:14:36.023579 00:08:c7:77:9a:a2 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: arp who-has 192.168.0.2 (Broadcast) tell 0.0.0.0
10:14:36.866266 00:08:c7:77:9a:a2 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: arp who-has 192.168.0.131 tell 192.168.0.131

# After one second, having received no answer, it asks again.
10:14:37.023771 00:08:c7:77:9a:a2 (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: arp who-has 192.168.0.2 (Broadcast) tell 0.0.0.0

# After here ARP requests are still sent to/from it from time to time but the interface is obviously already up.


Last edited by Corona688; 08-12-2010 at 02:04 PM..
# 3  
Old 08-13-2010
Hi,

Thanks for the help, appreciate it.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Red Hat

Linux Boot Process

Explain Linux Boot Process??? (1 Reply)
Discussion started by: tejaschache
1 Replies

2. IP Networking

DHCP client's IP release query

Hi All, I have two doubts here in DHCP Solaris environment.. could anyone please clarify me? 1. If a new client comes up and it needs an IP to be assigned by a DHCP server, how can it communicate with the DHCP server in the first case without any IP? The SUN doc says something about "BOOTP"... (4 Replies)
Discussion started by: satish51392111
4 Replies

3. UNIX for Dummies Questions & Answers

Linux DHCP Release on boot

Hi All- I have an assigned static IP address on my Linux box and was wondering if there is a way to change that to a DHCP without actually logging in? Possibly a hot key I can press prioir to login? I am running Centos Thanks! (0 Replies)
Discussion started by: jvpike
0 Replies

4. AIX

How to set dhcp client by using commands

Hi, I have used "smit tcpip" to setup dhcp client but it does not work. Don't know why. Now I want to try using commands to do the job. I have studied commands chdev and mktcpip but did not find howto. Please help. Thank you! (1 Reply)
Discussion started by: aixlover
1 Replies

5. UNIX for Advanced & Expert Users

DHCP client question

hi all, In dhcp client , how to specify no of retiral attempts for getting IP ? man dhclient.conf - has rery timeout but i m looking for attempts Also option nwip.autoretries uint8; - i guess this is for dhcpd server I basically want to expire after the first attempt. Any... (1 Reply)
Discussion started by: ramchan10
1 Replies

6. SCO

dhcp client

I have openserver 5.0.7 running on a machine and would like to know how to configure a dhcp client for it and make it run at startup. Thank you. (1 Reply)
Discussion started by: izzzy
1 Replies

7. IP Networking

PUMP DHCP Client

I'm currently using red hat 6.1 and PUMP DHCP Client, I have a Cable Modem from which I aquire my leases. I've configured the lcient corrctly to the best of my knowledge and if get assigned an IP address on the subnet for my local Ubr, however when I go to use any HTTP based program all my requests... (1 Reply)
Discussion started by: r00t.$h3ll
1 Replies

8. IP Networking

Howto configure AIX DHCP Client ?

I use DHCP on my AIX box at home . I want to connect to my Cable ISP as a DHCP Client . the thing I did was this : smit Communications Applications and Services TCP/IP Use DHCP for TCPIP Configuration and Startup "Select the interface you want to use" en0 "Enter a hostname" OK after... (3 Replies)
Discussion started by: zumbi
3 Replies

9. IP Networking

DHCP client & ipchains headache

Hi all, I upgraded my SUSE 6.1 to SUSE 7.1 and at once the following things won't work anymore: 1) My DHCP client is not able anymore to retrieve my IP address from the @home server. It times out all the time. If I use a fixed IP I can get on the net, so there is no physical problem. 2) I... (3 Replies)
Discussion started by: Micky
3 Replies
Login or Register to Ask a Question