如图:
状况:pc1 能ping通网关(也就是路由器子接口1的IP:192.168.1.254),pc2 也能ping 通网关(也就是路由器子接口2的IP:172.16.1.254),但pc1 不能ping 通pc2,为何原因 注:用boson netsim5.0模拟器做的实验)
路由器为2620,配置如下:(fa0/0口作了2个子接品,分别封装dot1q协议
interface Serial0
no ip address
no ip directed-broadcast
shutdown
!
interface FastEthernet0/0
no ip address
no ip directed-broadcast
!
interface FastEthernet0/0.1 multipoint
encapsulation dot1q 2
ip address 192.168.1.254 255.255.255.0
!
interface FastEthernet0/0.2 multipoint
encapsulation dot1q 3
ip address 172.16.1.254 255.255.255.0
!
!
ip classless
no ip http server
ip route 192.168.1.0 255.255.255.0 FA0/0.1
ip route 172.16.1.0 255.255.255.0 FA0/0.2
!
!
line con 0
transport input none
line aux 0
line vty 0 4
pc1接2950交换机fa0/1口(属VLAN1),pc2接2950交换机fa0/2口(属VLAN2),2950交换机fa0/12口接2620路由器,已做trunk,配置如下:
interface FastEthernet0/1
switchport mode access
switchport access vlan 2
!
interface FastEthernet0/2
switchport mode access
switchport access vlan 3
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
switchport mode trunk
!
vtp domain bigdomain
interface Vlan 1
no ip address
no ip route-cache
shutdown
vlan 2 name 2
vlan 3 name 3
!
ip classless
no ip http server
!
!
vlan信息如下:
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12
2 v2 active Fa0/1
3 v3 active Fa0/2
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
2台PC的IP及网关配置如下:
PC1: IP Address. . . . . . . . . . . . : 192.168.1.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.254
PC2: IP Address. . . . . . . . . . . . : 172.16.1.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.1.254
请高手帮忙解答,谢谢!分不够再加!