Link to home
Start Free TrialLog in
Avatar of valdezf
valdezfFlag for United States of America

asked on

need help with cisco router and dhcp

Hey,

I've been configuring my new Cisco 871w Integrated Services router on my home network, but I haven't been able to get DHCP working on the LAN ports. This is what I have done

Router(config)# ip dhcp excluded-address 192.168.2.1 192.168.2.10
Router(config)# ip dhcp pool home
Router(config-dhcp)#network 192.168.2.0 255.255.255.0
Router(config-dhcp)#dns-server 192.168.2.1 4.2.2.2
Router(config-dhcp)#default-router 192.168.2.1

on all interfaces fa0 - fa3
#switchport mode access
#switchport access vlan 1


I have enabled service dhcp

I can ping vlan 1 192.168.2.1
I can ping my default route 192.168.1.1 (home router)
I can ping www.cisco.com 

I have wr erase twice to do everything all over again, but I have not been successful

this is my config

R1#sh run
Building configuration...

Current configuration : 3552 bytes
!
version 12.4
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R1
!
!
ip subnet-zero
ip cef
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.2.1 192.168.2.10
!
ip dhcp pool home
   import all
   network 192.168.2.0 255.255.255.0
   dns-server 192.168.1.1 4.2.2.2
   default-router 192.168.2.1
   lease 5
!
!
ip domain name XXXX
ip name-server 192.168.1.1
ip name-server 4.2.2.2
ip name-server 8.8.8.8
ip ssh version 2
!

!
!
!
interface FastEthernet0
!
interface FastEthernet1
!
interface FastEthernet2
!
interface FastEthernet3
!
interface FastEthernet4
 ip address 192.168.1.2 255.255.255.0
 ip nat outside
 ip virtual-reassembly
 duplex auto
 speed auto
!
interface Dot11Radio0
 no ip address
 shutdown
 speed basic-1.0 basic-2.0 basic-5.5 6.0 9.0 basic-11.0 12.0 18.0 24.0 36.0 48.0 54.0
 station-role root
!
interface Vlan1
 ip address 192.168.2.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
!
ip default-gateway 192.168.1.1
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.1
!
!
access-list 101 permit udp any any eq domain
access-list 101 permit udp any eq domain any
!

---------------------------------------------------------------------------------------------------------------------------------------

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0, Fa1, Fa2, Fa3
1002 fddi-default                     active
1003 token-ring-default               active
1004 fddinet-default                  active
1005 trnet-default                    active


I followed this instructions from the Cisco website, for my IOS version "flash:c870-advsecurityk9-mz.124-4.T3.bin"

http://www.cisco.com/en/US/docs/ios-xml/ios/ipaddr_dhcp/configuration/12-4t/dhcp-12-4t-book.html

 
I can have DHCP working on GNS3 and Packet Tracer with no problems...I'm not sure what's wrong.

thanks in advance!!
Avatar of Don Johnston
Don Johnston
Flag of United States of America image

So what doesn't work?

Are the hosts not getting an IP address?

Have you manually assigned an IP address to a host and tried to ping the 2.1 address?
I'm not sure what the question is? Is the problem just that you're not getting an IP addressed automatically through DHCP from the router?

MO
Avatar of valdezf

ASKER

yes..the problem is that I'm not getting an IP address automatically from DHCP

I don't want to set it manually

R1#sho ip int bri
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0              unassigned      YES unset  down                  down
FastEthernet1              unassigned      YES unset  down                  down
FastEthernet2              unassigned      YES unset  up                    up  
FastEthernet3              unassigned      YES unset  up                    down
FastEthernet4              192.168.1.2     YES manual up                    up  
Dot11Radio0                unassigned      YES TFTP   administratively down down
Vlan1                      192.168.2.1     YES manual up                    up  
Virtual-Dot11Radio0        unassigned      YES TFTP   administratively down down
NVI0                       unassigned      YES unset  up                    up
Is there anything else running DHCP on the same network? Can you connect your client system to any other port (0 - 3) and get an address through DHCP?

MO
Avatar of valdezf

ASKER

umm...i'm not sure what you are asking, but to try an answer your question

dhcp is the verizon modem with the ip 192.168.1.1
i have Fa4 (WAN) port on the cisco 871 router plugged to the verizon modem

I get 192.168.1.2 on my Cisco routers WAN port Fa4

vlan 1 is configured with 192.168.2.1

I can ping vlan 1, the verizon modem, and www.cisco.com from my cisco router

any client connected to the cisco router will not get an ip address from DHCP (which is what I am trying to do here).
Avatar of valdezf

ASKER

Is there anything else running DHCP on the same network?
no
topology.png
Avatar of danieldias
danieldias

Remove the vlan IP address and place it on a physical interface.

I.E.

interface FastEthernet2
 ip address 192.168.2.1 255.255.255.0
Avatar of valdezf

ASKER

I tried that but it says

"ip address may not be configured on L2 links"
It is configured that way on fa 4.
Rremove the ip address and the vlan 1 interface..... then try to add the IP for fa2.
Avatar of valdezf

ASKER

Fa4 is a WAN port......Fa0 - 3 are LAN ports (L2)
One more time...

Have you manually assigned an IP address (192.168.2.x) to a host and tried to ping the 2.1 address?
Avatar of valdezf

ASKER

ok. I just did what you told me. this is weird (maybe not)

I added the static to the client connected to Fa3 and I can ping the 192.168.2.1 network but not the 192.168.1.1

I set it to "dynamic dhcp" on the client and I do get an ip, but I don't see the ip address on the router sho ip int bri

regardless I can't ping the 192.168.1.1 from the 192.168.2.1 - but this I can probably fix myself

my question is...why is it that I can't see the clients ip 192.168.2.14 listed on the router fa3 port when I do "sho ip int bri" ???


Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0              unassigned      YES unset  down                  down
FastEthernet1              unassigned      YES unset  down                  down
FastEthernet2              unassigned      YES unset  up                    up  
FastEthernet3              unassigned      YES unset  up                    up    
FastEthernet4              192.168.1.2     YES manual up                    up  
Dot11Radio0                unassigned      YES TFTP   administratively down down
Vlan1                      192.168.2.1     YES manual up                    up


---------------------------------------------------------------------------------------------------------------------------------------

Gateway of last resort is 192.168.1.1 to network 0.0.0.0

C    192.168.1.0/24 is directly connected, FastEthernet4
C    192.168.2.0/24 is directly connected, Vlan1
S*   0.0.0.0/0 [1/0] via 192.168.1.1
ASKER CERTIFIED SOLUTION
Avatar of Don Johnston
Don Johnston
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial