07-31-2017 03:11 AM - edited 03-01-2019 04:39 AM
Hi All,
I have some problems regarding getting dhcp config for switch.
I have topology: DHCP server (192.168.1.50) <-- GRE over IPsec--> Router <--------> Switch.
Router config:
interface GigabitEthernet0/0/1.99
description Mgmt
encapsulation dot1Q 99
vrf forwarding VRF-NAME
ip address X.X.1.1 255.255.255.248
ip helper-address global 192.168.1.50
no ip redirects
no ip proxy-arp
pnp startup-vlan 99.
When switch booted Pnp creating configuration:
vlan 99
interface vlan 99
ip address dhcp
interface GigabitEthernet1/0/1
switchport access vlan 99
macro description CISCO_SMI_EVENT
Switch is not getting IP from DHCP.
I tried to configure dhcp server locally on router:
ip dhcp pool SW_Provisioning
vrf VRF
network XXX.XXX.1.0 255.255.255.248
default-router XXX.XXX.1.1
option 43 ascii "5A1N;B2;K4;IXXX.XXX.XXX.XXX;J80"
And got same result - fail.
Switch which I'm using is - 2960X Version 15.2(2)E6.
One thing that I'm aware of is that switchport access vlan 99 shouldn't be on the switch trunk port, it should be something like switchport mode trunk because router subinterface is tagged.
Any suggestions?
Solved! Go to Solution.
07-31-2017 05:20 PM
Routers do not support DTP.
You will need to make vlan 99 the native vlan on the interface as the switch will be in access mode.
The reason it works differently if there was a switch up stream is that DTP creates a trunk dynamically.
Adam
07-31-2017 05:20 PM
Routers do not support DTP.
You will need to make vlan 99 the native vlan on the interface as the switch will be in access mode.
The reason it works differently if there was a switch up stream is that DTP creates a trunk dynamically.
Adam
07-31-2017 09:41 PM
I got it, thank you.
07-31-2017 10:59 PM
I changed router configuration :
interface GigabitEthernet0/0/1.99
description Mgmt
encapsulation dot1Q 99 native
vrf forwarding VRF-NAME
ip address X.X.1.1 255.255.255.248
ip helper-address global 192.168.1.50
no ip redirects
no ip proxy-arp
But after boot switch didn't get vlan 99 configuration. It just got IP from DHCP to Vlan 1
Switch#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Vlan1 XXX.XXX.1.5 YES DHCP up up
08-01-2017 12:09 AM
sorry, I should have been clearer.
The way i do this on routers is
- remove the pnp startup vlan
- configure the management vlan as native
this means the switch will connect via vlan1 on it's uplink and into vlan 99
In the config i download to the switch, I then "switchover" to shutdown vlan 1 (make sure you do this first) and enable vlan 99 on the switch with either a static or dynamic ip.
Gotcha-s.
- make sure you use VTP transparent so you can define vlan 99 in the config (or the vlan will not be present on a new switch)
- make sure you shut down vlan1 before creating and assigning vlan 99 otherwise you will have two interfaces with the same IP network
- make sure you add a default route if you use a static IP
Adam
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide