IP Domain-name Command on CISCO Router/Switch


IP Domain-name


This command allows you to set a domain name for the router.


Router(config)#ip domain-name <name>


In the below example, we set R1 to have a domain name of “cisco.com”.

R1(config)#ip domain-name cisco.com

Now if we check show cdp neighbors on R2 we see that R1 has a domain name appended to it..

R2(config)#do show cdp neighbor
Capability Codes: R – Router, T – Trans Bridge, B – Source Route Bridge
S – Switch, H – Host, I – IGMP, r – Repeater

Device ID Local Intrfce Holdtme Capability Platform Port ID
R3 Fas 1/0 160 R S I 3640 Fas 0/0
R1.cisco.com Fas 0/0 161 R S I 3640 Fas 0/0