cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
18738
Views
0
Helpful
19
Replies

DHCP didn't cross TRUNK

h.dam
Level 1
Level 1

Hi guys,

I' ve an DHCP issue that works if the link is access mode but didn't work if I change it to trunk mode. Here's the config:

 

SW-server: (with vlan database created)

ip routing

ip dhcp pool VLAN-MGT

network 10.0.0.0 255.255.255.0

default-router 10.0.0.254

!

interface vlan 500

ip address 10.0.0.254 255.255.255.0

!

interface G1/0

switchport mode trunk

switchport trunk allowed vlan 500

!

SW-client: (with vlan database created)

ip routing

interface vlan 500

ip address dhcp

!

interface G1/0

switchport mode trunk

switchport trunk allowed vlan 500

!

 

In summary:

1. if interface G1/0 is access mode , interface vlan500 on SW-client gets IP address

2. if interface G1/0 is trunk mode, no IP address on SW-client interface vlan500.

 

Your explanations are very appreciated.

1 Accepted Solution

Accepted Solutions

User error :)

I hope we pointed you in the right direction for you to find this configuration.

Don't forget to mark helpful if we did.

Paul

View solution in original post

19 Replies 19

Hello,

without knowing which switch model you have, make sure that 'service dhcp' is enabled globally. Also, you could try and configure the trunk interface with 'spanning-tree portfast trunk'...

Hello,

Yes, service dhcp is enabled on switches.

The spanning-tree command didn't work.

My switches are:

SW-server=C2951 IOS: 15.4(2)

SW-client=IE4010 IOS: 15.2(4)

Hello,

what is the VTP setup for your switches ? On the 4010 you can assign a static access port to a VLAN without VTP propagating the VLAN configuration, but in trunk mode that doesn't work.

Post the output of 'show VTP status' of both switches, or if you are familiar with VTP, configure the 4010 as VTP client and the 2951 as server (make sure they are in the same VTP domain)...

Hello,

 

On IE4010, vtp is off.

I created the vlans manually on two switches.

That could be the problem.  What if you turn VTP on on the 4010 ?

I changed to vtp transparent. Always the same issue.

In fact from the debug, I saw DHCP Sdiscovery sent by client but the server did nothing.

VTP transparent doesn't work with the trunk, it needs to be client or server...

Hello,

 

I just tried to turn VTP=client on 4010. while SW-server is VTP server.

Same issue.

 

I think its a trunk mode issue.

Hello,

odd. Maybe it has to do with the native VLAN. Try and remove the 'switchport trunk allowed vlan' from the trunk configuration.

Hi,

I've already tried :

1. to add native vlan on both switches

2. to remove switchport allowed vlan on both switches

Always no DHCP actions on server.

Hello,

what if you configure an ip helper-address on the VLAN interface:

interface vlan 500
ip address dhcp
ip helper-address 10.0.0.254

Hi,

Using GNS3 with 2x3725 switches, I tested the configuration mentionned in my first post, everything's ok. I got the DHCP address. So the config is correct. Now I goto check if its hardware issue.

 

In production environment: I use C2951 and IE4010. The interface on 2951 used is a port on EHWIC. Maybe there's something different. I'm working on it.....

 

anyway, thanks for your quick replies.

Hello,

I am just thinking: what if you disable ip routing on the client switch ? My reasoning is: the ip routing makes the switch a layer 3 device, which might cause the DHCP broadcast to be dropped...

The below discussions are somehow related to the issue you are experiencing so I think it's worth going through them.

 

https://learningnetwork.cisco.com/thread/64253

https://supportforums.cisco.com/t5/getting-started-with-lans/why-is-trunk-not-showing-vlan-membership/td-p/1989996

 

Anyway the issue I believe is something I've experienced a few years ago on a switch module in a router. When in trunk mode vlan500 doesn't see any active access ports and it "sends vlan500 to sleep"(not the official term but can't remember what it was). When using access port the above issue is no longer causing you trouble because the active access port keeps vlan500 up. I believe there was a command which you could try and see if it's available on the router "state active" under vlan or something like that.

 

If it doesn't work then post the show vlan and show interface xxx switchport along with a full running-config if you can. Sometimes it's the little things that cause the big trouble.

 

EDIT: no autostate !!! That's what I couldn't remember. See: https://www.cisco.com/c/en/us/support/docs/switches/catalyst-6500-series-switches/41141-188.html

and

https://supportforums.cisco.com/t5/lan-switching-and-routing/switch-port-auto-state-exclude-command-not-working-in-4500/td-p/2206050

 

The models are not relevant here but it looks like this command is not properly documented under switch modules. Or at least I couldn't find it quickly enough.

 

I hope it helps,

 

Paul