Está en la página 1de 9

Route redistribution

Route redistribution is often needed when a network running 2 different routing protocols (maybe even the same routing protocol, but different AS) need to exchange routes. Redistribution can even be useful for a merged network using the same routed protocol.

When a static route is used as redistribution rather than an IGP, its recommended that you either 1) specify the exit interface directly (for point-or-point link), or 2) specify both the exit interface and the next-hop address (for broadcast link). This is used to prevent recursive lookup, which occur because only the next hop address exist. The routing table is checked twice: 1) when a packet enters the router and router looks up the entry, and 2) router checks the next-hop address.

To be able to redistribute, use at least one working physical link with each routing domain. A working routing protocol for each routing domain. Additional configuration that tell the routing protocol to take the routes learned by another source of routing information and to then advertise those routes.

When performing redistribution, the router (re-distributing) take routes from the IP routing table and pass those routes to a routing protocol for redistribution. Routing protocols treat the foreign routes as external routes, and since different protocols have different methods of calculating metric, there will be different metric calculation.

At the point of redistribution, the receiving process start with a seed metric, which is usually assigned manually. Here are some seed metric for routing protocols.

When more than one route exist for a particular destination network, the better route is judged per AD. Routers can only redistribute routes they know (static or dynamic). When a route is redistributed, it gets the default AD of the new routing protocol.

Route feedback refers to loop created by multiple redistribution router, solutions include: Change the metric, - Change AD, - Use default route, - User passive interface with static route, - Use distribute list

Networks converge at the speed of the slower protocol.

If there are one match command, the criteria can match to any condition to be true, this is logical OR. If there are multiple statements, all must be considered true for the route map statement to be matched, this is logical AND.

EIGRP Redistribution

This is the complete configuration of EIGRP redistribute command, used in EIGRP router configuration mode: (config-router)#redistribute eigrp ASN [metric BW DELAY REL LOAD MTU] [tag VALUE] [routemap NAME], where tag refers to a number that identifies a route. It can be further manipulated with route maps.

For redistribution to work, the redistributing router MUST set the metric factor (from which the metric is calculated) for those external routes using one of 3 methods:

Note that if you are redistributing from another EIGRP process, EIGRP will (already) have a default metric; thus, no need for the above method. To redistribute between IGRP and EIGRP, simply configure them to use the same ASN. Note: delay is again 10 times smaller than delay in show command.

When redistribute command refers to anothe r IGP as the routing source, the router will redistribute (these routes will show via Redistributed exit interface): All routes in the routing table learned by that routing protocol All connected routes of interfaces on which that routing protocol is enabled

Note: redistributing router will become the next-hop router for packets to the other domain. Note: EIGRP external routes has AD of 170.

OSPF Redistribution

OSPF redistribution uses default metric, thus, no need to configure using commands OSPF create LSA for external route Redistributed routes are flagged as external. The command for redistribution (in OSPF router configuration mode) is:

(config-router)#redistribute ospf P_ID [metric VALUE] [metric-type {1 | 2}] [match {internal | nssa-internal | external 1 | external 2}] [tag VALUE] [route-map NAME] [subnets]

When redistribute OSPF from: Another OSPF AD, use the routes metric A subnet, only the classful network is considered unless subnets is added Any source, Type 5 LSA is created for each external route. If in a (totally) NSSA area, Type 7 LSA is created instead.

The same rules that can change EIGRP metric also applies to OSPF.

When Type 5 LSA is created by the ASBR, its flooded to the connected area. ABRs in that area will flood the LSA to routers in its area unless its a stubby area, which requires default route instead.

OSPF external route can either be type 1 or type 2 (default). These routes calculate metric differently, type 2 external route uses metric stated in the LSA. This means all routes advertised by E2 has the same metric, making all ASBR equal cost. How a router choose its route differ depends on whether its in the same area as ASBR.

When ASBR reside in the same area as this router and many routes are available, this router checks the next hop router RID to find the shortest distance route.

When ASBR reside in another area, not as same as this router, route calculation involves another LSA. The total cost = cost to reach ABR + cost from ABR to ASBR (metric listed in Type 4 LSA). Type 4 Summary ASBR LSA is created by ABR when it receives an LSA from ASBR. Type 4 LSA include ABRs RID, ASBRs RID and cost to reach ASBR from ABR. Displayed with show ip ospf database asbr-summary show ip ospf border-routers, lists a line for every ABR and ASBR known to the local router. It lists whether the router is inside the same area or in another area, the RID of the ABR or ASBR, and this routers best route to reach each ABR and ASBR.

Another solution is to use E1 route instead of E2 (Type 5 LSA) by metric-type 1; E1 route metric = internal cost + external cost. For a given IP subnet, OSPF ALWAYS prefer E1 route over E2 route regardless of metric.

Routers may be redistributed into a (totally) NSSA area using Type 7 LSA. The ASBR flood Type 7 LSAs (which continues in this form) that reaches (totally) NSSA area, if the area is not stub, ABR converts it to a Type 5 LSA and forward it.

Redistribute into IS-IS

By default, all redistributed routes have a metric of 0 and imported only to Level 2 LSDB. You can change the behavior with redistribute static ip {level -1 | level-2 | level-1-2 | metric | metric-type | route-map} redistribute static only advertise CLNS routes. To use IP, use redistribute static ip

Redistribution filtering

You can use route-map keyword included in the redistribute command to choose what route to 1) set a different metric, 2) set a different type, or 3) which to redistribute.

In addition to filter by ACL or prefix-list, route-map can filter based on

Other than filtering routes, a route map can also cause value of items of route to change using the set command:

In an ACL, ip host 172.16.1.0 host 255.255.255.0 matches route whose destination subnet is 172.16.1.0, specifically, those address with mask of 255.255.255.0.

You can also use show access-lists and show ip prefix-list detail followed by prefix-list name. These commands show you the number of matches found.

To set the metric for a route use set metric route map subcommand. If you are setting the metric for OSPF or RIP, follow the command by the metric, such as set metric 10. If youre setting the metric for EIGRP, follow the command by bandwidth, delay, reliability, load, MTU, such as set metric 100 22 255 1 1500. To apply the metrics, use redistribute ...... Set-metric command. The precedence is 1) setmetric from route map, 2) set-metric from redistribute, 3) default-metric command. Verify using show ip route or show ip eigrp topology

When using match {internal | external 1 | external 2 | nssa-external} part of command, you are matching the type of routes to be redistributed.

If you are only filtering redistribution routes (without setting metric and other stuff), you can use distribute-list command with direction being out (this is a MUST) and the mechanism is either ACL or prefix-list. For instance, distribute-list 1 out ospf 2 applies ACL 1 to EIGRP (current domain) for routes redistributing from OSPF process number 2. Another example is distribute -list prefix fred out eigrp 1 applies a prefix-list named fred to EIGRP ASN 1 redistributing into OSPF (current domain).

Note that filtering take place as the route is redistributed to the destination routing protocol that is added to the topology table (if one is present). show ip access -lists and show ip prefix-list detail command confirms the successful action while show ip eigrp/ospf topology of the destination protocol will not show the route.

Filtering for OSPF will only filter LSA from the RIB, but it still remain in LSDB. Filtering for BGP is preferably done in per-neighbor basis.

Multiple router redistribution

When multiple redistribution routers exist, a subnet can be looped (in advertisement) between the domains because the default metric of the route from the redistribution may be lower than the metric of the internal route. Therefore, the router is tricked into going through the further route and may even cause a loop. Somehow, if EIGRP is present as one of the routing protocols, this situation would not occur.

One method to resolve this problem is purposefully use a (default) metric higher than the highest internal route metric. This way, the router can precede internal routes before redistributed routes.

In OSPF, this problem can also be prevented since it has a (default) higher precedence for E1 routes; meaning for every redistributed routes that has cost of total cost of internal and external route, it has precedence over those redistributed routes that counts only external cost.

Remember: if there are 2 possible routes to a certain destination, the longer prefix wins. If the prefix is equal, lower AD wins.

Another behavior that prevent domain loop is recognition of redistributed routes. If a route in domain A is redistributed into domain B, the redistribution router will not advertise this route back from B to A because it doesnt exist in B.

RIP doesnt have a concept of internal and external routes. In RIP, internal route simple refer to routes exist inside the RIP domain and external routes are ones exist outside RIP domain.

You can manually set the AD of routing protocol to overcome domain loop problem. Redistribution problem between RIP and OSPF can be solved this way:

When multiple routing domains exist, routers may be confused by the redistributed routes and chose the route with the lowest AD, which may be the longer way around, 3 solutions are present to solve this problem: 1. per-route AD setting, the full distance command is (config-router)#distance AD [IP_ADD WILDCARD] [ACL_NAME/ID]. Whereas routers whose IP address match the range of address in IP_ADD WILDCARD, the specified AD value applies. The route is matched using ACL. Thus, the router that redistribute that route will stop the route from being advertised. This command cant be used with prefix list. In OSPF, IP_ADD WILDCARD refers to the RID of the router that advertise this LSA. In RIP and EIGRP, IP_ADD WILDCARD is the interface IP address that advertise this route.

1. Filter routes using prefix-list at the redistribution router also prevent this sort of problem.

1. Route tag is a 32-bit integer that can be used to identify a (set of) routes; its a n identifier that can be used for many purposed. In redistribution, you can tag (identify) certain routes, and then decide to let them pass or filter them. To set a tag, simply add set tag followed by the identifier after a route map clause. This route m ap can be added in redistribute command for it to filter redistributed routes.

Backup interface

An interface can be configure to back up another interface. When configured, this interface stay in standby mode. To use S0/0 as backup for S1/0, configure (config-if)#backup interface s1/0 on S0/0s interface configuration mode. (config-if)#backup delay [UP] [DOWN] configures the backup interface to come alive when the primary interface has failed for UP seconds. The backup interface will be shut down when the primary interface has come up for DOWN seconds. (config-if)#backup load [EX] [DIS] configures the backup interface to share traffic once the load on the primary interface exceed EX% of its bandwidth. Backup interface return to shutdown mode once primary interfaces load drops to DIS% of its bandwidth.

También podría gustarte