Packet Tracer 5.0 Experiment (VII) router one-arm routing configuration
First, the experimental target
Second, the experimental background
An enterprise has two main 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 router to connect.
Three, the principle of technology
One-arm routing: is a three-tier network device router for inter-VLAN communication, which requires only an Ethernet interface that can assume all VLAN gateways by creating sub-interfaces, while forwarding data between different VLANs.
Iv. Steps of the experiment
Experimental topology
650) this.width=650; "src=" http://pic002.cnblogs.com/images/2012/370046/2012071717501074.jpg "/>
1. When the switch is set to two VLANs, it has logically become a two network, and the broadcast is quarantined. Two VLAN network to communicate, must pass through the router, if the access router has only one physical port, then there must be two sub-interfaces corresponding to two VLANs, but also requires the router connected to the switch port F0/1 to be set to trunk, because this port to pass through two VLAN packets.
2, check the settings, should be able to correctly see the VLAN and trunk information.
3. The gateway of the computer points to the sub-interface of the router, respectively.
4, configure the sub-interface, turn on the router physical interface.
5, the default encapsulation is the DOT1Q protocol.
6. Configure the router sub-interface IP address.
Switch:
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
switch>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 Switch (config-if) #
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
R1:
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
router>enrouter#conf tenter configuration commands, one per line. End with Cntl/z.router (config) #hostname r1r1 (config) #interface fa0/0r1 (config-if) #no shutdown%link-5-changed: Interface fastethernet0/0, changed state to Up%lineproto-5-updown:line protocol on Interface fastethernet0/0, changed STA Te to UpR1 (config-if) #exitR1 (config) #interface fa0/0.1%link-5-changed:interface fastethernet0/0.1, CHANGED %lineproto-5-updown:line protocol on Interface fastethernet0/0.1, changed state to UpR1 (CONFIG-SUBIF) #encapsulation dot1q 2R1 (config-subif) #ip address 192.168.1.1 255.255.255.0r1 (config-subif) #exitR1 (config) #interface fa0/0.2% Link-5-changed:interface fastethernet0/0.2, CHANGED State to Up%lineproto-5-updown:line protocol on Interface Fastether net0/0.2, changed state to UpR1 (config-subif) #encapsulation dot1q 3r1 (config-subif) #ip address 192.168.2.1 255.255.255.0R1 (config-subif) #R1 #%sys-5-config_i:configured from the console by console
R1#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 route
Gateway of last resort are not set
C 192.168.1.0/24 is directly connected, fastethernet0/0.1
C 192.168.2.0/24 is directly connected, fastethernet0/0.2
R1
650) this.width=650; "src=" Http://common.cnblogs.com/images/copycode.gif "alt=" Copy Code "/>
V. Testing
PC2:
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.2.2Subnet Mask for the ...... ...: 255.255.255.0Default Gateway .....: 192.168.2.1pc>ping, ..... £ º +/---/--------192.168.1.2Pinging 192.168.1.2 with + bytes of data:request timed out. Reply from 192.168.1.2:bytes=32 time=8ms ttl=127reply to 192.168.1.2:bytes=32 time=8ms ttl=127reply from 192.168.1.2: Bytes=32 time=17ms ttl=127ping Statistics for 192.168.1.2:packets:sent = 4, Received = 3, Lost = 1 (25% loss), Approxi Mate round trip times in milli-seconds:minimum = 8ms, Maximum = 17ms, Average = 11mspc>
Packet Tracer 5.0 Experiment (VII) router one-arm routing configuration