细安诶 发表于 2011-4-21 18:28:17

vlan路由【新人求助】

下午在做vlan实验,拓扑图如下:

做完后PC0终端ping不通PC4,不同VLAN之间不能通信
附:
vlan2有:
PC0:192.168.1.1/29
PC3:192.168.1.2/29
gataway:192.168.1.6

vlan3有:
PC1:192.168.1.9
PC4:192.168.1.10
gateway:192.168.1.14

vlan4有:
PC2:192.168.1.17
PC3:192.168.1.18
gateway:192.168.1.22

下面的是路由器的子接口配置:

JYU#sh int
FastEthernet0/0 is up, line protocol is up (connected)
Hardware is Lance, address is 00d0.5886.6928 (bia 00d0.5886.6928)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
   reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
   0 packets input, 0 bytes, 0 no buffer
   Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
   0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
   0 input packets with dribble condition detected
   0 packets output, 0 bytes, 0 underruns
   0 output errors, 0 collisions, 1 interface resets
   0 babbles, 0 late collision, 0 deferred
   0 lost carrier, 0 no carrier
   0 output buffer failures, 0 output buffers swapped out
FastEthernet0/0.1 is up, line protocol is up (connected)
Hardware is PQUICC_FEC, address is 00d0.5886.6928 (bia 00d0.5886.6928)
Internet address is 192.168.1.6/29
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
   reliability 255/255, txload 1/255, rxload 1/255
Encapsulation 802.1Q Virtual LAN, Vlan ID 2
ARP type: ARPA, ARP Timeout 04:00:00,
Last clearing of "show interface" counters never
FastEthernet0/0.2 is up, line protocol is up (connected)
Hardware is PQUICC_FEC, address is 00d0.5886.6928 (bia 00d0.5886.6928)
Internet address is 192.168.1.14/29
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
   reliability 255/255, txload 1/255, rxload 1/255
Encapsulation 802.1Q Virtual LAN, Vlan ID 3
ARP type: ARPA, ARP Timeout 04:00:00,
Last clearing of "show interface" counters never
FastEthernet0/0.3 is up, line protocol is up (connected)
Hardware is PQUICC_FEC, address is 00d0.5886.6928 (bia 00d0.5886.6928)
Internet address is 192.168.1.22/29
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
   reliability 255/255, txload 1/255, rxload 1/255
Encapsulation 802.1Q Virtual LAN, Vlan ID 4
ARP type: ARPA, ARP Timeout 04:00:00,
Last clearing of "show interface" counters never
FastEthernet0/0.7 is up, line protocol is up (connected)
Hardware is PQUICC_FEC, address is 00d0.5886.6928 (bia 00d0.5886.6928)
Internet address is 192.168.1.30/29
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
   reliability 255/255, txload 1/255, rxload 1/255
Encapsulation 802.1Q Virtual LAN, Vlan ID 1
ARP type: ARPA, ARP Timeout 04:00:00,
Last clearing of "show interface" counters never


各位大神帮帮忙,小弟感激不尽

magic_os 发表于 2011-4-21 19:24:33

回复 1 # 细安诶 的帖子

也许是因为 Switch2和路由连接的那个端口没有被配置成主干端口造成的~

细安诶 发表于 2011-4-21 23:09:33

回复 2 # magic_os 的帖子


中继端口配置好了啊~还是不行

magic_os 发表于 2011-4-22 09:02:51

回复 3 # 细安诶 的帖子

你的意思是在相同的Vlan里面的机器可以互相通讯 不同的不能通讯是吧?
这就说明你Vlan在这三个交换机之间的配置应该是没有错的...
看你路由器子接口的封装应该也没有错误
那就只有可能是你那台和路由连接的交换机的那个端口可能忘记被配置成主干了

你将那台路由器的三个接口 fa 0/1 0/2 0/3都使用下面这些命令再配置一下吧

分别进入这些接口 在接口下敲
switchport mode trunk

wantccie 发表于 2011-4-22 09:32:57

本帖最后由 wantccie 于 2011-4-22 09:33 编辑

1、交换机与交换机之间,交换机与路由器之间起trunk
2、路由器上配置子接口封装相应vlan
3、交换机连接PC机的相应端口划分到vlan内,可以给二层交换机配置一个SVI地址,看看PC机到交换机通不通。然后进一步排查原因。
4、如果是用模拟器模拟PC机,务必关闭no ip routing,指定ip default-gateway X.X.X.X X.X.X.X

vlan间路由一共只有两种方式:
1、利用三层交换机作vlan的网关
2、利用路由器作单臂路由封装

linda.! 发表于 2011-4-22 09:52:03

1、PC机是路由器模拟的吗?是的话是否有no ip routing,接口是否no shutdown
2、交换机和交换机之间、路由器和交换机之间是否为trunk链路
3、各自先测试是否能ping通自己的网关。

bookpig 发表于 2011-4-22 14:18:15

-woniu2--woniu6-讨论的好热闹啊。

roy 发表于 2011-4-22 15:05:45

这个帖子不回对不起自己!
雏鹰部落分享快乐!

电脑123 发表于 2011-4-22 15:42:02

好贴 顶起强力技术贴 深入学习了谢谢

明天¤晴天℃ 发表于 2011-4-22 19:53:23

楼主问题解决了么 -woniu2-
页: [1] 2 3
查看完整版本: vlan路由【新人求助】