设为首页收藏本站language 语言切换
查看: 1853|回复: 5
收起左侧

[求助] 新手求助 单臂路由不通

[复制链接]
发表于 2016-10-25 02:09:45 | 显示全部楼层 |阅读模式
3鸿鹄币
练习配置单臂路由 怎么都不通,拓扑、地址如图所示






交换机上配置
Switch#
Switch#
Switch#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#int
Switch(config)#interface f0/1
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface f0/2
Switch(config-if)#switchport access vlan 3
Switch(config-if)#exit
Switch(config)#interface f0/3
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk allowed vlan all
Switch(config-if)#exit
Switch(config)#end




路由器配置
outer>en
Router#
Router#
Router#conf
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#
Router(config)#
Router(config)#interf
Router(config)#interface f0/1
Router(config-if)#no sh
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#exit
Router(config)#
Router(config)#
Router(config)#inter
Router(config)#interface f0/1.1
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/1.1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.1, changed state to up

Router(config-subif)#
Router(config-subif)#
Router(config-subif)#encapsulation dot1Q 2

Router(config-subif)#ip address 192.168.2.254 255.255.255.0
Router(config-subif)#exit
Router(config)#interface f0/1.2
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/1.2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.2, changed state to up

Router(config-subif)#
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip address 192.168.3.254 255.255.255.0

Router(config-subif)#end

1.PNG 2.PNG 3.PNG


最佳答案

查看完整内容

网关问题。。。。 你的网关是254还是1呢?
发表于 2016-10-25 02:09:46 | 显示全部楼层
网关问题。。。。  你的网关是254还是1呢?
沙发 2016-10-25 02:09:46 回复 收起回复
回复

使用道具 举报

发表于 2016-10-25 09:20:03 | 显示全部楼层
本帖最后由 shenxian 于 2016-10-25 11:54 编辑

你需要在交换机的trunk口配置(config-if)#switchport trunk encapsulation dot1q刚才忘了看网关,网关肯定要指正确的。
板凳 2016-10-25 09:20:03 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-10-25 10:07:16 | 显示全部楼层
谢谢,照着网上敲的,没注意!
地板 2016-10-25 10:07:16 回复 收起回复
回复

使用道具 举报

发表于 2016-10-28 17:42:42 | 显示全部楼层
交换机 要配置为trunk  路由器的子接口IP地址 应该是你PC的网关
5# 2016-10-28 17:42:42 回复 收起回复
回复

使用道具 举报

发表于 2016-10-31 10:32:14 | 显示全部楼层
主机上的网关地址配置错了,要指向你在路由器上面配置好的网关地址,比如这一次配置的是192.168.2.254和192.168.3.254,主机的网关地址配错了,其他没问题
6# 2016-10-31 10:32:14 回复 收起回复
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-8 03:18 , Processed in 0.066644 second(s), 14 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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