看板 Network 關於我們 聯絡資訊
小的有兩台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
wst2080:很正常啊 你兩個fast ethernet 兩個封裝不同... 09/17 21:17
wst2080:怎麼會通??? 09/17 21:17
wst2080:encapsulation 這個是關鍵 09/17 21:17
wst2080:我還是習慣推文... 沒辦法~ 某個戰略組長喜歡人三行回文 09/17 21:18
wst2080:我還是改不了我的習慣就是了..... 09/17 21:18
wst2080:Router的Fa0 這部分 是要給擁有Trunk的Switch使用... 09/17 21:19
wst2080:你可以發現這個configuration當中有encapsulation dot1q 09/17 21:20
wst2080:這就代表這個Port接受dot1q的封裝 09/17 21:20
wst2080:換句話說 就是RouterA這台路由器按照你所po的設定就是設定 09/17 21:21
wst2080:位於VLAN之間的Routing~ 所以你的Switch連接到RouterA的Po 09/17 21:21
wst2080:rt 設定 Trunk 就能夠進行VLAN的Routing了 09/17 21:22
wst2080:至於Router B 的Fa0 設定就很簡單 就好比一般的LAN一樣 09/17 21:22
wst2080:若你的Switch使用access mode的話,就可以用這樣的設定 09/17 21:23
wst2080:由於你Router A與B之間的溝通方式不同,所以你接到HUB上 09/17 21:23
wst2080:當然不會通! 若真的有必要保留RouterA的組態...其實dot1q 09/17 21:24
wst2080:有個小技巧 你可以試試看... 09/17 21:24
wst2080:你就把dot1q當中的VLAN 3 設定成native vlan就可以了 09/17 21:25
wst2080:封包封裝的時候不要有vlan tag 的話,我想應該是能通的 09/17 21:25
wst2080:只不過你這兩台router的組態還蠻詭異的 有點不搭就是了 09/17 21:25
wst2080:就看看你的需求去修整or刪除之類... 09/17 21:26
wst2080:PS:因為你Router B 是 10.8.15.0/24 的網段... 09/17 21:26
wst2080:而我發現你的RouterA FA0的網段子介面(fa0.3)設定一樣餘 09/17 21:27
wst2080:Router B 的 Fa0 相同的網段... 所以你要在Switch上頭指定 09/17 21:28
wst2080:native vlan 改設定成 vlan 3 應該就可以通了 09/17 21:28
wst2080:然後RouterA的Fa0.3也設定encapsulation dot1q 3 native 09/17 21:30
wst2080:PS: 在Switch接往 Router A 的 Fa 0 上頭的Port 設定 09/17 21:35
wst2080:switchport trunk native vlan 3 09/17 21:36
UNIEER:先一鞠躬!專業果然還是要交給專業! 09/17 22:50