Cisco 2800 Router DHCP

finsfree

Member
I have configured DHCP on this Cisco 2800 Router. It is handing out IP addresses but my computer is not getting them. Weird I know.

If I type the command "show ip dhcp binding" it shows all the ip addresses it handed out w/ the MAC address to which computer it handed to. Sure enough my computers MAC address shows up every time. I have plugged in 2 different PC's and both don't show an IP.

If I manually assign an IP to the computer, I can ping the router just fine.

How is the router assigning me an IP but I can't see it on my PC?

I've witched cables and disabled the firewall, still nothing.

P.S. I am using sub interfaces (fa0/0.1, fa0/0.2, fa0/0.3, etc....) an d an IP range for each subnet.
 

beers

Moderator
Staff member
What do you see in Wireshark for DHCPDISCOVER, DHCPOFFER etc?

What does your router's DHCP config look like?

Edit: Are you tagging your subinterfaces into specific VLANs?
 

finsfree

Member
Q1: Nothing under those 2 search filters
Q3: Yes subinterfaces are tagged with dot1q

Q2:
R1#show run
Building configuration...

Current configuration : 1770 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip cef
!
!
no ip dhcp use vrf connected
ip dhcp excluded-address 10.10.2.1 10.10.2.5
ip dhcp excluded-address 10.10.3.1 10.10.3.5
ip dhcp excluded-address 10.10.1.1 10.10.1.5
ip dhcp excluded-address 10.10.4.1 10.10.4.5
ip dhcp excluded-address 10.10.10.1 10.10.10.5
!
ip dhcp pool Local
network 10.10.1.0 255.255.255.0
default-router 10.10.1.1
dns-server 8.8.8.8
!
ip dhcp pool Sales
network 10.10.2.0 255.255.255.0
default-router 10.10.2.1 255.255.255.0
dns-server 8.8.8.8
!
ip dhcp pool Management
network 10.10.3.0 255.255.255.0
default-router 10.10.3.1 255.255.255.0
dns-server 8.8.8.8
!
ip dhcp pool Guest_Wifi
network 10.10.4.0 255.255.255.0
default-router 10.10.4.1 255.255.255.0
dns-server 8.8.8.8
!
ip dhcp pool Home
network 10.10.10.0 255.255.255.0
default-router 10.10.10.1 255.255.255.0
dns-server 8.8.8.8
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 10.10.2.1 255.255.255.0
ip helper-address 10.10.2.1
!
interface FastEthernet0/0.3
encapsulation dot1Q 3
ip address 10.10.3.1 255.255.255.0
!
interface FastEthernet0/0.4
encapsulation dot1Q 4
ip address 10.10.4.1 255.255.255.0
!
interface FastEthernet0/1
ip address dhcp
duplex auto
speed auto
!
interface Serial0/3/0
no ip address
shutdown
no fair-queue
!
ip forward-protocol nd
!
ip http server
no ip http secure-server
!
!
control-plane
!
!
line con 0
logging synchronous
line aux 0
line vty 0 4
login
!
scheduler allocate 20000 1000
end

R1#
 

finsfree

Member
I also learned about the command "IP helper-address A.B.C.D" and that didn't work either. You can see it in fa0/0.2. it may be because I'm using multiple dhcp's. The you tube video I watch had only 1 DHCP server for all the vlans.

One other thing to add, as I hover over the interface I want to record in Wireshark I can see an IP address that the DHCP would of handed out. Weird, I've got to figure this thing out.

Thx
 

beers

Moderator
Staff member
A helper address is needed when you have a DHCP segment that's on a separate subnet than the DHCP server. The helper address will turn the broadcast (layer 2) into a unicast request toward the DHCP server (layer 3). Having the helper address on the same segment won't really do anything for you.

How is your switch set up? Did you enable portfast on those access ports? Sometimes the 30 second STP delay will make hosts behave weird with DHCP. By doing a 'spanning-tree portfast' on those switch interfaces they will bypass the STP listening and learning phases and just start forwarding you traffic immediately, similar to an unmanaged switch.

Also, you'd want to use 'bootp' for that Wireshark filter.

7V84Aex.png
 

finsfree

Member
Untitled.png When I get home later I'll post the switches running config.

For now, I have the results of the Wireshark.
 

finsfree

Member
S1#show run
Building configuration...

Current configuration : 4854 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname S1
!
!
ip subnet-zero
!
ip ssh time-out 120
ip ssh authentication-retries 3
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
!
!
!
interface FastEthernet0/1
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/3
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/4
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/5
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/6
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/7
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/8
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/9
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/10
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/11
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/12
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/13
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/14
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/15
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/16
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/17
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/18
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/19
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/20
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/21
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/22
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/23
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/24
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/25
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/26
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/27
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/28
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/29
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/30
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/31
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/32
switchport access vlan 2
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/33
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/34
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/35
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/36
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/37
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/38
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/39
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/40
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/41
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/42
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/43
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/44
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/45
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/46
switchport mode trunk
spanning-tree portfast
!
interface FastEthernet0/47
switchport access vlan 3
switchport mode access
spanning-tree portfast
!
interface FastEthernet0/48
switchport access vlan 4
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/1
switchport mode trunk
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
no ip route-cache
shutdown
!
interface Vlan2
no ip address
no ip route-cache
shutdown
!
interface Vlan3
ip address 10.10.3.1 255.255.255.0
no ip route-cache
!
ip http server
!
line con 0
logging synchronous
line vty 0 4
login
line vty 5 15
login
!
!
end

S1#
 

beers

Moderator
Staff member
Looks about right assuming you have the VLANs created in the vlan database (ie show vlan).

It sounds like the DHCP server is indicating it leases you an address and the PC knows about that address (hence the mouseover). There isn't anything configuration wise that would prevent this from working at a network level, other than maybe you have multiple SVIs for VLAN3 (same IP on the switch as well as on the router).
 

finsfree

Member
S1#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/33, Fa0/34, Fa0/35, Fa0/36
Fa0/37, Fa0/38, Fa0/39, Fa0/40
Fa0/41, Fa0/42, Fa0/43, Fa0/44
Fa0/45, Fa0/46, Gi0/2

2 Sales active Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Fa0/25, Fa0/26, Fa0/27, Fa0/28
Fa0/29, Fa0/30, Fa0/31, Fa0/32

3 Management active Fa0/47

4 Guest_Wifi active Fa0/48

1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
4 enet 100004 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0

Remote SPAN VLANs
------------------------------------------------------------------------------


Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------

S1#
 

finsfree

Member
Untitled.png This is crazy because I built this same network in Packet Tracer today at work and it worked just fine. Not sure what I'm doing wrong?
 

beers

Moderator
Staff member
You'd really need more of an ipconfig /all to verify the IP. You'll get the exclamation mark since your PC can't resolve any DNS entries, and there are no NAT overload statements for those subnets to reach out to the Internet.

Also, keep in mind you don't have a layer 3 interface for VLAN1.
 

finsfree

Member
I gave up. What I'm doing is not practical anyways. It's just a lab environment.

Thx I did learn a couple of things though.
 
Top