THE SCHOOL OF CISCO NETWORKING (SCN): CISCO - BGP LAB (USING COMMUNITY VALUES):
Contact No:   ### / ###/ ###
Welcome To The IT Knowledge Base Sharing Freeway "Study With The Zero Fees / Zero Money" Web - If We Believe, That If We Have Knowledge, Let Others Light Their Candles With It. - Our Motivation Has Brought Us Together To Offer Our Helping Hands To The Needy Ones Please. "Student Expectations And Satisfaction Is Always Our Highest Priority")

'Love All, Serve All, Help Ever Hurt Never'

Please Welcome To The "Zero Fees And Zero Money SCN Community Study Page"

We Like To Share Our Stuff With Everyone And Hope You Will Find Something Useful Here. Enjoy Our Collection And Come Back Again And Again, We'll Do Our Best To Make It Always Interesting For You. All Our Stuff Always Available May Be 100% Totally Freely. Use Only For Non-Commercial Purposes Only!

THE SCHOOL OF CISCO NETWORKING (SCN) Is A IT Support Community – Based, Non - Profit Volunteer Organizations, Offering Our Assistance And Support To Developmental Our Services Dedicated To All.

Because Large Section Of Our Students In This World, Especially In Villages, Who Are Under Privileged Expecting For Equal Opportunity In Terms Of Money And Education. We Feel The Sufferings Of Talented Students Losing Their Opportunity To Shine Because Of Their Poor Financial Status. So We Thought That Professional Education Will Be Providing Them Freely.

Our Web Site Is To Give An Easy Way To Understand Each And Every Student Who Are Going To Start CISCO Lab Practice Without Any Doubts And Our ARTICLES STUFF Are Always 100% Totally Free For Everyone, Which Is Belongings To THE SCHOOL OF CISCO NETWORKING (SCN).

Also This Guide Provides Technical Guidance Intended To Help All Network Students, Network Administrators And Security Officers Improve Of Their Demonstrated Ability To Achieve Specific objectives Within Set Timeframes.

Hands - On Experience Is An Invaluable Part Of Preparing For The Lab Exam And Never Pass Up An Opportunity To Configure Or Troubleshoot A Router ( If You Have Access To Lab Facilities, Take Full Advantage Of Them) There Is No Replacement For The Experience You Can Gain From Working In A Lab, Where You Can Configure Whatever You Want To Configure And Introduce Whatever Problems You Want To Introduce, Without Risk Of Disrupting A Production Network.

For Better View Of Our Web Page - Please Use Any Latest Web Browser, Such As (Mozilla Firefox, Google Chrome, Opera, Safari, Internet Explorer, Torch, Maxthon, Sea Monkey, Avant Browser, Deepnet Explorer, And Etc ), Because Some Elements Or Scripts Are Not Work In The Old Web Browser (It Might Not Be Displayed Properly Or Are Not Appearing properly!). Thank You For Your Time And Best Of Luck!

Your Sincerely – Premakumar Thevathasan.
"Our Motivation Has Brought Us Together To Offer Our Helping Hands To The Needy Once Please,Thank You."

CISCO - BGP LAB (USING COMMUNITY VALUES):

FIRST KNOW WHAT IS BGP?


The Border Gateway Protocol (BGP) Is A Protocol That Is Used Between Routers To Convey This Information. Since The Routers That Talk BGP To Each Other Aren't Owned By The Same Organization (That Would Kind Of Defeat The Purpose Of Creating Global Reachability) This Is Often Called "Inter-Domain" Routing.

The Border Gateway Protocol (BGP), Defined In RFC 1771, Allows You To Create Loop−Free Inter Domain Routing Between Autonomous Systems (AS). An AS Is A Set Of Routers Under A Single Technical Administration.

Routers In An AS Can Use Multiple Interior Gateway Protocols To Exchange Routing Information Inside The AS And An Exterior Gateway Protocol To Route Packets Outside The AS.

BGP Which May Be Used To Create A Confederation Of Autonomous Systems That Is Represented As A Single Autonomous System To BGP Peers External To The Confederation, There By Removing The "Full Mesh" Requirement.



ALSO UNDERSTAND BGP - BEST PATH ALGORITHM



BGP BEST PATH ALGORITHM:


1. The First Path Received Is Automatically The 'Best Path'. Any Further Paths Received Are Compared To This Path To Determine If The New Path Is 'Best'.

2. Is The Route VALID? To Be Valid:

o The Route Must Be Synchronized With The Interior Gateway Protocol (Unless Synchronization Is Turned Off).

o The Route Must Appear In The IP Routing Table (See Previous Bullet Point).

o The NEXT_HOP Must Be Reachable.

o The AS_Paths Received From An External AS Must Not Contain The Local AS, Or They Will Be Discarded.

o The Local Routing Policy Must Permit The Route. If The Neighbor Is Filtering The Route, They Won't Use It.

3. Highest WEIGHT

Weight Is A Cisco-Proprietary Setting And Only Exists On The Router On Which It Is Configured. It Is Otherwise Useless Throughout An AS.

4. Highest LOCAL_PREF (Used Within An AS)
5. Prefer LOCALLY ORIGINATED Route (Originated From This Router)
6. Shortest AS-PATH

7. Lowest ORIGIN Type:
IGP < EGP < INCOMPLETE

8. Lowest MULTI-EXIT-DISCRIMINATOR (MED)
9. Prefer Ebgp Route Over Ibgp Route
10. Lowest IGP Metric To BGP NEXT_HOP
11. Prefer FIRST RECEIVED EXTERNAL ROUTE (Prefer The OLDEST External PATH)

12. Prefer Lowest Router ID

The Cisco Router ID Is IP Address Of The Router, Which In Turn Is The Highest IP Address On The Router, Or Its Loopback Interface If It Has One.

13. Minimum CLUSTER_ID Length
14. Lowest Neighbor Address.



BGP LAB (USING COMMUNITY VALUES)



BGP LAB (USING COMMUNITY VALUES) EXAMPLE:



IN ORDER TO ACHIEVE THIS ROUTING POLICY, Router3 ANNOUNCES ITS PREFIXES AS FOLLOWS:


TO ROUTER1:

•6.6.6.0/24 With A Community Attribute 100:300
•7.7.7.0/24 With A Community Attribute 100:250

TO ROUTER2:

•6.6.6.0/24 With A Community Attribute 100:250
•7.7.7.0/24 With A Community Attribute 100:300

Once BGP Neighbors ROUTER1 And ROUTER2 Receive The Prefixes From ROUTER3, ROUTER1 And ROUTER2 Apply The Preconfigured Policy Based On Mapping Between The Community And Local Preference Attributes And Thus Achieve The Routing Policy Dictated By Customer (AS 30).

ROUTER1 INSTALLS THE PREFIXES IN THE BGP TABLE.

•6.6.6.0/24 With A Local Preference Of 130
•7.7.7.0/24 With A Local Preference Of 125

ROUTER2 INSTALLS THE PREFIX IN ITS BGP TABLE:

•6.6.6.0/24 With A Local Preference Of 125
•7.7.7.0/24 With A Local Preference Of 130

Since A Higher Local Preference Is Preferred In The BGP Path Selection Criteria, The Path With A Local Preference Of 130 (130 Is Greater Than 125) Is Selected As The Best Path Within AS 101, And Is Installed In The IP Routing Table Of ROUTER1 And ROUTER2.

For More Information On BGP Path Selection Criteria, Refer To BGP Best Path Selection Algorithm.

CONFIGURATIONS :


  • • Router3
  • • Router1
  • • Router2

    CONFIGURATION ON ROUTER3 :

    Current Configuration : 2037 Bytes
    !
    Version 12.2
    !
    Hostname ROUTER3
    !
    Interface Loopback0
    Ip Address 6.6.6.1 255.255.255.0
    !

    Interface Ethernet0/0
    Ip Address 7.7.7.1 255.255.255.0
    !

    Interface Serial8/0
    Ip Address 10.10.13.3 255.255.255.0

    !−−− Interface Connected To Router1.

    !
    Interface Serial9/0
    Ip Address 10.10.23.3 255.255.255.0

    !−−− Interface Connected To Router2.

    ! Router Bgp 102

    Network 6.6.6.0 Mask 255.255.255.0
    Network 7.7.7.0 Mask 255.255.255.0

    !−−− Network Commands Announce Prefix 6.6.6.0/24
    !−−− And 7.7.7.0/24.

    Neighbor 10.10.13.1 Remote−As 101

    !−−− Establishes Peering With Router1.

    Neighbor 10.10.13.1 Send−Community

    !−−− Without This Command, The Community Attributes
    !−−− Are Not Sent To The Neighbor.

    Neighbor 10.10.13.1 Route−Map Peer−R1 Out

    !−−− Configures Outbound Policy As Defined By
    !−−− Route−Map "Peer−Router1" When Peering With Router1.

    Neighbor 10.10.23.2 Remote−As 101

    !−−− Establishes Peering With Router2

    Neighbor 10.10.23.2 Send−Community

    !−−− Configures To Send Community Attribute To Router2.

    Neighbor 10.10.23.2 Route−Map Peer−Router2 Out

    !−−− Configures Outbound Policy As Defined By
    !−−− Route−Map "Peer−R2" When Peering With Router2.

    No Auto−Summary

    !

    Ip Classless
    Ip Bgp−Community New−Format

    !−−− Allows You To Configure The BGP Community
    !−−− Attribute In AA:NN Format.

    !

    Access−List 101 Permit Ip Host 6.6.6.0 Host 255.255.255.0
    Access−List 102 Permit Ip Host 7.7.7.0 Host 255.255.255.0

    !
    !

    Route−Map Peer−Router1 Permit 10

    Match Ip Address 101
    Set Community 100:300

    !−−− Sets Community 100:300 For Routes Matching Access−List 101.
    !

    Route−Map Peer−Router1 Permit 20
    Match Ip Address 102
    Set Community 100:250

    !−−− Sets Community 100:250 For Routes Matching Access−List 102.
    !

    Route−Map Peer−Router2 Permit 10
    Match Ip Address 101
    Set Community 100:250

    !−−− Sets Community 100:250 For Routes Matching Access−List 101.

    !

    Route−Map Peer−Router2 Permit 20

    Match Ip Address 102
    Set Community 100:300

    !−−− Sets Community 100:300 For Routes Matching Access−List 102.

    !

    End

    CONFIGURATION ON ROUTER1

    Version 12.2
    !
    Hostname Router1

    !
    Interface Loopback0
    Ip Address 200.200.200.1 255.255.255.0

    !
    Interface Serial8/0
    Ip Address 10.10.13.1 255.255.255.0

    !−−− Connected To Router3.

    !

    Interface Serial10/0
    Ip Address 10.10.12.1 255.255.255.0

    !−−− Connected To Router2.

    !

    Router Bgp 101
    No Synchronization
    Bgp Log−Neighbor−Changes
    Neighbor 10.10.12.2 Remote−As 101

    !−−− Establishes Peering With Router2.

    Neighbor 10.10.12.2 Next−Hop−Self
    Neighbor 10.10.13.3 Remote−As 30

    !−−− Establishes Peering With Router3.

    Neighbor 10.10.13.3 Route−Map Peer−Router3 In

    !−−− Configures The Inbound Policy As Defined By
    !−−− Route−Map "Peer−R3" When Peering With Router3.

    No Auto−Summary

    !

    Ip Bgp−Community New−Format

    !−−− Allows You To Configure The BGP Community
    !−−− Attribute In AA:NN Format.

    Ip Community−List 1 Permit 100:300
    Ip Community−List 2 Permit 100:250

    !−−− Defines Community List 1 And 2.

    !
    Route−Map Peer−Router3 Permit 10

    Match Community 1
    Set Local−Preference 130

    !−−− Sets Local Preference 130 For All Routes
    !−−− Matching Community List 1.

    !
    Route−Map Peer−Router3 Permit 20
    Match Community 2
    Set Local−Preference 125

    !−−− Sets Local Preference 125 For All Routes
    !−−− Matching Community List 2.

    !

    Route−Map Peer−Router3 Permit 30

    !−−− Without This Permit 30 Statement, Updates That Do Not
    !−−− Match The Permit 10 Or Permit 20 Statements Are Dropped.

    !
    End

    CONFIGURATION ON ROUTER2

    Version 12.2
    !
    Hostname Router2

    !
    Interface Loopback0
    Ip Address 192.168.50.1 255.255.255.0

    !
    Interface Serial9/0
    Ip Address 10.10.23.2 255.255.255.0

    !−−− Connected To Router3.

    !
    Interface Serial10/0
    Ip Address 10.10.12.2 255.255.255.0

    !−−− Connected To Router1.

    !


    Router Bgp 101

    No Synchronization
    Bgp Log−Neighbor−Changes
    Neighbor 10.10.12.1 Remote−As 101

    !−−− Establishes Ibgp Peering With Router1.

    Neighbor 10.10.12.1 Next−Hop−Self
    Neighbor 10.10.23.3 Remote−As 102

    !−−− Establishes Peering With Router3.

    Neighbor 10.10.23.3 Route−Map Peer−Router3 In

    !−−− Configures Inbound Policy As Defined By
    !−−− Route−Map "Peer−R3" When Peering With Router3.

    No Auto−Summary
    !
    Ip Bgp−Community New−Format

    !−−− Allows You To Configure The BGP Community
    !−−− Attribute In AA:NN Format.
    !

    Ip Community−List 1 Permit 100:300
    Ip Community−List 2 Permit 100:250

    !−−− Defines Community List 1 And 2.
    ! Route−Map Peer−Router3 Permit 10

    Match Community 1
    Set Local−Preference 130

    !−−− Sets Local Preference 130 For All Routes
    !−−− Matching Community List 1.
    !
    Route−Map Peer−Router3 Permit 20

    Match Community 2
    Set Local−Preference 125

    !−−− Sets Local Preference 125 For All Routes
    !−−− Matching Community List 2.

    ! Route−Map Peer−Router3 Permit 30

    !−−− Without This Permit 30 Statement, Updates That Do Not
    !−−− Match The Permit 10 Or Permit 20 Statements Are Dropped.

    !
    End

    VERIFY :


    Router1 Receives Prefixes 6.6.6.0/24 And 7.7.7.0/24 With Communities 100:300 And 100:250, As Shown In Bold In The Show IP BGP Output Of This Section.

    Note: Once These Routes Are Installed Into The BGP Table Based On The Configured Policy, Prefixes With Community 100:300 Are Assigned Local Preference 130 And Prefixes With Community 100:250 Are Assigned Local Preference 125.

    Router1# Show IP BGP 6.6.6.0

    Router1# Show IP BGP 7.7.7.0

    Router1# Show IP BGP

    BGP Table Version Is 4, Local Router ID Is 200.200.200.1
    Status Codes: S Suppressed, D Damped, H History, * Valid, > Best, I − Internal
    Origin Codes: I − IGP, E − EGP, ? − Incomplete
    Network Next Hop Metric Locprf Weight Path
    *> 6.6.6.0/24 10.10.13.3 0 130 0 30 I
    *>I7.7.7.0/24 10.10.12.2 0 130 0 30 I
    * 10.10.13.3 0 125 0 30 I



    The Show IP BGP Command On Router1 Confirms That The Best Path Selected On Router1 Are With Local Preference (Loclprf) = 130.

    Similarily, Router2 Receives Prefixes 6.6.6.0/24 And 7.7.7.0/24 With Communities 100:250 And 100:300, As Shown In Bold In The Show IP BGP Command Output Of This Section.

    Note: Once These Routes Are Installed Into The BGP Table, Based On The Configured Policy, Prefixes With Community 100:300 Are Assigned Local Preference 130 And Prefixes With Community 100:250 Are Assigned Local Preference 125.

    ALSO USE THIS DISPLAR COMMAND :

    Router2# Show IP BGP 6.6.6.0

    Router2# Show IP BGP 7.7.7.0

    Router2# Show IP BGP

    BGP Table Version Is 3, Local Router ID Is 192.168.50.1 Status Codes: S Suppressed, D Damped, H History, * Valid, > Best, I − Internal Origin Codes: I − IGP, E − EGP, ? − Incomplete Network Next Hop Metric Locprf Weight Path * 6.6.6.0/24 10.10.23.3 0 125 0 30 I *>I 10.10.12.1 0 130 0 30 I *> 7.7.7.0/24 10.10.23.3 0 130 0 30 I This Show IP BGP Command Output On Router2 Confirms The Best Path Selected On Router2 Are With Local Preference(Loclprf) = 130.

    The IP Route To Prefix 6.6.6.0/24 Prefers The Router1−Router3 Link Exiting Out Of AS 101 Towards AS 102. The Show IP Route Command On Router1 And Router2 Confirms That.


    USE ALL DISPLAY COMMANDS:

    Router1# Show IP Route 6.6.6.0

    Router2# Show IP Route 6.6.6.0
    Router2# Show IP Route 7.7.7.0

    Router1# Show IP Route 7.7.7.0

    Routing Entry For 7.7.7.0/24
    Known Via "BGP 101", Distance 200, Metric 0
    Tag 30, Type Internal
    Last Update From 10.10.12.2 3d22h Ago
    Routing Descriptor Blocks:
    * 10.10.12.2, From 10.10.12.2, 3d22h Ago
    Route Metric Is 0, Traffic Share Count Is 1
    AS Hops 1

    !−−− On Router1, IP Route To Prefix 7.7.7.0/24 Points
    !−−− To Next Hop Router2 (10.10.12.2) On Its IBGP Link.

    !−−− Thus Traffic To Network 7.7.7.0/24 From Router1
    !−−− Exits through Router1−Router2 and Then Router2−Router3 Link
    !−−− From AS 101 Towards AS 102.

    IF Failure Of One Link, For Example The Router1−Router3 Link, All Traffic Must Follow The Router2−Router3 Link. You Can Simulate That If You Shut Down The Link Between Router1−Router3.

    Router1# Conf T
    Enter Configuration Commands, One Per Line. End With CNTL/Z.

    Router1(Config)#Int S8/0
    Router1(Config−If)#Shut
    Router1(Config−If)#

    3d22h: %BGP−5−ADJCHANGE: Neighbor 10.10.13.3 Down Interface Flap
    3d22h: %LINK−5−CHANGED: Interface Serial8/0, Changed State To

    Administratively Down
    3d22h: %LINEPROTO−5−UPDOWN: Line Protocol On Interface Serial8/0,

    Changed State To Down

    Notice The IP Routing Table For Prefix 6.6.6.0/24 And 7.7.7.0/24 On Router1 And Router2. Use Router2−Router3 Link In Order To Exit Out Of AS 101.

    Router1# Show Ip Route 6.6.6.0

    Routing Entry For 6.6.6.0/24
    Known Via "Bgp 101", Distance 200, Metric 0

    Tag 30, Type Internal
    Last Update From 10.10.12.2 00:01:47 Ago
    Routing Descriptor Blocks:
    * 10.10.12.2, From 10.10.12.2, 00:01:47 Ago
    Route Metric Is 0, Traffic Share Count Is 1
    AS Hops 1

    Router1# Show IP Route 7.7.7.0

    Routing Entry For 7.7.7.0/24
    Known Via "Bgp 101", Distance 200, Metric 0
    Tag 30, Type Internal
    Last Update From 10.10.12.2 3d22h Ago
    Routing Descriptor Blocks:

    * 10.10.12.2, From 10.10.12.2, 3d22h Ago
    Route Metric Is 0, Traffic Share Count Is 1
    AS Hops 1

    This Show Command Output Shows That The Route To Prefixes 6.6.6.0/24 And 7.7.7.0/24 Points To The Next Hop 10.10.12.2, (Router2), Which Is Expected. Now Take A Look At The IP Routing Table On Router2to Check Next−Hop Of Prefix 6.6.6.0/24 And 7.7.7.0/24. The Next Hop Must Be Router3 For The Configured Policy In Order To Work Successfully.

    Router2# Show Ip Route 6.6.6.0

    Routing Entry For 6.6.6.0/24
    Known Via "Bgp 101", Distance 20, Metric 0
    Tag 30, Type External
    Last Update From 10.10.23.3 00:04:10 Ago
    Routing Descriptor Blocks:

    * 10.10.23.3, From 10.10.23.3, 00:04:10 Ago
    Route Metric Is 0, Traffic Share Count Is 1
    AS Hops 1

    Router2# Show Ip Route 7.7.7.0

    Routing Entry For 7.7.7.0/24
    Known Via "Bgp 101", Distance 20, Metric 0
    Tag 30, Type External
    Last Update From 10.10.23.3 3d22h Ago
    Routing Descriptor Blocks:
    * 10.10.23.3, From 10.10.23.3, 3d22h Ago
    Route Metric Is 0, Traffic Share Count Is 1
    AS Hops 1
    The Next Hop 10.10.23.3 Is Router3 Serial 9/0 Interface On The Router2−Router3 Link. This Confirms The Configured Policy Works As Expected.

    CONCLUSION:


    The Goal Of This Article Is To Give An Easy Way To Understand The “CISCO - BGP LAB (USING COMMUNITY VALUES) CONFIGURATION” .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: