[Ccnp] routing policy: Manage distance control routing (sub-optimal path)

Source: Internet
Author: User

Tutorial topology:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/48/D2/wKioL1QLrYjSWubjAAFR1F2EAJA800.jpg "Title =" 1.png" alt = "wkiol1qlryjswubjaafr1f2eaja800.jpg"/>

, Which belongs to the dual-point bidirectional redistribution in OSPF. The above box indicates that the OSPF protocol is run, and the following box indicates that the RIP Protocol is run.

Objective: 1. To reproduce rip and OSPF, observe what problems will happen.

2. Solve sub-optimal path problems by changing the Management Distance

Tutorial steps:

  1. Complete basic configuration

R1

R1 # conf t

Enter configuration commands, one per line. End with cntl/Z.

R1 (config) # int F0/1

R1 (config-If) # IP add 10.1.12.1 255.255.255.0

R1 (config-If) # No sh


R1 (config-If) # int F0/0

R1 (config-If) # IP add 10.1.13.1 255.255.255.0

R1 (config-If) # No sh


R1 (config-If) # int l0

R1 (config-If) # IP add 1.1.1.1 255.255.255.255

R1 (config-If) # No sh

R1 (config-If) # ex


R2

R2 # conf t

Enter configuration commands, one per line. End with cntl/Z.


R2 (config) # int F0/0

R2 (config-If) # IP add 10.1.12.2 255.255.255.0

R2 (config-If) # No sh


R2 (config-If) # int F0/1

R2 (config-If) # IP add 10.1.24.2 255.255.255.0

R2 (config-If) # No sh


R2 (config-If) # int l0

R2 (config-If) # IP add 2.2.2.2 255.255.255.255

R2 (config-If) # No sh

R2 (config-If) # ex


R3

R3 # conf t

Enter configuration commands, one per line. End with cntl/Z.

R3 (config-If) # int F0/1

R3 (config-If) # IP add 10.1.13.3 255.255.255.0

R3 (config-If) # No sh


R3 (config-If) # int F0/0

R3 (config-If) # IP add 10.1.34.3 255.255.255.0

R3 (config-If) # No sh


R3 (config-If) # int l0

R3 (config-If) # IP add 3.3.3.3 255.255.255.255

R3 (config-If) # No sh

R3 (config-If) # ex


R4

R4 # conf t

Enter configuration commands, one per line. End with cntl/Z.

R4 (config) # int l0

R4 (config-If) # IP add 4.4.4.4 255.255.255.255

R4 (config-If) # No sh


R4 (config-If) # int F0/0

R4 (config-If) # IP add 10.1.24.4 255.255.255.0

R4 (config-If) # No sh


R4 (config-If) # int F0/1

R4 (config-If) # IP add 10.1.34.4 255.255.255.0

R4 (config-If) # No sh

R4 (config-If) # ex


Next, run OSPF on R1, R2, R3, and rip on R2, R3, and R4. Note that do not overlap when declaring network segments.


R1 (config) # router OSPF 1

R1 (config-router) # router-ID 1.1.1.1

R1 (config-router) # network 1.1.1.1 0.0.0.0 A 1

R1 (config-router) # network 10.1.12.0 0.0.255 A 1

R1 (config-router) # network 10.1.20.0.0.255 A 1


R2 (config) # router OSPF 1

R2 (config-router) # router-ID 2.2.2.2

R2 (config-router) # network 10.1.12.0 0.0.255 A 1

R2 (config-router) # network 10.1.12.0 0.0.255 A 1

R2 (config-router) # ex


R3 (config) # router OSPF 1

R3 (config-router) # router-ID 3.3.3.3

R3 (config-router) # network 10.1.20.0.0.255 A 1

R3 (config-router) # ex

R3 (config) # End


R2 (config) # router rip

R2 (config-router) # Version 2

R2 (config-router) # No auto-Summary

R2 (config-router) # network 10.0.0.0


R3 (config) # router rip

R3 (config-router) # Version 2

R3 (config-router) # No auto-Summary

R3 (config-router) # network 10.0.0.0

R3 (config-router) # ex


R4 (config) # router rip

R4 (config-router) # Version 2

R4 (config-router) # No auto-Summary

R4 (config-router) # network 4.4.4.4

R4 (config-router) # network 10.0.0.0


Show IP route on R3 and observe the route direction to 4.4.4.4

R3 # Show IP Route

.......

1.0.0.0/32 is subnetted, 1 subnets

O 1.1.1.1 [110/11] via 10.1.13.1, 00:02:01, fastethernet0/1

3.0.0.0/32 is subnetted, 1 subnets

C 3.3.3.3 is directly connected, loopback0

4.0.0.0/32 is subnetted, 1 subnets

R 4.4.4.4 [120/1] via 10.1.34.4, 00:00:05, fastethernet0/0

10.0.0.0/24 is subnetted, 4 subnets

C 10.1.13.0 is directly connected, fastethernet0/1

O 10.1.12.0 [110/20] via 10.1.13.1, 00:02:01, fastethernet0/1

R 10.1.24.0 [120/1] via 10.1.34.4, 00:00:07, fastethernet0/0

C 10.1.34.0 is directly connected, fastethernet0/0

It is found that the data is directly routed from F0/1 of R4 through rip. No problem.


2. Route redistribution


At this time, OSPF is redistributed to rip on R2 and R3.


R2 (config) # router rip

R2 (config-router) # redistribute OSPF 1 metric 2


R3 (config) # router rip

R3 (config-router) # redistribute OSPF 1 metric 2


Note: When OSPF is injected into rip, you must add the metric value metric. Otherwise, it is not reachable by default.

At this time, continue to show IP route on r3

R3 # Show IP Route

........


1.0.0.0/32 is subnetted, 1 subnets

O 1.1.1.1 [110/11] via 10.1.13.1, 00:18:38, fastethernet0/1

3.0.0.0/32 is subnetted, 1 subnets

C 3.3.3.3 is directly connected, loopback0

4.0.0.0/32 is subnetted, 1 subnets

R 4.4.4.4 [120/1] via 10.1.34.4, 00:00:07, fastethernet0/0

10.0.0.0/24 is subnetted, 4 subnets

C 10.1.13.0 is directly connected, fastethernet0/1

O 10.1.12.0 [110/20] via 10.1.13.1, 00:18:38, fastethernet0/1

R 10.1.24.0 [120/1] via 10.1.34.4, 00:00:08, fastethernet0/0

C 10.1.34.0 is directly connected, fastethernet0/0

It's still okay.


Inject rip into OSPF on r2

R2 (config) # router OSPF 1

R2 (config-router) # redistribute rip subnets


At this time, view the route table on r3

R3 # Show IP Route

.....

1.0.0.0/32 is subnetted, 1 subnets

O 1.1.1.1 [110/11] via 10.1.13.1, 00:00:05, fastethernet0/1

3.0.0.0/32 is subnetted, 1 subnets

C 3.3.3.3 is directly connected, loopback0

4.0.0.0/32 is subnetted, 1 subnets

O E2 4.4.4.4 [110/20] via 10.1.13.1, 00:00:05, fastethernet0/1

10.0.0.0/24 is subnetted, 4 subnets

C 10.1.13.0 is directly connected, fastethernet0/1

O 10.1.12.0 [110/20] via 10.1.13.1, 00:00:05, fastethernet0/1

O E2 10.1.24.0 [110/20] via 10.1.13.1, 00:00:07, fastethernet0/1

C 10.1.34.0 is directly connected, fastethernet0/0


Because the OSPF ad value is less than rip, so in R3 up to 4.4.4 will give priority to select the OSPF path, is the R3-R1-R2-R4 path, clearly only need to take the R3-R4 path, but need to walk a large circle, this is the so-called sub-optimal path, which will waste a lot of routing resources in the current network.


In addition, re-distributing rip into OSPF on R3 will also fail, because the rip route in the R3 route table has been overwritten by OSPF. The re-distributing route is based on the existence of a route in the routing table.


So how to solve this problem? You can modify the ad value to control the route direction.


3. Modify the ad value to solve the sub-optimal path


First, make an ACL access list to allow the destination CIDR Block

R3 (config) # access-List 1 permit 4.4.4.4


Modify the value of AD (less than OSPF) When Rip reaches R4 in rip to 100, and apply the ACL


R3 (config) # router rip

R3 (config-router) # distance 100 10.1.34.4 0.0.0.255 1

R3 (config-router) # End


R3 # clear IP route * clear the route table


R3 # Show IP Route

.......


1.0.0.0/32 is subnetted, 1 subnets

O 1.1.1.1 [110/11] via 10.1.13.1, 00:00:01, fastethernet0/1

3.0.0.0/32 is subnetted, 1 subnets

C 3.3.3.3 is directly connected, loopback0

4.0.0.0/32 is subnetted, 1 subnets

R 4.4.4.4 [100/1] via 10.1.34.4, 00:00:01, fastethernet0/0

10.0.0.0/24 is subnetted, 4 subnets

C 10.1.13.0 is directly connected, fastethernet0/1

O 10.1.12.0 [110/20] via 10.1.13.1, 00:00:01, fastethernet0/1

O E2 10.1.24.0 [110/20] via 10.1.13.1, 00:00:02, fastethernet0/1

C 10.1.34.0 is directly connected, fastethernet0/0


After adjustment, it is found that the route is normal.

Make the same modification on R2. Otherwise, the sub-optimal path will appear when R2 goes to 4.4.4.


R2 (config) # access-List 1 permit 4.4.4.4

R2 (config) # router rip

R2 (config-router) # distance 100 10.1.24.4 0.0.0.255 1

R2 (config-router) # End


Redistributing rip to OSPF on r3

R3 (config) # router rip

R3 (config-router) # redistribute rip subnets

R3 (config-router) # End


Finally, check whether the loose 4.4.4.4 to R4 is normal on R1.

R1 # clear IP route *

R1 # Show IP Route

......

1.0.0.0/32 is subnetted, 1 subnets

C 1.1.1.1 is directly connected, loopback0

4.0.0.0/32 is subnetted, 1 subnets

O E2 4.4.4.4 [110/20] via 10.1.13.3, 00:00:01, fastethernet0/0

[110/20] via 10.1.12.2, 00:00:01, fastethernet0/1

10.0.0.0/24 is subnetted, 4 subnets

C 10.1.13.0 is directly connected, fastethernet0/0

C 10.1.12.0 is directly connected, fastethernet0/1

O E2 10.1.24.0 [110/20] via 10.1.12.2, 00:00:01, fastethernet0/1

O E2 10.1.34.0 [110/20] via 10.1.13.3, 00:00:02, fastethernet0/0


Server Load balancer. No problem. The experiment is over.




This article is from the "ne Road" blog, please be sure to keep this source http://332162926.blog.51cto.com/8831013/1549741

[Ccnp] routing policy: Manage distance control routing (sub-optimal path)

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.