Re: DHCP hostname

From: Bit Gossip (bit.gossip@chello.nl)
Date: Fri Jul 27 2007 - 15:56:49 ART


The only way I managed to set the hostname of a router is via autoinstall so
far
But that is kind of extreme way to do it....

Cheers,
bit.

----- Original Message -----
From: "Alexei Monastyrnyi" <alexeim@orcsoftware.com>
To: "Bit Gossip" <bit.gossip@chello.nl>
Cc: <ccielab@groupstudy.com>
Sent: Thursday, July 26, 2007 5:31 PM
Subject: Re: DHCP hostname

> Hi there.
>
> It seems like IOS DHCP client does not request this option (12) from the
> server. DocCD is a bit misleading here, or maybe it is me
> misinterpreting it.
>
> http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cg/hiad_c/ch10/hipdhcpc.htm#wp1053063
>
> If on server side we have something like this:
>
> ip dhcp pool FRS-DHCP
> host 192.168.12.4 255.255.255.192
> client-identifier cc1e
> default-router 192.168.12.3
> dns-server 172.16.12.33 172.16.12.34
> client-name frs-dhcp
> lease infinite
>
> And on the client side something along these lines:
>
> interface FastEthernet0/0
> no ip dhcp client request netbios-nameserver
> ip dhcp client client-id hex CC1E
> ip address dhcp
>
> The client requests the following options by default:
>
> R3(config-if)#ip dhcp client request ?
> dns-nameserver DNS nameserver (6)
> domain-name Domain name (15)
> netbios-nameserver NETBIOS nameserver (44)
> router Default router option (3)
> static-route Static route option (33)
> tftp-server-address TFTP server address (150)
> vendor-specific Vendor specific option (43)
> <cr>
>
> And snoop confirms it all but option 44, as per client's config:
>
> DHCP: ----- (Options) field options -----
> DHCP:
> DHCP: Message type = DHCPREQUEST
> DHCP: Maximum DHCP Message Size = 1152 bytes
> DHCP: Client Identifier = 0xCC 0x1E (unprintable)
> DHCP: DHCP Server Identifier = 192.168.12.1
> DHCP: Requested IP Address = 192.168.12.4
> DHCP: IP Address Lease Time = -1 seconds
> DHCP: Client Hostname = R3
> DHCP: Requested Options:
> DHCP: 1 (Subnet Mask)
> DHCP: 6 (DNS Servers)
> DHCP: 15 (DNS Domain Name)
> DHCP: 3 (Router)
> DHCP: 33 (Static Routes)
> DHCP: 150 (Site Option)
> DHCP: 43 (Vendor Specific Options)
>
> Here is what options are received, output from snoop:
>
> DHCP: ----- (Options) field options -----
> DHCP:
> DHCP: Message type = DHCPACK
> DHCP: DHCP Server Identifier = 192.168.12.1
> DHCP: IP Address Lease Time = -1 seconds
> DHCP: Renewal (T1) Time Value = 2147483647 seconds
> DHCP: Rebinding (T2) Time Value = 536870911 seconds
> DHCP: Subnet Mask = 255.255.255.192
> DHCP: Router at = 192.168.12.3
> DHCP: DNS Servers at = 172.16.12.33
> DHCP: DNS Servers at = 172.16.12.34
> DHCP: DNS Domain Name = cisco.com
>
> And on the client we see:
>
> *Jul 26 22:15:42.033: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0
> assigned DHCP address 192.168.12.4, mask 255.255.255.192, hostname R3
>
> So... no host name via DHCP for IOS clients, to my understanding. Not a
> bigger loss though. :-)
>
> HTH,
> A.
>
> on 7/26/2007 12:13 PM Bit Gossip wrote:
>> In my setup I have a router getting its ip from a DHCP server R5 via DHCP
>> and
>> manual binding. It gets correctly the IP, mask, default-router and
>> domain, but
>> it doesn't get the hostname.
>> Any suggestion:
>>
>> R5:
>> ip dhcp pool POOL-R6
>> host 155.1.146.66 255.255.255.128
>> client-identifier
>> 0063.6973.636f.2d30.3030.372e.6562.6263.2e62.3861.302d.4661.302f.30
>> default-router 155.1.146.4
>> domain-name cisco.com
>> client-name R6
>>
>> *Mar 3 15:25:44.988: DHCPD: Sending notification of DISCOVER:
>> *Mar 3 15:25:44.988: DHCPD: htype 1 chaddr 0007.ebbc.b8a0
>> *Mar 3 15:25:44.988: DHCPD: circuit id 01f80000
>> *Mar 3 15:25:44.988: DHCPD: DHCPDISCOVER received from client
>> 0063.6973.636f.2d30.3030.372e.6562.6263.2e62.3861.302d.4661.302f.30
>> through
>> relay 155.1.146.4.
>> *Mar 3 15:25:44.988: DHCPD: Seeing if there is an internally specified
>> pool
>> class:
>> *Mar 3 15:25:44.988: DHCPD: htype 1 chaddr 0007.ebbc.b8a0
>> *Mar 3 15:25:44.988: DHCPD: circuit id 01f80000
>> *Mar 3 15:25:44.992: DHCPD: Sending DHCPOFFER to client
>> 0063.6973.636f.2d30.3030.372e.6562.6263.2e62.3861.302d.4661.302f.30
>> (155.1.146.66).
>> *Mar 3 15:25:44.992: DHCPD: unicasting BOOTREPLY for client
>> 0007.ebbc.b8a0 to
>> relay 155.1.146.4.
>> *Mar 3 15:25:45.124: DHCPD: DHCPREQUEST received from client
>> 0063.6973.636f.2d30.3030.372e.6562.6263.2e62.3861.302d.4661.302f.30.
>> *Mar 3 15:25:45.124: DHCPD: Sending notification of ASSIGNMENT:
>> *Mar 3 15:25:45.124: DHCPD: address 155.1.146.66 mask 255.255.255.128
>> *Mar 3 15:25:45.124: DHCPD: lease time remaining (secs) = 4294967295
>> *Mar 3 15:25:45.124: DHCPD: Appending default domain from pool
>> *Mar 3 15:25:45.124: DHCPD: Using hostname 'Router.cisco.com.' for
>> dynamic
>> update (from hostname option)
>> *Mar 3 15:25:45.124: DHCPD: Sending DHCPACK to client
>> 0063.6973.636f.2d30.3030.372e.6562.6263.2e62.3861.302d.4661.302f.30
>> (155.1.146.66).
>> *Mar 3 15:25:45.128: DHCPD: unicasting BOOTREPLY for client
>> 0007.ebbc.b8a0 to
>> relay 155.1.146.4.
>>
>> _______________________________________________________________________
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Sat Aug 18 2007 - 08:17:42 ART