我对某些 Vlan 的 Dhcp 有疑问。我的网络是这样的:
我有一个路由器 ASR1001,它连接 15 个交换机(2960)作为环形拓扑。每个交换机都有一个路由器的子接口,所有交换机的 dhcp 都是在路由器上创建的。这是dhcp的配置:
ip dhcp excluded-address 192.168.90.1 192.168.90.10
ip dhcp excluded-address 192.168.90.254
ip dhcp pool SITEA
network 192.168.90.0 255.255.255.0
default-router 192.168.90.254
dns-server 8.8.8.8 8.8.4.4
lease 8
每个交换机的子接口配置是:
interface GigabitEthernet0/0/1.90
description "SITEA"
encapsulation dot1Q 90
ip address 192.168.90.254 255.255.255.0
ip nbar protocol-discovery
我面临的问题是 VLAN 无法接收动态 IP 地址,但可以接收静态 IP 地址。
我尝试删除该 vlan 的 dhcp 配置并再次创建,仍然相同。我也试过重启交换机,也没有帮助。
有什么建议么。
交换机的完整配置:
Building configuration...
Current configuration : 17949 bytes
!
! Last configuration change at 14:48:28 Africa Thu Sep 13 2018
!
version 15.2
no service pad
service timestamps debug datetime localtime
service timestamps log datetime localtime
service password-encryption
!
hostname SITEA
!
boot-start-marker
boot-end-marker
!
logging buffered 64000
logging console informational
enable secret xx
!
no aaa new-model
clock timezone Africa 3 0
switch 1 provision ws-c2960x-24pd-l
!
!
ip dhcp snooping vlan 10-150
no ip dhcp snooping information option
ip dhcp snooping database flash:DHCPSnoopingDB
ip dhcp snooping database write-delay 60
ip dhcp snooping
no ip domain-lookup
ip name-server 8.8.8.8
vtp mode transparent
!
!
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
vlan internal allocation policy ascending
!
vlan 10
name CA
!
vlan 20
name BA
!
vlan 30
name DA
!
vlan 40
name FA
!
vlan 50
name GA
!
vlan 60
name HA
!
vlan 70
name IA
!
vlan 80
name Ben
!
vlan 90
name SITEA
!
vlan 100
name KA
!
vlan 110
name LA
!
vlan 120
name MA
!
vlan 130
name OA
!
vlan 140
name PA
!
vlan 150
name QA
!
vlan 201
name SA
!
vlan 299
name TA
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0
no ip address
shutdown
!
interface GigabitEthernet1/0/1
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/2
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/3
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/4
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/5
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/6
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/7
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/8
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/9
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/10
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/11
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/12
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/13
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/14
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/15
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/16
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/17
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/18
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/19
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/20
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/21
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/22
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/23
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/24
description Un-Trusted Data Port
switchport access vlan 90
switchport mode access
switchport port-security maximum 3
switchport port-security aging time 1
switchport port-security aging type inactivity
switchport port-security
srr-queue bandwidth share 1 70 25 5
priority-queue out
no snmp trap link-status
no cdp enable
spanning-tree portfast
spanning-tree bpduguard enable
ip dhcp snooping limit rate 10
!
interface GigabitEthernet1/0/25
description ** Connection to Sw2 - Gi1/0/25
switchport trunk native vlan 299
switchport mode trunk
switchport nonegotiate
logging event trunk-status
srr-queue bandwidth share 1 70 25 5
priority-queue out
mls qos trust dscp
ip dhcp snooping trust
!
interface GigabitEthernet1/0/26
description ** Connection to Sw1 - Gi1/0/25
switchport trunk native vlan 299
switchport mode trunk
switchport nonegotiate
logging event trunk-status
srr-queue bandwidth share 1 70 25 5
priority-queue out
mls qos trust dscp
ip dhcp snooping trust
!
interface TenGigabitEthernet1/0/1
!
interface TenGigabitEthernet1/0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
no ip address
shutdown
!
interface Vlan20
no ip address
shutdown
!
interface Vlan30
no ip address
shutdown
!
interface Vlan40
no ip address
shutdown
!
interface Vlan50
no ip address
shutdown
!
interface Vlan60
no ip address
shutdown
!
interface Vlan70
no ip address
shutdown
!
interface Vlan80
no ip address
shutdown
!
interface Vlan90
no ip address
shutdown
!
interface Vlan100
no ip address
shutdown
!
interface Vlan110
no ip address
shutdown
!
interface Vlan120
no ip address
shutdown
!
interface Vlan130
no ip address
shutdown
!
interface Vlan140
no ip address
shutdown
!
interface Vlan150
no ip address
shutdown
!
interface Vlan201
description Management_VLAN Interface
ip address 10.1.1.90 255.255.255.0
!
interface Vlan299
no ip address
shutdown
!
ip default-gateway 10.1.1.254
ip http server
ip http secure-server
!
!
!
路由器的完整代码:
Building configuration...
Current configuration : 15410 bytes
!
! Last configuration change at 11:39:24 UTC Thu Sep 13 2018
!
version 15.4
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
no platform punt-keepalive disable-kernel-core
!
hostname CE-Router
!
boot-start-marker
boot-end-marker
!
!
vrf definition Mgmt-intf
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
enable secret xx
!
no aaa new-model
!
!
!
!
!
!
!
!
!
ip name-server 8.8.8.8
ip dhcp excluded-address 192.168.20.1 192.168.20.10
ip dhcp excluded-address 192.168.20.254
ip dhcp excluded-address 192.168.30.1 192.168.30.10
ip dhcp excluded-address 192.168.30.254
ip dhcp excluded-address 192.168.40.1 192.168.40.10
ip dhcp excluded-address 192.168.40.254
ip dhcp excluded-address 192.168.50.1 192.168.50.10
ip dhcp excluded-address 192.168.50.254
ip dhcp excluded-address 192.168.60.1 192.168.60.10
ip dhcp excluded-address 192.168.60.254
ip dhcp excluded-address 192.168.70.1 192.168.70.10
ip dhcp excluded-address 192.168.70.254
ip dhcp excluded-address 192.168.80.1 192.168.80.10
ip dhcp excluded-address 192.168.80.254
ip dhcp excluded-address 192.168.90.1 192.168.90.10
ip dhcp excluded-address 192.168.90.254
ip dhcp excluded-address 192.168.100.1 192.168.100.10
ip dhcp excluded-address 192.168.100.254
ip dhcp excluded-address 192.168.110.1 192.168.110.10
ip dhcp excluded-address 192.168.110.254
ip dhcp excluded-address 192.168.120.1 192.168.120.10
ip dhcp excluded-address 192.168.120.254
ip dhcp excluded-address 192.168.130.1 192.168.130.10
ip dhcp excluded-address 192.168.130.254
ip dhcp excluded-address 192.168.140.1 192.168.140.10
ip dhcp excluded-address 192.168.140.254
ip dhcp excluded-address 192.168.150.1 192.168.150.10
ip dhcp excluded-address 192.168.150.254
ip dhcp excluded-address 192.168.10.1 192.168.10.14
ip dhcp excluded-address 192.168.10.254
ip dhcp excluded-address 192.168.160.1 192.168.160.10
ip dhcp excluded-address 192.168.160.254
ip dhcp excluded-address 192.168.170.1 192.168.170.10
ip dhcp excluded-address 192.168.170.254
!
ip dhcp pool M
network 192.168.50.0 255.255.255.0
default-router 192.168.50.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool MO
network 192.168.10.0 255.255.255.0
default-router 192.168.10.254
dns-server 9.9.9.9 8.8.8.8
lease 8
!
ip dhcp pool Mot
network 192.168.20.0 255.255.255.0
default-router 192.168.20.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool MoY
network 192.168.40.0 255.255.255.0
default-router 192.168.40.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool C
network 192.168.60.0 255.255.255.0
default-router 192.168.60.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool E
network 192.168.70.0 255.255.255.0
default-router 192.168.70.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool F
network 192.168.100.0 255.255.255.0
default-router 192.168.100.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool G
network 192.168.120.0 255.255.255.0
default-router 192.168.120.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool H
network 192.168.130.0 255.255.255.0
default-router 192.168.130.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool I
network 192.168.140.0 255.255.255.0
default-router 192.168.140.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool J
network 192.168.150.0 255.255.255.0
default-router 192.168.150.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool K
network 192.168.80.0 255.255.255.0
default-router 192.168.80.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool L
network 192.168.110.0 255.255.255.0
default-router 192.168.110.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool O
network 192.168.30.0 255.255.255.0
default-router 192.168.30.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool P
network 192.168.160.0 255.255.255.0
default-router 192.168.160.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool Q
network 192.168.170.0 255.255.255.0
default-router 192.168.170.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
ip dhcp pool SITEA
network 192.168.90.0 255.255.255.0
default-router 192.168.90.254
dns-server 8.8.8.8 8.8.4.4
lease 8
!
!
!
!
!
!
!
!
!
!
subscriber templating
!
flow exporter CE-ROUTER
destination 192.168.10.246
source GigabitEthernet0/0/0
transport udp 1600
export-protocol netflow-v5
!
!
flow monitor MONITOR-1
exporter CE-ROUTER
record netflow ipv4 original-input
!
multilink bundle-name authenticated
license udi pid ASR1001-X sn xx
!
!
redundancy
mode none
!
!
cdp run
!
ip tftp source-interface GigabitEthernet0
!
interface TenGigabitEthernet0/0/0
no ip address
shutdown
!
interface TenGigabitEthernet0/0/1
no ip address
shutdown
!
interface GigabitEthernet0/0/0
description "Primary Fiber Connection
bandwidth 158720
ip address 172.16.1.2 255.255.255.252
no ip redirects
no ip unreachables
no ip proxy-arp
ip nbar protocol-discovery
ip flow monitor MONITOR-1 input
negotiation auto
!
interface GigabitEthernet0/0/1
description "All Ministries LAN Interface" - -Core-Sw1 - Gi1/0/48
no ip address
no ip redirects
no ip unreachables
no ip proxy-arp
ip nbar protocol-discovery
ip tcp adjust-mss 1452
negotiation auto
cdp enable
service-policy output Parent-LAN-Shaper
!
interface GigabitEthernet0/0/1.10
description
encapsulation dot1Q 10
ip address 192.168.10.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.20
description ""
encapsulation dot1Q 20
ip address 192.168.20.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.30
description
encapsulation dot1Q 30
ip address 192.168.30.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.40
description
encapsulation dot1Q 40
ip address 192.168.40.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.50
description
encapsulation dot1Q 50
ip address 192.168.50.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.60
description
encapsulation dot1Q 60
ip address 192.168.60.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.70
description
encapsulation dot1Q 70
ip address 192.168.70.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.80
description
encapsulation dot1Q 80
ip address 192.168.80.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.90
description
encapsulation dot1Q 90
ip address 192.168.90.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.100
description
encapsulation dot1Q 100
ip address 192.168.100.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.110
description
encapsulation dot1Q 110
ip address 192.168.110.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.120
description
encapsulation dot1Q 120
ip address 192.168.120.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.130
description
encapsulation dot1Q 130
ip address 192.168.130.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.140
description
encapsulation dot1Q 140
ip address 192.168.140.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.150
description
encapsulation dot1Q 150
ip address 192.168.150.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.160
description
encapsulation dot1Q 160
ip address 192.168.160.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.170
description
encapsulation dot1Q 170
ip address 192.168.170.254 255.255.255.0
ip nbar protocol-discovery
!
interface GigabitEthernet0/0/1.201
description
encapsulation dot1Q 201
ip address 10.1.1.254 255.255.255.0
!
!
interface GigabitEthernet0/0/4
no ip address
shutdown
negotiation auto
!
interface GigabitEthernet0/0/5
no ip address
shutdown
negotiation auto
!
interface ATM0/1/0
no ip address
shutdown
no atm enable-ilmi-trap
!
interface GigabitEthernet0
vrf forwarding Mgmt-intf
no ip address
shutdown
negotiation auto