Packet tracer 5.2 Lab (11) Comprehensive router routing configuration

Source: Internet
Author: User

I. Lab Objectives

  • Master the configuration of Integrated routes;
  • View the routes generated by route redistribution;
  • Familiar with Wan cable connection methods;

Ii. Lab background

Assume that a company connects to the egress router R1 through a layer-3 switch, and router R1 is connected to another router R2. Layer 3 and R1 run the r12002 routing protocol, while R1 and R2 run the OSPF routing protocol. Now, we need to make proper configuration to implement communication between the company's internal host and the company's external host.

Iii. Technical Principles

To support this device to run multiple Routing Protocol processes, the system software provides the routing information from one routing process to another. For example, you can re-distribute the routes in the OSPF routing domain and then advertise the routes in the rip routing domain to the OSPF routing domain. The redistribution of routes can be performed between all IP routing protocols.

To distribute routes from one route domain to another and control route redistribution, run the following command in route Process configuration mode:

Redistribute Protocol [metric] [metric-type] [Match internal | external type | NSSA-external type] [tag] [route-map route-Map-name] [subnets]

Iv. Experiment steps

Lab Topology

1. Direct Connection is used between the PC and the vswitch, and cross-line connection is used between the PC and the route, route, and route.

2. divide two VLANs on the layer-3 to run the ripv2 protocol; r2 to run the OSPF protocol;

3. Configure the r12002 routing protocol on the left of router R1 and the OSPF protocol on the right;

4. introduce external routes in the R1 router process for Route redistribution;

5. Set the default gateways of the pC1 and PC2 hosts to the IP addresses of the interfaces with the directly connected network devices;

6. Verify that the pC1 and PC2 hosts can communicate with each other;

S3560:

Switch> en
Switch # conf t
Enter configuration commands, one per line. End with cntl/Z.
Switch (config) # hostname s3560
S3560 (config) # VLAN 10
S3560 (config-VLAN) # exit
S3560 (config) # VLAN 20
S3560 (config-VLAN) # exit
S3560 (config) # interface fa0/10
S3560 (config-If) # switchport access VLAN 10
S3560 (config-If) # exit
S3560 (config) # interface fa0/20
S3560 (config-If) # switchport access VLAN 20
S3560 (config-If) # exit
S3560 (config) # interface VLAN 10
S3560 (config-If )#
% Link-5-changed: interface vlan10, changed state to up
% LINEPROTO-5-UPDOWN: Line protocol on interface vlan10, changed state to up
S3560 (config-If) # IP address 192.168.1.1 255.255.255.0 // configure the VLAN 10 Virtual Interface IP Address
S3560 (config-If) # exit
S3560 (config) # interface VLAN 20

% Link-5-changed: interface vlan20, changed state to ups3560 (config-If )#
S3560 (config-If) # IP address 192.168.2.1 255.255.255.0 // configure VLAN 20 Virtual Interface IP Address
S3560 (config-If) # No shut
S3560 (config-If) # exit
S3560 (config) # router rip // configure the ripv2 Protocol
S3560 (config-router) # network 192.168.1.0
S3560 (config-router) # network 192.168.2.0
S3560 (config-router) # Version 2
S3560 (config-router) # End
S3560 #
% SYS-5-CONFIG_ I: configured from console by the Console
S3560 # Show IP Route
Codes: C-connected, S-static, I-IGRP, R-rip, M-mobile, B-BGP
D-OSPF, ex-VPN 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, L1-is level-1, L2-is level-2, Ia-Is Inter Area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, vlan10
S3560 #
S3560 #
S3560 #
% Link-5-changed: interface fastethernet0/20, changed state to up
% LINEPROTO-5-UPDOWN: Line protocol on interface fastethernet0/20, changed state to up
% LINEPROTO-5-UPDOWN: Line protocol on interface vlan20, changed state to up
S3560 # Show IP Route // route information after the three devices are configured
Codes: C-connected, S-static, I-IGRP, R-rip, M-mobile, B-BGP
D-OSPF, ex-VPN 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, L1-is level-1, L2-is level-2, Ia-Is Inter Area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, vlan10
C 192.168.2.0/24 is directly connected, vlan20
S3560 # Show IP Route // route information after route redistribution
Codes: C-connected, S-static, I-IGRP, R-rip, M-mobile, B-BGP
D-OSPF, ex-VPN 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, L1-is level-1, L2-is level-2, Ia-Is Inter Area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, vlan10
C 192.168.2.0/24 is directly connected, vlan20
R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:28, vlan20
R 192.168.4.0/24 [120/2] via 192.168.2.2, 00:00:28, vlan20
S3560 #
S3560 # Show running-config
Building configuration...

Current configuration: 1276 bytes
!
Version 12.2:
No service timestamps log datetime msec
No service timestamps debug datetime msec
No service password-Encryption
!
Hostname s3560
!
...
!
Interface fastethernet0/1
!
...
!
Interface fastethernet0/10
Switchport access VLAN 10
!
...
!
Interface fastethernet0/20
Switchport access VLAN 20
!
...
!
Interface vlan1
No IP Address
Shutdown
!
Interface vlan10
IP address 192.168.1.1 255.255.255.0
!
Interface vlan20
IP address 192.168.2.1 255.255.255.0
!
Router rip
Version 2
Network 192.168.1.0
Network 192.168.2.0
!
IP classless
!
...
!
Line con 0
Line vty 0 4
Login
!
!
!
End


S3560 #

R1:

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 state to upr1 (config-If) # IP address 192.168.2.2 255.255.255.0r1 (config-If) # exitr1 (config) # interface fa0/1r1 (config-If) # No shutdown % link-5-changed: interface fastethernet0/1, changed state to upr1 (config-If) # IP address 192.168.3.1 255.255.255.0r1 (config-If) # exitr1 (config) # router rip/R1 configure ripv2 routing protocol r1 (config-router) # network 192.168.2.0r1 (config-router) on the left) # version 2r1 (config-router) # exitr1 (config) # router OSPF 1 // configure OSPF routing protocol r1 (config-router) on the right side of r1) # network 192.168.3.1 0.0.255 area 0r1 (config-router) # endr1 # % SYS-5-CONFIG_ I: configured from console by consoler1 # Show IP Route codes: C-connected, S-static, I-IGRP, r-rip, M-mobile, B-BGP D-VPN, ex-OSPF 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, L1-is level-1, l2-is level-2, Ia-Is Inter Area *-candidate default, U-per-user static route, o-ODR p-periodic downloaded static routegateway of last resort is not setr 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:14, fastethernet0/0
C 192.168.2.0/24 is directly connected, fastethernet0/0
C 192.168.3.0/24 is directly connected, fastethernet0/1r1 #
R1 #
R1 #
R1 # Show IP Route // route information after the three devices are configured
Codes: C-connected, S-static, I-IGRP, R-rip, M-mobile, B-BGP
D-OSPF, ex-VPN 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, L1-is level-1, L2-is level-2, Ia-Is Inter Area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route

Gateway of last resort is not set

R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:06, fastethernet0/0
C 192.168.2.0/24 is directly connected, fastethernet0/0
C 192.168.3.0/24 is directly connected, fastethernet0/1
O 192.168.4.0/24 [110/2] via 192.168.3.2, 00:01:22, fastethernet0/1
R1 # Ping 192.168.1.2 // ping the left-side host from R1.

Type escape sequence to abort.
Sending 5, 100-byte ICMP echos to 192.168.1.2, timeout is 2 seconds:
..!!!
Success rate is 60 percent (3/5), round-trip min/AVG/max = 3/5/8 MS

R1 # Ping 192.168.4.2 // ping the host on the right from R1.
// The host on the Left cannot be pinged.
Type escape sequence to abort.
Sending 5, 100-byte ICMP echos to 192.168.4.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/AVG/max = 3/5/7 MS

R1 #
R1 #
R1 # conf t
Enter configuration commands, one per line. End with cntl/Z.
R1 (config) # router rip
R1 (config-router) # redistribute OSPF 1
R1 (config-router) # exit
R1 (config) # router OSPF 1
R1 (config-router) # redistribute rip?
Metric metric for redistributed routes
Metric-type OSPF/Is-Is exterior metric type for redistributed routes
Subnets consider subnets for redistribution into OSPF
TAG set tag for routes redistributed into OSPF
<CR>
R1 (config-router) # redistribute rip subnets
R1 (config-router) # End
R1 #
% SYS-5-CONFIG_ I: configured from console by the Console
R1 # Show IP Route // route information after route redistribution
Codes: C-connected, S-static, I-IGRP, R-rip, M-mobile, B-BGP
D-OSPF, ex-VPN 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, L1-is level-1, L2-is level-2, Ia-Is Inter Area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route

Gateway of last resort is not set

R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:03, fastethernet0/0
C 192.168.2.0/24 is directly connected, fastethernet0/0
C 192.168.3.0/24 is directly connected, fastethernet0/1
O 192.168.4.0/24 [110/2] via 192.168.3.2, 00:02:41, fastethernet0/1
R1 #
R1 #
R1 # Show running-config
Building configuration...

Current configuration: 643 bytes
!
Version 12.4:
No service timestamps log datetime msec
No service timestamps debug datetime msec
No service password-Encryption
!
Hostname r1
!
...
!
Interface fastethernet0/0
IP address 192.168.2.2 255.255.255.0
Duplex auto
Speed auto
!
Interface fastethernet0/1
IP address 192.168.3.1 255.255.255.0
Duplex auto
Speed auto
!
Interface vlan1
No IP Address
Shutdown
!
Router OSPF 1
Log-adjacency-Changes
Redistribute rip subnets
Network 192.168.3.0 0.0.255 area 0
!
Router rip
Version 2
Redistribute OSPF 1
Network 192.168.2.0
!
IP classless
!
...
!
Line con 0
Line vty 0 4
Login
!
!
!
End


R1 #

R2:

Router> en
Router # conf t
Enter configuration commands, one per line. End with cntl/Z.
Router (config) # hostname r2
R2 (config) # interface fa0/1
R2 (config-If) # IP address 192.168.4.1 255.255.255.0
R2 (config-If) # No Shutdown

% Link-5-changed: interface fastethernet0/1, changed state to up
% LINEPROTO-5-UPDOWN: Line protocol on interface fastethernet0/1, changed state to up
R2 (config-If) # exit
R2 (config) # interface fa0/0
R2 (config-If) # IP address 192.168.3.2 255.255.255.0
R2 (config-If) # No Shutdown

% Link-5-changed: interface fastethernet0/0, changed state to up
% LINEPROTO-5-UPDOWN: Line protocol on interface fastethernet0/0, changed state to up
R2 (config-If )#
R2 (config-If) # exit
R2 (config) # router OSPF
% Incomplete command.
R2 (config) # router OSPF 1 // configure the R2 OSPF Routing Protocol
R2 (config-router) # network 192.168.3.0 0.0.255 area 0
R2 (config-router) # network 192.168.4.0 0.0.255 area 0
R2 (config-router) # End
R2 #
% SYS-5-CONFIG_ I: configured from console by the Console
R2 # Show IP Route
Codes: C-connected, S-static, I-IGRP, R-rip, M-mobile, B-BGP
D-OSPF, ex-VPN 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, L1-is level-1, L2-is level-2, Ia-Is Inter Area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route

Gateway of last resort is not set

C 192.168.3.0/24 is directly connected, fastethernet0/0
C 192.168.4.0/24 is directly connected, fastethernet0/1
R2 #
00: 06: 39: % OSPF-5-ADJCHG: Process 1, NBR 192.168.3.1 on fastethernet0/0 from loading to full, loading done
R2 # Show IP Route // route information after route redistribution
Codes: C-connected, S-static, I-IGRP, R-rip, M-mobile, B-BGP
D-OSPF, ex-VPN 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, L1-is level-1, L2-is level-2, Ia-Is Inter Area
*-Candidate default, U-per-user static route, o-ODR
P-periodic downloaded static route

Gateway of last resort is not set

O E2 192.168.1.0/24 [110/20] via 192.168.3.1, 00:00:05, fastethernet0/0
O E2 192.168.2.0/24 [110/20] via 192.168.3.1, 00:00:05, fastethernet0/0
C 192.168.3.0/24 is directly connected, fastethernet0/0
C 192.168.4.0/24 is directly connected, fastethernet0/1
R2 #

PC1:

Packet tracer PC command line 1.0 Pc> ipconfigip address ......................: 192.168.1.2subnet mask .....................: 255.255.255.0default gateway .................: 192.168.1.1pc> Ping 192.168.4.2 // before route redistribution, the left and right hosts cannot Ping pinging 192.168.4.2 with 32 bytes of data: reply from 192.168.1.1: destination host unreachable. reply from 192.168.1.1: destination host unreachable. reply from 192.168.1.1: destination host unreachable. reply from 192.168.1.1: destination host unreachable. ping statistics for 192.168.4.2: Packets: Sent = 4, pinned ED = 0, lost = 4 (100% loss), Pc> Ping 192.168.4.2 // route redistribution, ping pinging 192.168.4.2 with 32 bytes of data: reply from 192.168.4.2: bytes = 32 time = 15 ms TTL = 125 reply from 192.168.4.2: bytes = 32 time = 10 ms TTL = 125 reply from 192.168.4.2: bytes = 32 time = 16 Ms TTL = 125 reply from 192.168.4.2: bytes = 32 time = 10 ms TTL = 125 Ping statistics for 192.168.4.2: Packets: Sent = 4, encrypted ED = 4, lost = 0 (0% loss ), approximate round trip times in Milli-seconds: Minimum = 10 ms, maximum = 16 ms, average = 12 mspc>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.