Cisco
思科配置。已配置 DHCP 和 VLAN。但無法 ping 其他 VLAN 客戶端
我用 CISCO Packet Tracer 創建了一個網路測試實驗室。我已執行以下操作以使 DHCP 和 VLAN(帶卡車)工作:
- 配置的路由器介面 (g0/0 + g0/0.10-0.50)
- 在路由器上配置 DHCP 設置
- 在路由器上啟用中繼
- 交換機上配置的 VLAN
- 在交換機上啟用中繼
下面我發布了路由器和交換機的>show run<。工作站可以獲得 DHCP IP 地址,並且 VLAN 隔離正在發揮作用。
工作站可以 ping 路由器,但不能 ping 單獨 VLAN 網路上的其他工作站。
路由器配置
shanelab#show run Building configuration... Current configuration : 2184 bytes ! version 15.1 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname shanelab ! ! ! enable secret 5 $1$mERr$xqDCepYvK4SAD6V0cxKQ3. ! ! ip dhcp excluded-address 192.168.10.1 192.168.10.10 ip dhcp excluded-address 192.168.20.1 192.168.20.10 ip dhcp excluded-address 192.168.30.1 192.168.30.10 ip dhcp excluded-address 192.168.40.1 192.168.40.10 ip dhcp excluded-address 192.168.50.1 ip dhcp excluded-address 192.168.60.1 ip dhcp excluded-address 192.168.50.1 192.168.50.10 ip dhcp excluded-address 192.168.60.1 192.168.60.10 ! ip dhcp pool ITC network 192.168.10.0 255.255.255.0 default-router 192.165.10.1 ip dhcp pool Manuf network 192.168.20.0 255.255.255.0 default-router 192.168.20.1 ip dhcp pool billing network 192.168.30.0 255.255.255.0 default-router 192.168.30.1 ip dhcp pool sales network 192.168.40.0 255.255.255.0 default-router 192.168.40.1 ip dhcp pool HR network 192.168.50.0 255.255.255.0 default-router 192.168.50.1 ip dhcp pool Management network 192.168.60.0 255.255.255.0 default-router 192.168.60.1 ! ! ! ip cef no ipv6 cef ! ! ! ! license udi pid CISCO1941/K9 sn FTX1524KDLE- ! ! ! ! ! ! ! ! ! ! ! spanning-tree mode pvst ! ! ! ! ! ! interface GigabitEthernet0/0 ip address 192.168.1.1 255.255.255.0 duplex auto speed auto ! interface GigabitEthernet0/0.10 encapsulation dot1Q 10 ip address 192.168.10.1 255.255.255.0 ! interface GigabitEthernet0/0.20 encapsulation dot1Q 20 ip address 192.168.20.1 255.255.255.0 ! interface GigabitEthernet0/0.30 encapsulation dot1Q 30 ip address 192.168.30.1 255.255.255.0 ! interface GigabitEthernet0/0.40 encapsulation dot1Q 40 ip address 192.168.40.1 255.255.255.0 ! interface GigabitEthernet0/0.50 encapsulation dot1Q 50 ip address 192.168.50.1 255.255.255.0 ! interface GigabitEthernet0/0.60 encapsulation dot1Q 60 ip address 192.168.60.1 255.255.255.0 ! interface GigabitEthernet0/1 no ip address duplex auto speed auto ! interface Vlan1 no ip address shutdown ! ip classless shanelab# shanelab#
開關配置
Switch#show run Building configuration... Current configuration : 1385 bytes ! version 15.0 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Switch ! ! ! ! ! ! spanning-tree mode pvst spanning-tree extend system-id ! interface FastEthernet0/1 switchport access vlan 10 switchport mode access ! interface FastEthernet0/2 switchport access vlan 20 switchport mode access ! interface FastEthernet0/3 switchport access vlan 30 switchport mode access ! interface FastEthernet0/4 switchport access vlan 40 switchport mode access ! interface FastEthernet0/5 switchport access vlan 50 switchport mode access ! interface FastEthernet0/6 switchport access vlan 60 ! interface FastEthernet0/7 ! interface FastEthernet0/8 ! interface FastEthernet0/9 ! interface FastEthernet0/10 ! interface FastEthernet0/11 ! interface FastEthernet0/12 ! interface FastEthernet0/13 ! interface FastEthernet0/14 ! interface FastEthernet0/15 ! interface FastEthernet0/16 ! interface FastEthernet0/17 ! interface FastEthernet0/18 ! interface FastEthernet0/19 ! interface FastEthernet0/20 ! interface FastEthernet0/21 ! interface FastEthernet0/22 ! interface FastEthernet0/23 ! interface FastEthernet0/24 switchport mode trunk ! interface GigabitEthernet0/1 ! interface GigabitEthernet0/2 ! interface Vlan1 no ip address shutdown ! ! ! ! line con 0 ! line vty 0 4 login line vty 5 15 login ! ! ! ! end Switch#
我看不出你的配置有什麼問題。您可以在 ping 時使用模擬模式來確定 ICMP 數據包發生了什麼。