WHAT IS REDISTRIBUTION?
Route Redistribution - Get Different Routing Protocols To Pass Routing Information To Each Other.
Route Redistribution Allows Different Routing Protocols To Exchange Routing Information. Redistribution Is The Process Of Injecting Prefixes From One Routing Protocol Into Another Routing Protocol.
Using A Routing Protocol To Advertise Routes That Are Learned By Another Routing Protocol, Static Routes, Or Directly Connected Routes, Is Called Redistribution.
Route Redistribution Involves A Router Using A Routing Protocol To Advertise Routes It Learned Through Another Routing Protocol, Static Routes Or Direction Connection. The Routing Protocol Receiving These Redistributed Routes Usually Marks The Routes As External.
Route Redistribution Allows Routes From One Routing Protocol To Be Advertised Into Another Routing Protocol. The Routing Protocol Receiving These Redistributed Routes Usually Marks The Routes As External. External Routes Are Usually Less Preferred Than Locally-Originated Routes.
Route Redistribution Is Often Used On The Border Routers, To Move Routes Between The IGP And EGP.
Route Redistribution Can Be One-Way (That Is, One Protocol Receives The Routes From Another) Or Two-Way (That Is, Both Protocols Receive Routes From Each Other). Route Redistribution Is Often Used On The Border Routers, To Move Routes Between The IGP And EGP.
Routers That Perform Redistribution Are Called Boundary Routers Because They Border Two Or More Ass Or Routing Domains.
The Term Boundary Router Is Also Sometimes Used To Describe A Router Running A Classful Routing Protocol (Like RIP) That Has Interfaces In More Than One Classful Network.
Route Redistribution Involves A Router Using A Routing Protocol To Advertise Routes It Learned Through Another Routing Protocol, Static Routes Or Direction Connection.
Static Routes Maybe Be Needed To Advertise Into The Dynamic Routing Protocols.
Route Redistribution Can Be Used To Bridge Legacy Networks Or Connect Vendor Specific Networks.
NOTE:Running Different Routing Protocols Is Often Part Of A Network Design. In Any Case, Having A Multiple Protocol Environment Makes Redistribution A Necessity.
WHY WE NEED REDISTRIBUTING?
Redistribution Allows Different Routing Protocols To Exchange Routing Information. (Layer 3 And Layer2 Devices To Be Able To Exchange Routing Information), It Is Necessary To Use The Same Routing Protocol, Such As RIP, EIGRP, OSPF, BGP, Etc. Different Routing Protocols, Or Protocols Configured Differently Do Not Exchange Routing Information.
While Running A Single Routing Protocol Throughout Your Entire IP Internetwork Is Desirable, Multi-Protocol Routing Is Common For A Number Of Reasons, Such As Company Mergers, Multiple Departments Managed By Multiple Network Administrators, And Multi-Vendor Environments.
When A Device Learns Routing Information From Different Sources Cisco IOS Allows The Information Learned From A Specific Source To Be Published To Other Devices Using A Different Protocol.
You Want To Run IGRP/EIGRP In One Or More Areas In A Mixed Vendor Environment
You Want To Support Legacy UNIX Systems That Support RIP Only, But Use A More Scalable Protocol Elsewhere.
You Need A Temporary Fix During A Prolonged Upgrade From Older Protocols And Hardware To Newer, More Scalable Solutions.
Because Each Routing Process Places Substantial Demands On The Router’s Memory And CPU Resources, Only Boundary Routers Should Run More Than One Routing Process For The Same Routed Protocol, And Only When Absolutely Necessary.
If A Boundary Router Is Running Multiple IP Routing Protocols, Then It May Be Possible That The Router Will Learn About The Same Network From More Than One Routing Protocol.
NOTE :Redistribution Should Not Be Thought Of As A Quick And Easy Solution. Redistribution Is Complex. It Is Crucial That You Understand The Operation Of The Processes And How This Affects Your Network.
Each Routing Protocol Within An AS Can Be Thought Of As A Routing Domain. Routes Redistributed Into A Routing Domain Are Termed External Routes, While Native Routes Are Called Internal Routes.
The Metric Is The Main Method Of Route Selection Within A Routing Protocol. Therefore, It Is Necessary To Define A Default Seed Metric For The Networks Accepted From Other Routing Protocols.
There Are Many Routing Protocols For IP, And Each Uses A Different Metric. If Two Protocols Want To Share Information Through Redistribution, The Configuration Must Deal With This Difference In Metrics.
IT IS IMPORTANT TO CONSIDER THE FOLLOWING RULES WHEN REDISTRIBUTING BETWEEN IP ROUTING PROTOCOLS :
If More Than One Routing Protocol Is Running On A Router, The Routing Table Process Will Place The Route With The Best Administrative Distance Into The Routing Table.
Routing Protocols Can Only Redistribute Routes They Know. Thus, If RIP Is Being Redistributed Into EIGRP, The Routing Table Must Have An Entry For The RIP Network.
When A Route Is Redistributed, It Inherits The Default Administrative Distance Of The New Routing Protocol.
Redistributed Routes Are Called External. External Routes In EIGRP Are Given A Different (Higher) AD, While OSPF Tracks The Route As External And Prefers Internal Routes.
TO CONFIGURE ROUTE REDISTRIBUTION SOME RULES MUST BE BELOW :
Three Things To Consider In Route Redistribution:
Metric.
Administrative Distances.
And Classful / Classless Capabilities.
Differences In Routing Protocol Characteristics, Such As Metrics, Administrative Distance, Classful And Classless Capabilities Can Effect Redistribution. Consideration Must Be Given To These Differences For Redistribution To Succeed.
The Redistributed Route Must Be Present In The Routing Table.
The Redistributed Route Will Be Received By The Neighbouring Device With A New Metric As Configured By The Redistributing Router.
Routing Protocols Do Not Understand Metrics Used From Other Routing Protocols. They May Assign Defaults Or Network Administrator’s May Assign Specific Values. Assigning Metrics Is A Very Useful Tool Given The Proper Consideration And Understanding Of How It Affects Routing Decision.
Administrative Distances Pose A Problem When A Route Is Redistributed From A Protocol With A Higher Admin Distance To A Protocol With A Lower Admin Distance. In This Case, The Redistributed Route Would Be Preferred Over The Original Route.
While Routing Protocols Use Metrics To Determine The Best Route, Routers Use Administrative Distances To Determine The Best Source. Each Type Of Source Has A Different Administrative Distance, The Lower The Distance The Better The Source Of The Route.
METRICS :
When You Redistribute One Protocol Into Another, Remember That The Metrics Of Each Protocol Play An Important Role In Redistribution.
Each Routing Protocol Uses A Different Metric. This Causes The Routes Redistributed To Lose The Original Metric Of The Protocol And The Metric Is Redefined In Terms Of The New Protocol.
The Routing Information Protocol (RIP) Metric Is Based On Hop Count.
But Interior Gateway Routing Protocol (IGRP) And Enhanced Interior Gateway Routing Protocol (EIGRP) Use A Composite Metric Based On Bandwidth, Delay, Reliability, Load, And Maximum Transmission Unit (MTU), Where Bandwidth And Delay Are The Only Parameters Used By Default.
NOTE :When Routes Are Redistributed, You Must Define A Metric That Is Understandable To The Receiving Protocol.
THERE ARE TWO METHODS TO DEFINE METRICS WHEN REDISTRIBUTING ROUTES:
You Can Define The Metric For That Specific Redistribution Only:
Router RIP
Redistribute Static Metric 1
Redistribute OSPF 1 Metric 1
Or You Can Use The Same Metric As A Default For All Redistribution (Using The Default-Metric Command Saves Work Because It Eliminates The Need For Defining The Metric Separately For Each Redistribution.):
Router RIP
Redistribute Static
Redistribute OSPF 1
Default-Metric 1
ADMINISTRATIVE DISTANCE :
If A Router Is Running More Than One Routing Protocol And Learns A Route To The Same Destination Using Both Routing Protocols, Then Which Route Should Be Selected As The Best Route? Each Protocol Uses Its Own Metric Type To Determine The Best Route.
Comparing Routes With Different Metric Types Cannot Be Done. Administrative Distances Take Care Of This Problem.
Administrative Distances Are Assigned To Route Sources So That The Route From The Most Preferred Source Will Be Chosen As The Best Path.
Administrative Distances Help With Route Selection Among Different Routing Protocols, But They Can Cause Problems For Redistribution. These Problems Can Be In The Form Of Routing Loops, Convergence Problems, Or Inefficient Routing.
THE ADMINISTRATIVE DISTANCE FOR EACH OF THE PROTOCOLS AS BELOW:
CONNECTED INTERFACE - > 0
STATIC ROUTE - > 1
EIGRP SUMMARY - > 5
EXTERNAL BGP - > 20
EIGRP - > 90
IGRP - > 100
OSPF - > 110
IS-IS - > 115
RIP - > 120
EGP - > 140
EXTERNAL EIGRP - > 170
INTERNAL BGP - > 200
BASIC REDISTRIBUTE COMMANDS:
When You Configure Redistribution Of Protocols, You Should Indicate How To Redistribute Routing Information, And How We Want To Measure These Routes (Metric) When They Are Redistributed. If We Do Not Indicate Anything, The Routes Are Redistributed With The Default Metric.
RIP REDISTRIBUTION :
RIP Redistributes The Protocols Using A Default Metric Of Infinity, So It Is Necessary To Specify A Different Metric In Order For The Neighbour Router To Incorporate The Routing Information In Its Table.
AN RIP EXAMPLE :
Router (Config) # Router Rip
Router (Config-Router) # Redistribute Static Metric 1
Router (Config-Router) # Redistribute OSPF 1 Metric 2
In This Example: We Tell The Router To Redistribute Routing Information Into Rip When Learned Through The OSPF Process 1 Which Is In The Routing Table, With A Metric Of 2 Hops.
REDISTRIBUTION IN OSPF :
The Default Metric Used By OSPF Is 20, So It Does Not Require Us To Specify A Metric For The Route Learned By The Adjacent Devices. However, When There Are Multiple Subnets On The Same Network And You Want To Publish Routes For Each Subnet, You Must Configure A Metric Otherwise OSPF Will Summarize All Subnets In The Class Boundary And Publish A Single Route.
AN OSPF EXAMPLE:
Router (Config) # Router OSPF 1
Router (Config-Router) # Redistribute Static Metric 200 Subnets
Router (Config-Router) # Redistribute Eigrp 100 Metric 500 Subnets
REDISTRIBUTION IN EIGRP :
To Redistribute Routing Information Into EIGRP, It Should Be Noted That The Default Metric Is Infinite. Therefore, If You Do Not Specify Metric For Redistributed Routes, They Will Not Appear In The Routing Table Of The Neighbouring Device.
IGRP And EIGRP Need Five Metrics When Redistributing Other Protocols: Bandwidth, Delay, Reliability, Load, And MTU, Respectively. An Example Of IGRP Metrics Follows:
BY DEFINING THE METRIC IT SHOULD BE NOTED :
Bandwidth - > In Units Of Kilobits Per Second; 10000 For Ethernet.
Delay - > In Units Of Tens Of Microseconds; For Ethernet It Is100 X 10 Microseconds = 1 Ms.
Reliability - > 255 For 100 Percent Reliability.
Load - > Effective Load On The Link Expressed As A Number From 0 To 255 (255 Is 100 Percent Loading).
MTU - > Minimum MTU Of The Path; Usually Equals That For The Ethernet Interface, Which Is 1500 Bytes.
AN EIGRP EXAMPLE :
Router (Config) # Router EIGRP 100
Router (Config-Router) # Redistribute Static
Router (Config-Router) # Redistribute RIP
Router (Config-Router) # Default-Metric 10000 100 255 1 1500
REDISTRIBUTE ROUTES BETWEEN AN IGP AND BGP :
Router> - User Exec Mode
Router# - Privileged Exec Mode
Router(Config)# - Configuration Mode (Notice The # Sign Indicates This Is Only Accessible At Privileged Exec Mode.)
Router(Config-If)# - Interface Level Within Configuration Mode.
Router(Config-Router)# - Routing Engine Level Within Configuration Mode.
SAVING CONFIGURATIONS - ALWAYS ISSUE THIS COMMAND AFTER EACH CONFIGURATION :
Router# Copy Running-Config Startup-Config - Saves Configuration Into NVRAM
A Cisco IOS Router Stores Configurations In Two Locations - RAM And NVRAM. The Running Configuration Is Stored In RAM And Is Used By The Router During Operation. Any Configuration Changes To The Router Are Made To The Running-Configuration And Take Effect Immediately After The Command Is Entered.
The Startup-Configuration Is Saved In NVRAM And Is Loaded Into The Router's Running-Configuration When The Router Boots Up. If A Router Loses Power Or Is Reloaded, Changes To The Running Configuration Will Be Lost Unless They Are Saved To The Startup-Configuration. To Save The Running-Configuration To The Startup Configuration, Type The Following From Privileged EXEC Mode (I.E. At The "Router#" Prompt.)
Router# Copy Running-Config Startup-Config
When Connecting Two Or More IGPs Using BGP, You Sometimes Need To Configure Redistribution Between The IGP And BGP On Both Routers.
We Need To Connect An EIGRP Network To An OSPF Network Using A Pair Of BGP Routers.
The First Router Redistributes Routes From BGP Into OSPF :
Router1#Configure Terminal
Enter Configuration Commands, One Per Line. End With Cntl/Z.
Router1(Config)#Router OSPF 100
Router1(Config-Router)#Network 172.26.0.0 0.0.255.255 Area 0
Router1(Config-Router)#Redistribute Bgp 65500 Metric 500 Subnets
Router1(Config-Router)#Exit
Router1(Config)#Router BGP 65500
Router1(Config-Router)#Neighbor 192.168.1.5 Remote-As 65520
Router1(Config-Router)#Network 172.26.0.0
Router1(Config-Router)#Exit
Router1(Config)#End
Router1#
Configuration Router That Redistributes BGP Routes Into EIGRP :
Router2#Configure Terminal
Enter Configuration Commands, One Per Line. End With Cntl/Z.
Router2(Config)#Router Eigrp 99
Router2(Config-Router)#Network 172.25.0.0
Router2(Config-Router)#Redistribute Bgp 65520 Metric 500 10 255 1 1500
Router2(Config-Router)#Exit
Router2(Config)#Router BGP 65520
Router2(Config-Router)#Neighbor 192.168.1.6 Remote-As 65500
Router2(Config-Router)#Network 172.25.0.0
Router2(Config-Router)#Exit
Router2(Config)End
Router2#
DISCUSSION :
Before We Say Anything About This Recipe, We Need To Stress That Redistribution With BGP Is Often A Very Messy Business.
The Example: Specifically Shows Using Bgp To Handle Routing Between Two Igps Rather Than Redistribution Into The Public Internet, Because This Technique Is Only Really Relevant In A Large Enterprise Network.
Even Here, It's Easy To Create Routing Loops, Particularly When Redistributing From BGP Into An IGP And Then Back Out Into BGP. This Is Why We Have Actually Chosen To Distribute From BGP Into The Other Protocols, Rather Than Full Two-Way Redistribution.
We Will Discuss Two-Way Redistribution In A Moment.
For Internet Connections, We Strongly Recommend Against Redistributing Routes From Bgp Into The IGP. This Is Because It Is Too Easy To Inadvertently Wind Up Distributing Tens Of Thousands Of Internet Routing Prefixes Into Your IGP. And, When Passing IGP Routing Information To The Internet, It Is Better To Pass A Few Summary Routes Using Network Statements, As We Have Done In The Above Example, Than To Directly Redistribute IGP Prefixes.
In Addition, There Is A Huge Danger When You Redistribute BGP Routes From The Internet, Into An IGP, And Then Back Into BGP And Onto The Internet. Unless You Carefully Filter Routes, Or Unless Your ISP Filters For You, You Will Wind Up Sending Routes Back Into The Internet With Very Short As Paths That Originate In Your Network. This Could Reroute The Entire Internet Through Your IGP, Which Would Be A Bad Thing.
However, BGP Isn't Just Used On The Public Internet. Many Large Enterprise Networks Also Use BGP For Interconnecting IGPs. In This Case, Although You Have To Redistribute Routes From BGP Into The IGP, It May Not Be Necessary To Redistribute IGP Routes Into BGP. So, In The Above Example, We Have Actually Only Used One-Way Redistribution From The BGP Into The IGP, But Not The Other Way Around. Instead, We Have Relied On Network Statements To Summarize The IGP Routes Into BGP:
Router1(Config)#Router BGP 65500
Router1(Config-Router)#Neighbor 192.168.1.5 Remote-As 65520
Router1(Config-Router)#Network 172.26.0.0
If You Need BGP To Advertise A Large Number Of Igp Routes, You Can Use As Many Network Statements As Are Necessary To Accomplish This. Note That Before Ios Version 12.0, You Could Configure A Maximum Of 200 Network Statements. However, Cisco Has Now Removed This Restriction.
Having Said All Of This, It Is Possible To Redistribute Prefixes From The Igp Into Bgp. Two-Way Redistribution Can Be Convenient When You Want To Use BGP To Connect Two IGPs That Use Overlapping Address Ranges. This Might Happen, For Example, If A Single Igp Became Too Large And Needed To Be Split For Stability Reasons.
We Will Focus Instead On The Redistribution Of These Protocols Into BGP Here.The Work Is All Done By A Simple Redistribute Command In The BGP Configuration Clause. For Simple Redistribution, All We Need To Do Is Specify The IGP Protocol And Its Process Id Number:
Router1(Config)#Router BGP 65500
Router1(Config-Router)#Redistribute OSPF 100
However, By Default, When You Do This, BGP Takes The IGP Metric And Uses It As The BGP Metric, Also Called The Med. Bgp Distributes This Metric With The Route. Routers Use The Lowest Metric Value To Select The Best Route If Two Or More BGP Routes Have The Same As Path Length.
This May Provide Exactly The Right Behavior, Selecting The BGP Router That Is Closest To The IGP Destination Network. But In Some Cases You Might Want To Force A Particular Metric Value To Ensure That A Particular BGP Router Or Link Is Used When Routing To IGP Destinations. You Can Do This Most Easily By Simply Setting A Default Metric For All Redistributed IGP Routes:
Router2(Config)#Router BGP 65520
Router2(Config-Router)#Redistribute EIGRP 99 Metric 500
Although We Have Only Assigned A Default Metric To The EIGRP Routes, You Can Use The Same Syntax To Give A Default Metric To The Routes Redistributed From OSPF.
You Can Assign A Route Tag To External Routes In Both OSPF And EIGRP. This Can Be Extremely Useful When You Do Lots Of Redistribution. In Particular, Suppose That The EIGRP And OSPF Sides Of This Network Have A Back Door Connection To One Another, Redistributing Part Or All Of Their Routing Tables. In This Case, We Will Need To Restrict Which Routes We Redistribute Into BGP And Suppress All Of These Back Door Routes, Or We Will Have Routing Loop Problems.
You Can Do This With A Route Map. The Simplest Case, Which Is Useful For The Back Door Example, Is To Suppress All External Routes When Redistributing From The IGP Into BGP:
Router2(Config)#Route-Map Redist Deny 10
Router2(Config-Route-Map)#Match Route-Type External
Router2(Config-Route-Map)#Exit
Router2(Config)#Route-Map Redist Permit 20
Router2(Config-Route-Map)#Exit
Router2(Config)#Router BGP 65520
Router2(Config-Router)#Redistribute EIGRP 99 Route-Map Redist Metric 500
You Would Need To Apply A Similar Route Map At Both Redistribution Points To Prevent Loops.
However, The Route Map We Just Created Will Match All External Routes, Not Just The External Routes Due To The Back Door Connection. You Might Have Some Redistributed Static Routes In Your IGP, Or Perhaps Some Isolated Part Of Your Network Uses Rip To Support Legacy Equipment. This Is Where Route Tags Become Invaluable.
If You Have External Routes You Need To Redistribute Into BGP, And You Know They Have A Particular Tag Value Such As 123, You Can Use A Slightly More Complicated Route Map Like This:
Router2(Config)#Route-Map Redist Permit 5
Router2(Config-Route-Map)#Match Tag 123
Router2(Config-Route-Map)#Exit
Router2(Config)#Route-Map Redist Deny 10
Router2(Config-Route-Map)#Match Route-Type External
Router2(Config-Route-Map)#Exit
Router2(Config)#Route-Map Redist Permit 20
Router2(Config-Route-Map)#Exit
Router2(Config)#Router BGP 65520
Router2(Config-Router)#Redistribute EIGRP 99 Route-Map Redist Metric 500
This Route Map Now Allows BGP To Redistribute All Local Routes And All External Routes That Have The Tag Value 123. But It Suppresses All Other External Routes.
You Might Use A Redistribution System Like This If You Were Using BGP To Act As A Transit Between Two Networks. The Router That Redistributes Routes Into BGP From The Other Network Would Mark Them With This Tag Value. Then, At This Router, We Can Use This Tag To Select Only These Particular External Routes For Distribution Into This Particular IGP.
CONCLUSION:
The Goal Of This Article Is To Give An Easy Way To Understand The “CISCO – BGP REDISTRIBUTE WITH OSPF AND EIGRP.”Hope This Article Will Help Every Beginners Who Are Going To Start Cisco Lab Practice Without Any Doubts. Thank You And Best Of Luck.
This Article Written Author By: Premakumar Thevathasan. CCNA, CCNP, CCIP, MCSE, MCSA, MCSA - MSG, CIW Security Analyst, CompTIA Certified A+.
DISCLAIMER:
This Document Carries No Explicit Or Implied Warranty. Nor Is There Any Guarantee That The Information Contained In This Document Is Accurate. Every Effort Has Been Made To Make All Articles As Complete And As Accurate As Possible.
It Is Offered In The Hopes Of Helping Others, But You Use It At Your Own Risk. The Author Will Not Be Liable For Any Special, Incidental, Consequential Or Indirect Any Damages Due To Loss Of Data Or Any Other Reason That Occur As A Result Of Using This Document. But No Warranty Or Fitness Is Implied. The Information Provided Is On An "As Is" Basic. All Use Is Completely At Your Own Risk.
The School Of Cisco Networking (SCN)
No comments:
Post a Comment