trunk端口设置

[CCNA] 端口汇聚(TRUNK)协议
2011年7月18日
发表评论
阅读评论 .TRUNK是端口汇聚的意思,通过配置软件的设置,将2个或多个物理端口组合在一起成为一条逻辑的路径从而增加在交换机和网络节点之间的带宽,将属于这几个端口的带宽合并,给端口提供一个几倍于独立端口的独享的高带宽。Trunk是一种封装技术,它是一条点到点的链路,链路的两端可以都是交换机,也可以是交换机和路由器,还可以是主机和交换机或路由器。基于端口汇聚(Trunk)功能,允许交换机与交换机、交换机与路由器、主机与交换机或路由器之间通过两个或多个端口并行连接同时传输以提供更高带宽、更大吞吐量, 大幅度提供整个网络能力。



?步骤一:配置各PC的IP地址。
各PC的IP地址规划到192.168.1.0/24的地址,D位地址与PC编号一致。基础配置省略。

?步骤二:在pc1 上ping其它的主机结果是全部通的。
配置好各主机的IP地址就可以通了。

?步骤三:将switch1 和switch2 的G1/1 的直连接口指定为干道,即Trunk。
Switch1(config)#interface gigabitEthernet 1/1 //具体接口取决与两台交换机互联端口
Switch1(config-if)#switchport trunk encapsulation dot1q //选择接口干道的类型,用Cisco Packet Trace不需要此命令,默认!
Switch1(config-if)#switchport mode trunk //将接口的工作模式指定为干道

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to up
Switch1(config-if)#exit

Switch2(config)#interface gigabitEthernet 1/1
Switch2(config-if)#switchport trunk encapsulation dot1q
Switch2(config-if)#switchport mode trunk

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1, changed state to up
Switch2(config-if)#exit

?步骤四:使用show interface trunk 或show interface g1/1 switchport 命令查看确认干道
Switch1#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Gig1/1 on 802.1q trunking 1

Port Vlans allowed on trunk
Gig1/1 1-1005

Port Vlans allowed and active in management domain
Gig1/1 1

Port Vlans in spanning tree forwarding state and not pruned
Gig1/1 1
Switch1#

Switch1#show interfaces gigabitEthernet 1/1 switchport
Name: Gig1/1
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Voice VLAN: none
Administrative private-vlan host-associatio

n: none
Administrative private-vlan mapping: none

Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk private VLANs: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL
Protected: false
Appliance trust: none

?步骤五:在switch1 和switch2 上创建vlan 10 和 vlan 20,并将端口按图加入到相应的VLAN
前一节刚讲的。详细配置在本站搜索 VLAN

?步骤四:使用Ping去确认


相关文档
最新文档