作者UNIEER (UNIEER)
看板Network
标题[问题] Help me!Cisco互相Ping不到?Why?
时间Fri Sep 17 18:13:42 2010
小的有两台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
1F:推 wst2080:很正常啊 你两个fast ethernet 两个封装不同... 09/17 21:17
2F:→ wst2080:怎麽会通??? 09/17 21:17
3F:→ wst2080:encapsulation 这个是关键 09/17 21:17
4F:→ wst2080:我还是习惯推文... 没办法~ 某个战略组长喜欢人三行回文 09/17 21:18
5F:→ wst2080:我还是改不了我的习惯就是了..... 09/17 21:18
6F:→ wst2080:Router的Fa0 这部分 是要给拥有Trunk的Switch使用... 09/17 21:19
7F:→ wst2080:你可以发现这个configuration当中有encapsulation dot1q 09/17 21:20
8F:→ wst2080:这就代表这个Port接受dot1q的封装 09/17 21:20
9F:→ wst2080:换句话说 就是RouterA这台路由器按照你所po的设定就是设定 09/17 21:21
10F:→ wst2080:位於VLAN之间的Routing~ 所以你的Switch连接到RouterA的Po 09/17 21:21
11F:→ wst2080:rt 设定 Trunk 就能够进行VLAN的Routing了 09/17 21:22
12F:→ wst2080:至於Router B 的Fa0 设定就很简单 就好比一般的LAN一样 09/17 21:22
13F:→ wst2080:若你的Switch使用access mode的话,就可以用这样的设定 09/17 21:23
14F:→ wst2080:由於你Router A与B之间的沟通方式不同,所以你接到HUB上 09/17 21:23
15F:→ wst2080:当然不会通! 若真的有必要保留RouterA的组态...其实dot1q 09/17 21:24
16F:→ wst2080:有个小技巧 你可以试试看... 09/17 21:24
17F:→ wst2080:你就把dot1q当中的VLAN 3 设定成native vlan就可以了 09/17 21:25
18F:→ wst2080:封包封装的时候不要有vlan tag 的话,我想应该是能通的 09/17 21:25
19F:→ wst2080:只不过你这两台router的组态还蛮诡异的 有点不搭就是了 09/17 21:25
20F:→ wst2080:就看看你的需求去修整or删除之类... 09/17 21:26
21F:→ wst2080:PS:因为你Router B 是 10.8.15.0/24 的网段... 09/17 21:26
22F:→ wst2080:而我发现你的RouterA FA0的网段子介面(fa0.3)设定一样余 09/17 21:27
23F:→ wst2080:Router B 的 Fa0 相同的网段... 所以你要在Switch上头指定 09/17 21:28
24F:→ wst2080:native vlan 改设定成 vlan 3 应该就可以通了 09/17 21:28
25F:→ wst2080:然後RouterA的Fa0.3也设定encapsulation dot1q 3 native 09/17 21:30
26F:推 wst2080:PS: 在Switch接往 Router A 的 Fa 0 上头的Port 设定 09/17 21:35
27F:→ wst2080:switchport trunk native vlan 3 09/17 21:36
28F:→ UNIEER:先一鞠躬!专业果然还是要交给专业! 09/17 22:50