7

I am having an issue with DHCP not traversing to devices behind a switch. I have many other switches deployed with nearly the same configuration that are able to receive a DHCP address. On this switch that I am having issues with, most of the devices have a static address and they have access and can be accessed from the network just fine. I am trying to add an AP to one of the ports, and being a UniFi, it needs to get a DHCP address from the server, but it is unable to do so. When I bring the AP to another switch with the same port configuration, it properly gets a DHCP addresses. On this switch that is having the DHCP problems, if I assign a static address, then I again have access to the network.

I would like to figure out why DHCP is not being passed on properly, or if there is a misconfiguration that I have. The DHCP server is a Windows server, all other devices not attached to this switch, can contact and receive the reservation or address as needed.

The VLAN information is passed down by VTP and it is on the most up to date revision.

Problem switch config:

!
! Last configuration change at 19:25:03 UTC Tue Jul 1 2014
! NVRAM config last updated at 19:25:05 UTC Tue Jul 1 2014
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
boot-start-marker
boot-end-marker
!

!
!
no aaa new-model
switch 1 provision ws-c2960s-24ps-l
authentication mac-move permit
ip subnet-zero
!
!
!
!
spanning-tree mode pvst
spanning-tree etherchannel guard misconfig
spanning-tree extend system-id
!
!
!
!
vlan internal allocation policy ascending
!
!
!
interface FastEthernet0
 no ip address
!
interface GigabitEthernet1/0/1
 description MDF uplink 1/0/20
 switchport mode trunk
!
interface GigabitEthernet1/0/2
 description Fixed Cam
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/3
 description PLC
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/4
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/5
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/6
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/7
 description IDF Link 1/0/22
 switchport mode trunk
!
interface GigabitEthernet1/0/8
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/9
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/10
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/11
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/12
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/13
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/14
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/15
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/16
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/17
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/18
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/19
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/20
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/21
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/22
 switchport access vlan 100
 switchport mode access
 spanning-tree portfast
!
interface GigabitEthernet1/0/23
 switchport access vlan 205
 switchport mode access
!
interface GigabitEthernet1/0/24
 description UniFi
 switchport trunk native vlan 200
 switchport mode trunk
!
interface GigabitEthernet1/0/25
!
interface GigabitEthernet1/0/26
!
interface GigabitEthernet1/0/27
!
interface GigabitEthernet1/0/28
!
interface Vlan1
 no ip address
!
interface Vlan205
 ip address 192.168.205.35 255.255.255.0
!
ip default-gateway 192.168.205.1
ip http server
ip http secure-server
ip sla enable reaction-alerts
!
!
line con 0
line vty 0 4
 password ----
 login
line vty 5 15
 login
!
end

VLANS (via VTP)

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                            active  Gi1/0/22, Gi1/0/25, Gi1/0/26
                                                Gi1/0/27, Gi1/0/28
99   guest                              active
100  plc                                active  Gi1/0/2, Gi1/0/3, Gi1/0/4
                                                Gi1/0/5, Gi1/0/6, Gi1/0/8
                                                Gi1/0/9, Gi1/0/10, Gi1/0/11
                                                Gi1/0/12, Gi1/0/13, Gi1/0/14
                                                Gi1/0/15, Gi1/0/16, Gi1/0/17
                                                Gi1/0/18, Gi1/0/19, Gi1/0/20
                                                Gi1/0/21
200 wlan                                active
205 Mgmnt                               active  Gi1/0/23

Interfaces:

Port      Name               Status       Vlan       Duplex  Speed Type
Gi1/0/1   MDF uplink 1/0/20  connected    trunk      a-half  a-100 10/100/1000BaseTX
Gi1/0/2   Fixed Cam          connected    100        a-full  a-100 10/100/1000BaseTX
Gi1/0/3   PLC                connected    100        a-full  a-100 10/100/1000BaseTX
Gi1/0/4                      connected    100        a-full  a-100 10/100/1000BaseTX
Gi1/0/5                      notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/6                      notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/7   IDF Link 1/0/22    connected    trunk      a-full  a-100 10/100/1000BaseTX
Gi1/0/8                      notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/9                      connected    100        a-full a-1000 10/100/1000BaseTX
Gi1/0/10                     notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/11                     notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/12                     notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/13                     notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/14                     connected    100        a-full  a-100 10/100/1000BaseTX
Gi1/0/15                     notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/16                     notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/17                     notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/18                     notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/19                     notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/20                     notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/21                     notconnect   100          auto   auto 10/100/1000BaseTX
Gi1/0/22                     notconnect   1            auto   auto 10/100/1000BaseTX
Gi1/0/23                     notconnect   205          auto   auto 10/100/1000BaseTX
Gi1/0/24  UniFi              connected    trunk      a-full  a-100 10/100/1000BaseTX
Gi1/0/25                     notconnect   1            auto   auto Not Present
Gi1/0/26                     notconnect   1            auto   auto Not Present
Gi1/0/27                     notconnect   1            auto   auto Not Present
Gi1/0/28                     notconnect   1            auto   auto Not Present
Fa0                          notconnect   routed       auto   auto 10/100BaseTX

Problem switch sh interfaces trunk:

Port        Mode             Encapsulation  Status        Native vlan
Gi1/0/1     on               802.1q         trunking      1
Gi1/0/7     on               802.1q         trunking      1
Gi1/0/24    on               802.1q         trunking      200

Port        Vlans allowed on trunk
Gi1/0/1     1-4094
Gi1/0/7     1-4094
Gi1/0/24    1-4094

Port        Vlans allowed and active in management domain
Gi1/0/1     1,98-111,200-215,300
Gi1/0/7     1,98-111,200-215,300
Gi1/0/24    1,98-111,200-215,300

Port        Vlans in spanning tree forwarding state and not pruned
Gi1/0/1     1,98-111,200-215,300
Gi1/0/7     1,98-111,200-215,300
Gi1/0/24    1,98-111,200-215,300

MDF Gi1/0/20 (the connection to Gi1/0/1 on the problem switch):

sh interfaces trunk

Port        Mode             Encapsulation  Status        Native vlan
Gi1/0/20    on               802.1q         trunking      1

Port        Vlans allowed on trunk
Gi1/0/20    1-4094

Port        Vlans allowed and active in management domain
Gi1/0/20    1,98-111,200-215,300

Port        Vlans in spanning tree forwarding state and not pruned
Gi1/0/20    1,98-111,200-215,300



sh run
!
interface GigabitEthernet1/0/20
 description ProblemSwitch gi1/0/1
 switchport mode trunk
!

STP information

Problem Switch

sh spanning-tree vlan 200

VLAN0200
  Spanning tree enabled protocol ieee
  Root ID    Priority    24683
             Address     b4a4.e322.7500
             Cost        19
             Port        1 (GigabitEthernet1/0/1)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32875  (priority 32768 sys-id-ext 200)
             Address     b4a4.e313.2480
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi1/0/1             Root FWD 19        128.1    P2p
Gi1/0/7             Desg FWD 19        128.7    P2p
Gi1/0/24            Desg FWD 19        128.24   P2p


sh spanning-tree interface gi1/0/1

Vlan                Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
VLAN0001            Root FWD 19        128.1    P2p
VLAN0098            Root FWD 19        128.1    P2p
VLAN0099            Root FWD 19        128.1    P2p
VLAN0100            Root FWD 19        128.1    P2p
VLAN0101            Root FWD 19        128.1    P2p
VLAN0102            Root FWD 19        128.1    P2p
VLAN0103            Root FWD 19        128.1    P2p
VLAN0104            Root FWD 19        128.1    P2p
VLAN0105            Root FWD 19        128.1    P2p
VLAN0106            Root FWD 19        128.1    P2p
VLAN01.1            Root FWD 19        128.1    P2p
VLAN0108            Root FWD 19        128.1    P2p
VLAN0109            Root FWD 19        128.1    P2p
VLAN0110            Root FWD 19        128.1    P2p
VLAN0111            Root FWD 19        128.1    P2p
VLAN0200            Root FWD 19        128.1    P2p
VLAN0201            Root FWD 19        128.1    P2p
VLAN0205            Root FWD 19        128.1    P2p
VLAN0211            Root FWD 19        128.1    P2p
VLAN0300            Root FWD 19        128.1    P2p

MDF Switch

sh spanning-tree vlan 200

VLAN0200
  Spanning tree enabled protocol rstp
  Root ID    Priority    24683
             Address     b4a4.e322.7500
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24683  (priority 24576 sys-id-ext 200)
             Address     b4a4.e322.7500
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi2/0/1             Desg FWD 4         128.55   P2p Edge
Gi2/0/2             Desg FWD 4         128.56   P2p Edge
Gi2/0/3             Desg FWD 4         128.57   P2p Edge
Gi2/0/12            Desg FWD 4         128.66   P2p Peer(STP)
Gi2/0/13            Desg FWD 4         128.67   P2p
Gi2/0/18            Desg FWD 19        128.72   P2p Peer(STP)
Gi2/0/24            Desg FWD 19        128.78   P2p
Gi2/0/25            Desg FWD 4         128.79   P2p

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------

Gi2/0/26            Desg FWD 4         128.80   P2p Peer(STP)
Gi1/0/1             Desg FWD 4         128.1    P2p Edge
Gi1/0/2             Desg FWD 4         128.2    P2p Edge
Gi1/0/3             Desg FWD 4         128.3    P2p Edge
Gi1/0/20            Desg FWD 19        128.20   P2p Peer(STP)
Gi1/0/21            Desg FWD 19        128.21   P2p Peer(STP)
Gi1/0/22            Desg FWD 4         128.22   P2p
Gi1/0/24            Desg FWD 4         128.24   P2p
Gi1/0/25            Desg FWD 4         128.25   P2p Peer(STP)
Gi3/0/1             Desg FWD 4         128.109  P2p Edge
Gi3/0/2             Desg FWD 4         128.110  P2p Edge
Gi3/0/3             Desg FWD 4         128.111  P2p Edge

sh spanning-tree interface gi1/0/20

Vlan                Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
VLAN0001            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0098            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0099            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0100            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0101            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0102            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0103            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0104            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0105            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0106            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0107            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0108            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0109            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0110            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0111            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0200            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0201            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0205            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0211            Desg FWD 19        128.20   P2p Peer(STP)
VLAN0300            Desg FWD 19        128.20   P2p Peer(STP)

I can ping the gateway, and servers from the switch with no issue. On a computer with a statically assigned IP and DNS that is NOT on the native VLAN, I cannot ping the computer name, but I can ping the IP addresses. By assigning a native VLAN ip, I can ping the computer names.

Can someone help in figuring out why I cannot get a DHCP address from behind this single switch?

EDIT: Included entire sanitized config.

  • Are you trying to get a DHCP address from the native vlan (200)? do you have a scope set up for it? Is the DHCP server also on VLAN 200? – Ron Trunk Jul 1 '14 at 15:56
  • @Ron DHCP server is on a different VLAN. Trying to get an address from a 211 VLAN. the 205.35 is just the management address. The gateway is an NSA 2400. There is a scope for the 200 VLAN in there. When I had this AP on a different switch, it grabbed an IP address from that scope, and I can still see the MAC and IP for this AP on the DHCP server, but not connected obviously. The other switch I was testing on, has this same VLAN configuration (and port configuration for a different AP), that works. – PenguinCoder Jul 1 '14 at 16:10
  • 1
    Is the DHCP server on the same VLAN (211) as the client? Pinging the DHCP address form switch management IP doesn't mean much in this case. ICMP has source address of the management interface and unicast destination address of the DHCP server and are probably routed between VLANs. DHCP discover packets are sent from 0.0.0.0 to 255.255.255.255 and if the DHCP server is not on the same subnet/VLAN as the client and you don't have ip helper-address configured on SVI it will not reach DHCP server. – pajaja Jul 1 '14 at 17:49
  • 4
    OK, we're all guessing in the dark. Can you post your switch config, and perhaps a simple diagram? – Ron Trunk Jul 2 '14 at 1:45
  • 2
    Which port is the link towards the DHCP server? Just realized that port Gi1/0/1 is configured in trunk mode, but the output of show interface statusshows only VLAN 100 on it, no trunk. If this is the link towards DHCP server, what is the configuration of the port on the other end of this link? – Daniel Yuste Aroca Jul 3 '14 at 21:07
3

First, thanks to @AveryAbbot, @Ron, @YLearn and @DanielYusteAroca for assisting me greatly in working through this.

At this time I have determined the cause of the issue to lie with the access points from Ubiquity and not an issue with the Cisco switch itself. After researching further and talking with some of the other network personnel who set this up, it turns out that this one switch connected to the MDF via NanoBridge M5's (that I was unaware of). That is, it is not a straight wire run but in fact a wireless AP to Station in bridge mode. In this setup, the mac addresses stop at the AP side and every outgoing packet gets the AP's mac address. To resolve this, you need to setup the AP and Station in Ubiquiti's Wireless WDS transparent bridge mode. After changing this setting on both AP and Station, and a reload of the switch, all devices connected to the problemswitch, are now receiving a proper DHCP lease when requested.

  • Also since your lightweight AP is on a trunk port, you are currently waiting through the 50 second STP timeout after link-up. You can remove this with spanning-tree portfast trunk on IOS devices. – cpt_fink Jul 9 '14 at 5:26
  • Is that wise to do, when there will be other devices connecting through that port? I know the AP won't be doing any switching, just wondering. – PenguinCoder Jul 9 '14 at 17:40
  • The wireless client devices are end hosts only, so it is safe. If you had some type of possible loop through your wireless clients back to your network then you would not want to use portfast, but you would also want to fix the broken configuration. – cpt_fink Jul 31 '14 at 5:23
0

If the DHCP server is on a different VLAN then you'll need to use an ip helper (DHCP relay agent). Since DHCP is a layer 2 protocol it cannot span IP subnets. The ip helper would be configured on the device that is doing your inter-vlan routing. Typically that occurs at a core switch.

Here is info on using ip helper:

http://www.cisco.com/en/US/docs/ios/12_4t/ip_addr/configuration/guide/htdhcpre.html

Additionally, debugging DHCP can help you narrow down the problem. You'll want to do that on the device running the relay agent.

debug ip dhcp server packet

You should see something similar to this if the relay agent is working:

DHCPD: DHCPINFORM received from client 015c.260a.4837.95 (192.168.200.201). DHCPD: Looking up binding using address 192.168.200.1 DHCPD: setting giaddr to 192.168.200.1. DHCPD: BOOTREQUEST from 015c.260a.4837.95 forwarded to 192.168.206.227

  • IP helper is setup on a sonicwall firewall, not a Cisco device, and it is working properly for 13 other switches. This is not a problem with the IP Helper. – PenguinCoder Jul 7 '14 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.