- 积分
- 102
- 鸿鹄币
- 个
- 好评度
- 点
- 精华
- 注册时间
- 2014-3-26
- 最后登录
- 1970-1-1
- 阅读权限
- 20
- 听众
- 收听
助理工程师
|
发表于 2014-10-30 18:55:41
|
显示全部楼层
ac cd
hybird配置是需要先有vlan 才可以进行端口配置的
而trunk配置是没有这个vlan也是可以配置上去的
我用LITO模拟器测试的
首先有1—10的vlan
[SW1]dis vlan
Total 10 VLAN exist(s).
The following VLANs exist:
1(default), 2-10,
首先验证trunk的配置顺序
[SW1]int e0/4/0
[SW1-Ethernet0/4/0]port link-type trunk
[SW1-Ethernet0/4/0]port trunk pvid vlan 12
[SW1-Ethernet0/4/0]port trunk permit vlan 13
interface Ethernet0/4/0
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 13
port trunk pvid vlan 12
查看端口:
[SW1-Ethernet0/4/0]dis int e0/4/0
Ethernet0/4/0 current state: UP
IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 0000-5601-0000
Description: Ethernet0/4/0 Interface
Loopback is not set
100Mbps-speed mode, full-duplex mode
Link speed type is force link, link duplex type is autonegotiation
Flow-control is not enabled
The Maximum Frame Length is 1500
Broadcast MAX-ratio: 100%
Unicast MAX-ratio: 100%
Multicast MAX-ratio: 100%
Allow jumbo frame to pass
PVID: 12
Mdi type: auto
Port link-type: trunk
VLAN passing : 1(default vlan)
VLAN permitted: 1(default vlan), 13
Trunk port encapsulation: IEEE 802.1q
trunk端口的配置没问题 是允许配置不存在的vlan的
现在验证hybrid端口配置
[SW1-Ethernet0/4/1]port link-type hybrid
[SW1-Ethernet0/4/1]port hybrid vlan 20 tagged
Error: Only the existing static VLANs could be added.(报错了)
[SW1-Ethernet0/4/1]port hybrid pvid vlan 30(hybrid端口也就是说可以配置没有的vlan 作为此端口的缺省vlan)
现在创建了vlan20
[SW1-vlan20]int e0/4/1
[SW1-Ethernet0/4/1]port hybrid vlan 20 tagged
Please wait... Done.(成功配置)
[SW1-Ethernet0/4/1]dis this
#
interface Ethernet0/4/1
port link-mode bridge
port link-type hybrid
port hybrid vlan 20 tagged
port hybrid vlan 1 untagged
port hybrid pvid vlan 30
#
查看端口:
[SW1-Ethernet0/4/0]dis int e0/4/1
Ethernet0/4/1 current state: UP
IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 0000-5601-0001
Description: Ethernet0/4/1 Interface
Loopback is not set
100Mbps-speed mode, full-duplex mode
Link speed type is force link, link duplex type is autonegotiation
Flow-control is not enabled
The Maximum Frame Length is 1500
Broadcast MAX-ratio: 100%
Unicast MAX-ratio: 100%
Multicast MAX-ratio: 100%
Allow jumbo frame to pass
PVID: 30
Mdi type: auto
Port link-type: hybrid
Tagged VLAN ID : 20
Untagged VLAN ID : 1
Port priority: 0
Last clearing of counters: Never |
沙发
2014-10-30 18:55:41
回复(0)
收起回复
|