Trunk link configuration

Test environments used before GNS3, WireShark and CRT
enter GNS3 page, click on the left menu bar icon, drag two routers to topology console, and then click PC icon, select VPC, dragged topology console, equipped with two router (change of name, change the icon to add Layer 2 services board, add disk capacity of 128Mb)

----------------Configuration Environment-------------

1, followed by the PC and the cable router connected

The PC1 is connected to SW1 is f1 / 0
to PC2 connected to SW1 is f1 / 1
to SW1 and SW2 connected to f1 / 2
to PC3 connected to SW2 is f1 / 0
to PC4 connected to SW2 is f1 / 1
after starting set, then displays all ports.
Trunk link configuration

2, the PC1 and PC3 divided vlan10
the PC2 and PC4 divided vlan20
configured PC1ip address 192.168.10.10
configured PC2ip address 192.168.10.30
with pc3ip address 192.168.10.20
with PC3ip address 192.168.10.40
Trunk link configuration

3. After configuring IP interworking, PC1 and PC3 can communicate, PC2 and PC4 can communicate, PC1 and PC2 can not communicate, PC3 and PC4 can not communicate.

4、双击打开SW1和SW2跳转至CRT界面进行配置:
SW1
输入conf t
输入no ip routing 关闭路由功能
输入vlan10,20添加路由
输入exit
输入do show vlan-sw b查看vlan
Trunk link configuration
5、配置端口
SW1:
1、输入int f1/0
2、输入sw mo acc
3、输入sw acc vlan 10
4、输入exit
5、输入do show vlan-sw b
Trunk link configuration


1、输入int f1/1
2、输入sw mo acc
3、输入sw acc vlan 20
4、输入do show vlan-sw b
Trunk link configuration
1.输入conf t
2.输入no ip routing
3.输入vlan 10,20
4.输入ex
5.输入int f1/0
6.输入sw mo acc
7.输入sw acc vlan 10
8.输入ex
9.输入int f1/1
10.输入sw mo acc
11.输入sw acc vlan 20
12.输入do show vlan-sw b
Trunk link configuration
6、配置中继链路,在没有设置之前活跃在vlan1中。
输入ex
输入end进入特权模式
输入show int f1/0 switchport,查看端口,此时端口在access状态
Trunk link configuration
7、接下来把SW1和SW2设置为中继链路。
SW1
输入conf t
输入switchport mode trunk 设置为trunk模式
输入switchport trunk encapsulation dot1q封装dot1q模式
输入ex
输入do show int f1/2 switchport
Trunk link configuration
SW2:
Input int f1 / 2
input switchport mode trunk to trunk mode
input switchport trunk encapsulation dot1q mode
input ex
input do show int f1 / 2 switchport
Trunk link configuration

-----------start testing---------

1, then we can pass PC1ping PC3, PC2 and PC4, they can communicate.
Input ping 192.168.10.20 on PC1, when can pass
Trunk link configuration
2, on the input 192.168.10.40 PC2, can also pass
Trunk link configuration

Experiment proved successful.

At this point we can communicate with each other data analysis task WireShark
1, right click and select an access link
Trunk link configuration
2, will fetch the data port SW1 is f1 / 1 from the input ping 192.168.10.40, by obtaining data capture.
Trunk link configuration


Trunk link configuration
3. Double-click on the data obtained from, many of which are important data.
Trunk link configuration


4, then we crawl relay link to view vlan.
Trunk link configuration
5, then PC2ping 192.168.10.40, a fetch of data from WireShark.
Trunk link configuration
Trunk link configuration
6, crawling from a view, you will see a 802.1q vlan 20.
Trunk link configuration
7, while a re-fetch data PC1 and PC3, and open the data using the same method to view.
Trunk link configuration
8, so that different links was able to achieve interoperability.

Guess you like

Origin blog.51cto.com/14307755/2428156