Want to get dhcp config for a switch.
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 so 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 Model - 2960X Version 15.2(2)E6.
switchport access vlan 99 shouldn't be on the switch trunk port, it should be something like switchport mode trunk because router sub interface is tagged.
Routers do not support DTP.
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.
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
The way to 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 - download to the switch, - 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.
- 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
Comments
0 comments
Please sign in to leave a comment.