GNS3 experiment: the communication between two hosts by different VLAN routing-arm

GNS3 experiment: the communication between two hosts by different VLAN routing-arm

Overview : vlan data corresponding to different physical interfaces of the substance of a single arm of routing technology allows the router to the physical interface is divided into several sub-interfaces, sub-interfaces 802.1q encapsulation identification to identify different vlan of the TAG

Experimental tool, GNS3 1.3 version SecureCRT8.0 version

Start test

1, open GNS3, add a router, a switch and the PC 2 which in turn is connected and turned on.
Here Insert Picture Description
2, we set to PC1 ip address 192.168.10.10/24, gateway 192.168.10.1, PC2 set ip address 192.168.20.20/24, gateway 192.168.20.1
Here Insert Picture Description
Here Insert Picture Description
3, to add two VLAN switches are VLAN10 and VLAN20,
Here Insert Picture Description
. 4, since this link setup switch F1 / 0 interface and F1 / 2 directly to the interface connector 2 so that the PC 2 using the link access link model, we switch to the PC1 is VLAN10 and switch F1 / 0 interface is added to VLAN10, set the switch to PC2 F1 / 2 interface, this link is VLAN20 and switch F1 / 2 interface is added to the VLAN10.
Here Insert Picture Description
5, since the switch F1 / 1 the router is connected to the F0 / 0 interface, use this link relay link mode.
Here Insert Picture Description
4, to the F0 / 0 router physical interface to add two logical sub-interfaces being f0 / 0.1, f0 / 0.2, we set f0 / 0.1 so that the interface corresponding to pc1 be divided into 10, the VLAN, the corresponding gateway 192.168 .10.1, setting f0 / 0.2 PC2 corresponding to the interface, it will be divided into VLAN 20 in the corresponding gateway 192.168.20.1.
Here Insert Picture Description
At this point, all the settings have been configured, look at the topology
Here Insert Picture Description
test results
open PC1 of CRT debugging interface to enter the PING command
Here Insert Picture Description
to open PC2 of CRT debugging interface input PING command
Here Insert Picture Description
the test was successful. Experimental principle is as follows:
PC1 wants to send a packet to PC2, when the data packet to the switch will add a package 802.1q switch then enters VLAN10

Relay link between the router and when it reaches a router, the routing table corresponding to the destination address found VLAN20 so as PC2, PC2

VLAN20 package to its 802.1q next hop interface F1 / 0, after reaching the switch will be off by the relay link then packaged 802.1q

PC2 into the switch to access links to the PC2.

Published 43 original articles · won praise 56 · views 7937

Guess you like

Origin blog.csdn.net/weixin_42953006/article/details/102633258