Monday, 22 May 2017

CISCO – BGP LAB (REDISTRIBUTE BGP VERSUS OSPF):

This Notes Help And Explains The Behavior Of Open Shortest Path First (OSPF) To Border Gateway Protocol (BGP) Redistribution On Cisco Routers. The Behavior Of OSPF To BGP Redistribution Is Outlined In RFC 1403. 

INTRODUCTION :


BGP Does Not Carry Subnet Information In Routing Updates. Therefore, When Referring To A Subnetted Network In The OSPF Routing Domain, We Consider The Equivalent Network Route In The Context Of BGP. Multiple Subnet Routes For A Subnetted Network In OSPF Are Collapsed Into One Network Route When Exported Into BGP. 

The Default Must Be To Export No Routes From OSPF Into BGP. A Single Configuration Parameter Must Permit All OSPF Inter-Area And Intra-Area Routes To Be Exported Into BGP. OSPF External Routes Of Type 1 And Type 2 MUST Never Be Exported Into BGP Unless They Are Explicitly Configured. 



BGP REDISTRIBUTING ROUTES INTO OSPF



BGP VS OSPF INTERACTION / REDISTRIBUTION :


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. 

At Least One Redistribution Point Needs To Exist Between The Two Routing Domains. This Device Will Actually Run Both Routing Protocols. 

BGP Implementations Should Allow An AS To Control Announcements Of BGP-Learned Routes Into OSPF. Implementations Should Support Such Control With The Granularity Of A Single Network. Implementations Should Also Support Such Control With The Granularity Of An Autonomous System, Where The Autonomous System May Be Either The Autonomous System That Originated The Route Or The Autonomous System That Advertised The Route To The Local System (Adjacent Autonomous System). 

The Default Must Be To Export No Routes From BGP Into OSPF. Administrators Must Configure Every Route They Wish To Import. 

A Configuration Parameter May Allow An Administrator To Configure An ASBR To Import All The BGP Routes Into The OSPF Routing Domain. 

  • The Administrator Must Be Able To Configure The OSPF Cost And The OSPF Metric Type Of Every Route Imported Into OSPF.
  • The OSPF Cost Must Default To 1; The OSPF Metric Type MUST Default To Type 2.

    The Default Behavior Is Not To Redistribute Any Routes From OSPF Into BGP. Redistribution Must Be Configured. You Can Use The Route-Map Command To Filter Routes During OSPF To BGP Redistribution.

    When Redistributing, Specific Keywords Like Internal, External And Nssa-External Are Required To Redistribute Respective Routes.

    NOTE :If You Configure The Redistribution Of OSPF Into BGP Without Keywords, Only OSPF Intra-Area And Inter-Area Routes Are Redistributed Into BGP, By Default. You Can Use The Internal Keyword Along With The Redistribute Command Under Router BGP To Redistribute OSPF Intra- And Inter-Area Routes.

    Redistribution Of Dynamically Learned Interior Gateway Protocol (IGP) Routes Into Border Gateway Protocol (BGP) Is Not Recommended.

    When Open Shortest Path First (OSPF) Is Redistributed Into Border Gateway Protocol (BGP), Only The Inter-Area And Intra-Area Routes Get Redistributed.



    OSPF AREA



    NORMALY THERE ARE SEVERAL TYPES OF OSPF ROUTES :


    Intra-Area— In A Multiarea OSPF Network, Routes, Originated Within An Area, Are Known By The Routers In The Same Area As Intra-Area Routes. These Routes Are Flagged As O In The Show IP Route Command Output.

    Inter-Area— When A Route Crosses An OSPF Area Border Router (ABR), The Route Is Known As An OSPF Inter-Area Route. These Routes Are Flagged As O IA In The Show IP Route Command Output.

    Both Intra And Inter-Area Routes Are Also Called OSPF Internal Routes, As They Are Generated By OSPF Itself, When An Interface Is Covered With The OSPF Network Command. 

    External Type-2 Or External Type-1— Routes Which Were Redistributed Into OSPF, Such As Connected, Static, Or Other Routing Protocol, Are Known As External Type-2 Or External Type-1. These Routes Are Flagged As O E2 Or O E1 In The Show IP Route Command Output.

    NSSA External Type 2 Or NSSA External Type 1— When An Area Is Configured As A Not-So-Stub Area (NSSA), And Routes Are Redistributed Into OSPF, The Routes Are Known As NSSA External Type 2 Or NSSA External Type 1. These Routes Are Flagged As O N2 Or O N1 In The Show IP Route Command Output.

    REDISTRIBUTION OF OSPF NSSA−EXTERNAL ROUTES INTO BGP :


    This Is A Special Case In Which Only Not−So−Stubby Area (NSSA) Routes Are Redistributed Into BGP. This Case Is Very Similar To The Case Described In The Redistribution Of Only OSPF External (Type 1 And 2) Routes Into BGP Section.

    Issuing The Redistribute Command By Itself Does Not Result In Redistribution Of OSPF External Or Not-So-Stubby Area (NSSA) External Routes Into BGP.

    To Redistribute OSPF NSSA-External Routes Into BGP, Issue The Redistribute Command With The NSSA-External Keyword In Router Configuration Mode.

    Redistributing Routes Into OSPF From Other Routing Protocols Or From Static Will Cause These Routes To Become OSPF External Routes. To Redistribute Routes Into OSPF, Use The Following Command In Router Configuration Mode:

    OSPF Is A Standardized Link-State Routing Protocol That Uses Cost (Based On Bandwidth) As Its Link-State Metric. An OSPF Router Performing Redistribution Automatically Becomes An ASBR.

    To Redistribute Routes Learned From Another Routing Process Into Ospf. Redistributed Routes Become OSPF External Type 2 Routes By Default. The Default Cost Or Metric Of A Redistributed Route Is 1 For BGP And 20 For All Other Protocols. This Command Will Redistribute Classful Routes Into Ospf Only If The Subnets Keyword Is Not Used. USE OF A VALID METRIC :

    Whenever You Redistribute OSPF Into Other Protocols, You Have To Respect The Rules Of Those Protocols. In Particular, The Metric Applied Should Match The Metric Used By That Protocol. For Example, The RIP Metric Is A Hop Count Ranging Between 1 And 16, Where 1 Indicates That A Network Is One Hop Away And 16 Indicates That The Network Is Unreachable.



    REDISTRIBUTION EXAMPLE IN OSPF



    If The Default-Metric Or A Manual Metric Is Not Specified For The Redistributed Routes, A Default Metric Of 20 Will Be Applied To Routes Of All Routing Protocols Except For BGP. Redistributed BGP Routes Will Have A Default Metric Of 1 Applied By OSPF.

    By Default, OSPF Will Only Redistribute Classful Routes Into The OSPF Domain.

    Redistribute Protocol [Process-Id] [Metric Value] [Metric-Type Value] [Route-Map Map-Tag] [Subnets]

    NOTE : The Above Command Should Be On One Line.

    SYNTAX DESCRIPTION :


    ROUTING – PROCESS — > Routing Process To Redistribute Into Ospf. The Routing Process Can Be BGP, Connected, EGP, EIGRP, IGRP, ISIS, ISO-IGRP, Mobile, ODR, OSPF, RIP, Or Static.

    PROCESS-ID — > The Process Id Of The Routing Process (If Applicable).

    OSPF - METRIC — > The Metric Or Cost To Assign To The Redistributed Routes. If This Option Is Not Used, A Default Metric Of 1 Will Be Used For Redistributed Bgp Routes And A Default Metric Of 20 Will Be Used For All Other Protocols. The Range Of Values Is 0–16,777,214.

    METRIC – TYPE — > Routes Are Redistributed Into Ospf As Either Type 1 Or Type 2 Routes. The Default Is Type 2.

    TAG – VALUE — > A 32-Bit Value That Is Attached To The Redistributed Routes. The Route Tag Is Not Used By OSPF But Can Be Referenced In A Route Map For Making Policy Decisions. One Possible Use Is To Base The Decision To Redistribute A Route Based On The Route Tag. The Default Tag Value Is 0. The Range Of Values For The Tag Is 0–4,294,967,295.

    The Protocol And Process-Id Are The Protocol That We Are Injecting Into OSPF And Its Process-Id If It Exits. The Metric Is The Cost We Are Assigning To The External Route. If No Metric Is Specified, OSPF Puts A Default Value Of 20 When Redistributing Routes From All Protocols Except BGP Routes, Which Get A Metric Of 1. The Metric-Type Is Discussed In The Next Paragraph.

    The Route-Map Is A Method Used To Control The Redistribution Of Routes Between Routing Domains. The Format Of A Route Map Is:

    Route-Map Map-Tag [[Permit | Deny] | [Sequence-Number]]

    NOTE :When Redistributing Routes Into OSPF, Only Routes That Are Not Subnetted Are Redistributed If The Subnets Keyword Is Not Specified.

    AN EXAMPLE :

    Router (Config) # Router OSPF 1
    Router (Config-Router) # Redistribute Static Metric 200 Subnets

    THIS CONFIGURATION COMMAND EXAMPLE SEQUENCE SHOWS ITS IMPACT ON REDISTRIBUTION :


    R4# Conf T
    R4(Config)# Router BGP 100

    R4(Config−Router)# Redistribute OSPF 1 Match Internal
    R4(Config−Router)# ^Z

    !−−− Initially, We Redistribute Internal OSPF Routes Into BGP 100.

    R4# Conf T
    R4(Config)# Router Bgp 100
    R4(Config−Router)# Redistribute Ospf 1 Match External
    R4(Config−Router)# ^Z

    !−−− With This Second Command, We Tell BGP
    !−−− To Also Redistribute External OSPF Routes.

    R4# Sh Run | I Redistribute Ospf

    Redistribute Ospf 1 Match Internal External 1 External 2

    R4#

    R4# Conf T
    R4(Config)# Router BGP 100
    R4(Config−Router)# No Redistribute Ospf 1 Match External 2
    R4(Config−Router)# ^Z

    !−−− With This No Command, We Only Disable The
    !−−− Redistribution Of External Type 2 Into BGP.
    !−−− All Other Types Of Routes Previously Configured Remain.

    R4# Sh Run | I Redistribute OSPF
    Redistribute Ospf 1 Match Internal External 1

    !−−− As You Can See, Internal And External Type 1 Remain.

    DEFAULT-INFORMATION ORIGINATE (BGP) :


    The Default-Information Originate Command Is Used To Configure A BGP Routing Process To Advertise A Default Route (Network 0.0.0.0).

    REDISTRIBUTING NETWORK 0.0.0.0


    By Default, You Are Not Allowed To Redistribute Network 0.0.0.0. To Permit The Redistribution Of Network 0.0.0.0, Use The Following Command In Router Configuration Mode:

    Router(Config-Router)# Default-Information Originate - > Allows The Redistribution Of Network 0.0.0.0 Into BGP.

    The Default-Route Can Actually Be Used For The BGP Next-Hop Check. Even If We Have No Route To The Next-Hop (There Are No Routes In The BGP Routing Table), If We Have A Default-Route In Our Routing Table (If There are no routes in the BGP routing table). 

    To Configure A Border Gateway Protocol (BGP) Routing Process To Distribute A Default Route (Network 0.0.0.0), Use The Default-Information Originate Command In Address Family Or Router Configuration Mode. To Disable The Advertisement Of A Default Route, Use The No Form Of This Command.

    Default-Information Originate
    No Default-Information Originate

    EXAMPLE :

    In The Following Example, The Router Is Configured To Redistribute A Default Route From OSPF Into The BGP Routing Process:

    Router(Config)# Router BGP 5001
    Router(Config-Router)# Address-Family Ipv4 Unicast

    Router(Config-Router-Af)# Default-Information Originate
    Router(Config-Router-Af)# Redistribute OSPF 100
    Router(Config-Router-Af)# End

    Router (Config)#Do Sh Ip Route OSPF

    To Advertise A BGP Default Route To A BGP Neighbor, Use The Neighbor Default-Originate Router Configuration Command. The Network Command Requires Only That The Route 0.0.0.0 Is Present In The Interior Gateway Protocol (IGP) Routing Table. For This Reason, The Network Command Is Preferred.

    DEFAULT-METRIC (BGP):


    To Set A Default Metric For Routes Redistributed Into Border Gateway Protocol (BGP), Use The Default-Metric Command In Address Family Or Router Configuration Mode. To Remove The Configured Value And Return BGP To Default Operation, Use The No Form Of This Command.

    Default-Metric Number
    No Default-Metric Number



    LAB FOR – BGP VERSUS OSPF REDISTRIBUTE



    LAB EXAMPLE FOR BGP VS OSPF REDISTRIBUTE :




    STEP BY STEP LAB CONFIGURATION GUIDANCE




    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

    CONFIGURATION ON ROUTER A:


    Router>enable (Switches To Privileged EXEC Level)
    Router#Configure Terminal (Switches To Global Configuration Level)
    Router(Config)#Hostname Router A (Assign Host Name To Router A)
    Router A(Config)#

    INTERFACE E0 CONFIGURATION ON ROUTER A:


    Router A(Config)#int e0 (Switches To Configure The E0 Interface)
    Router A(Config-if)#IP address 10.0.0.1 255.0.0.0 (Configures An IP Address On Ethernet0 (Interface))

    Router A(Config-if)#no shutdown (Activates Serial0 (Interface))
    Router A(Config-if)#no keepalive

    Router A(Config-if)#Exit (Exits Back To Global Configuration Level)

    KEEPALIVE :

    A Keepalive Is A Message Sent By One Device To Another To Check That The Link Between The Two Is Operating, Or To Prevent This Link From Being Broken. No Keepalive Will Be Bringing Down The Interface Or Before Bringing The Tunnel Protocol Down For A Specific Interface.

    NOTE:If You Enter The No Keepalive Command, Keepalive Packets Are Disabled On The Interface.

    Router A(Config)#Exit
    Router A# Copy Running-Config Startup-Config (Saves Configuration Into NVRAM)

    INTERFACE SERIAL S1 CONFIGURATION ON ROUTER A:


    Router A#Conf T
    Router A(Config)#Int s1 (Switches To Configure The Serial1 Interface)
    Router A(Config-if)#Ip address 20.0.0.1 255.0.0.0

    Router A(Config-if)#no shut (Enable An Interface)
    Router A(Config-if)# Clock Rate 56000 (Set The Clock Rate 56000 For DCE Interface)
    Router A(Config-if)# bandwidth 64 (Set A Logical Bandwidth Assignment Of 64k To The Serial Interface)

    To Enable The Back-To-Back Serial Connection Between Two Routers, You Need To Configure One Router As DCE Using The Following Command In Interface Configuration Mode For The Serial Connection On Two different Routers.

    Router A(Config-if)#exit

    ROUTER - DTE / DCE :


    In A Real-Life Network, Your Serial Interfaces Will Almost Certainly Be Configured As DTE Interfaces. Recall That A CSU/DSU Usually Handles The Clocking For A Synchronous Serial Interface.
  • A DTE (Date Terminating Equipment) Cable Is The Normal Cable You Should Use. Being DTE You Should Expect The Other End To Provide Clocking.
  • A DCE (Data Communication Equipment) Means That This Device Must Provide The Clocking On The Wire. DTE/DCE Cable To Directly Connect Two Cisco Router Serial Interfaces.
  • Connecting The Serial Ports Of Two Routers Directly Using What Is Known As A DCE-To-DTE Crossover Cable. These Cables Allow You To Simulate A Serial WAN Connection Without Requiring A CSU/DSU Or Similar Device.
  • The Main Issue With Connecting Your Serial Interfaces In This Manner Is The Fact That One Of The Devices Will Need To Be Configured As DCE In Order To Provide The Timing Mechanism Required.

    The DCE-To-DTE Crossover Cable Will Have Two Different DB-60 Interfaces – One Marked DTE, And The Other Marked DCE. The Router Connected To The DCE End Of The Cable Will Need Its Serial Interface Configured As A DCE Device. 

    NOTE : If Your Device Is The DCE, You Must Provide Clocking Using The Clock Rate Command.

    Example - > Router A(Config-if)# Clock Rate 56000

    BGP CONFIGURATION ON ROUTER A:


    Router A(Config)#Router BGP 10

    To Configure The Border Gateway Protocol (BGP) Routing Process, Use The Router BGP Command In Global Configuration Mode. To Remove A Routing Process, He Following Example Configures A BGP Process For Autonomous System 20)

    Router A(Config-Router)#Neighbor 20.0.0.2 remote-as 20


    Router A(Config-Router)#Network 10.0.0.0 (Advertised Route To The Network Specified Must Be Present In The Routing Table.)

    Router A(Config-Router)#Network 20.0.0.0 (Advertised Route To The Network Specified Must Be Present In The Routing Table.)

    Router A(Config-Router)#Exit (Or ^Z I’will Go To Router A#)
    Router A(Config)#Exit
    Router A#

    Router A# Copy Running-Config Startup-Config

    THEN CHECK IT ON ROUTER A (USE ALL THESE COMMANDS) :


    Router A#CLEAR IP BGP* SOFT

    The CLEAR IP BGP Command Can Be Used To Initiate A Hard Reset Or Soft Reconfiguration. A Hard Reset Tears Down And Rebuilds The Specified Peering Sessions And Rebuilds The BGP Routing Tables. A Soft Reconfiguration Uses Stored Prefix Information To Reconfigure And Activate BGP Routing Tables Without Tearing Down Existing Peering Sessions. Soft Reconfiguration Uses Stored Update Information, At The Cost Of Additional Memory For Storing The Updates, To Allow You To Apply New BGP Policy Without Disrupting The Network. Soft Reconfiguration Can Be Configured For Inbound Or Outbound Sessions.

    Router A#SHOW IP BGP

    To Display Entries In The BGP Routing Table, Use The Show Ip Bgp Command In EXEC Mode.

    Router A#SHOW IP BGP NEIGHBOR

    To Display Information About The TCP And BGP Connections To Neighbors, Use The Show Ip Bgp Neighbors Command In EXEC Mode.

    Router A#CLEAR IP ROUTE*

    Removes From The IP Routing Table From The IP Routing Table.

    Router A#SHow IP ROUTE

    To Display The Current State Of The Routing Table, Use The Show Ip Route Command In EXEC Mode.

    Router A#SHOW IP INT BRIEF

    Interface Commands (Show Ip Interface), To Display The Usability Status Of Interfaces Configured For IP, Use The Show Ip Interface Command In Privileged EXEC Mode.

    Show Ip Interface [Type Number] [Brief]

    CONFIGURATION ON ROUTER B:


    Router>Enable (Switches To Privileged Exec Level)
    Router#Configure Terminal (Switches To Global Configuration Level)
    Router(Config)#Hostname Router B (Assign Host Name To Router B)
    Router B(Config)#

    INTERFACE S0 CONFIGURATION ON ROUTER B:


    Router B(Config)#Int S0
    Router B(Config-if)#IP Address 20.0.0.2 255.0.0.0
    Router B(Config-if)#no shutdown
    Router B(Config-if)# bandwidth 64

    Router B(Config-if)#Exit
    Router B(Config)#Exit
    Router B# Copy Running-Config Startup-Config

    INTERFACE S1 CONFIGURATION ON ROUTER B:


    Router B(Config)#Int S1

    Router B(Config-if)#IP Address 30.0.0.1 255.0.0.0
    Router B(Config-if)#no shutdown

    Router B(Config-if)#Clock Rate 56000
    Router B(Config-if)# bandwidth 64

    Router B(Config-if)#Exit
    Router B(Config)#Exit
    Router B# Copy Running-Config Startup-Config

    BGP AND OSPF PROTOCALS REDISTRIBUTE CONFIGURATION ON ROUTER B:


    NOTE :There Are Two Different Protocols Running In Router B And Router D, Such As BGP And OSPF. So We Have to Redistribute on Router B and Router D.

    STEP 1 - FIRST ADVITICE BGP NETWORK FOR ON ROUTE B:

    Router B(Config)#Router BGP 20
    Router B(Config-Router)#Neighbor 20.0.0.1 remote-as 10

    Router B(Config-Router)#Network 20.0.0.0
    Router B(Config-Router)#Exit
    Router B(Config)#

    THEN ADVITICE OSPF NETWORK FOR ON ROUTE B:

    Router B(Config)#Router OSPF 46
    Router B(Config-Router)#Network 30.0.0.0 0.255.255.255 area 4
    Router B(Config-Router)#Exit
    Router B(Config)#

    STEP 2 - THEN REDISTRIBUTE BGP INTO OSPF & OSPF INTO BGP ON ROUTER B:


    BGP - > OSPF :

    Router B(Config)#Router OSPF 46
    Router B(Config-Router)#Redistribute BGP 20 (This Redistributes ONLY OSPF External Routes)

    Router B(Config-Router)#Exit

    OSPF - > BGP :

    Router B(Config)#Router BGP 20
    Router B(Config-Router)#Redistribute OSPF 45 Match External (This redistributes all OSPF routes into BGP)

    Router B(Config-Router)#Redistribute Connected (This Command Is No Necessary But U Can Give This Command. It’s Always Good)

    Router B(Config-Router)#^Z (Exit & Exit)

    Router B# Copy Running-Config Startup-Config

    Router B#

    THEN CHECK IT ON ROUTER A & ROUTER B (USE ALL THESE COMMANDS BY THIS ORDER) :


    #CLEAR IP BGP* SOFT
    #SHOW IP BGP

    #CLEAR IP ROUTE*
    #SHOW IP ROUTE

    #SHOW RUN
    #SHOW IP OSPF DATABASE

    CONFIGURATION ON ROUTER C:


    Router>Enable (Switches To Privileged Exec Level)
    Router#Configure Terminal (Switches To Global Configuration Level)
    Router(Config)#Hostname Router C (Assign Host Name To Router C)
    Router C(Config)#

    INTERFACE S0 CONFIGURATION ON ROUTER C:


    Router C(Config)#Int S0
    Router C(Config-if)#IP Address 30.0.0.2 255.0.0.0
    Router C(Config-if)#No shutdown
    Router C(Config-if)# Bandwidth 64

    Router C(Config-if)#Exit
    Router C(Config)#Exit
    Router C# Copy Running-Config Startup-Config

    INTERFACE S1 CONFIGURATION ON ROUTER C:


    Router C(Config)#Int S1
    Router C(Config-if)#IP Address 40.0.0.1 255.0.0.0
    Router C(Config-if)#no shutdown

    Router C(Config-if)#Clock Rate 56000
    Router C(Config-if)# Bandwidth 64

    Router C(Config-if)#Exit
    Router C(Config)#Exit
    Router C# Copy Running-Config Startup-Config

    OSPF CONFIGURATION ON ROUTER C:


    Router C#Conf T
    Router C(Config)#Router OSPF 46

    Router C(Config-Router)#Network 30.0.0.0 0.255.255.255 Area 4
    Router C(Config-Router)#Network 40.0.0.0 0.255.255.255 Area 4

    Router C(Config-Router)^z
    Router C#

    THEN CHECK IT ON ROUTER C (USE ALL THESE COMMANDS BY THIS ORDER) :


    Router C#CLEAR IP BGP* SOFT
    Router C#SHOW IP BGP

    Router C#CLEAR IP ROUTE*
    Router C#SHOW IP ROUTE

    Router C#SHOW RUN
    Router C#SHOW IP OSPF DATABASE
    Router C#SHOW IP OSPF NEIGHBOR
    Router C#PING 10.0.0.1

    CONFIGURATION ON ROUTER D:


    Router>Enable (Switches To Privileged Exec Level)
    Router#Configure Terminal (Switches To Global Configuration Level)
    Router(Config)#Hostname Router D (Assign Host Name To Router D)
    Router D(Config)#

    INTERFACE S0 CONFIGURATION ON ROUTER D:


    Router D(Config)#Int S0
    Router D(Config-if)#IP Address 40.0.0.2 255.0.0.0
    Router D(Config-if)#no shutdown
    Router D(Config-if)# Bandwidth 64

    Router D(Config-if)#Exit
    Router D(Config)#Exit
    Router D# Copy Running-Config Startup-Config

    INTERFACE S1 CONFIGURATION ON ROUTER D:


    Router D(Config)#Int S1
    Router D(Config-if)#IP Address 50.0.0.1 255.0.0.0
    Router D(Config-if)#no shutdown

    Router D(Config-if)#Clock Rate 56000
    Router D(Config-if)#Bandwidth 64

    Router D(Config-if)#Exit
    Router D(Config)#Exit
    Router D# Copy Running-Config Startup-Config

    BGP AND OSPF PROTOCALS REDISTRIBUTE CONFIGURATION ON ROUTER D:


    NOTE :There Are Two Different Protocols Running In Router D And Router B, Such As BGP And OSPF. So We Have to Redistribute on Router D and Router B.

    Also We Have To Advertise The Network OSPF Network Into BGP And BGP Into OSPF On Router B, So We Have To Do On Router D Now.

    STEP 1 - FIRST ADVITICE OSPF NETWORK FOR ON ROUTE D:

    Router D(Config)#Router OSPF 46
    Router D(Config-Router)#Network 40.0.0.0 0.255.255.255 area 4
    Router D(Config-Router)#Exit
    Router D(Config)#

    THEN ADVITICE BGP NETWORK FOR ON ROUTE D:

    Router D(Config)#Router BGP 20
    Router D(Config-Router)#Neighbor 50.0.0.2 remote-as 30

    Router D(Config-Router)#Network 50.0.0.0
    Router D(Config-Router)#Exit
    Router D(Config)#

    STEP 2 - THEN REDISTRIBUTE BGP INTO OSPF & OSPF INTO BGP ON ROUTER D:


    BGP - > OSPF :

    Router D(Config)#Router OSPF 46
    Router D(Config-Router)#Redistribute BGP 20 (This Redistributes ONLY OSPF External Routes)

    Router D(Config-Router)#Exit

    OSPF - > BGP :

    Router D(Config)#Router BGP 20
    Router D(Config-Router)#Redistribute OSPF 45 Match External (This redistributes all OSPF routes into BGP)

    Router D(Config-Router)#Redistribute Connected (This Command Is No Necessary But U Can Give This Command. It’s Always Good)

    Router D(Config-Router)#^Z (Exit & Exit)

    Router D# Copy Running-Config Startup-Config

    Router D#

    THEN CHECK IT ON ROUTER D (USE ALL THESE COMMANDS BY THIS ORDER) :


    Router D#CLEAR IP OSPF PROCESSOR - > (Enter Then It’ll Ask Yes or No, You Enter Yes)
    Router D#CLEAR IP ROUTE*

    Router D#SHOW RUN
    Router D#SHOW IP OSPF DATABASE
    Router D#SHOW IP ROUTE

    Router D#CLEAR IP BGP* SOFT
    Router D#SHOW IP BGP

    CONFIGURATION ON ROUTER E:


    Router>Enable (Switches To Privileged Exec Level)
    Router#Configure Terminal (Switches To Global Configuration Level)
    Router(Config)#Hostname Router E (Assign Host Name To Router E)
    Router E(Config)#

    INTERFACE S0 CONFIGURATION ON ROUTER E:


    Router E(Config)#Int S0
    Router E(Config-if)#IP Address 50.0.0.2 255.0.0.0
    Router E(Config-if)#no shutdown
    Router E(Config-if)# bandwidth 64

    Router E(Config-if)#Exit
    Router E(Config)#Exit
    Router E# Copy Running-Config Startup-Config

    INTERFACE E1 CONFIGURATION ON ROUTER E:


    Router E(Config)#Int e1
    Router E(Config-if)#IP Address 60.0.0.1 255.0.0.0
    Router E(Config-if)#No shutdown
    Router E(Config-if)#No Keepalive

    Router E(Config-if)#Exit
    Router E(Config)#Exit
    Router E# Copy Running-Config Startup-Config

    BGP CONFIGURATION ON ROUTER E:


    Router E(Config)#Router BGP 30

    Router E(Config-Router)#Neighbor 50.0.0.1 remote-as 20


    Router E(Config-Router)#Network 50.0.0.0
    Router E(Config-Router)#Network 60.0.0.0

    Router E(Config-Router)#Exit (Or ^Z I’will Go To Router A#)
    Router E(Config)#Exit
    Router E#

    Router E# Copy Running-Config Startup-Config

    THEN CHECK IT ON ROUTER E (USE ALL THESE COMMANDS BY THIS ORDER) :


    Router E#CLEAR IP BGP* SOFT
    Router E#CLEAR IP ROUTE*
    Router E#SHOW IP BGP

    Router E#SHOW IP ROUTE
    Router E#SHOW RUN
    Router E##SHOW IP BGP NEIGHBOR

    FINALLY EXTERNAL PING ON ROUTER A & ROUTER E: Router E#PING

    -

    -

    - Target IP Address 10.0.0.1

    -

    -

    - Source IP Address 60.0.0.1

    Then GO TO ROUTER A AND PING :
    ROUTER A#PING

    -

    -

    - Target IP Address 60.0.0.1

    -

    -

    - Source IP Address 10.0.0.1




    CONCLUSION:


    The Goal Of This Article Is To Give An Easy Way To Understand The “CISCO – BGP LAB (BGP VERSUS OSPF REDISTRIBUTE)”. Hope This Article Will Help Every Beginners Who Are Going To Start Cisco Lab Practice Without Any Doubts.

    Some Topics That You Might Want To Pursue On Your Own That We Did Not Cover In This Article Are Listed Here, 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. 
  • No comments:

    PAN-OS Supported ciphers

    Following is a list of supported ciphers for PAN-OS 7.1 and later: SSLv3 Ciphers Supported (No change from PAN-OS 7.0) Non-FIPS mod...