Cisco devices can be configured as DHCP clients to receive IPv4 or IPv6 addresses dynamically, rather than always acting as DHCP servers. This coverage includes the interface-level commands for DHCP and SLAAC assignment, along with key show commands for verification.
Cisco DHCP Client Setup
We have talked a lot about setting up Cisco equipment as servers — that is, Cisco devices handing out IP addresses and information to the clients. But there are times when you want the Cisco device itself to be a client and be able to get an IP address from a server. So let's talk about how to set up Cisco devices to be DHCP clients and get IP addresses.
Right here we have a network that, let's say, we want to connect out to the outside world, so we're going to connect to some sort of ISP router that's out there. What they may do is say, we are going to give you an IP address, and it might be static, or it might be through some sort of dynamic host configuration protocol, or SLAAC, or something to that effect here on the outside world. So what we need to do is get onto that device to configure it, so it can accept an IP address or be able to autoconfigure an IP address.
I'm on switch one, and what I need to do is get onto the interface that's going to accept the IP address. In this scenario right here — I'll bring up my network diagram — I'm on this switch right here, and I have a connection between here and the router, and let's say I want that connection to be set up for some sort of autoconfiguration or some sort of DHCP. That interface right there is interface VLAN 9, so that's the one that I'm going to configure here.
Let's get into that interface. I'm going to get into the global configuration mode, interface VLAN 9. It's actually pretty easy to set up: ip address dhcp. What that does is set up the interface to accept an IPv4 address via DHCP.
Then the similar command is ipv6 address dhcp, and now we'll accept an IPv6 address from a DHCP server. Now, we know that typically we want to try to avoid using DHCP servers — I mean, we prefer, I'll put it that way, we prefer using SLAAC for this interface instead. So the command for using SLAAC would be ipv6 address autoconfig. Now that's set up for it.
Some of the show commands that we would use for troubleshooting, or to take a look at the settings, are going to be kind of boring here, because we don't have a DHCP server on the other side. But what I can do is just run through a couple of the commands that I'd use to take a look at the information.
Such as show ip interface, and then we're taking a look at VLAN 9, and then I could pick out different pieces of information. We can see internet address will be negotiated versus DHCP, so that's interesting there.
Then what we can do is a show ipv6 dhcp interface. You can see, once again, I don't have a lot of information here because nothing has been set on here, but I can see some information about the binding.
Then I can also do a show ipv6 interface brief. This is one of my favorites here. We can see some information here, in which case we see some of the statically assigned stuff or the autoconfiguration stuff.
So there is just some show commands to do this. Once again, this would be to set up one of the interfaces to receive a dynamic IP address, or to autoconfigure that interface, so we can connect it into maybe an internet service provider or maybe some other device that we don't have control over.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →