Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cisco 1751 obtaining IP address 1

Status
Not open for further replies.

tyl3r32

Technical User
Jul 1, 2008
19
US
I believe I have an easy question. I have a Cisco 1751 router that I am currently using as a router-on-a-stick because I have only 1 Ethernet port and that has 4 sub interfaces on it. Currently, I have this in a little lab area with no access to an external network. I was trying to set this up to obtain an IP address automatically, so just to try it out, I unplugged my 2950 switch from the ethernet port on the router, plugged a cable from the router into the network where I currently gain access to internet from my PC. There is a DHCP server on the network, so I set the router up to obtain an IP through DHCP:

interface FastEthernet0/0
ip address dhcp
speed auto
!
interface FastEthernet0/0.2
encapsulation dot1Q 2 native
ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0.3
encapsulation dot1Q 3
ip address 192.168.168.254 255.255.255.0
!
interface FastEthernet0/0.4
encapsulation dot1Q 4
ip address 10.10.0.1 255.255.255.0
!
interface FastEthernet0/0.5
encapsulation dot1Q 5
ip address 10.10.1.1 255.255.255.0

However, after plugging into the network and waiting a while, the router doesn't obtain any IP address. What else do I need to know or what am I doing wrong?

Thanks!
 
You can't have an ip address on the main interface that is broken up into sub-interfaces that have IP addresses on them. I am not sure you can do the dhcp for the vlan ip addresses, but you might...not sure with router-on-a-stick though.
In order for the fa interface to get a dhcp ip address, you'll have to remove all sub-int commands.

Burt
 
Thanks, Burt! I was wondering if that was my problem. I was hoping there was a way around that, but I guess not. And just so you know, you are not able to do DHCP for the vlan ip addresses...it's not an option for the sub-interfaces. Thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top