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

[已解决] 做练习遇到多多问题……三层交换机端口trunk问题

[复制链接]
发表于 2014-1-22 15:17:56 | 显示全部楼层 |阅读模式
在做2层和3层交换机不同vlan通讯的练习,用pt做,在三层交换机端口上设置trunk,不给弄,用的是3560设备,没有加额外模块,代码如下

Switch(config-if)#sw
Switch(config-if)#switchport trunk enca
Switch(config-if)#switchport trunk encapsulation dot1q
                             ^
% Invalid input detected at '^' marker.
       
Switch(config-if)#switchport mode trunk
                             ^
% Invalid input detected at '^' marker.


模拟器不给跑封装协议,又不给选择模式,不明,求解。
发表于 2014-1-22 15:25:24 | 显示全部楼层
在PT里,2950和2960不需要打switchport trunk encapsulation dot1q这条,默认已封装了!
沙发 2014-1-22 15:25:24 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2014-1-22 15:34:48 | 显示全部楼层
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#sw
Switch(config-if)#switchport mode tr
Switch(config-if)#switchport mode trunk
pt 3560 可以而且必须要封装
板凳 2014-1-22 15:34:48 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2014-1-22 15:35:56 | 显示全部楼层
都说了三层接口,你还用 switchport mode trunk  ,这条只有在二层物理接口。。。
地板 2014-1-22 15:35:56 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2014-1-22 18:24:37 | 显示全部楼层
可以封装的呀   撸主把拓扑发来看一下嘛
6# 2014-1-22 18:24:37 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-1-23 21:49:05 | 显示全部楼层


三层3560 的runing-config

version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
ip routing
!
!
interface FastEthernet0/24
no switchport
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
interface Vlan10
ip address 192.168.1.1 255.255.255.0
!
interface Vlan20
ip address 192.168.2.1 255.255.255.0
!
interface Vlan30
ip address 192.168.3.1 255.255.255.0
!
ip classless
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end

然后进入f0/24接口跑封装就不行了

Switch(config)#int f0/24
Switch(config-if)#sw
Switch(config-if)#switchport mo
Switch(config-if)#switchport mode trunk
                             ^
% Invalid input detected at '^' marker.
       
Switch(config-if)#switchport trunk encapsulation dot1q
                             ^
% Invalid input detected at '^' marker.
7# 2014-1-23 21:49:05 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-1-23 21:50:56 | 显示全部楼层
mychong888 发表于 2014-1-22 15:25
在PT里,2950和2960不需要打switchport trunk encapsulation dot1q这条,默认已封装了!

二层的交换机设置已经弄好,我在下面附上图了,就是三层交换机跑封装的命令不行
8# 2014-1-23 21:50:56 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2014-1-23 21:51:25 | 显示全部楼层
lauruirui 发表于 2014-1-22 18:24
可以封装的呀   撸主把拓扑发来看一下嘛

已附上拓扑图和有关命令代码
9# 2014-1-23 21:51:25 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2014-1-23 22:53:37 | 显示全部楼层
coople 发表于 2014-1-23 21:50
二层的交换机设置已经弄好,我在下面附上图了,就是三层交换机跑封装的命令不行

你的三层交换机已把fa0/24变为三层接口了,所以用不了swi  mode trunk,要在二层接口才可以用。
10# 2014-1-23 22:53:37 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2014-1-23 22:55:14 | 显示全部楼层
interface FastEthernet0/24
no switchport                   //三层接口不能用swi mod tru
no ip address
duplex auto
speed auto
11# 2014-1-23 22:55:14 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2014-1-24 07:48:08 | 显示全部楼层
错在多打了一条no switchport命令
12# 2014-1-24 07:48:08 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2014-1-29 16:13:44 | 显示全部楼层
低版本的ios默認啟用dot1q,而且只能啟用dot1q
13# 2014-1-29 16:13:44 回复 收起回复
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-11 02:03 , Processed in 0.111403 second(s), 24 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

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