cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2569
Views
0
Helpful
9
Replies

router as dhcp server,

sarahr202
Level 5
Level 5

     Hi everybody

I am reading about how to configure cisco router as dhcp server and troublshoot any issue related to it

I performed this lab as shown below:             

R1--f0/0-199.199.19.0--R2---198.198.198.0----R4

R1 is configured as dhcp client

R2 is dhcp relay agent

R4 is dhcp server.

R1 f0/0 mac address: c000.211c.0000

Below is dhcp ack sent by R4( dhcp server) to R2( relay agent):

No.     Time        Source                Destination           Protocol Length Info
    760 2618.315000 198.198.198.4         199.199.199.2         DHCP     342    DHCP ACK      - Transaction ID 0x1208

Frame 760: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits)
Ethernet II, Src: c0:03:21:1c:00:00 (c0:03:21:1c:00:00), Dst: c0:01:21:1c:00:10 (c0:01:21:1c:00:10)
Internet Protocol Version 4, Src: 198.198.198.4 (198.198.198.4), Dst: 199.199.199.2 (199.199.199.2)
User Datagram Protocol, Src Port: bootps (67), Dst Port: bootps (67)
Bootstrap Protocol
    Message type: Boot Reply (2)
    Hardware type: Ethernet
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x00001208
    Seconds elapsed: 0
    Bootp flags: 0x8000 (Broadcast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 199.199.199.1 (199.199.199.1)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 199.199.199.2 (199.199.199.2)
    Client MAC address: c0:00:21:1c:00:00 (c0:00:21:1c:00:00)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: DHCP
    Option: (t=53,l=1) DHCP Message Type = DHCP ACK
    Option: (t=54,l=4) DHCP Server Identifier = 198.198.198.4
    Option: (t=51,l=4) IP Address Lease Time = 1 day
    Option: (t=58,l=4) Renewal Time Value = 12 hours
    Option: (t=59,l=4) Rebinding Time Value = 21 hours
    Option: (t=12,l=13) Host Name = "R1.lab.local."
    Option: (t=1,l=4) Subnet Mask = 255.255.255.0
    End Option
    Padding

Above we can see R1 f0/0 is being assigned 199.199.199.1. Lets confirm it.

R1#show ip int brief

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            199.199.199.1   YES DHCP   up                    up

Now When I check the dhcp binding at R4, I should have found 199.199.199.1---->  c0:00:21:1c:00:00 ( R1 f0/0 mac address)

However, I found something completely different:

R4#show ip dhcp binding

Bindings from all pools not associated with VRF:

IP address          Client-ID/              Lease expiration        Type

                    Hardware address/

                    User name

199.199.199.1      0063.6973.636f.2d63.    Mar 02 2002 12:57 AM    Automatic

                   3030.302e.3231.3163.

                    2e30.3030.302d.4661.

                    302f.30

None of the highlighted mac address matches the R1 f0/0 mac c0:00:21:1c:00:00

What is the issue here?

why do we have  more than one mac bind to 199.199.199.1?

Where do  these mac addresses come from?

thanks and have a great day.

5 Accepted Solutions

Accepted Solutions

singhaam007
Level 3
Level 3

Hello Sarah,

please try this command

R4#show ip dhcp binding 199.199.199.1 and see what is the output.

thanks

View solution in original post

hello Sarah,

its look like its default server automatic behaviour.

if you do

# debug ip dhcp server packets

it will show you in loggs that  0063.6973.636f.2d63.3030.302e.3266.6130.2e30.3030.302d.4661.302f.30 is one mca adress

R2#
*Oct 24 16:44:19.015: DHCPD: Sending notification of DISCOVER:
*Oct 24 16:44:19.015: DHCPD: htype 1 chaddr 0018.b9cd.bef0
*Oct 24 16:44:19.015: DHCPD: remote id 020a0000ac10170200000000
*Oct 24 16:44:19.015: DHCPD: circuit id 00000000
4 - 15 CCNP: Building Scalable Internetworks v5.0 - Lab 5-5 Copyright    2006, Cisco Systems, Inc
*Oct 24 16:44:19.015: DHCPD: DHCPDISCOVER received from client
0063.6973.636f.2d30.3031.382e.6239.6364.2e62.6566.302d.4661.302f.30 on
interface FastEthernet0/0.
*Oct 24 16:44:19.015: DHCPD: Seeing if there is an internally specified pool
class:
*Oct 24 16:44:19.015: DHCPD: htype 1 chaddr 0018.b9cd.bef0

so in end you will get similar answer.

R2# show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
172.16.23.101 0063.6973.636f.2d30. Oct 25 2006 10:20 PM Automatic
3031.382e.6239.6364.
2e62.6566.302d.4661.
302f.30

you can try manual binding if you want hope fully this will bit diffrent.

thanks

View solution in original post

Hi Sarah,

this string is not the MAC address but the client-identifier.

0063.6973.636f.2d30.3031.382e.6239.6364.2e62.6566.302d.4661.302f.30

   is   cisco-0018.b9cd.bad0.Fa0/0  in Hex.

You can change this behaviour with the command ip address dhcp  client-id fastethernet0/0  and then you'll see the MAC

address of the interface as client-identifier.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

View solution in original post

Hi,

http://www.asciitable.com/

63 in hex is 99 in decimal and the ascii code for decimal 99 is lower case c

69 in hex is 105 in decimal which is ascci code for lowercase i. and so on...

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

View solution in original post

Hi Sarah,

http://blog.ioshints.info/2007/08/default-dhcp-client-id.html

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

View solution in original post

9 Replies 9

singhaam007
Level 3
Level 3

Hello Sarah,

please try this command

R4#show ip dhcp binding 199.199.199.1 and see what is the output.

thanks

Hi Singh

I recreated the lab as shown below, still same result.

R1 f0/0----------f0/0--R2---------------------R3

R1 dhcp client

R2 dhcp relay agent

R3  dhcp server.

R3#show ip dhcp binding 199.199.199.1

IP address          Client-ID/              Lease expiration        Type

                    Hardware address/

                    User name

199.199.199.1       0063.6973.636f.2d63.    Mar 02 2002 12:06 AM    Automatic

                    3030.302e.3266.6130.

                    2e30.3030.302d.4661.

                    302f.30

R1#show int f0/0

FastEthernet0/0 is up, line protocol is up

  Hardware is Gt96k FE, address is c000.2fa0.0000 (bia c000.2fa0.0000)

R1#show ip int brief

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            199.199.199.1   YES DHCP   up                    up

Thanks

hello Sarah,

its look like its default server automatic behaviour.

if you do

# debug ip dhcp server packets

it will show you in loggs that  0063.6973.636f.2d63.3030.302e.3266.6130.2e30.3030.302d.4661.302f.30 is one mca adress

R2#
*Oct 24 16:44:19.015: DHCPD: Sending notification of DISCOVER:
*Oct 24 16:44:19.015: DHCPD: htype 1 chaddr 0018.b9cd.bef0
*Oct 24 16:44:19.015: DHCPD: remote id 020a0000ac10170200000000
*Oct 24 16:44:19.015: DHCPD: circuit id 00000000
4 - 15 CCNP: Building Scalable Internetworks v5.0 - Lab 5-5 Copyright    2006, Cisco Systems, Inc
*Oct 24 16:44:19.015: DHCPD: DHCPDISCOVER received from client
0063.6973.636f.2d30.3031.382e.6239.6364.2e62.6566.302d.4661.302f.30 on
interface FastEthernet0/0.
*Oct 24 16:44:19.015: DHCPD: Seeing if there is an internally specified pool
class:
*Oct 24 16:44:19.015: DHCPD: htype 1 chaddr 0018.b9cd.bef0

so in end you will get similar answer.

R2# show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
172.16.23.101 0063.6973.636f.2d30. Oct 25 2006 10:20 PM Automatic
3031.382e.6239.6364.
2e62.6566.302d.4661.
302f.30

you can try manual binding if you want hope fully this will bit diffrent.

thanks

Hi Sarah,

this string is not the MAC address but the client-identifier.

0063.6973.636f.2d30.3031.382e.6239.6364.2e62.6566.302d.4661.302f.30

   is   cisco-0018.b9cd.bad0.Fa0/0  in Hex.

You can change this behaviour with the command ip address dhcp  client-id fastethernet0/0  and then you'll see the MAC

address of the interface as client-identifier.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Thanks Alain

0063.6973.636f.2d30.3031.382e.6239.6364.2e62.6566.302d.4661.302f.30

   is   cisco-0018.b9cd.bad0.Fa0/0  in Hex.

The highligted numbers are already in hex

How can we  say

0063.6973.636f.2d30.3031.382e.6239.6364.2e62.6566.302d.4661.302f.30

   is   cisco-0018.b9cd.bad0.Fa0/0  in Hex.?

Hi,

http://www.asciitable.com/

63 in hex is 99 in decimal and the ascii code for decimal 99 is lower case c

69 in hex is 105 in decimal which is ascci code for lowercase i. and so on...

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Hi Alain

0063.6973.636f.2d30.3031.382e.6239.6364.2e62.6566.302d.4661.302f.30

You are saying the above string is in hex, and its ASCI representation is:

cisco-0018.b9cd.bad0.Fa0/0

Is that correct?

But i thought mac address is written in hex.

thanks


Hi Sarah,

http://blog.ioshints.info/2007/08/default-dhcp-client-id.html

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

thanks Alain.  I got it. Nice link

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card