Packet Tracer 5.0 Experiment (IV.) inter-VLAN routing with three layer switches
First, the experimental target
Master the configuration of the switch tag VLAN;
Master three layer switch basic configuration method;
Master three-layer switch VLAN routing configuration method;
Inter-VLAN communication through three layer switch;
Second, the experimental background
An enterprise has two major departments, technical department and sales department, divided into different offices, for security and ease of management, two departments of the Host VLAN Division, Technical Department and Sales section in different VLAN. Due to the business needs, the sales department and the technical Department of the host can access each other, access to the corresponding resources, the two departments of the switch through a three-layer switch to connect.
Three, the principle of technology
The three layer switch has the function of the network layer, and the principle of mutual access between VLANs is that the routing function of the three layer switch is used to find the routing table by identifying the IP address of the packet. The three-layer switch uses direct-attached routing to enable mutual access between different VLANs. The layer three switch configures the IP address for the interface and implements the inter-VLAN interconnection using the SVI (switching virtual interface). SVI refers to creating a virtual interface for the VLAN in the switch and configuring the IP address.
Iv. Steps of the experiment
Experimental topology
650) this.width=650; "src=" http://pic002.cnblogs.com/images/2012/370046/2012071416044545.jpg "/>
1. Configure VLAN 2, VLAN 3 on Layer Two switch, Port 2, Port 3 to VLAN 2, VLAN 3 respectively;
2, the two-layer switch and the three-layer switch connected to the port FA0/1 defined as the tag VLAN mode;
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
switch>enswitch#conf tenter configuration commands, one per line. End with Cntl/z.switch (config) #vlan 2Switch (config-vlan) #exitSwitch (config) #vlan 3Switch (Config-vlan) #exitSwitch ( Config) #interface fa0/2switch (config-if) #switchport access VLAN 2Switch (config-if) #exitSwitch (config) #interface fa0 /3switch (config-if) #switchport access VLAN 3Switch (config-if) #exitSwitch (config) #interface fa0/1switch (config-if) # Switchport mode Trunk%lineproto-5-updown:line protocol on Interface FASTETHERNET0/1, changed state to Down%lineproto-5-u Pdown:line protocol on Interface FASTETHERNET0/1, changed state to Upswitch (CONFIG-IF) #
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
3. Configure VLAN 2, VLAN 3 on layer three switch, Port 2, Port 3 to VLAN 2, VLAN 3 respectively;
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
switch>enswitch#conf tenter configuration commands, one per line. End with Cntl/z.switch (config) #vlan 2Switch (config-vlan) #exitSwitch (config) #vlan 3Switch (Config-vlan) #exitSwitch ( Config) #interface fa0/2switch (config-if) #switchport access VLAN 2Switch (config-if) #exitSwitch (config) #interface fa0 /3switch (config-if) #switchport access VLAN 3Switch (config-if) #exit
Switch (config) #
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
4, set up three layer switch VLAN communication, create VLAN 2, VLAN 3 virtual interface, and configure the virtual interface VLAN 2, VLAN 3 IP address;
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
Switch (config) #interface VLAN 2//Create VLAN 2Virtual InterfaceSwitch (config-if) #%link-5-changed:interface Vlan2, CHANGED State to Up%lineproto-5-updown:line protocol on Interface Vl AN2, changed state to Upswitch (config-if) #ip address 192.168.1.1 255.255.255.0//Configure virtual Interface VLAN 2 IP address switch (conf IG-IF) #no shutdown Switch (config-if) #exitSwitch (config) #interface VLAN 3//Create a virtual interface for VLAN 2Switch (config-if) #%link-5-changed:interface Vlan3, CHANGED State to Up%lineproto-5-updown:line protocol on Interface Vl AN3, changed state to Upswitch (config-if) #ip address 192.168.2.1 255.255.255.0//Configure the IP address of the virtual interface VLAN 2Switch (config-if) #no shutdown switch (config-if) #end
switch#
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
5. View layer three switch routing table
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
Switch#show ip route codes: c - connected, s - static, i - IGRP, R - RIP, M - mobile, B - BGP     D - EIGRP, EX - EIGRP EXTERNAL, O - OSPF, ia - ospf inter area n1 - ospf nssa external type 1, n2 - ospf nssa external type 2 e1 - ospf external type 1, e2 - ospf external type 2, e - egp i - is-is, l1 - is-is level-1, l2 - is-is level-2, ia - IS-IS inter area * - candidate Default, u - per-user static route, o - odr p - periodic downloaded static routegateway of last resort is not setC 192.168.1.0/24 is directly connected, Vlan2C 192.168.2.0/24 is directly connected, vlan3switch#
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
6, the VLAN 2, VLAN 3, the host default gateway is set to the corresponding virtual interface IP address;
V. Verification
Open PC1 Command Prompt
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
Packet tracer pc command line 1.0pc>ipconfigip address ..............: 192.168.1.2subnet mask.....................: 255.255.255.0default gateway .................: 192.168.1.1pc>ping 192.168.1.3pinging 192.168.1.3 with 32 Bytes of data:reply from 192.168.1.3: bytes=32 time=187ms ttl=128reply from 192.168.1.3: bytes=32 time=93ms TTL=128Reply from 192.168.1.3: Bytes=32 time=110ms ttl=128reply from 192.168.1.3: bytes=32 time=93ms ttl= 128ping statistics for 192.168.1.3: packets: sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: minimum = 93ms, maximum = 187ms, average = 120mSpc>ping 192.168.2.2pinging 192.168.2.2 with 32 bytes of data:request timed out. reply from 192.168.2.2: bytes=32 time=188ms ttl=127reply from 192.168.2.2: bytes=32 time=112ms ttl=127reply from 192.168.2.2: bytes=32 time=125ms ttl=127ping statistics for 192.168.2.2: packets: sent = 4, Received = 3, Lost = 1 (25% loss), Approximate round trip times in milli-seconds: Minimum = 112ms, maximum = 188ms, average = 141mspc>ping 192.168.2.3pinging 192.168.2.3 with 32 bytes of data:request timed out. reply from 192.168.2.3: bytes=32 time=125ms ttl=127reply from 192.168.2.3: bytes=32 time=78ms ttl=127reply from 192.168.2.3: bytes=32 time=64ms ttl=127ping statistics for 192.168.2.3: packets: sent = 4, received = 3, lost = 1 (25% loss), Approximate round trip times in milli-seconds: Minimum = 64ms, Maximum = 125ms, Average = 89ms
Packet Tracer 5.0 Experiment (IV.) inter-VLAN routing with three layer switches