Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router ....

86
O Route Optimization

Transcript of Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router ....

Page 1: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

ORoute Optimization

Page 2: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Seed Metrics and Route Redistribution

Page 3: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Using Multiple Routing Protocols! Interim during conversion

From RIPv1 to EIGRP

A li i ifi l! Application-specific protocolsOne size does not always fit all.

! Political boundarieso t ca bou da esGroups that do not work well with others

! Mismatch between devicesMultivendor interoperabilityHost-based routers

Page 4: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Redistribution with Seed MetricRedistribution with Seed Metric

Luiz Angelo Steffenel
Luiz Angelo Steffenel - 11 mai 09 14:16cost 30 (not 130)To get 130, need to set different metric type (01)
Page 5: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Default Seed Metrics

Protocol Default Seed Metrics

RIP Infinity

IGRP/EIGRP Infinity

OSPF 20 for all except BGP which is 1OSPF 20 for all except BGP, which is 1

IS-IS 0

BGP BGP metric is set to IGP metric value

Page 6: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Seed metric golden rules:

1 A seed metric is used to artificially set the distance1. A seed metric is used to artificially set the distance, cost, etc., to each external (redistributed) network from the redistribution point.

2. A metric of infinity tells the router that the route is unreachable, and therefore, it should not be advertisedadvertised.

3. When redistributing routes into RIP, IGRP, and EIGRP, you must specify a default metric. If you do notyou must specify a default metric. If you do not configure a default metric, the default will be infinity which means that all routes redistributed from these three protocols will be unreachablethree protocols will be unreachable.

Page 7: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Configuring and Verifying Route RedistributionRedistribution

Page 8: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Redistribution Supports All ProtocolsRedistribution Supports All Protocols

RtrA(config)#router ripRtrA(config)#router ripRtrA(config-router)#redistribute ?bgp Border Gateway Protocol (BGP)connected Connectedeigrp Enhanced Interior Gateway Routing Protocoleigrp Enhanced Interior Gateway Routing Protocol

(EIGRP)isis ISO IS-ISiso-igrp IGRP for OSI networksmetric Metric for redistributed routesmetric Metric for redistributed routesmobile Mobile routesodr On Demand stub Routesospf Open Shortest Path First (OSPF)rip Routing Information Protocol (RIP)p out g o at o otoco ( )route-map Route map referencestatic Static routes<cr>

! Default metric is infinity.

Page 9: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Planning Redistribution

! Locate the boundary router between two routing processes.

! Determine which routing process is the core or backbone process (EIGRP, OSPF or ISIS)

! Determine which routing process is the edge or migration process

! Select a method for injecting the required edge protocol routes! Select a method for injecting the required edge protocol routes into the core. (summaries)

Page 10: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Configuring Redistribution into RIP! Use this command to redistribute routes into RIP:

Configuring Redistribution into RIP

Router(config-router)# redistribute protocol[process-id] [match route-type] [metric metric-value] [route-map map-tag]

RtrA(config)# router ripRtrA(config-router)# redistribute ospf ?

<1 65535> Process ID<1-65535> Process IDRtrA(config-router)# redistribute ospf 1 ?

match Redistribution of OSPF routesmetric Metric for redistributed routesmetric Metric for redistributed routesroute-map Route map reference…<cr>

! Default metric is infinity for RIP/IGRP/EIGRP.

Page 11: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Redistributing into RIPRedistributing into RIP

Page 12: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Configuring Redistribution into OSPFConfiguring Redistribution into OSPF

! Use this command to redistribute routes into OSPF:! Use this command to redistribute routes into OSPF:Router(config-router)# redistribute protocol[process-id] [metric metric-value] [metric-typet l ] [ t t ] [ b t ] [ttype-value] [route-map map-tag] [subnets] [tag tag-value]

! Default metric is 20Default metric is 20.

! Default metric type is 2.

! Subnets do not redistribute by default! Subnets do not redistribute by default.

Page 13: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Example: Redistribution into OSPFExample: Redistribution into OSPFRtrA(config)# router ospf 1Rt A( fi t )# di t ib t i ?RtrA(config-router)# redistribute eigrp ?

<1-65535> Autonomous system numberRtrA(config-router)# redistribute eigrp 100 ?

metric Metric for redistributed routesmetric-type OSPF/IS-IS exterior metric type for

redistributed routest R t froute-map Route map reference

subnets Consider subnets for redistribution into OSPFtag Set tag for routes redistributed into OSPF…<cr><cr>

Page 14: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Redistributing into OSPFRedistributing into OSPF

Page 15: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Configuring Redistribution into EIGRPConfiguring Redistribution into EIGRP! Use this command to redistribute routes into EIGRP:

router(config-router)# redistribute protocol[process-id] [match {internal | external 1 |external 2}] [metric metric-value] [route-mapmap tag]

RtrA(config)# router eigrp 100RtrA(config-router)# redistribute ospf ?

map-tag]

<1-65535> Process IDRtrA(config-router)# redistribute ospf 1 ?

match Redistribution of OSPF routesmetric Metric for redistributed routesmetric Metric for redistributed routesroute-map Route map reference…

<cr>

D f lt t i i i fi it! Default metric is infinity.

Page 16: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Redistributing into EIGRP

! Bandwidth in kilobytes = 100000! Delay in tens of microseconds = 100! Reliability = 255 (maximum)! Load = 1 (minimum)! MTU = 1,500 bytes

! To remember the components of the composite EIGRP metric, use the phrase Big Dogs Really Like MTU.

Luiz Angelo Steffenel
Luiz Angelo Steffenel - 11 mai 09 14:38EX (non E1, qui est OSPF)
Page 17: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Configuring Redistribution into IS ISConfiguring Redistribution into IS-IS! Use this command to redistribute routes into IS-IS:

t ( fi t )# di t ib t t lrouter(config-router)# redistribute protocol[process-id] [level level-value] [metricmetric-value] [metric-type type-value] [route-map map-tag]

RtrA(config)# router isisRtrA(config-router)# redistribute eigrp 100 ?

level-1 IS-IS level-1 routes only

map map tag]

ylevel-1-2 IS-IS level-1 and level-2 routeslevel-2 IS-IS level-2 routes onlymetric Metric for redistributed routesmetric-type OSPF/IS-IS exterior metric type for redistributed routesroute map Route map referenceroute-map Route map reference..Output Omitted

R t i t d d l l 2 ith t i f 0 b! Routes are introduced as level 2 with a metric of 0 by default.

Page 18: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Redistributing into IS ISRedistributing into IS-IS

Page 19: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Redistributing IS IS into Other ProtocolsRedistributing IS-IS into Other Protocols

Router(config)# router ospf 1Router(config-router)# redistribute isis ?<output omitted>level-1 IS-IS level-1 routes onlyl l 1 2 IS IS l l 1 d l l 2 tlevel-1-2 IS-IS level-1 and level-2 routeslevel-2 IS-IS level-2 routes only

<output omitted>

Page 20: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Example: Before RedistributionExample: Before Redistribution

Page 21: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Example: Before Redistribution (Cont )Example: Before Redistribution (Cont.)

Page 22: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Example: Configuring Redistribution at Router BRouter B

Page 23: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Example: Routing Tables After Route RedistributionRedistribution

Page 24: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Example: Routing Tables After Summarizing Routes and RedistributionsSummarizing Routes and Redistributions

Page 25: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Controlling Routing Update Trafficp

Page 26: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Using the i i t f CommandUsing the passive-interface Command

Page 27: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Passive Interfaces

The passive-interface command works differently with the different IProuting protocols that support it.

RIP/IGRP:RIP/IGRP:Can receive updates but doesn’t send.

OSPF:Routing information is neither sent nor received via a passiveinterface.The network address of the passive interface appears as aThe network address of the passive interface appears as astub network in the OSPF domain.Better to use proper wildcard mask in network command.

EIGRP:EIGRP:The router stops sending hello packets on passive interfaces.When this happens, the EIGRP router can’t form neighboradjacencies on the interface or send and receive routingupdates.

Page 28: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Passive InterfacesRTA(config)#router rip

RTA(config-router)#network 10.0.0.0

Send and Receive RIP Updates

By default:

! RIP updates are sent out all interfaces belonging to the 10.0.0.0 networknetwork.

! All directly connected subnets belonging to 10.0.0.0 network will be included in the RIP updates, plus any dynamically learned routes.

Page 29: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Passive Interfaces

RTA(config)#router rip

RTA(config-router)#network 10.0.0.0

RTA(config router)#passive interface e0RTA(config-router)#passive-interface e0

RTA(config-router)#passive-interface bri0Passive Interfaces receive—but don’t

send--updates

Passive interface

passive-interface [default] {interface-type number}passive interface [default] {interface type number}

The default keyword sets all interfaces as passive by default.

Page 30: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters

! Configuring an passive interface prevents it from sending updates entirely but there are times when you need to suppress only certainentirely, but there are times when you need to suppress only certain routes in the update from being sent or received.

! We can use a distribute-list command to pick and choose what routes a router will send or receive updates abouta router will send or receive updates about.

! The distribute-list references an access-list, which creates a route filter

Route filter– a set of rules that precisely controls what routes a router sends or receives in a routing update.

Page 31: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters Inbound and OutboundRoute Filters – Inbound and OutboundLet’s take a look on how keep subnet

10.1.1.0 from entering RTZ!

Page 32: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters InboundRoute Filters - Inbound

Inbound interfaces:

Wh li d t i b d d t th t f fi i t! When applied to inbound updates, the syntax for configuring a route filter is as follows:

Router(config-router)#distribute-list access-list-number in[interface name][interface-name]

Note: This does not permit/deny packets from entering the routers, only what routes a router will send or receive updates about.

Page 33: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters Inbound - Interface

s0

Applies to just s0 e0RTZ( fi )# t iRTZ(config)#router rip

RTZ(config-router)#network 10.0.0.0

RTZ(config-router)#distribute-list 16 in s0

RTZ(config)#access-list 16 deny 10.1.1.0 0.0.0.255

RTZ(config)#access-list 16 permit any

Page 34: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters Inbound - Global

s0

Applies to all interfaces including s0 e0

RTZRTZ(config)#router rip

RTZ(config-router)#network 10.0.0.0

RTZ(config-router)#distribute-list 16 in

RTZ(config)#access-list 16 deny 10.1.1.0 0.0.0.255

RTZ(config)#access-list 16 permit any

Page 35: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters OutboundRoute Filters Outbound

Outbound interfaces:

! When applied to outbound updates the syntax can be! When applied to outbound updates, the syntax can be more complicated:

Router(config-router)#distribute-list access-list-number out[interface-name | routing-process | as-number]

Page 36: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters Outbound - Global

Applies to all interfaces

Page 37: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters Outbound - Interface

RTA( fi )# t i

Applies to just S2 interface

RTA(config)#router rip

RTA(config-router)#network 10.0.0.0

RTA(config-router)#distribute-list 24 out s2

RTA(config)#access-list 24 deny 10.1.1.0 0.0.0.255

RTA(config)#access-list 24 permit any

Page 38: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters

For each interface and routing process, Cisco IOS permits:• one incoming global distribute-list• one outgoing global distribute-list• one incoming interface distribute-list• one outgoing interface distribute list• one outgoing interface distribute-list

RTZ(config)#router rip

RTZ(config-router)#distribute-list 1 in

RTZ( fi t )#distrib te list 2 o tRTZ(config-router)#distribute-list 2 out

RTZ(config-router)#distribute-list 3 in e0

RTZ(config-router)#distribute-list 4 out e0

Page 39: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters - VerificationRTZ(config)#router rip

RTZ(config-router)#distribute-list 1 in

( fi )#di t ib t li t 2 tRTZ(config-router)#distribute-list 2 out

RTZ(config-router)#distribute-list 3 in e0

RTZ(config-router)#distribute-list 4 out e0

RTZ#show ip protocols

Routing Protocol is "rip"

Sending updates every 30 seconds, next due in 25 seconds

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

Outgoing update filter list for all interfaces is 2

Ethernet0 filtered by 4

Incoming update filter list for all interfaces is 1

Ethernet0 filtered by 3

Page 40: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters and Link State Routing ProtocolsProtocols

! Routers running link state protocols determine their routes based on g pinformation in their link state databasein their link state database, rather than the advertised route entries of its neighbors.

! Route filters have no effect on link state advertisements or the linkRoute filters have no effect on link state advertisements or the link state database.

Remember, a basic requirement of link state routing protocols is that routers in an area must have identical link state databases.routers in an area must have identical link state databases.

! Route filters are mainly used at redistribution pointsredistribution points, such as on an ASBR.

Page 41: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Filters and Link State Routing Protocols

OSPF routes cannot be filtered from entering the OSPF database The

Protocols

OSPF routes cannot be filtered from entering the OSPF database. The distribute-list in command only filters routes from entering the routing table, but it doesn't prevent link-state packets from being propagated.

! The command distribute-list out works only on the routes being di t ib t d b th t t b d t (ASBR )redistributed by the autonomous system boundary routers (ASBRs)

into OSPF.

! It can be applied to external type 2 and external type 1 routes, but notto intra-area and inter-area routes.

Page 42: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

“Passive” EIGRP interfaces! A passive interface cannot send EIGRP hellos, which thus prevents

adjacency relationships with link partners.

! An administrator can create a “psuedo” passive EIGRP interface by using a route filter that suppresses all routes from the EIGRP routing update.

RTA(config)#router eigrp 364RTA( fi t )# t k 10 0 0 0RTA(config-router)#network 10.0.0.0RTA(config-router)#distribute-list 5 out s0RTA(config-router)#exitRTA(config)#access-list 5 deny anyRTA(config)#access-list 5 deny any

Page 43: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Policy Routing

! Static routes: You can use the ipip routeroute command to dictate which path a router will select to a given destination, based on the destination addressaddress.

! However, through policy routing, you can manually program a router to choosechoose a route based not only on destination, but on source as

llwell.

! Human factors such as monetary expense, organizational jurisdiction, or security issues can lead administrators to establish policies, or rules that routed traffic should follow.

! Left to their default behavior, routing protocols may arrive at path decisions that conflict with these policies.

! Policy routes are nothing more than sophisticated static routessophisticated static routes..

Page 44: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Policy Routing

ISP2

! Policy routing is used to:Override dynamic routingTake precise control of how their routers handle certain traffic.

! Although policy routing can be used to control traffic within an AS it is! Although policy routing can be used to control traffic within an AS, it istypically used to control routing between autonomous systems (ASs).

Policy routing is used extensively with exterior gatewayprotocols (EGPs) such as BGPprotocols (EGPs), such as BGP.

Page 45: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Policy Routing

Routing Table

Routing Policy ISP2

! The route-map command is used to configure policy routing, which isoften a complicated task.o te a co p cated tas

!! ““PolicyPolicy routingrouting isis aa techniquetechnique thatthat allowsallows thethe administratoradministrator totoinstructinstruct thethe routerrouter toto forwardforward packetspackets accordingaccording toto aa configuredconfiguredpolicypolicy ratherrather thanthan accordingaccording toto thethe contentscontents ofof thethe routingrouting tabletableandand thethe packetpacket’’ss destinationdestination addressaddress..””

Page 46: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route MapsRoute MapsRoute maps are similar to a scripting language for these

reasons:reasons:! They work like a more sophisticated access list:

Top-down processingp p gOnce there is a match, leave the route map

! Lines are sequence-numbered for easier editing:Insertion of linesDeletion of lines

! Route maps are named rather than numbered for! Route maps are named rather than numbered for easier documentation.

! Match criteria and set criteria can be used, similar to the “if, then” logic in a scripting language.

Page 47: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Map ApplicationsRoute Map Applications

The common uses of route maps are as follows:The common uses of route maps are as follows:

! Redistribution route filtering: A more sophisticated alternative to distribute listsp

! Policy-based routing: The ability to determine routing policy based on criteria other than the destination network

! BGP policy implementation: Th i t l f d fi i BGP ti li iThe primary tool for defining BGP routing policies

Page 48: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Map Operation

! A list of statements composes a route map.

Th li t i d t d lik li t! The list is processed top-down like an access list.

! The first match found for a route is applied.

! The sequence number is used for inserting or deleting specific route map statements.

route-map my_bgp permit 10{ match statements }{ match statements }{ set statements }{ set statements }

route-map my_bgp deny 20:: :: :::: :: ::

route-map my_bgp permit 30:: :: :::: :: ::

Page 49: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Map Operation (Cont )! The match statement may contain multiple references.! Multiple match criteria in the same line use a logical OR

Route Map Operation (Cont.)

! Multiple match criteria in the same line use a logical OR.! At least one reference must permit the route for it to be a

candidate for redistribution.

E h ti l t h l i l AND! Each vertical match uses a logical AND.! All match statements must permit the route for it to

remain a candidate for redistribution.! Route map permit or deny determines if the candidate

will be redistributed.

Page 50: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

route map Commandsroute-map Commandsroute-map map-tag [permit | deny] [sequence-number]

router(config)#

! Defines the route map conditions

t h { diti }router(config-route-map)#match {conditions}

! Defines the conditions to matchrouter(config route map)#set {actions} router(config-route-map)#

! Defines the action to be taken on a match

redistribute protocol [process id] route-map map-tagrouter(config-router)#

! Allows for detailed control of routes being redistributed! Allows for detailed control of routes being redistributed into a routing protocol

Page 51: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

The match CommandThe match Command! The match commands specify criteria to be matched.

Th i d i

router(config route map)#

! The associated route map statement permits or denies the matching routes.

router(config-route-map)#

match {options}

options :ip address ip-access-listip address ip access listip route-source ip-access-listip next-hop ip-access-listinterface type numbermetric metric-valueroute-type [external | internal | level-1 | level-2 |local] …

Page 52: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

The match commandsCommand Description

match community Matches a BGP community

match interface Matches any routes that have the next hop out of one of the interfaces specifiedMatches any routes that have a destination network

match ip addressy

number address that is permitted by a standard or extended ACL

match ip next- Matches any routes that have a next-hop router hop address that is passed by one of the ACLs specified

match ip route-source

Matches routes that have been advertised by routers and access servers at the address that is source specified by the ACLs

match length Matches based on the layer 3 length of a packetmatch metric Matches routes with the metric specifiedmatch route-type Matches routes of the specified typematch tag Matches tag of a route

Page 53: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

The set CommandThe set Command! The set commands modify matching routes.

Th d difi i di ib d

#

! The command modifies parameters in redistributed routes.

router(config-route-map)#

set {options}options :metric metric-value

i [ 1 | 2 | i l | l]metric-type [type-1 | type-2 | internal | external]level [level-1 | level-2 | level-1-2 |stub-area | backbone]ip next-hop next-hop-address

Page 54: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

The set commandsCommand DescriptionCommand Description

set as-path Modifies an AS path for BGP routes

set automatic-tag Computes automatically the tag valuep y g

set community Sets the BGP communities attribute

set default interface Indicates where to output packets that pass a match clause of a route map for policy routing and have no explicit route to the destination

set interface Indicates where to output packets that pass a match clause of a route map for policy routing

set ip default next-hopIndicates where to output packets that pass a match clause of a route map for policy routing and for which the Cisco IOS software has no explicit route to a destinationroute to a destination

set ip next-hop Indicates where to output packets that pass a match clause of a route map for policy routing

set level Indicates where to import routes for IS-IS and OSPF

set local-preference Specifies a BGP local preference value

set metric Sets the metric value for a routing protocol

set metric-type Sets the metric type for the destination routing protocolset et c type Sets the metric type for the destination routing protocol

set tag Sets tag value for destination routing protocol

set weight Specifies the BGP weight value

Page 55: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Policy Routing Example

ISP2

Assume for this example that the policy we want to enforce is this:

! Internet-bound traffic from 192.168.1.0 /24 is to be routed to ISP1

! Internet-bound traffic from 172.16.1.0 /24 is to be routed to ISP2.

Page 56: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Policy Routing Example

Access Lists" First we configure two access

lists with these commands:

ISP2

RTA(config)#access-list 1 permit 192.168.1.0 0.0.0.255

RTA(config)#access-list 2 permit 172.16.1.0 0.0.0.255

Page 57: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Global: route-maps" Next we configure two

policies with thesePolicy Routing Example

policies with these commands:– The ISP1 route map will

match access-list 1, and route traffic out S0 towardroute traffic out S0 toward ISP1.

– The ISP2 route map will match access-list 2, and

ff S

ISP2

route that traffic out S1 toward ISP2.

RTA(config)#route-map ISP1 permit 10

RTA(config-route-map)#match ip address 1RTA(config route map)#match ip address 1

RTA(config-route-map)#set interface s0

RTA(config)#route map ISP2 permit 10RTA(config)#route-map ISP2 permit 10

RTA(config-route-map)#match ip address 2

RTA(config-route-map)#set interface s1

Page 58: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Interface: policy route-maps

" The final step is to apply eachThe final step is to apply each route map to the appropriate interface on RTA using the ip policy route-map command.

" ip policy route-map map-tag

ISP2

" With the route maps applied to the appropriate LAN interfaces, we have successfully ISP2 implemented policy routing.

RTA( fi )#i t f 0RTA(config)#interface e0

RTA(config-if)#ip policy route-map ISP1

RTA(config)#interface e1RTA(config)#interface e1

RTA(config-if)#ip policy route-map ISP2

Page 59: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Policy Routing

! Policy routes are nothing more than sophisticated static routessophisticated static routes..

! Static routes forward a packet to a specified next hop based on destination addressdestination address of the packet.

! Policy routes forward a packet to a specified next hop based on the source of the packetsource of the packetsource of the packetsource of the packet..

Policy routes can also be linked to extended IP access listsextended IP access lists so that routing may be based on protocol types and port numbers.Lik t ti t li t i fl th ti l f hLike a static route, policy route influences the routing only of the router on which it is configured.

Page 60: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Route Maps and Redistribution CommandsCommandsRouter(config)# router ospf 10Router(config-router)# redistribute rip route-map redis-rip

! Routes matching either access list 23 or 29 are redistributed with an OSPF cost of 500, external type 1.

! Routes permitted by access list 37 are not redistributed! Routes permitted by access list 37 are not redistributed.! All other routes are redistributed with an OSPF cost metric of

5000, external type 2.Router(config)#route-map redis-rip permit 10 match ip address 23 29set metric 500

Router(config)#access-list 23 permit 10.1.0.0 0.0.255.255access-list 29 permit 172.16.1.0 0.0.0.255access-list 37 permit 10.0.0.0 0.255.255.255

set metric-type type-1

route-map redis-rip deny 20match ip address 37

route-map redis-rip permit 30set metric 5000set metric-type type-2

Page 61: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Modifying Administrative DistanceRouter(config-router)#

Modifying Administrative Distance

distance administrative distance [address wildcard-mask [access-list-number | name]]

! Used for all protocols except EIGRP and BGP redistribution

Router(config-router)#

distance eigrp internal-distance external-distance

! Used for EIGRPBGP(config-router)#distance ?<1-255> Administrative distancebgp BGP distancembgp MBGP distancembgp MBGP distance

Page 62: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Administrative Distance

IGRP at 100IGRP at 100 favored

OSPF now favored

! When using multiple IP routing protocols on a router, the default distances almost always suffice.

! However, some circumstances call for changing the administrative distance , g gvalues on a router.

Page 63: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Administrative Distance

Router(config-router)#distance weight [source-ip-addresssource-mask (access-list-number | name)]

RTZ(config)#router ripRTZ(config-router)#distance 105 10.4.0.2 255.255.255.0

! Using the optional arguments, we can configure a router to apply an d i i t ti di t f 105 t ll RIP t i d fadministrative distance of 105 to all RIP routes received from

10.4.0.2.

! These values are local to the router, all other routers will apply the d i i t ti di t f 120administrative distance of 120.

Page 64: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Administrative DistanceAdministrative Distance

RTZ(config)#router ripRTZ(config-router)#distance 97 10.3.0.1 255.255.255.0 2RTZ(config-router)#exit Source of the route

Th t th t ill t th

RTZ(config router)#exit

RTZ(config)#access-list 2 permit 192.168.3.0 0.0.0.255

Source of the route

The route that will get the administrative distance of 97

! We can configure a router to apply an administrative distance of 97 to specific RIP routes: 192.168.3.0, received from 10.3.0.1.

Page 65: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Administrative Distance

RTZ(config)#router rip

RTZ(config-router)#distance 105 10.4.0.2 255.255.255.0

Applies to all routes from 10.4.0.2

RTZ(config-router)#distance 97 10.3.0.1 255.255.255.0 2

RTZ(config)#access-list 2 permit 192.168.3.0 0.0.0.255

Applies to just the 192.168.3.0/24 route from 10.3.0.1RTZ#show ip route

R 192.168.5.0/24 [105/1] via 10.4.0.2, 00:00:02, Serial1

10.0.0.0/16 is subnetted, 5 subnets

R 10.2.0.0 [120/1] via 10.3.0.1, 00:00:02, Serial0

C 10.3.0.0 is directly connected, Serial0

R 10.1.0.0 [120/2] via 10.3.0.1, 00:00:02, Serial0

C 10.4.0.0 is directly connected, Serial1

R 192.168.1.0/24 [120/3] via 10.3.0.1, 00:00:02, Serial0

R 192.168.2.0/24 [120/2] via 10.3.0.1, 00:00:02, Serial0/ [ / ] , ,

R 192.168.3.0/24 [97/1] via 10.3.0.1, 00:00:02, Serial0

Page 66: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Avoiding L##PsAvoiding L##Ps

Page 67: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Redistribution Using Administrative DistanceDistance

Page 68: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

router ospf 1redistribute rip metric 10000 metric type 1 subnets

Router P3R1

redistribute rip metric 10000 metric-type 1 subnetsnetwork 172.31.0.0 0.0.255.255 area 0!router ripversion 2version 2redistribute ospf 1 metric 5network 10.0.0.0no auto-summary

router ospf 1redistribute rip metric 10000 metric-type 1 subnetsnetwork 172.31.3.2 0.0.0.0 area 0

Router P3R2

network 172.31.3.2 0.0.0.0 area 0!router ripversion 2redistribute ospf 1 metric 5pnetwork 10.0.0.0no auto-summary

Page 69: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or
Page 70: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

hostname P3R1!router ospf 1redistribute rip metric 10000 metric-type 1

hostname P3R2!router ospf 1redistribute rip metric 10000 metric-type 1redistribute rip metric 10000 metric type 1

subnetsnetwork 172.31.0.0 0.0.255.255 area 0distance 125 0.0.0.0 255.255.255.255 64 !router rip

redistribute rip metric 10000 metric type 1 subnetsnetwork 172.31.3.2 0.0.0.0 area 0distance 125 0.0.0.0 255.255.255.255 64!router rip

version 2redistribute ospf 1 metric 5network 10.0.0.0no auto-summary!access-list 64 permit 10 3 1 0 0 0 0 255

version 2redistribute ospf 1 metric 5network 10.0.0.0no auto-summary!access-list 64 permit 10 3 1 0 0 0 0 255access list 64 permit 10.3.1.0 0.0.0.255

access-list 64 permit 10.3.3.0 0.0.0.255access-list 64 permit 10.3.2.0 0.0.0.255access-list 64 permit 10.200.200.31access-list 64 permit 10.200.200.34access-list 64 permit 10.200.200.32

access list 64 permit 10.3.1.0 0.0.0.255access-list 64 permit 10.3.3.0 0.0.0.255access-list 64 permit 10.3.2.0 0.0.0.255access-list 64 permit 10.200.200.31access-list 64 permit 10.200.200.34access-list 64 permit 10.200.200.32

access-list 64 permit 10.200.200.33 access-list 64 permit 10.200.200.33

Page 71: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or
Page 72: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Know Your NetworkKnow Your Network! Be very familiar with

your network BEFOREyour network BEFORE implementing redistribution

! Focus on routers with redundant paths

! Make sure no path information is lost when using thewhen using the distance command

Page 73: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

DHCP in an Enterprise NetworkEnterprise Network

Page 74: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Configuring an Cisco IOS DHCP ServerConfiguring an Cisco IOS DHCP Server Router(config)#ip dhcp pool [pool name]

! Enable a DHCP pool for use by hosts.

Router(config dhcp)#network [network address][subnet mask]Router(config-dhcp)#network [network address][subnet mask]

! Specify the network and subnet mask of the pool.

Router(config-dhcp)#default-router [host address]

! Specify the default router for the pool to use.Router(config)#ip dhcp excluded-address low-address high-address

! Specify the IP address that should not assign toSpecify the IP address that should not assign to DHCP clients.

Page 75: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Optional DHCP Server CommandsRouter(config-dhcp)#domain-name domain

! Specifies the domain name for the client.

! Specifies the IP address of a DNS server that is available

p

Router(config-dhcp)#dns-server address

! Specifies the IP address of a DNS server that is available to a DHCP client. One is required, but up to eight can be specified.

Router(config-dhcp)#netbios-name-server address

! Same as DNS, but for WINS.

Router(config-dhcp)#lease {days [hours] [minutes] | infinite}

S ifi th d ti f th l Th d f lt i! Specifies the duration of the lease. The default is a one-day lease.

Page 76: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

DHCP Database Command and ConfigurationConfiguration Router(config)#ip dhcp database url [timeout seconds | write-d l d ]delay seconds]

! Configures the database agent and the interval between database updates and database transfers.

ip dhcp database ftp://user:[email protected]/router-dhcp write-delay 120

ip dhcp excluded-address 172.16.1.100 172.16.1.103

p

ip dhcp excluded-address 172.16.2.100 172.16.2.103

ip dhcp pool 0

network 172.16.0.0/16

domain-name global.com

dns-server 172.16.1.102 172.16.2.102

netbios-name-server 172.16.2.103 172.16.2.103

default-router 172.16.1.100

Page 77: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Importing and AutoconfigurationImporting and Autoconfiguration

Router(config-dhcp)#import all

! Used to import DHCP option parameters into DHCP p p pserver database. Used for remote DHCP pools.

Page 78: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Importing and Autoconfiguration (Cont )Importing and Autoconfiguration (Cont.)ip dhcp-excluded address 10.0.0.1 10.0.0.5ip dhcp pool centralnetwork 10.0.0.0 255.255.255.0default-router 10.0.0.1 10.0.0.5domain name central.comdns-server 10.0.0.2netbios-name-server 10 0 0 2netbios name server 10.0.0.2

interface fastethernet0/0ip address 10.0.0.1 255.255.255.0

ip dhcp-excluded address 20.0.0.2ip dhcp pool clientnetwork 20.0.0.0 255.255.255.0default-router 20.0.0.2import all

interface fastethernet0/0ip address dhcp

Page 79: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

DHCP ClientDHCP ClientEnables an IOS device to obtain an IP address dynamically from a DHCP server

Router (config-if)#ip address dhcp

dynamically from a DHCP server.

ip dhcp-excluded address 20.0.0.2ip dhcp pool clientnetwork 20.0.0.0 255.255.255.0default-router 20.0.0.2import all

interface fastethernet0/0interface fastethernet0/0ip address dhcp

Page 80: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

Relay Agent Option SupportRelay Agent Option Support

Page 81: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

DHCP Topology

Page 82: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or
Page 83: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or
Page 84: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or
Page 85: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or

ResourcesResources

! Route Maps for IP Routing Protocol Redistribution! Route-Maps for IP Routing Protocol Redistribution Configuration

–http://cisco.com/en/US/tech/tk365/technologies_tech_note09186a008047915d shtml6a008047915d.shtml

! Default Passive Interface Feature–http://cisco.com/en/US/products/sw/iosswrel/ps1830/products_fp p p p _eature_guide09186a008008784e.html

! Dynamically Configuring DHCP Server Optionshttp://cisco com/en/US/tech/tk648/tk361/technologies configura–http://cisco.com/en/US/tech/tk648/tk361/technologies_configuration_example09186a0080094a52.shtml

! Commonly Used IP ACLs–http://cisco.com/en/US/tech/tk648/tk361/technologies_configuration_example09186a0080100548.shtml

Page 86: Route Optimization - univ-reims.frlsteffenel/cours/FC/BSCI5.pdf · Redistribution! the . router . processes.! routing process is the . core. or . backbone process (EIGRP, OSPF or