Redistribution Between RIP and OSPF

Source: Internet
Author: User

Redistribution Between RIP and OSPF

650) this. width = 650; "title =" clip_image002 "style =" border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px "height =" 383 "alt =" clip_image002 "src =" http://www.bkjia.com/uploads/allimg/131227/0332594043-0.gif "" 558 "border =" 0 "/>

1. Configure r1_2 and OSPF first.

2. Configure passive Interfaces

3. Configure address Summary

4. Repeat Static Routing

5. Configuration allocation list

6. Configure the default route

7. Configure re-allocation between RIP and OSPF

8. Configure seed metric)

9. Modify the OSPF external route type

++ ++

First, configure the interface IP address on each vro according to the topology.

R1 & gt;

650) this. width = 650; "title =" clip_image004 "style =" border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px "height =" 175 "alt =" clip_image004 "src =" http://www.bkjia.com/uploads/allimg/131227/0332594558-1.jpg "" 557 "border =" 0 "/>

R2 & gt;

650) this. width = 650; "title =" clip_image006 "style =" border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px "height =" 103 "alt =" clip_image006 "src =" http://www.bkjia.com/uploads/allimg/131227/0332591X2-2.jpg "" 557 "border =" 0 "/>

R3 & gt;

650) this. width = 650; "title =" clip_image008 "style =" border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px "height =" 173 "alt =" clip_image008 "src =" http://www.bkjia.com/uploads/allimg/131227/03325a911-3.jpg "" 557 "border =" 0 "/>

After the IP address is configured, verify the connection to the R1 and R3 serial links on R2.

R2 # ping 172.16.12.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.12.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 168/202/248 MS

R2 # ping 172.16.23.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.23.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 48/170/396 MS

Next, configure r1_2 on R1 and R2.

R1 # show runn | B r

Router rip

Version 2

Network 172.16.0.0

Network 192.168.48.0

Network 192.168.49.0

Network 192.168.50.0

Network 192.168.51.0

Network 192.168.70.0

No auto-summary

!

R2 # show runn | B r

Router rip

Version 2

Network 172.16.0.0

No auto-summary

!

To advertise a network in a RIP process, you only need to advertise the primary network number, instead of adding the anti-mask as in the case of VPN and OSPF. Show ip route rip on R1 and R2 to verify whether the configuration is successful

R1 # show ip route rip

172.16.0.0/24 is subnetted, 4 subnets

R 172.16.23.0 [120/1] via 172.16.12.2, 00:00:22, Serial0/0

R 172.16.2.0 [120/1] via 172.16.12.2, 00:00:22, Serial0/0

R2 # show ip route rip

172.16.0.0/24 is subnetted, 4 subnets

R 172.16.1.0 [120/1] via 172.16.12.1, 00:00:24, Serial0/1

R 192.168.51.0/24 [120/1] via 172.16.12.1, 00:00:24, Serial0/1

R 192.168.50.0/24 [120/1] via 172.16.12.1, 00:00:24, Serial0/1

R 192.168.49.0/24 [120/1] via 172.16.12.1, 00:00:24, Serial0/1

R 192.168.70.0/24 [120/1] via 172.16.12.1, 00:00:24, Serial0/1

R 192.168.48.0/24 [120/1] via 172.16.12.1, 00:00:24, Serial0/1

If RIP is correctly configured and successfully runs on R1 and R2, R1 can learn the routes 172.16.2.0/24 and 172.16.23.0/24 that are directly connected to R2. 172.16.23.0/24 is advertised as RIP because it belongs to the 172.16.0.0/16 subnet. Therefore, R2 will send the RIP periodic update on the serial link connected to R3, obviously, this is unnecessary and insecure. You can use the passive interface to suppress the serial link transmission of RIP updates between R2 and R3.

R2 # show ip pro

Routing Protocol is "rip"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Sending updates every 30 seconds, next due in 8 seconds

Invalid after 180 seconds, hold down 180, flushed after 240

Redistributing: rip

Default version control: send version 2, receive version 2

Interface Send Recv Triggered RIP Key-chain

Serial0/1 2 2

Serial0/3 2 2

Loopback0 2 2

Automatic network summarization is not in effect

Maximum path: 4

Routing for Networks:

172.16.0.0

R2 # show ip pro

Routing Protocol is "rip"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Sending updates every 30 seconds, next due in 26 seconds

Invalid after 180 seconds, hold down 180, flushed after 240

Redistributing: rip

Default version control: send version 2, receive version 2

Interface Send Recv Triggered RIP Key-chain

Serial0/1 2 2

Loopback0 2 2

Automatic network summarization is not in effect

Maximum path: 4

Routing for Networks:

172.16.0.0

Passive Interface (s ):

Serial0/3

Of course, the loop interface is also advertised to the RIP, And the RIP update will also be performed on the loop interface. Therefore, on R1, all the loop interfaces are configured as passive interfaces.

Router rip

Version 2

Passive-interface default

No passive-interface Serial0/0

Network 172.16.0.0

Network 192.168.48.0

Network 192.168.49.0

Network 192.168.50.0

Network 192.168.51.0

Network 192.168.70.0

No auto-summary

!

R1 # show ip pro

Routing Protocol is "rip"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Sending updates every 30 seconds, next due in 19 seconds

Invalid after 180 seconds, hold down 180, flushed after 240

Redistributing: rip

Default version control: send version 2, receive version 2

Interface Send Recv Triggered RIP Key-chain

Serial0/0 2 2

Automatic network summarization is not in effect

Maximum path: 4

Routing for Networks:

172.16.0.0

192.168.48.0

192.168.49.0

192.168.50.0

192.168.51.0

192.168.70.0

Passive Interface (s ):

Serial0/1

Serial0/2

Serial0/3

Loopback0

Passive Interface (s ):

Loopback1

Loopback48

Loopback49

Loopback50

Loopback51

Loopback70

VoIP-Null0

Routing Information Sources:

Gateway Distance Last Update

172.16.12.2 120 00:00:04

Distance: (default is 120)

Passive-interface can prohibit RIP from sending RIP updates to external devices, but it can still receive RIP updates on this interface. However, because the LSA needs to be synchronized in OSPF, if a passive interface is configured, the neighbor or adjacent relationship in the interface will be disconnected and the HELLO packet will not be sent in this interface.

View the RIP route learned on R2. You can view detailed routes in all RIP domains. However, to save the router's memory space, you can speed up Route table search and reduce the occupation of Route updates on network links, detailed routes can be summarized on R1, but routes summarized by RIP are conditional.

R1 (config-if) # int s0/0

R1 (config-if) # ip summary-address rip 192.168.48.0 255.255.252.0

Summary mask must be greater or equal to major net

That is, the number of mask bits in the RIP route summary must be equal to or greater than the number of mask bits in the primary network. In the above RIP summary, the number of bits in the mask must be equal to or greater than limit 255.0. Therefore, you cannot use this method to route the RIP in this network environment. When we look back at the routing Summary of the network in the network. Configure a summary route pointing to NULL0 in R1 and then re-allocate the static route to the RIP process.

R1 # show runn | B r

Router rip

Version 2

Redistribute static metric 1

Passive-interface default

No passive-interface Serial0/0

Network 172.16.0.0

Network 192.168.48.0

Network 192.168.49.0

Network 192.168.50.0

Network 192.168.51.0

Network 192.168.70.0

No auto-summary

!

Ip http server

Ip route 192.168.48.0 255.255.252.0 Null0

View the route table on R2, and you can see the route for/22.

R2 # show ip route rip

172.16.0.0/24 is subnetted, 4 subnets

R 172.16.1.0 [120/1] via 172.16.12.1, 00:00:10, Serial0/1

R 192.168.51.0/24 [120/1] via 172.16.12.1, 00:00:10, Serial0/1

R 192.168.50.0/24 [120/1] via 172.16.12.1, 00:00:10, Serial0/1

R 192.168.49.0/24 [120/1] via 172.16.12.1, 00:00:10, Serial0/1

R 192.168.70.0/24 [120/1] via 172.16.12.1, 00:00:10, Serial0/1

R 192.168.48.0/24 [120/1] via 172.16.12.1, 00:00:10, Serial0/1

R 192.168.48.0/22 [120/1] via 172.16.12.1, 00:00:10, Serial0/1

The measurement value in the 192.168.48.0/22 route is 1, that is, the price specified by R1 when the static route is re-allocated. If R1 does not specify the metric value during redistribution, the default measurement value is infinite. Of course, the measurement value needs to be specified during redistribution, but OSPF has a default redistribution measurement value of 20.

There are summary routes and detailed Routes learned from R1 on R2. To make the summary routes take effect, route filtering must be performed on R1 to suppress all detailed routes.

On R1, you only need to allow 172.16.1.0/24,192.168 .48.0/22,192.168 .70.0/24 to send to R2. Because the access control list cannot achieve the desired effect, use prefix-list

R1 # show runn | B r

Router rip

Version 2

Redistribute static metric 1

Passive-interface default

No passive-interface Serial0/0

Network 172.16.0.0

Network 192.168.48.0

Network 192.168.49.0

Network 192.168.50.0

Network 192.168.51.0

Network 192.168.70.0

Distribute-list prefix 1to2 out Serial0/0

No auto-summary

!

Ip http server

Ip route 192.168.48.0 255.255.252.0 Null0

!

Ip prefix-list 1to2 seq 5 permit 192.168.48.0/22

Ip prefix-list 1to2 seq 10 deny 192.168.48.0/22 le 24

Ip prefix-list 1to2 seq 15 permit 0.0.0.0/0 le 32

Verify that the configuration on R1 is correct on R2

R2 # show ip route rip

172.16.0.0/24 is subnetted, 4 subnets

R 172.16.1.0 [120/1] via 172.16.12.1, 00:00:05, Serial0/1

R 192.168.51.0/24 [120/1] via 172.16.12.1, 00:00:33, Serial0/1

R 192.168.50.0/24 [120/1] via 172.16.12.1, 00:00:33, Serial0/1

R 192.168.49.0/24 [120/1] via 172.16.12.1, 00:00:33, Serial0/1

R 192.168.70.0/24 [120/1] via 172.16.12.1, 00:00:05, Serial0/1

R 192.168.48.0/24 [120/1] via 172.16.12.1, 00:00:33, Serial0/1

R 192.168.48.0/22 [120/1] via 172.16.12.1, 00:00:05, Serial0/1

On R2, the detailed routes under 192.168.48.0/22 and 192.168.48.0/22 are not changed, but pay attention to the time after the route table, the Detailed Routing time for 192.168.48.0/22 exceeds the interval of 30 S for RIP update. This is because RIP has a HoldTime of S. At this time, you can manually update the route table on R2.

R2 # clear ip route *

R2 # show ip route rip

172.16.0.0/24 is subnetted, 4 subnets

R 172.16.1.0 [120/1] via 172.16.12.1, 00:00:11, Serial0/1

R 192.168.70.0/24 [120/1] via 172.16.12.1, 00:00:11, Serial0/1

R 192.168.48.0/22 [120/1] via 172.16.12.1, 00:00:11, Serial0/1

Configure OSPF now

R2 (config-router) # do show runn | B r o

Router ospf 1

Router-id 2.2.2.2

Log-adjacency-changes

Network 172.16.23.2 0.0.0.0 area 0

!

R3 (config) # do show runn | B r o

Router ospf 1

Router-id 3.3.3.3

Log-adjacency-changes

Network 172.16.3.1 0.0.0.0 area 0

Network 172.16.23.3 0.0.0.0 area 0

Network 192.168.20.1 0.0.0.0 area 0

Network 192.168.25.1 0.0.0.0 area 0

Network 192.168.30.1 0.0.0.0 area 0

Network 192.168.35.1 0.0.0.0 area 0

Network 192.168.40.1 0.0.0.0 area 0

!

Verify OSPF Configuration

R2 # show ip route ospf

192.168.30.0/32 is subnetted, 1 subnets

O 192.168.30.1 [110/65] via 172.16.23.3, 00:04:57, Serial0/3

192.168.25.0/32 is subnetted, 1 subnets

O 192.168.25.1 [110/65] via 172.16.23.3, 00:04:57, Serial0/3

192.168.40.0/32 is subnetted, 1 subnets

O 192.168.40.1 [110/65] via 172.16.23.3, 00:04:57, Serial0/3

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks

O 172.16.3.1/32 [110/65] via 172.16.23.3, 00:04:57, Serial0/3

192.168.20.0/32 is subnetted, 1 subnets

O 192.168.20.1 [110/65] via 172.16.23.3, 00:04:57, Serial0/3

192.168.35.0/32 is subnetted, 1 subnets

O 192.168.35.1 [110/65] via 172.16.23.3, 00:04:57, Serial0/3

On R2, we will find that the network mask of the loop port of R3 learned through OSPF is/32. This is because

R3 (config) # do show ip ospf int lo 0

Loopback0 is up, line protocol is up

Internet Address 172.16.3.1/24, Area 0

Process ID 1, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1

Loopback interface is treated as a stub Host

Therefore, you must manually specify the network type as point-to-point on the loopback interface.

Interface Loopback0

Ip address 172.16.3.1 255.255.255.0

Ip ospf network point-to-point

!

Interface Loopback20

Ip address 192.168.20.1 255.255.255.0

Ip ospf network point-to-point

!

....

R3 (config) # do show ip ospf int bri

Interface PID Area IP Address/Mask Cost State Nbrs F/C

Lo40 1 0 192.168.40.1/24 1 peer to peer (P2P) 0/0

Lo35 1 0 192.168.35.1/24 1 peer to peer (P2P) 0/0

Lo30 1 0 192.168.30.1/24 1 P2P 0/0

Lo25 1 0 192.168.25.1/24 1 P2P 0/0

Lo20 1 0 192.168.20.1/24 1 P2P 0/0

Lo0 1 0 172.16.3.1/24 1 P2P 0/0

Se0/0 1 0 172.16.23.3/24 64 P2P 1/1

R2 # show ip route ospf

O 192.168.30.0/24 [110/65] via 172.16.23.3, 00:02:16, Serial0/3

O 192.168.25.0/24 [110/65] via 172.16.23.3, 00:02:16, Serial0/3

O 192.168.40.0/24 [110/65] via 172.16.23.3, 00:02:16, Serial0/3

172.16.0.0/24 is subnetted, 5 subnets

O 172.16.3.0 [110/65] via 172.16.23.3, 00:02:16, Serial0/3

O 192.168.20.0/24 [110/65] via 172.16.23.3, 00:02:16, Serial0/3

O 192.168.35.0/24 [110/65] via 172.16.23.3, 00:02:16, Serial0/3

Of course, you can also configure the loopback interface as a passive interface in R3.

R3 (config-router) # do show runn | B r o

Router ospf 1

Router-id 3.3.3.3

Log-adjacency-changes

Passive-interface default

No passive-interface Serial0/0

Network 172.16.23.3 0.0.0.0 area 0

Network 192.168.0.0 0.0.255.255 area 0

!

Because the OSPF link status database needs to be synchronized, you cannot configure the Serial Link interface connecting R2 and R3 as a passive interface. Once configured as a passive interface

* Mar 1 03:35:10. 891: % OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial0/0 from FULL to DOWN, Neighbor Down: Interface down or detached

Verify with show ip protocol

R3 # show ip pro

Routing Protocol is "ospf 1"

Outgoing update filter list for all interfaces is not set

Incoming update filter list for all interfaces is not set

Router ID 3.3.3.3

Number of areas in this router is 1. 1 normal 0 stub 0 nssa

Maximum path: 4

Routing for Networks:

172.16.23.3 0.0.0.0 area 0

192.168.0.0 0.0.255.255 area 0

Reference bandwidth unit is 100 mbps

Passive Interface (s ):

Serial0/1

Serial0/2

Serial0/3

Loopback0

Loopback1

Loopback20

Loopback25

Loopback30

Loopback35

Loopback40

VoIP-Null0

Now we will re-allocate OSPF to RIP on R2.

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

When re-allocating other routing protocols to RIP, you must configure the measurement value. Otherwise, the default measurement value is infinite. The metric value specified during Redistribution is the measurement value for accepting the first-hop router of this route.

R1 # show ip route rip

R 192.168.30.0/24 [120/2] via 172.16.12.2, 00:00:20, Serial0/0

R 192.168.25.0/24 [120/2] via 172.16.12.2, 00:00:20, Serial0/0

R 192.168.40.0/24 [120/2] via 172.16.12.2, 00:00:20, Serial0/0

172.16.0.0/24 is subnetted, 4 subnets

R 172.16.23.0 [120/2] via 172.16.12.2, 00:00:20, Serial0/0

R 172.16.2.0 [120/1] via 172.16.12.2, 00:00:20, Serial0/0

R 192.168.20.0/24 [120/2] via 172.16.12.2, 00:00:20, Serial0/0

R 192.168.35.0/24 [120/2] via 172.16.12.2, 00:00:20, Serial0/0

At this time, the routes in the OSPF domain can be learned on R1, but R1 and R3 still cannot communicate normally, because R3 has not yet reached the R1 route, therefore, a default route can be created on R2 so that R3 can communicate with R1 through R2.

R2 (config-router) # default-information originate always

R3 # show ip route ospf

O * E2 0.0.0.0/0 [110/1] via 172.16.23.2, 00:00:18, Serial0/0

Of course, R3 can also learn all routes in the RIP domain.

R2 (config-router) # redistribute rip subnets

When OSPF is re-allocated to RIP, subnets will re-allocate the RIP subnet. You do not need to specify the measurement value for re-allocation in the OSPF process, because the default external route metric value of OSPF is 20

R3 # show ip route ospf

172.16.0.0/24 is subnetted, 5 subnets

O E2 172.16.12.0 [110/20] via 172.16.23.2, 00:02:29, Serial0/0

O E2 172.16.1.0 [110/20] via 172.16.23.2, 00:02:29, Serial0/0

O E2 172.16.2.0 [110/20] via 172.16.23.2, 00:02:29, Serial0/0

O E2 192.168.70.0/24 [110/20] via 172.16.23.2, 00:02:29, Serial0/0

O E2 192.168.48.0/22 [110/20] via 172.16.23.2, 00:02:29, Serial0/0

You can also modify the default measurement value.

R2 (config-router) # default-metric?

<1-16777214> OSPF default metric

The default external routing type in OSPF is O E2. When the OE2 external route flood to the OSPF domain, the metric value will not change. Of course, you can change it to the OE1 type External route.

R2 (config-router) # redistribute rip subnets metric-type 1

Verify the configuration on R3

R3 # show ip route ospf

172.16.0.0/24 is subnetted, 5 subnets

O E1 172.16.12.0 [110/84] via 172.16.23.2, 00:00:13, Serial0/0

O E1 172.16.1.0 [110/84] via 172.16.23.2, 00:00:13, Serial0/0

O E1 172.16.2.0 [110/84] via 172.16.23.2, 00:00:13, Serial0/0

O E1 192.168.70.0/24 [110/84] via 172.16.23.2, 00:00:13, Serial0/0

O E1 192.168.48.0/22 [110/84] via 172.16.23.2, 00:00:13, Serial0/0

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.