雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6184|回复: 9

[讨论/求助] 求助.单臂路由vlan1 Ping不通网关.

[复制链接]
发表于 2010-9-8 15:01:50 | 显示全部楼层 |阅读模式
单臂路由的实验...
划分vlan之后.两个不同vlan内的PC是可以Ping通的.
Vlan1已经设置了IP与网关.路由上也有封装.但是Ping不通交换机上的vlan 1.
请问为什么呢?




路由器设置:
Router#sh run
Building configuration...
Current configuration : 975 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!         
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Ethernet0/0
no ip address
full-duplex
!         
interface Ethernet0/0.1
encapsulation dot1Q 1 native
ip address 192.168.10.254 255.255.255.0
!
interface Ethernet0/0.10
encapsulation dot1Q 10
ip address 172.16.1.254 255.255.255.0
!
interface Ethernet0/0.20
encapsulation dot1Q 20
ip address 10.1.1.254 255.255.255.0
!
interface Ethernet0/1
no ip address
shutdown
half-duplex
!
interface Ethernet0/2
no ip address
shutdown
half-duplex
!
interface Ethernet0/3
no ip address
shutdown
half-duplex
!
ip http server
no ip http secure-server
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end

交换机设置:
SW1#sh run
Building configuration...
Current configuration : 1540 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip routing
!
!
no ip cef
no ip domain lookup
!
!
!         
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
!
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
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet2/0
!
interface FastEthernet2/1
!
interface FastEthernet2/2
!
interface FastEthernet2/3
!
interface FastEthernet2/4
!
interface FastEthernet2/5
!
interface FastEthernet2/6
!
interface FastEthernet2/7
!
interface FastEthernet2/8
!
interface FastEthernet2/9
!
interface FastEthernet2/10
!
interface FastEthernet2/11
!
interface FastEthernet2/12
!
interface FastEthernet2/13
!
interface FastEthernet2/14
!
interface FastEthernet2/15
!
interface Vlan1
ip address 192.168.10.1 255.255.255.0
no ip route-cache
!
ip default-gateway 192.168.10.254
ip http server
no ip http secure-server
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!         
!
end
发表于 2010-9-8 19:22:47 | 显示全部楼层
我刚刚做了一遍,是能够ping通的。你的配置
interface Ethernet0/0.1
encapsulation dot1Q 1 native
ip address 192.168.10.254 255.255.255.0
这个配置我没明白为什么要加这个,但是你给的VLAN1的管理IP是跟这个一个网段的,显然这样PC是无法管理SW1的,交换机的管理IP需要跟PC在同一个网段。
我的SHOW RUN:
R1:
interface FastEthernet0/0
no ip address
speed 100
full-duplex
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 172.16.10.254 255.255.255.0
!
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 10.1.1.254 255.255.255.0
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
!
!
ip http server
no ip http secure-server

SW1:
interface FastEthernet0/0
no ip address
no ip route-cache
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
no ip route-cache
shutdown
duplex auto
speed auto
!
interface FastEthernet1/0
switchport access vlan 10
!
interface FastEthernet1/1
switchport access vlan 20
!
interface FastEthernet1/2
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!         
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
switchport mode trunk
!
interface Vlan1
no ip address
no ip route-cache
!
interface Vlan10
ip address 172.16.10.250 255.255.255.0
!
ip default-gateway 172.16.10.254
 楼主| 发表于 2010-9-8 23:55:37 | 显示全部楼层
我刚刚做了一遍,是能够ping通的。你的配置
interface Ethernet0/0.1
encapsulation dot1Q 1 native
ip  ...
gechao890302 发表于 2010-9-8 19:22



    我这边还是不可以...ping不通..我说的是 PC Ping Vlan1 Ping不通哦

interface Ethernet0/0.1
encapsulation dot1Q 1 native
敲这个就是为了使PC访问处在不同网段的vlan 1
跟封装 10和20类似
发表于 2010-9-9 10:51:53 | 显示全部楼层
我刚真正看懂你的意思,你是想建立三个子接口,我刚试了下,是能够成功做通的,你把PC划入你的vlan 10里面,就可以了!
interface FastEthernet1/0
switchport access vlan 10
 楼主| 发表于 2010-9-9 11:10:58 | 显示全部楼层
回复 4# gechao890302


    额.PC已经划进去了...两个不同Vlan内的PC也是通的..但是Ping不通Vlan 1的IP..你可以Ping通vlan1?
发表于 2010-9-9 11:14:06 | 显示全部楼层
再检查一遍吧,我是可以ping vlan1的网关和SW1的管理IP的
 楼主| 发表于 2010-9-9 11:19:05 | 显示全部楼层
我是想做远程管理交换机的实验...
 楼主| 发表于 2010-9-9 11:25:34 | 显示全部楼层
回复 6# gechao890302


    哦.你是用小凡模拟器吗?
发表于 2010-9-9 16:57:48 | 显示全部楼层
不是啊,GNS3
 楼主| 发表于 2010-9-9 21:09:49 | 显示全部楼层
回复 9# gechao890302


    哦.明白了.非常感谢.......
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-12-23 17:48 , Processed in 0.089879 second(s), 18 queries , Gzip On.

快速回复 返回顶部 返回列表