[問題] Help me!Cisco互相Ping不到?Why?

看板Network作者 (UNIEER)時間15年前 (2010/09/17 18:13), 編輯推噓2(2026)
留言28則, 2人參與, 最新討論串1/1
小的有兩台Cisco Router 接在同一個Hub上,為什麼連不上? ping 都 ping不到? 設定分別為 ------------------------------------RouterA--------------------------------- Building configuration... Current configuration : 1333 bytes ! version 12.3 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname RouterA ! boot-start-marker boot-end-marker ! enable password 12345 ! no aaa new-model ip subnet-zero ! ! ! ip cef ! ! ! interface FastEthernet0 no ip address speed auto ! interface FastEthernet0.2 encapsulation dot1Q 2 ip address 192.168.223.99 255.255.255.0 no cdp enable ! interface FastEthernet0.3 encapsulation dot1Q 3 ip address 10.8.15.1 255.255.255.0 no cdp enable ! interface Serial0 bandwidth 512 ip address 192.168.254.2 255.255.255.252 encapsulation ppp no fair-queue ! interface Serial1 no ip address shutdown ! router ospf 1 router-id 10.8.15.1 log-adjacency-changes network 10.8.15.0 0.0.0.255 area 0 network 192.168.254.0 0.0.0.3 area 0 ! ip classless ip route 0.0.0.0 0.0.0.0 192.168.254.1 ip route 0.0.0.0 0.0.0.0 192.168.223.1 230 ip route 10.3.0.0 255.255.0.0 192.168.254.1 ip route 10.8.0.0 255.255.0.0 192.168.223.1 230 ip route 10.8.15.100 255.255.255.255 FastEthernet0.3 ip route 10.8.19.0 255.255.255.0 10.8.15.250 ip route 10.8.22.0 255.255.255.0 10.8.15.100 ip route 10.8.190.0 255.255.255.0 192.168.223.1 ip route 192.168.221.0 255.255.255.0 192.168.254.1 no ip http server ! ! line con 0 line aux 0 line vty 0 4 password 12345 login ! end -------------------------------Router B------------------------------------ Current configuration : 829 bytes ! version 12.3 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname RouterB ! boot-start-marker boot-end-marker ! enable password 12345 ! no aaa new-model ip subnet-zero ! ! no ip domain lookup ! ip cef ! ! ! ! interface FastEthernet0 ip address 10.8.15.100 255.255.255.0 speed auto no cdp enable ! interface Serial0 ip address 192.168.254.17 255.255.255.252 encapsulation ppp no cdp enable ! interface Serial1 no ip address shutdown no cdp enable ! ip classless ip route 10.3.0.0 255.255.0.0 10.8.15.1 ip route 10.8.0.0 255.255.0.0 10.8.15.1 ip route 10.8.19.0 255.255.255.0 192.168.254.18 ip route 10.8.190.0 255.255.255.0 10.8.15.1 no ip http server ! no cdp run ! line con 0 stopbits 1 line aux 0 line vty 0 4 password 12345 login ! end -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.36.68.146

09/17 21:17, , 1F
很正常啊 你兩個fast ethernet 兩個封裝不同...
09/17 21:17, 1F

09/17 21:17, , 2F
怎麼會通???
09/17 21:17, 2F

09/17 21:17, , 3F
encapsulation 這個是關鍵
09/17 21:17, 3F

09/17 21:18, , 4F
我還是習慣推文... 沒辦法~ 某個戰略組長喜歡人三行回文
09/17 21:18, 4F

09/17 21:18, , 5F
我還是改不了我的習慣就是了.....
09/17 21:18, 5F

09/17 21:19, , 6F
Router的Fa0 這部分 是要給擁有Trunk的Switch使用...
09/17 21:19, 6F

09/17 21:20, , 7F
你可以發現這個configuration當中有encapsulation dot1q
09/17 21:20, 7F

09/17 21:20, , 8F
這就代表這個Port接受dot1q的封裝
09/17 21:20, 8F

09/17 21:21, , 9F
換句話說 就是RouterA這台路由器按照你所po的設定就是設定
09/17 21:21, 9F

09/17 21:21, , 10F
位於VLAN之間的Routing~ 所以你的Switch連接到RouterA的Po
09/17 21:21, 10F

09/17 21:22, , 11F
rt 設定 Trunk 就能夠進行VLAN的Routing了
09/17 21:22, 11F

09/17 21:22, , 12F
至於Router B 的Fa0 設定就很簡單 就好比一般的LAN一樣
09/17 21:22, 12F

09/17 21:23, , 13F
若你的Switch使用access mode的話,就可以用這樣的設定
09/17 21:23, 13F

09/17 21:23, , 14F
由於你Router A與B之間的溝通方式不同,所以你接到HUB上
09/17 21:23, 14F

09/17 21:24, , 15F
當然不會通! 若真的有必要保留RouterA的組態...其實dot1q
09/17 21:24, 15F

09/17 21:24, , 16F
有個小技巧 你可以試試看...
09/17 21:24, 16F

09/17 21:25, , 17F
你就把dot1q當中的VLAN 3 設定成native vlan就可以了
09/17 21:25, 17F

09/17 21:25, , 18F
封包封裝的時候不要有vlan tag 的話,我想應該是能通的
09/17 21:25, 18F

09/17 21:25, , 19F
只不過你這兩台router的組態還蠻詭異的 有點不搭就是了
09/17 21:25, 19F

09/17 21:26, , 20F
就看看你的需求去修整or刪除之類...
09/17 21:26, 20F

09/17 21:26, , 21F
PS:因為你Router B 是 10.8.15.0/24 的網段...
09/17 21:26, 21F

09/17 21:27, , 22F
而我發現你的RouterA FA0的網段子介面(fa0.3)設定一樣餘
09/17 21:27, 22F

09/17 21:28, , 23F
Router B 的 Fa0 相同的網段... 所以你要在Switch上頭指定
09/17 21:28, 23F

09/17 21:28, , 24F
native vlan 改設定成 vlan 3 應該就可以通了
09/17 21:28, 24F

09/17 21:30, , 25F
然後RouterA的Fa0.3也設定encapsulation dot1q 3 native
09/17 21:30, 25F

09/17 21:35, , 26F
PS: 在Switch接往 Router A 的 Fa 0 上頭的Port 設定
09/17 21:35, 26F

09/17 21:36, , 27F
switchport trunk native vlan 3
09/17 21:36, 27F

09/17 22:50, , 28F
先一鞠躬!專業果然還是要交給專業!
09/17 22:50, 28F
文章代碼(AID): #1CapzOJt (Network)