You are on page 1of 9

Alwaysremember

aroutemustbeintheroutingtablebeforeitcanberedistributed.
RedistributionintoEIGRP
ExternalEIGRPAdministrativeDistance=170

redistribute
protocol[processidorasnumber]
withtheoptions:
[
metric
bwdelayreliabilityloadmtu][
match
{
internal|
nssaexternal|external1|external2
}][
tag
tagvalue][
routemap
name]
protocol:
thesourceofroutinginformationbgp,connected,eigrp,isis,mobile,ospf,staticand
rip
processidorasnumber
:selfexplained
metric
:keywordthatfollowsthefourmetriccomponents(bwinkbps,delayin
tensofmicrosenconds,reliability(1255),linkload(1255))plustheMTUassociatedwiththe
route.(EIGRPignorethelast3parametersbydefault,becauseofKvalues)
match:
ifredistributingfromospf,thiskeywordletsyoumatchinternalospfroutes,external(by
type),andnssaexternalroutes,essentiallyfilteringwhichroutesareredistributed.
tag:
assignsaunitlessintegervaluetotheroutesredistributedbythiscommand,tagsthatcan
belatermatchedbyotherroutersusingaroutemap
routemap:
appliesthelogicinthereferencedroutemaptofilterroutes,setmetricandsetroute
tags
Considerthefollowing:the
redistribute
commandwillredistributeallroutesintheroutingtable
learnedbytheredistributedroutingprotocolandalsoalltheconnectedroutesofinterfaceson
whichthatroutingprotocolisenabled.

Important:
whenredistributingintoEIGRPfromOSPF,weneedtospecifythemetric..because
takethisforexample:
routereigrp1
redistributeospf2
end
Therouterwilltakethecommand,butwontredistributetheroutesbecauseeigrpdoesnthave
adefaultsettingforthemetriccomponentstousewhenredistributingintoeigrpfromospf.
Soweneedtocompletethecommandwitheither:
defaultmetric
bwdelayreliabilityloadmtu
parameters
metric
bwdelayreliabilityloadmtu
parameters
routemap
matchingroutesandsettingmetriccomponents

Note:
eigrpdoeshaveadefaultmetricwhenredistributingfromanothereigrpprocess,inthis
caseittakesthemetricfromthesourceoftheroutinginformation,inallothercases,themetric
mustbesetusingoneofthemethodsabove.


RedistributionintoOSPF
OSPFalwaysprefersinternalroutesoverE1,andE1routesoverE2
ExternalOSPFadministrativedistanceis110
Unlikeeigrp,ospfdoeshaveusefuldefaultmetricsforredistributedroutes
Unlikeeigrp,ospfcreatesLSAstorepresenteachexternalroute

redistribute
protocol[processidorasnumber][
metric
metricvalue]
[
metrictype
typevalue][
match
internal|external1|external2|
nssaexternal][
tag
tagvalue][
routemap
maptag][
subnets]

Defaults:
whentakingfrom
bgp
,usesa
defaultmetricof1
whentakingfrom
anotherospfprocess
,takethesourceroutesmetric
whentakingfrom
allothersources
,usea
defaultmetricof20
createatype5LSAforeachredistributedroute(external)ifnotinsideannssa
createatype7LSA
if
insideannssa
useexternalmetric
type
2
redistribute
onlyroutesofclassfulnetworks
,andnotroutesforsubnets

protocol:
thesourceofroutinginformationbgp,connected,eigrp,isis,mobile,ospf,static,rip
processidorasnumber:
selfexplained
metric:
definesthecostmetrictoroutesredistributedbythiscommand,unlessoverridddenby
routemap
metrictype{1|2}:
definestheexternalmetrictypefortheroutesredistributedbythiscommand:
1(E1routes)or2(E2routes)
match:
ifredistributingfromanotherospfprocess,thisletsyoumatchinternalospfroutes,
externalospfroutes(eitherE1orE2),andnssaexternalroutes,essentiallyfilteringwhichroutes
areredistributed.
tag:
assignsaunitlessintegervaluetotheroutesredistributedbythiscommand.
routemap:
appliesthelogicinthereferencedroutemaptofilterroutes,setmetricandtags
subnets:
redistributessubnetsofclassfulnetworks,withoutthisparameter,onlyroutesfor
classfulnetworksareredistributed(thisbehaviorisuniquetoospfredistributecommand)

TosetMetriconRedistributedRoutes:

defaultmetriccost
setsitforallredistributecommands
metriccost
setsitforoneroutesource
routemap


LSAsandMetricTieforE2

Type2ExternalRoutesINTRAAREA,findingthenexthop
1. findtheadvertisingASBR(s)aslistedinthetype5LSA(s)
2. calculatethelowestcostroutetoreachanyoftheASBR(s)basedonthe
intraareaLSDBtopology
3. usetheoutgoinginterfaceandnexthopbasedonthebestroutetoreachthe
ASBR(aschosenatstep2)
4. themetricoftherouteisunchanged,itisstillsimplythevaluelistedintheType5
LSA
SoinresumetherouterwilljustfindthebestwaytotheASBRwhoadvertisedthe
type5LSAanditsgonnauseacostofthesametype5LSA

Type2ExternalRoutesINTERAREA,findingthenexthop
SimplycalculatethecosttoreachtheABR,andthecostfromtheABRtothe
ASBR,addthesetwotogether,andthatshowthetieisbroken.

ABRscreatethisnewtypeofLSA,Type4SummaryASBRLSA,whichliststhe
RIDoftheASBRandtheRIDoftheABRthatcreatedandfloodedtheType4
LSA,mostimportantly,thetype4LSAliststhatABRscosttoreachtheASBR,
likethis:
IamABRX.IcanreachASBRY,andmycosttoreachthatASBRisZ

RedistributingintoOSPFasE1Routes

E2routesignoretheinternalOSPFcost(exceptwhenbreakingtiesforbestroute,asshown
above)

E1routesarecalculatedbyadding:
internalcosttoreachtheASBR+externalcostdefinedontheredistributingASBR

routerospf2
redistributeeigrp1subnetsmetrictype1

forroutersinadifferentareathantheASBR,thecalculationofmetricfollowsthesamegeneral
logicusedwhenbreakingtiesforE2routes.


ABriefComparisonofE1andE2Routes(straightfromthebook)
OSPFdefinestwotypesofexternalroutestogivenetworkdesignerstwoslightlydifferenttools
withwhichtocalculatethebestroutetoreachadestinationexternaltoOSPF.ForE1routes,
boththeexternalcostandinternalOSPFcostmattertothechoiceofbestroute.ForE2routes,
onlytheexternalcostmatterstothechoiceofbestroute(unlessatieneedstobebroken).The
benefitsofthedifferentexternalroutetypesapplymostlytowhenmultipleASBRsadvertisethe
samesubnet.Forexample,imaginetwoASBRs,ASBR1andASBR2,betweenOSPFand
anotherroutingdomain.IfthegoalistoalwayssendtrafficthroughASBR1,youcoulduseE2
routesandsetthemetricforASBR1sredistributedroutestoalowermetricthanASBR2.
BecauseroutersignoretheinternalmetricswhencalculatingtheE2metrics,everyrouter
choosesASBR1asthebetterASBR.Conversely,ifthegoalweretoloadbalancethetraffic,
andmakeeachrouterpicktheclosestASBR,bothASBRscouldsetthesamemetricontheir
redistributedroutes,butmaketheroutesTypeE1.Asaresult,routersclosertoeachASBR
choosebestroutesbasedonthelowerOSPFinternalcosts.Also,notethatforagiven
prefix/length,OSPFalwaysprefersanE1routeoveranE2route.

ExternalRoutesinNSSAs
SameType5LSAcost,20forallsourcesotherthanbgpandanotherospfprocess
Routersinstubbyandtotallystubbyareascantinjectexternalroutes(cantinjectType5LSAs)

Routersinnotsostubbyareascaninjectexternalroutes(usingType7LSAs,whichreplacethe
Type5,butonlyinsidetheNSSA)

Redistributionwith
RouteMaps
and
DistributeLists

RouteMaps
(implieddenyattheend,justlikeACLs)

redistributeroutemapmapnameoption

routemapmapname
matchinterface(looksatoutgoinginterfaceofroutes)
matchipaddraclnumberorprefixlist
matchipnexthopacl(examinesroutesnexthopaddr)
matchiproutesourceacl(matchadvertisingroutersip
matchmetricmetric+deviation
matchroutetype(matchesroutetype)
matchtagtagvalue

setmetricmetric(setsroutesmetric(ospf,rip,isis))
setmetricbwdelayreliabilityloadmtu(foreigrp)
setmetrictype1or2(forospf)
settagtag

Example:
ipaccesslistextended
match101
permitiphost172.16.101.0host255.255.255.0
ipaccesslistextended
match104105
permitiphost172.16.104.0host255.255.255.224
permitiphost172.16.105.0host255.255.255.240
routemap
option1
deny10<seqnumber
matchipaddress
match101
routemap
option1
deny20<seqnumber
matchipaddress
match104105
routemapoption1permit100<seqnumber
blank
routereigrp1
redistributeospf2routemapoption1

Sointheexampleabovewecreate2ACLs,thenassociatethemwiththeroutemapnamed
option1,thelastroutemapstatementleavesthepermitwithblank,meaningitsgonnapermit
everythingelsethatisnotlisted
(rememberthatroutemapshaveanimplieddenyatthe
end(justlikeACLs)
.Andfinallyweapplyroutemapwiththeredistributecommand.

Particularities:
WhenusingExtendedACLswithRouteMaps:
sourceipaddressofacl=subnetaddressoftheroute
destinationipaddressofacl=subnetmaskoftheroute

Tounderstandprefixlists:
Continuingthe
ge
example,
10.0.0.0/8ge16le24
willmatchallprefixeswithinthe10.0.0.0/8network
havingamaskbotha)greaterthanorequalto16bits,andb)lessthanorequalto24bitsinlength.For
instance,10.42.0.0/18wouldbematched,becauseitslengthisbetween16and24(inclusive),butneither
10.16.0.0/12nor10.123.77.128/25wouldbematched.

showipaccesslist[number|name]
and
showipprefixlistdetailname
listcountersthatincrementeachtimearoute
matchesforredistribution.


SettingMetricswhenRedistributing

whenredistributingintoeigrp:
setmetricbwdelayreliabilityloadmtu
whenredistributingintoospforrip:
setmetricmetric

routemapsetmetricpermit10
matchipaddressprefixlistprefixlistname
routemapsetmetricpermit20
matchipaddressprefixlistprefixlistname
setmetric10004425511500

Sointheexampleabove,thefirstseq(10)doesntincludea
setmetric
,andthatmeansit
willusethemetricvalueslistedinthe
defaultmetric

command
Thesecondseq(20)willusethemetricslistedinthe
setmetric
line

SettingExternalRouteType

(WhenredistributingintoOSPF)

Bydefault,ciscosetstheredistributedrouteasType2(E2),howeverthiscanbe
changedwithroutemapsubcommand:
setmetrictype[type1|type2]

DistributeLists

Thisisforwhenyoudontneedallthefeaturesprovidedbytheroutemaps,andyoucanmatch
allthesubnetsthatyouwanttoredistributewithasimpleaclorprefixlist

routereigrp1
distributelist1outospf2

AboveexampletellseigrptoapplyACL1toroutesredistributedfromospf2process

routerospf1
distributelistprefixfredouteigrp1

Tellsospftoapplyprefixlistfredtoroutesredistributedfromeigrp1process


InterRoutingDomainLoopsPrevention
(Preventloopswhenredistributing)

ThisisnotaproblemwhenEIGRPisoneoftheprotocolsbeingredistributed.
OSPFalwaysprefersinternalroutesoverE1routes,andE1routesoverE2

PreventUsingHigherMetrics

PreventwithAdministrativeDistance

ADisalocalsettingonarouterandcannotbeadvertisedtoneighboringrouters

The default AD for EIGRP takes care of the loop problem with redistributing between
EIGRPandOSPF

For each of the two routing protocols, the AD used for internal routes for one routing
protocolisbetterthantheADusedforexternalroutesbytheotherroutingprotocol.
i.e..eigrpinternal90<ospfexternal110
ospfinternal110<eigrpexternal170
likewise,whenredistributingbetweeneigrpandrip:
eigrpinternal90<ripexternal120
ripinternal120<eigrpexternal170


SettingADwithdistancecommand(routerconfig#):
RIP:
distanceadvalue
EIGRP:
distanceeigrpinternaladexternalad
OSPF:
distance ospf {external ad} {intraarea ad}
{interareaad}

Preventwhenmorethantworoutingdomains

ChangingADperRoute

routerconfig#distancedistanceipwcacl
AndappliestheADtoalltheroutesadvertisedbythematchedrouter
ip: ip of the neighboring router that advertised the routing information, if we are dealing
withospf,thisiphastobetheRIDinsteadoftheinterfaceip.
wc:wildcard
acl:optionally,theprefixes/lengthsofroutesasmatchedbyanacl,ifanACLisused,the
AD will only change for the routes matched by the ACL and being advertised by the
routermatchedwiththeipandwc

Filteringonsubnetwhileredistributing

This is done by filtering (not allowing) routes based on prefix, by using routemaps and
mightalsoneedtotweektheAD

FilteringonRouteTagusingDistributeList

Touseroutetagstopreventdomainloopproblems,youcanusethefollowingstrategy:
1. Choose and set a tag value that identifies routes taken from domain X and
advertisedintodomainY.
2. When redistributing in the opposite direction (from domain Y into domain X),
matchthetagvalueandfilterrouteswiththattag.
i.e.
1.

2.

routerospf1
redistributeeigrp1subnetsroutemapmapname
routemapmapnamepermit10
settag4

routereigrp1
redistributeospf1metric...routemapmap2name
routemapmap2namedeny10
matchtag4
routemapmap2namepermit20

Comments: in mapname b/c theres no match clause, it matches everything, and in


map2nameallrouteswithouttag4matchthe2ndclause,soallthosewillbeallowed.

You might also like