CISCO 2950交换机VLAN路由问题(棘手!)

foreverstar2004 2010-03-26 05:11:44
如图:


状况: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

请高手帮忙解答,谢谢!分不够再加!
...全文
592 18 打赏 收藏 转发到动态 举报
写回复
用AI写文章
18 条回复
切换为时间正序
请发表友善的回复…
发表回复
kingliu6534 2010-08-31
  • 打赏
  • 举报
回复
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
!
!
端口f0/0没有打开!
wex_1982 2010-08-27
  • 打赏
  • 举报
回复
配置没问题,单臂路由相对比较简单,但是一般都是int f0/0.1 没有后边的mult参数
另外看情况就是路由器路由功能关闭了,你试试敲下 ip routing
bartholemew 2010-05-12
  • 打赏
  • 举报
回复
LZ能不能重新发一下图,图片看不到...
foreverstar2004 2010-05-12
  • 打赏
  • 举报
回复
[Quote=引用 13 楼 syumin2009 的回复:]
interface FastEthernet0/12
switch trunk allow vlan all
记得应该是要写的
[/Quote]

我在2950上打这个命令时(switch trunk allow vlan all) 提示不支持噢!!有没人再帮顶下,谢谢,期待解决,我试N次也检查N次了,在网上查了很多资料,都没能找到问题所在
syumin2009 2010-04-16
  • 打赏
  • 举报
回复
interface FastEthernet0/12
switch trunk allow vlan all
记得应该是要写的
foreverstar2004 2010-04-10
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 jia_123 的回复:]
看不到图!!!你先把
interface FastEthernet0/1
switchport mode access
switchport access vlan 2
!
interface FastEthernet0/2
switchport mode access
switchport access vlan 3
!
里面switchport access vlan……
[/Quote]


9楼兄弟,常识问题你都弄错了,我那是把某个端口加到某个VLAN, 你用switchport access vlan all? 是把端口加入所有VLAN?
foreverstar2004 2010-04-10
  • 打赏
  • 举报
回复
[Quote=引用 10 楼 jia_123 的回复:]
静态路由好像有点问题。
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
你路由器上的接口IP是192.168.1.254和172.16.1.254,这样的话在路由器上这两个网段就算是直连路由了,就不需要配置静态路由了。
好像静态路由命令的格式是:ip route 目的网……
[/Quote]

10楼兄弟,我没设置静态路由,fa 端口我作了子接口,所以路由器自动把2个直连网段显示成静态路由了,Trunk有做,没有高手再看看了?
Jialingtong 2010-04-08
  • 打赏
  • 举报
回复
静态路由好像有点问题。
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
你路由器上的接口IP是192.168.1.254和172.16.1.254,这样的话在路由器上这两个网段就算是直连路由了,就不需要配置静态路由了。
好像静态路由命令的格式是:ip route 目的网络 子网掩码 下一跳IP地址
Jialingtong 2010-04-08
  • 打赏
  • 举报
回复
看不到图!!!你先把
interface FastEthernet0/1
switchport mode access
switchport access vlan 2
!
interface FastEthernet0/2
switchport mode access
switchport access vlan 3
!
里面switchport access vlan ID改为switchport access vlan all试试看。
并且你在端口上面配置的trunk口上面也要允许所以的vlan。
由于我这么看不见图,你先用上面的方法试试。
shiqincctv 2010-04-07
  • 打赏
  • 举报
回复
首先确保路由上的F0/0口是开启状态,好像还需要设一下Trunk,试下。
久不用boson,期待结果!
foreverstar2004 2010-04-06
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 lxrxyz 的回复:]
很久没用这种设备了,说两点:
1,路由器上的路由没必要,因为直接本身就有路由。
2,交换机trunk端口透一下vlan2和3.
[/Quote]

2楼大哥,TRUNK 我是在fa0/12口有做,接路由器的那个口!
foreverstar2004 2010-04-06
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 fly_stone 的回复:]
请将路由器上你添加的静态路由拿掉!
[/Quote]

3楼在哥,路由器的静态路由拿掉了,还是不行,到底哪里配错了? 哪位高手帮解答啊
jamella000 2010-04-01
  • 打赏
  • 举报
回复
学习了!
Fly_Stone 2010-03-31
  • 打赏
  • 举报
回复
请将路由器上你添加的静态路由拿掉!
一半乐事 2010-03-28
  • 打赏
  • 举报
回复
很久没用这种设备了,说两点:
1,路由器上的路由没必要,因为直接本身就有路由。
2,交换机trunk端口透一下vlan2和3.
foreverstar2004 2010-03-27
  • 打赏
  • 举报
回复
没一个人帮忙看看啊! 小弟拜谢啦!

3,811

社区成员

发帖
与我相关
我的任务
社区描述
硬件使用 交换及路由技术相关问题讨论专区
社区管理员
  • 交换及路由技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧