Lab Environment:
650) this.width=650; "alt=" Cisco Packer Trace three layer switch + router sharing internet-Ibm.chick-mingkang.zhou "src=" http://img2.ph.126.net/Dz -huesti3hye1avbt8nsa==/2835578915401090952.png "style=" border:0px;height:auto;margin:0px 10px 0px 0px; "/>
Experimental Purpose:
1, the three layer switch divides three VLANs, is Vlan2\vnal3\vlan4, and the VLAN IP is set to: 192.168.2.1, 192.168.3.1, 192.168.4.1 respectively.
2, on the three-layer machine on the FA0/1 port set to trunk port, FA0/4 join VLAN4, and F0/2 off two-layer port, and set the IP address 192.168.5.1.
3, set the two-layer switch, the FA0/1 port is set to trunk, and add FA0/2 join VLAN2,FA0/3 added VLAN3.
4. Turn on the router on the three-layer switch and set up the RIP router protocol to allow the data to be exchanged between VLANs.
5. Test the hosts of each VLAN for interoperability.
6, configure the IP address of the ROUTE0, and test each intranet host can ping 192.168.5.2.
7, because the router is not configured to reach the route, resulting in the intranet PC can not ping the 192.168.5.2, at this time we can configure the router protocol, so that the intranet can reach the router.
8, configure the IP address of the ISP router, and test whether the ROUTE0 can ping the IP address of the ISP 202.1.1.2; Also test whether the intranet host can ping the IP address of the ISP router.
9, Intranet is not able to ping the router IP address of the ISP, only on the ROUTE0 to configure NAT forwarding to achieve.
10. Whether the intranet host can ping the server under the ISP.
Experimental steps:
1, the three layer switch divides three VLANs, is Vlan2\vnal3\vlan4, and the VLAN IP is set to: 192.168.2.1, 192.168.3.1, 192.168.4.1 respectively.
Switch>enable
Switch#conf T
Enter configuration commands, one per line. End with cntl/z.
Switch (config) #hostname coresw
Coresw (config) #vlan 2
CORESW (Config-vlan) #exit
Coresw (config) #vlan 3
CORESW (Config-vlan) #vlan 4
CORESW (Config-vlan) #
Coresw (config) #int VLAN 2
CORESW (config-if) #
%link-5-changed:interface Vlan2, CHANGED state-to-up
CORESW (config-if) #ip add 192.168.2.1 255.255.255.0
CORESW (config-if) #no shutdown
CORESW (config-if) #exit
Coresw (config) #int VLAN 3
CORESW (config-if) #
%link-5-changed:interface Vlan3, CHANGED state-to-up
CORESW (config-if) #ip add 192.168.3.1 255.255.255.0
CORESW (config-if) #no shutdown
CORESW (config-if) #exit
Coresw (config) #int VLAN 4
CORESW (config-if) #exit
%link-5-changed:interface Vlan4, CHANGED state-to-up
CORESW (config-if) #ip add 192.168.4.1 255.255.255.0
CORESW (config-if) #no shutdown
2, the FA0/1 port is set to trunk port, FA0/4 join VLAN4, and F0/2 off the two-layer port, and set the IP address 192.168.5.1.
Coresw (config) #int FA0/1
CORESW (config-if) #switchport trunk Encapsulation dot1q
CORESW (config-if) #switchport mode trunk
Coresw (config) #int FA0/4
CORESW (config-if) #switchport mode access
CORESW (config-if) #switchport Access VLAN 4
CORESW (config-if) #no shutdown
CORESW (config-if) #exit
Coresw (config) #int FA0/2
CORESW (config-if) #no Switchport
CORESW (config-if) #ip add 192.168.5.1 255.255.255.0
CORESW (config-if) #no shutdown
3, set the two-layer switch, the FA0/1 port is set to trunk, and add FA0/2 join VLAN2,FA0/3 added VLAN3.
Switch>enable
Switch#conf T
Enter configuration commands, one per line. End with cntl/z.
Switch (config) #vlan 2
Switch (Config-vlan) #exit
Switch (config) #vlan 3
Switch (Config-vlan) #exit
Switch (config) #
Switch (config) #int FA0/1
Switch (config-if) #switchport mode trunk
Switch (config) #int FA0/2
Switch (config-if) #switchport mode access
Switch (config-if) #switchport Access VLAN 2
Switch (config-if) #exit
Switch (config) #int FA0/3
Switch (config-if) #switchport mode access
Switch (config-if) #switchport Access VLAN 3
Switch (config-if) #exit
4. Turn on the router on the three-layer switch and set up the RIP router protocol to allow the data to be exchanged between VLANs.
Coresw (config) #ip routing
Coresw (config) #router rip
CORESW (config-router) #ver 2
CORESW (config-router) #no au
CORESW (config-router) #net 192.168.2.0
CORESW (config-router) #net 192.168.3.0
CORESW (config-router) #net 192.168.4.0
CORESW (config-router) #net 192.168.5.0
650) this.width=650; "alt=" Cisco Packer Trace three layer switch + router sharing internet-Ibm.chick-mingkang.zhou "src=" Http://img2.ph.126.net/AQ L1o_4oeqjukocqqqrzpq==/64176294707966504.jpg "style=" border:0px;height:auto;margin:0px 10px 0px 0px; "/>
6, configure the IP address of the ROUTE0, and test each intranet host can ping 192.168.5.2.
Router>enable
Router#conf T
Enter configuration commands, one per line. End with cntl/z.
Router (config) #int gi0/0
Router (config-if) #ip add 192.168.5.2 255.255.255.0
Router (config-if) #no shutdown
Router (config) #int GI0/1
Router (config-if) #ip add 202.1.1.1 255.255.255.0
Router (config-if) #no shutdown
650) this.width=650; "alt=" Cisco Packer Trace three layer switch + router sharing internet-Ibm.chick-mingkang.zhou "src=" http://img2.ph.126.net/8g Jvnlcdcmy08r_jxboulq==/6630297008047627037.jpg "style=" border:0px;height:auto;margin:0px 10px 0px 0px; "/>
7, because the router is not configured to reach the route, resulting in the intranet PC can not ping the 192.168.5.2, at this time we can configure the router protocol, so that the intranet can reach the router.
Router (config) #router rip
Router (config-router) #ver 2
Router (config-router) #net 192.168.2.0
Router (config-router) #net 192.168.3.0
Router (config-router) #net 192.168.4.0
Router (config-router) #net 192.168.5.0
Router (config-router) #default-information originate// its role is to assign a default route to our three-tier router out!
Router (Config-router) #end
Router#show IP route
Codes:l-Local, c-connected, S-static, 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
R 192.168.2.0/24 [120/1] via 192.168.5.1, 00:00:05, gigabitethernet0/0
R 192.168.3.0/24 [120/1] via 192.168.5.1, 00:00:05, gigabitethernet0/0
R 192.168.4.0/24 [120/1] via 192.168.5.1, 00:00:05, gigabitethernet0/0
192.168.5.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.5.0/24 is directly connected, gigabitethernet0/0
L 192.168.5.2/32 is directly connected, gigabitethernet0/0
650) this.width=650; "alt=" Cisco Packer Trace three layer switch + router sharing internet-Ibm.chick-mingkang.zhou "src=" Http://img2.ph.126.net/wW Twzrzezbv5mtfx2nc2uw==/3846074081875158482.jpg "style=" border:0px;height:auto;margin:0px 10px 0px 0px; "/>
8, configure the IP address of the ISP router, and test whether the ROUTE0 can ping the IP address of the ISP 202.1.1.2; Also test whether the intranet host can ping the IP address of the ISP router.
Router>enable
Router#conf T
Enter configuration commands, one per line. End with cntl/z.
Router (config) #hostname ISP
ISP (config) #int gi0/0
ISP (config-if) #ip add 202.1.1.2 255.255.255.0
ISP (config-if) #no shutdown
ISP (config-if) #exit
ISP (config) #int GI0/1
ISP (config-if) #ip add 202.1.2.1 255.255.255.0
ISP (config-if) #no shutdown
650) this.width=650; "alt=" Cisco Packer Trace three layer switch + router sharing internet-Ibm.chick-mingkang.zhou "src=" http://img1.ph.126.net/Ld Q__zk4vzdmh10c84ieaw==/2827134666099779344.jpg "style=" border:0px;height:auto;margin:0px 10px 0px 0px; "/>
650) this.width=650; "alt=" Cisco Packer Trace three layer switch + router sharing internet-Ibm.chick-mingkang.zhou "src=" http://img1.ph.126.net/7x _sitspjehuc0yx-c-qeq==/6630370675326687415.jpg "style=" border:0px;height:auto;margin:0px 10px 0px 0px; "/>
9, Intranet is not able to ping the router IP address of the ISP, only on the ROUTE0 to configure NAT forwarding to achieve.
Router#conf T
Enter configuration commands, one per line. End with cntl/z.
Router (config) #access-list 1 Permit 192.168.2.0 0.0.0.255
Router (config) #access-list 1 Permit 192.168.3.0 0.0.0.255
Router (config) #access-list 1 Permit 192.168.4.0 0.0.0.255
Router (config) #access-list 1 Permit 192.168.5.0 0.0.0.255
Router (config) #ip nat inside source List 1 interface GI0/1 overload
Router (config) #int GI0/1
Router (config-if) #ip Nat outside
Router (config-if) #exit
Router (config) #int gi0/0
Router (config-if) #ip nat inside
Router (config-if) #exit
Router (config) #ip Route 0.0.0.0 0.0.0.0 GI0/1
650) this.width=650; "alt=" Cisco Packer Trace three layer switch + router sharing internet-Ibm.chick-mingkang.zhou "src=" HTTP://IMG0.PH.126.NET/GV Oz1xgttocuzn4csq47vg==/6630693931745331618.jpg "style=" border:0px;height:auto;margin:0px 10px 0px 0px; "/>
10. Whether the intranet host can ping the server under the ISP.
650) this.width=650; "alt=" Cisco Packer Trace three layer switch + router sharing internet-Ibm.chick-mingkang.zhou "src=" Http://img0.ph.126.net/YJ Jyj0t7g63zyclyxl5ukg==/2860067238374953098.jpg "style=" border:0px;height:auto;margin:0px 10px 0px 0px; "/>
Cisco Packer Trace's three-tier switch + router sharing internet