设为首页收藏本站language 语言切换
12
返回列表 发新帖
楼主: wangs.zjsx
收起左侧

[已解决] ccna vlan间路由 疑问

  [复制链接]
 成长值: 63770
发表于 2011-10-25 09:34:36 | 显示全部楼层
还是ping 不通啊。。。如果把sw2连上的话,单臂路由好像也不能成功了。把sw1和sw2之间改成交叉线也不行,,,求高手解啊。。。
16# 2011-10-25 09:34:36 回复 收起回复
回复 支持 反对

使用道具 举报

 成长值: 63770
发表于 2011-10-26 17:04:48 | 显示全部楼层
思路:r1上:分别有三个子接口,并分别封装协议、配置IP地址
sw1上:创建vlan 2和vlan 3,并指定端口
sw2上:创建vlan 4并指定端口
sw1上:f0/24和f0/23设置成trunk模式
sw2上:f0/24设置成trunk模式
我用的是PT5.3的,应该和版本没什么关系

r1上的命令:

Router#show running-config
Building configuration...

Current configuration : 733 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
!
!
!
!
!
!
!
!
!
no ip domain-lookup
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1
encapsulation dot1Q 2
ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0.2
encapsulation dot1Q 3
ip address 192.168.2.1 255.255.255.0
!
interface FastEthernet0/0.3
encapsulation dot1Q 4
ip address 192.168.3.1 255.255.255.0
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
!
!
!
!
!
!
line con 0
line vty 0 4
login
!
!
!
end



sw1上的命令:
Switch#show running-config
Building configuration...

Current configuration : 1127 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
no ip domain-lookup
!
!
interface FastEthernet0/1
switchport access vlan 2
!
interface FastEthernet0/2
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
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
switchport mode trunk
!
interface FastEthernet0/24
switchport mode trunk
!
interface GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface Vlan1
no ip address
shutdown
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end


sw2 上的命令:
Switch#show running-config
Building configuration...

Current configuration : 1134 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
no ip domain-lookup
!
!
interface FastEthernet0/1
switchport access vlan 4
!
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
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
switchport mode trunk
!
interface GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan4
ip address 192.168.3.1 255.255.255.0
!
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end
17# 2011-10-26 17:04:48 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2011-10-26 17:14:35 | 显示全部楼层
18# 2011-10-26 17:14:35 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2012-6-27 21:57:43 | 显示全部楼层
19# 2012-6-27 21:57:43 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-1-6 10:36:28 | 显示全部楼层
本帖最后由 84983251 于 2013-1-6 10:47 编辑

{:soso_e127:}
20# 2013-1-6 10:36:28 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-5-21 16:32:04 | 显示全部楼层
首先 把路由器f0/0“no shutdown”
其次 单臂路由配置时 vlan ID 与封装 ID一致
21# 2013-5-21 16:32:04 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2020-10-20 11:18:51 | 显示全部楼层
谢谢分享多谢
22# 2020-10-20 11:18:51 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-6-15 20:56 , Processed in 0.136194 second(s), 20 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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