Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)

The experiment we conducted is to configure the Ethernet Trunk link and channel test

Experimental environment: preparation software GNS3 article I mentioned before, CRT and Wireshark
First we enter GNS3 interface, click on the icon on the left side of the router, the two routers to get dragged topology operating area, then click on the PC icon, choose to take four VPC drag PC machine topology operating area; while two routers for configuration settings (for the switch to change the icon, change the device name sw1 / 2, Layer added service blade, disk space is provided 128Mb)
followed wired manner as follows:
1.PC1 SW1 to the F1 / 0
2.PC2 SW1 to the F1 /. 1
Fl of 3.SW1 / F1 2 to SW2, / 2
Fl 4.PC3 to SW2, / 0
5.PC4 SW2 to the F1 / 1
after a good set of all clicks on, and then displays all ports, and the results of operations as shown below:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
Next we want to divide VLAN:
1.PC1 and PC3 is vlan10
2.PC2 and PC4 is vlan20

IP address to:
PC1: 192.168.10.10/24
PC2: 192.168.10.20/24
PC3: 192.168.10.30/24
PC4: 192.168.10.40/24

Next we conduct interoperability testing conducted after the corresponding configuration if you can communicate, then PC1 and PC3 can communicate, PC2 and PC4 can communicate, but PC1 and PC2 is not communication, PC3 and PC4 is not communication .
Next, we double-click to open jump to SW1 and SW2 respectively CRT interface configuration:
SW1:
1. Enter T the conf
2. Enter Exit route no ip routing mode
3. Enter 10,20 VLAN
4. Enter Exit ex
5. Input do show vlan-sw b view vlan
operation and results as shown below:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
Next, a port:
1. enter F1 int / 0
2. Mo ACC input SW
3. enter vlan 10 ACC SW
4. enter EX
5. The F1 input int /. 1
. 6. Mo ACC input SW
7. The input 20 is VLAN ACC SW
8. The input do show vlan-sw b
operations and results as shown below:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
SW2:
1. enter T the conf
2. enter IP routing NO
3. enter 10,20 VLAN
4. enter ex
The F1 input int / 0
6. The ACC input Mo SW
7. The ACC input VLAN 10 SW
8. The input EX
9. The input int f1 / 1
10. Mo ACC input SW
11. The input 20 is vlan ACC SW
12. The input do show vlan-sw b
operations and results as shown below:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
At this time the addition was complete on all vlan, the next step is to configure the relay link, where our F1 / 2 is a relay
in the absence of set F1 / 2 is active in the default vlan1
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
1. enter ex exit
2. enter the end enter the privileged mode
3. enter the show int fa1 / 0 switchport view port to display at this time port access mode
operation and the results as shown below:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
Next, we F1 / 2 to SW1 in the Trunk mode:
1. enter F1 int / 2
2. enter switchport mode trunk to trunk mode
3. package input switchport trunk encapsulation dot1q dot1q protocol
4. enter exit ex
5. enter do show int f1 / 2 switchport
display mode trunk, perform dot1q encapsulation protocol, can take all vlan
operations and results as shown below:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
SW2:
1. enter F1 int / 2
2. enter sw T Mo
3. DOT input EN T SW
4. enter do show int f1 / 2 switchport
operation and the results as shown below:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
Next, we open the PC to write four IP addresses:
1.PC1:192.168.10.10
2.PC2:192.168.10.20
3.PC3:192.168.10.30
4.PC4:192.168.10.40

At this point we can test for continuity, if the configuration is correct, this time PC1 and PC3 can pass, PC2 and PC4 can pass
into the PC1: ping 192.168.10.30 hit enter, this time may be in communication, results as shown below :
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
then were ping 192.168.10.30 and hit enter ping 192.168.10.40, this time is not in communication (since different vlan), the results as shown below:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
entering PC2: ping 192.168.10.40 hit enter, can now be communicated, the results as shown below:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
then were ping 192.168.10.10 and hit enter ping 192.168.10.30, this time is not in communication (since different vlan), the results as shown below:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
the results of the above communication result is successful experiment.

此时我们可以用Wireshark抓包来抓互通的数据来具体分析:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
它会从SW1上的1/1端口抓取数据,进入PC2,输入:ping 192.168.10.40此时连通,抓包中会得到连通的数据,如下图所示:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
我们从中抓取一个数据,双击打开得到如下图的显示,其中的重要数据及含义如下图:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
因为我们此时是在接入链路上抓取的数据,所以无法看到vlan标签,此时如果我们抓取中继链路上的数据,应该能够在取到的数据包中看到vlan标签。
选择如下:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
我们再进入PC2输入ping 192.168.10.40敲回车显示互通,抓包工具同时获取数据,如下图:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
我们抓取其中一条,双击打开,此时我们会看到上面会有一条802.1q vlan ID 20
同时我们再进入PC1抓取其与PC3的互通数据,抓取到之后我们双击打开其中一条,我们此时把打开的两个数据放在一起做一下对比,同样截取到了vlan的标签,这样才是不同链路互通的证明,结果如下图:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)

下面为补充内容:

以太网通道:至少需要两条以上的链路组成,端口必须是trunk
特点为增加链路带宽,增加链路可靠性
为了解决链路带宽不足,链路不够稳定而产生的,所以现网环境中不会是一根线连接在两台交换机上作为中继链路,如果线路出现断路,不稳定,那么两端的接入链路都会无法通信,所以现实场景中两台交换机中的线路有两根,这样即使其中一根出了问题,另外一根依然可以正常工作。
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
接下来我们来看下如何开启这个以太网通道,首先要把它做成Trunk。
SW1:
1.输入int f1/3
2.输入sw mo t
3.输入sw t en dot
4.输入do show int f1/3 switchport
5.输入no shut开启
操作和结果如下图:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
SW2中的操作和SW1相同,操作过程和结果如下图:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
接下来就是把他们绑在一起组成一个以太网通道,进入SW1
1.输入ex退出
2.输入int range f1/2 -3
3.输入channel-group 1 mode on开启以太网通道(1为以太网通道ID)
操作过程和结果如下图:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
此时SW2中的以太网通道的ID应该和SW1中是相同的,所以我们进入SW2进行相同的设置如下图:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
此时链路是相互互通的,此时可以模拟故障把1/2线路给断开,看是否还能够继续互通
1.进入PC1,输入ping 192.168.10.30 -t进行长测
2.进入SW1:
Enter Exit ex
input int f1 / 2
input shutdown OFF
3. Enter SW2:
Enter Exit ex
input int f1 / 2
input shutdown OFF
time will automatically link switching procedure shown below:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
Let us take a look into the PC2 it should interrupted link or can be connected, the result is still the following figure can communicate:
Trunk link test configuration, and test the role of Ethernet channels (the whole operation can be done with!)
so this time experiment Ethernet channel will be successful!

Guess you like

Origin blog.51cto.com/14464303/2427904