CoreSW#sh runS2交换机配置如下:
Building configuration...
Current configuration : 3521 bytes
!
! Last configuration change at 22:27:47 +8 Thu May 24 2018
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname CoreSW
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
clock timezone +8 18 35
!
!
!
!
!
!
ip dhcp excluded-address 192.168.1.1
ip dhcp excluded-address 192.168.2.1
ip dhcp excluded-address 192.168.0.1
ip dhcp excluded-address 192.168.3.1
!
ip dhcp pool vlan1
network 192.168.1.0 255.255.255.0
dns-server 192.168.0.2
default-router 192.168.1.1
lease 0 4
!
ip dhcp pool vlan2
network 192.168.2.0 255.255.255.0
default-router 192.168.2.1
dns-server 192.168.0.2
lease 0 4
!
ip dhcp pool vlan3
network 192.168.3.0 255.255.255.0
default-router 192.168.3.1
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
switchport trunk encapsulation dot1q
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
switchport mode access
media-type rj45
negotiation auto
!
interface GigabitEthernet0/3
media-type rj45
negotiation auto
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
!
interface Vlan2
ip dhcp relay information trusted
ip address 192.168.2.1 255.255.255.0
!
interface Vlan3
ip dhcp relay information trusted
ip address 192.168.3.1 255.255.255.0
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
HJSW#sh runS3作为接入交换机,配置如下:
Building configuration...
Current configuration : 2836 bytes
!
! Last configuration change at 02:24:43 UTC Thu May 24 2018
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname HJSW
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
media-type rj45
negotiation auto
!
interface GigabitEthernet0/3
media-type rj45
negotiation auto
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
JRSW# sh run现象:
Building configuration...
Current configuration : 3060 bytes
!
! Last configuration change at 07:18:55 UTC Thu May 24 2018
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
no service dhcp
!
hostname JRSW
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
!
!
!
!
!
ip dhcp snooping vlan 2-3
ip dhcp snooping
ip cef
no ipv6 cef
!
!
!
spanning-tree mode rapid-pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
switchport trunk encapsulation dot1q
switchport mode trunk
media-type rj45
negotiation auto
ip dhcp snooping trust
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
switchport access vlan 2
switchport mode access
media-type rj45
negotiation auto
ip verify source
!
interface GigabitEthernet0/3
switchport access vlan 3
switchport mode access
media-type rj45
negotiation auto
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
已解决! 转到解答。
ningming.lu 发表于 2018-5-24 16:08
核心交换机开启ip routing,试下
shizhenning 发表于 2018-5-24 16:24
开着了 是 2口下的PC 获取到IP地址后 跟内网不通 关闭掉 ip verify source 之后就通了 不知咋回事
JRSW#show ip dhcp snooping
Switch DHCP snooping is enabled
Switch DHCP gleaning is disabled
DHCP snooping is configured on following VLANs:
2-3
DHCP snooping is operational on following VLANs:
2-3
DHCP snooping is configured on the following L3 Interfaces:
Insertion of option 82 is enabled
circuit-id default format: vlan-mod-port
remote-id: 5000.0002.0000 (MAC)
Option 82 on untrusted port is not allowed
Verification of hwaddr field is enabled
Verification of giaddr field is enabled
DHCP snooping trust/rate is configured on the following Interfaces:
Interface Trusted Allow option Rate limit (pps)
----------------------- ------- ------------ ----------------
GigabitEthernet0/0 yes yes unlimited
Custom circuit-ids:
JRSW#show ip dhcp snooping bi
JRSW#show ip dhcp snooping binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 10524 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 82651 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#show ip sou bin
JRSW#show ip sou binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 10520 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 82646 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
suzhouxiaoniu 发表于 2018-5-24 18:07
你把通和不通两种情况下的show ip verify source贴出来
JRSW#show ip source binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14382 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 75304 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#show ip dhcp sn bin
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14374 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 75296 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#show run int gi0/2
Building configuration...
Current configuration : 139 bytes
!
interface GigabitEthernet0/2
switchport access vlan 2
switchport mode access
media-type rj45
negotiation auto
ip verify source
end
JRSW#show ip source binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14367 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 75464 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#show ip djh
JRSW#show ip dh
JRSW#show ip dhcp sn
JRSW#show ip dhcp snooping bin
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14361 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 75458 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#show run int gi0/2
Building configuration...
Current configuration : 121 bytes
!
interface GigabitEthernet0/2
switchport access vlan 2
switchport mode access
media-type rj45
negotiation auto
end
suzhouxiaoniu 发表于 2018-5-24 18:07
你把通和不通两种情况下的show ip verify source贴出来
JRSW#show ip source binding
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14382 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 75304 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#show ip dhcp sn bin
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14374 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 75296 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#show run int gi0/2
Building configuration...
Current configuration : 139 bytes
!
interface GigabitEthernet0/2
switchport access vlan 2
switchport mode access
media-type rj45
negotiation auto
ip verify source
end
JRSW#show ip sou bind
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14221 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 75143 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#sho ip dhc sn bin
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14216 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 75138 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#sh run int gi0/2
Building configuration...
Current configuration : 121 bytes
!
interface GigabitEthernet0/2
switchport access vlan 2
switchport mode access
media-type rj45
negotiation auto
end
JRSW#show ip sou bind
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14221 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 75143 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#sho ip dhc sn bin
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14216 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 75138 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#sh run int gi0/2
Building configuration...
Current configuration : 121 bytes
!
interface GigabitEthernet0/2
switchport access vlan 2
switchport mode access
media-type rj45
negotiation auto
end
JRSW#sh ip sou bin
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14391 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 74962 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#sho ip dhc sn b
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14380 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 74951 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#sh run in gi0/2
Building configuration...
Current configuration : 139 bytes
!
interface GigabitEthernet0/2
switchport access vlan 2
switchport mode access
media-type rj45
negotiation auto
ip verify source
end
suzhouxiaoniu 发表于 2018-5-24 18:07
你把通和不通两种情况下的show ip verify source贴出来
JRSW# sh ip sou bin
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14345 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 64196 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#sh ip dhc sn bi
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14339 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 64191 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#sh run int g0/2
Building configuration...
Current configuration : 139 bytes
!
interface GigabitEthernet0/2
switchport access vlan 2
switchport mode access
media-type rj45
negotiation auto
ip verify source
end
suzhouxiaoniu 发表于 2018-5-24 18:07
你把通和不通两种情况下的show ip verify source贴出来
JRSW#
JRSW#sh ip sou bind
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14235 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 64086 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#sh ip dhc sn b
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------------- ---- --------------------
00:50:79:66:68:04 192.168.2.5 14225 dhcp-snooping 2 GigabitEthernet0/2
00:50:79:66:68:03 192.168.3.2 64076 dhcp-snooping 3 GigabitEthernet0/3
Total number of bindings: 2
JRSW#sh run in g0/2
Building configuration...
Current configuration : 121 bytes
!
interface GigabitEthernet0/2
switchport access vlan 2
switchport mode access
media-type rj45
negotiation auto
end
suzhouxiaoniu 发表于 2018-5-24 18:07
你把通和不通两种情况下的show ip verify source贴出来
JRSW#show ip ver source
Interface Filter-type Filter-mode IP-address Mac-address Vlan
--------- ----------- ----------- --------------- ----------------- ----
Gi0/2 ip active 192.168.2.5 2
JRSW#sho ip ver source
Interface Filter-type Filter-mode IP-address Mac-address Vlan
--------- ----------- ----------- --------------- ----------------- ----