The IOS "ip address dhcp" interface command

Unanswered Question
Jun 27th, 2003

I'm working on getting a router with an IOS current enough to use this new option for obtaining an IP address for an interface via DHCP. Pretty cool. Quick question I have is if I use that to just get an IP address for a specific Ethernet interface (not for full config of the router), I would assume that a "show int" or "show ip int" command would show the IP address that was acquired via DHCP for the interface, correct?

A related question would be if the other data acquired via DHCP like default gateway would/could be pulled in and if what is pulled in can be controlled. I'm sure this is detailed on CCO someplace, but was hoping to get these 2 questions answered quick until I have time for more intense digging.

Thanks.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 0 (0 ratings)
thisisshanky Fri, 06/27/2003 - 06:30

Once you configure the command under the interface you should get a similar message

Interface assigned DHCP address , mask

You should be able to verify this by using "sh ip interface "

or "sh ip interface brief" should tell you the same, with the method of obtaining that ip address listed as DHCP.

You can also see the same using "show interface "

Regarding your second question. Once the DHCP ip address is obtained, a default static route comes up automatically in the ip routing table with an administrative distance of 254 and cost of 0. The next hop would be the default gateway assigned via DHCP.

It would look like this, when u give a "show ip route"

S* 0.0.0.0/0 [254/0] via

where next-hop is the default gateway assigned by the DHCP server.

You can control this or change this by giving a local default static route with lower admin distance, so that, this route is preferred.

ip route 0.0.0.0 0.0.0.0 X

where next-hop is the new gateway that you want to use, and X is a value lesser than 254.

Hope that helps

Actions

Login or Register to take actions

This Discussion

Posted June 27, 2003 at 5:50 AM
Stats:
Replies:1 Avg. Rating:
Views:350 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard

Rank Username Points
1 2,069
2 1,732
3 1,675
4 1,624
5 1,529