Takeaway: Last time, David Davis reviewed the finer points of routing redistribution. This week, get a practical, hands-on example of using routing redistribution on your network.
In my last column, I offered an overview of the basics of using routing redistribution. Routing redistribution involves taking routes from one source (usually a routing protocol) and sending those routes to a different source (usually another routing protocol).
Now that we've discussed exactly what routing redistribution is, let's look at a practical, hands-on example of using routing redistribution. Last time, we discussed three situations in which one might use routing redistribution. One of those scenarios involved the use of devices that don't support the routing protocol of your network.
If you're using such devices, you'll likely want to bring routes from the devices into the routing protocol of your network. Let's drill down into this situation, and examine the proper configuration for each of the devices.
Let's say your organization's network has a firewall that only offers Routing Information Protocol (RIP) routing, and you want that firewall to be the default gateway for the network. However, the network is running Open Shortest Path First (OSPF) routing.
How do you get the RIP default route into your OSPF network? The answer is redistribution. First, let's look at a diagram of the network, as shown in Figure A.
The firewall is near the top of the diagram, and it connects to Router 1. Router 1 then connects to Router 2. (In a real-world network, it likely connects to other routers as well.)
Router 1 is our redistribution point, from which we'll redistribute the RIP routes we receive from the firewall into our OSPF network. So, Router 1 is running both RIP and OSPF; it runs RIP on the interface connecting to the firewall, and it runs OSPF on the interface connecting to Router 2.
When we're finished, we'll see the default route on Router 2, originally sent by the firewall. And Router 2 will only have the default route when Router 1 has the default route. Here's something important to note: While you could continually send the default route from Router 1 to Router 2 without redistribution, you only want Router 2 to have the default route if it's really available.
Here's the IP address configuration for Router 1:
interface Ethernet0 ip address 1.1.1.125 255.255.255.0 ! interface Serial0 ip address 2.2.2.1 255.255.255.0
Here's the routing configuration for Router 1:
router ospf 1 redistribute rip subnets network 2.2.2.0 0.0.0.255 area 0 default-information originate ! router rip network 1.0.0.0
This shows us that the router has OSPF enabled on the Serial interface and RIP enabled on the Ethernet interface. In addition, the following commands are particularly important to note.
- redistribute rip subnets: Under the OSPF routing process, this command sends any routes received from RIP to OSPF. The subnets keyword tells the router to redistribute all networks, including subnetted networks. By default, this command only redistributes classful networks.
- default-information originate: Under the OSPF process, this command allows OSPF to advertise a default route. By default, this command only advertises the default route if the router really has a default route. However, you can use the always keyword at the end of the command to tell the router to advertise a default route via OSPF no matter what.
Now, let's look at the IP address configuration for Router 2:
interface Ethernet0 ip address 10.1.1.1 255.255.255.0 ! interface Serial0 ip address 2.2.2.2 255.255.255.0 clockrate 250000
Here's the routing configuration for Router 2:
router ospf 1 network 10.1.1.0 0.0.0.255 area 0 network 2.2.2.0 0.0.0.255 area 0
Note that Router 2 is only running OSPF.
Next, let's use the show ip route command on Router 1. Here's a look at this command's output:
R1# show ip route Codes: 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 i - IS-IS, su - IS-IS summary, 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 is 1.1.1.126 to network 0.0.0.0 1.0.0.0/24 is subnetted, 1 subnets C 1.1.1.0 is directly connected, Ethernet0 2.0.0.0/24 is subnetted, 1 subnets C 2.2.2.0 is directly connected, Serial0 10.0.0.0/24 is subnetted, 1 subnets O 10.1.1.0 [110/74] via 2.2.2.2, 00:13:19, Serial0 R* 0.0.0.0/0 [120/1] via 1.1.1.126, 00:00:03, Ethernet0
Notice that Router 1 is receiving the default route via RIP, as indicated by the R next to the 0.0.0.0/0 default route at the bottom of the output. In addition, notice that Router 1 is communicating with Router 2 via OSPF because it has the 10.1.1.0/24 route for the Ethernet LAN on Router 2.
Now, let's use the show ip route command on Router 2. Here's a look at this command's output:
R2# 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 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, * - candidate default U - per-user static route Gateway of last resort is 2.2.2.1 to network 0.0.0.0 1.0.0.0/8 is subnetted, 1 subnets O E2 1.1.1.0 [110/20] via 2.2.2.1, 00:12:39, Serial0 2.0.0.0/8 is subnetted, 1 subnets C 2.2.2.0 is directly connected, Serial0 10.0.0.0/8 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Ethernet0 O*E2 0.0.0.0/0 [110/1] via 2.2.2.1, 00:12:31, Serial0 R2#
Notice that Router 2 has the 0.0.0.0/0 default route pointing to Router 1 (in this case, 2.2.2.1) and that the route has the O designation, which indicates the OSPF route.
This is an external OSPF route, as indicated by E2. This shows that its source was not natively OSPF, and it also indicates redistribution via some other protocol.
Router 2 has no RIP routes because it isn't running RIP. Through redistribution, however, it can receive the RIP route, originally advertised by the firewall.
Post a Comment
How do you acquire this kind of great important information? I looked at operating a blog during the past yet My partner and I discovered many people usually received better data prior to me. . .
I started to follow your blog
Jo Nice post and blog I d be coming to read more :D
I really think this blog is very time saving, but I found a site where you can get helpful information on Long Term care. Site
Hey, I think your blog is good
Post a Comment