Bgp

5,771 views
5,613 views

Published on

Intro to BGP, Juniper

Published in: Education, Technology
2 Comments
18 Likes
Statistics
Notes
No Downloads
Views
Total views
5,771
On SlideShare
0
From Embeds
0
Number of Embeds
103
Actions
Shares
0
Downloads
766
Comments
2
Likes
18
Embeds 0
No embeds

No notes for slide
  • Bgp

    1. 1. Introduction to Border Gateway Protocol (BGP 4) Version 1.2
    2. 2. Summary <ul><ul><li>BGP Concept </li></ul></ul><ul><ul><li>BGP Operation </li></ul></ul><ul><ul><li>Route Control </li></ul></ul><ul><ul><li>Configuration </li></ul></ul><ul><ul><li>Trouble-shooting </li></ul></ul><ul><ul><li>Juniper vs. Cisco </li></ul></ul>
    3. 3. Summary <ul><ul><li>BGP Concept </li></ul></ul><ul><ul><li>BGP Operation </li></ul></ul><ul><ul><li>Route Control </li></ul></ul><ul><ul><li>Configuration </li></ul></ul><ul><ul><li>Trouble-shooting </li></ul></ul><ul><ul><li>Juniper vs. Cisco </li></ul></ul>
    4. 4. Concepts <ul><li>The BGP protocol was developed by the IDR Working Group of IETF. A first version of BGP was published in June 1989 as RFC 1105 (BGP-1). A second version was published in June 1990 as RFC 1163 (BGP-2). A third version was published in October 1991 as RFC 1267 (BGP-3). </li></ul><ul><li>A fourth version was published in July 1994 as RFC 1654 (BGP-4). The Current version of BGP-4 is documented in RFC 1771 (March 1995). </li></ul><ul><li>BGP-4 supports </li></ul><ul><ul><li>the path vector concept to avoid the potential routing loop introduced by complicated (I.e., full-meshed) Internet topology </li></ul></ul><ul><ul><li>IP prefix and length advertisements </li></ul></ul>
    5. 5. <ul><li>JUNOS software supports BGP Version 4 and several extensions to the protocol </li></ul><ul><ul><li>RFC 1771, A Border Gateway Protocol 4 (BGP-4) </li></ul></ul><ul><ul><li>RFC 1772, Application of the Border Gateway Protocol in the Internet </li></ul></ul><ul><ul><li>RFC 1965, Autonomous System Confederations for BGP </li></ul></ul><ul><ul><li>RFC 1966, BGP Route Reflection: An Alternative to Full-Mesh IBGP </li></ul></ul><ul><ul><li>RFC 1997, BGP Communities Attribute </li></ul></ul><ul><ul><li>RFC 2270, Using a Dedicated AS for Sites Homed to a Single Provider </li></ul></ul><ul><ul><li>RFC 2283, Multiprotocol Extensions for BGP-4 </li></ul></ul><ul><ul><li>RFC 2385, Protection of BGP Sessions via the TCP MD5 Signature Option </li></ul></ul><ul><ul><li>RFC 2439, BGP Route Flap Damping </li></ul></ul><ul><ul><li>Capabilities Negotiation with BGP4 , IETF draft draft-ietf-idr-cap-neg-01 </li></ul></ul><ul><ul><li>BGP Extended Communities Attribute , IETF draft-ramachandra-bgp-ext-communities-04.txt </li></ul></ul>BGP Protocol Overview
    6. 6. Concepts <ul><ul><li>the concept of classless interdomain routing to allow better use of existing IP address space and to minimize the rapid growth of routing table size (CIDR, RFC 1519) </li></ul></ul><ul><ul><li>policy-based routing using a set of pre-defined path attributes </li></ul></ul><ul><ul><li>BGP-4 supports route aggregation and AS aggregation (I.e., AS Set and Confederation) </li></ul></ul><ul><ul><li>fast convergence by requiring the router to inform its neighbors when the previously announced routes become unreachable </li></ul></ul><ul><ul><li>large routing table size </li></ul></ul><ul><ul><li>authentication using BGP identifier and AS number. In addition, it supports encrypted signature in every BGP message. </li></ul></ul>
    7. 7. Concepts <ul><li>BGP routers only use those routes whose next-hop can be reached </li></ul><ul><li>BGP routers advertise only those routes that they use </li></ul><ul><li>BGP runs over a reliable transport protocol. </li></ul><ul><ul><li>TCP port 179 </li></ul></ul><ul><ul><li>takes care of segmenting, sequencing, retransmission and acknowledgments </li></ul></ul><ul><ul><li>supports a &quot;graceful&quot; close, i.e., that all outstanding data will be delivered before the connection is close. </li></ul></ul><ul><ul><li>-         4096 max frame size </li></ul></ul><ul><ul><li>-         hold time (90 sec def – smallest used between peers) </li></ul></ul><ul><ul><li>-         open->updates->keepalives (steady state)-> notification (close) </li></ul></ul><ul><ul><li>| | </li></ul></ul><ul><ul><li>------  ---  ------- </li></ul></ul><ul><li>BGP MIB consists of the BGP Peer Table, The BGP Path Attribute Table and a Global Table. </li></ul>
    8. 8. Concepts <ul><li>Autonomous System (AS) </li></ul><ul><ul><li>The classic definition of an Autonomous System is a set of routers under a single technical administration, using a single IGP and common metrics to route packets within the AS, and using an EGP to route packets to other ASs. </li></ul></ul><ul><ul><li>Currently, it has become common for a single AS to use several IGPs and sometimes several sets of metrics within an AS. </li></ul></ul><ul><ul><li>The use of the term Autonomous System here stresses the fact that, even when multiple IGPs and metrics are used, the administration of an AS appears to other ASs to have a single coherent interior routing plan and presents a consistent picture of what destinations are reachable through it. </li></ul></ul>
    9. 9. Concepts <ul><li>Autonomous System Type </li></ul><ul><li>Stub AS </li></ul><ul><ul><li>Single Exit Point </li></ul></ul><ul><ul><li>Local Traffic </li></ul></ul><ul><li>Multi-Homed AS </li></ul><ul><ul><li>Multiple Exit Points </li></ul></ul><ul><ul><li>Local Traffic </li></ul></ul><ul><li>Transit AS </li></ul><ul><ul><li>Local and Transit Traffic </li></ul></ul>Provider &quot;A&quot; AS 50 Provider &quot;B&quot; AS 60 Customer #1 AS 100 Customer #2 AS 110 Customer #n AS 120 EBGP IBGP Stub As Multi-Homed Stub As Transit AS Transit AS TCP Connections BGP Peers
    10. 10. BGP AS <ul><li>What is an AS? </li></ul><ul><li>-          16 bit integer (1-65535) </li></ul><ul><li>-          64512-65535 private. </li></ul>
    11. 11. Concepts <ul><li>CIDR = Classless Inter Domain Routing </li></ul><ul><li>Address Assignment and Aggregation Strategy </li></ul><ul><li>A mechanism to aggregate IP addresses into blocks of multiple of the old style classes of addresses </li></ul><ul><li>Reduces routing information through this aggregation </li></ul><ul><li>Conserves Resources </li></ul><ul><ul><li>router resources (CPU, memory) </li></ul></ul><ul><ul><li>bandwidth (less routes -> less routing packets) </li></ul></ul>
    12. 12. Concepts <ul><ul><li>Supernet </li></ul></ul><ul><ul><li>Organizations are allocated Blocks of IP addresses </li></ul></ul><ul><ul><li>These blocks are allocated in powers of 2 </li></ul></ul><ul><ul><li>The Blocks of Address Space can be Aggregated into one routing announcement (Supernetting) </li></ul></ul><ul><ul><ul><li>Block of 256 “Class C” Networks (or a class B sized block) </li></ul></ul></ul><ul><ul><ul><li>IP addresses 192.24.0.0 thru 192.24.255.255 </li></ul></ul></ul><ul><ul><ul><li>Can be described by one Supernetted Route </li></ul></ul></ul><ul><ul><ul><li>192.24.0.0 Mask 255.255.0.0 </li></ul></ul></ul>
    13. 13. Concepts <ul><ul><li>Exterior Routes </li></ul></ul><ul><ul><li>Routes learned from other autonomous systems </li></ul></ul>
    14. 14. Concepts <ul><li>Between BGP Speakers in different AS </li></ul><ul><li>Should be directly connected </li></ul><ul><li>Configuration </li></ul><ul><ul><li>Router A </li></ul></ul><ul><ul><li>bgp { </li></ul></ul><ul><ul><li>group EXTERNAL { </li></ul></ul><ul><ul><li>neighbor 1.1.1.2; </li></ul></ul><ul><ul><li>type external; </li></ul></ul><ul><ul><li>peer-as 200 ; </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>{ </li></ul></ul><ul><ul><li>Router B </li></ul></ul><ul><ul><li>bgp { </li></ul></ul><ul><ul><li>group EXTERNAL { </li></ul></ul><ul><ul><li>neighbor 1.1.1.1; </li></ul></ul><ul><ul><li>type external; </li></ul></ul><ul><ul><li>peer-as 100 ; </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>{ </li></ul></ul><ul><ul><li>External Neighbor </li></ul></ul>
    15. 15. Concepts <ul><li>Neighbor in same AS </li></ul><ul><li>May be several hop away </li></ul><ul><li>Configuration </li></ul><ul><ul><li>Router A </li></ul></ul><ul><ul><li>bgp { </li></ul></ul><ul><ul><li>group INTERNAL { </li></ul></ul><ul><ul><li>type internal; </li></ul></ul><ul><ul><li>neighbor 1.1.1.1; </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>Router B </li></ul></ul><ul><ul><li>bgp { </li></ul></ul><ul><ul><li>group INTERNAL { </li></ul></ul><ul><ul><li>neighbor 2.2.2.2; </li></ul></ul><ul><ul><li>type internal; </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>{ </li></ul></ul><ul><ul><li>Internal Neighbor </li></ul></ul>
    16. 16. Concepts <ul><li>Internal vs. External BGP </li></ul><ul><li>Local Preference </li></ul><ul><li>MED </li></ul><ul><li>Cluster list </li></ul><ul><li>Next-hop address </li></ul><ul><li>AS Path </li></ul>IBGP Update Preserved Preserved Prepend the Cluster ID by RR Preserved Unchanged EBGP Update Removed Removed the MED from previous AS Unchanged Changed to the local address Prepend the local AS
    17. 17. BGP Attribute <ul><li>Well-known mandatory – Always present in a BGP update .  All BGP implementations recognize these attributes.  An example is the BGP next hop attribute . (Origin, AsPath) </li></ul><ul><li>Well-known discretionary - Might be present in a BGP update .  All BGP implementations recognize these attributes.  An example is the local preference attribute. </li></ul><ul><li>Optional transitive - Must be passed to other BGP peers even if the local peer does not understand or process the attribute .  An example is the community attribute . </li></ul><ul><li>Optional non-transitive - Must not be passed to other BGP peers .  An example is the MED attribute </li></ul>
    18. 18. Concepts <ul><li>AS path Attributes </li></ul><ul><li>Standard attribute types </li></ul><ul><ul><li>1, ORIGIN (well-known mandatory) </li></ul></ul><ul><ul><li>2, AS_PATH (well-known mandatory) </li></ul></ul><ul><ul><li>3, NEXT_HOP (well-known mandatory) </li></ul></ul><ul><ul><li>4, MULTI_EXIT_DISC (optional non-transitive) </li></ul></ul><ul><ul><li>5, LOCAL_PREF (well-known discretionary) </li></ul></ul><ul><ul><li>6, ATOMIC_AGGREGATE (well-known discretionary) </li></ul></ul><ul><ul><li>7, AGGREGATOR (optional transitive) </li></ul></ul><ul><li>Additional attribute types have been created via supplemental specifications to extend the protocol </li></ul><ul><ul><li>8, Community (optional transitive) </li></ul></ul><ul><ul><li>9, Originator Id (optional non-transitive) </li></ul></ul><ul><ul><li>10, Cluster list (optional non-transitive) </li></ul></ul><ul><ul><li>11, Destination Path Attribute (optional transitive) </li></ul></ul>
    19. 19. Concepts <ul><li>Path traversed one or more members of a set </li></ul><ul><ul><li>{100 200} (as-set) </li></ul></ul><ul><li>A list of AS’s that a route has traversed </li></ul><ul><li>300 100 (sequence) </li></ul><ul><ul><li>AS-Path </li></ul></ul>
    20. 20. Concepts <ul><li>set by EBGP speaker or policy </li></ul><ul><li>Next hop to reach a network </li></ul><ul><li>Router A will advertise 100.100.100.1 next hop for network 150.10.0.0 </li></ul><ul><ul><li>Next-hop </li></ul></ul>
    21. 21. Concepts <ul><li>Router B would advertise 100.100.100.3 as an “next-hop” to reach the network behind router C to AS 109 ( router A ) </li></ul><ul><ul><li>Next-hop Issue </li></ul></ul>
    22. 22. Concepts <ul><li>Problem will occur if the network in-between is actually an NBMA network ! </li></ul><ul><ul><li>Next-hop Issue </li></ul></ul>
    23. 23. Concepts <ul><li>Use “next-hop self” to solve </li></ul><ul><ul><li>Next-hop Issue </li></ul></ul>Router B: protocol bgp { group BGP-to-router-A { export chg-nexthop; } } policy-options policy-statement chg-nexthop { from protocol bgp; then next-hop self; }
    24. 24. Concepts <ul><li>Preference send to all routers in local AS </li></ul><ul><li>Path with highest preference value are most desirable </li></ul><ul><ul><li>Local Preference </li></ul></ul>
    25. 25. Concepts <ul><li>bgp { </li></ul><ul><li>group EXTERNAL { </li></ul><ul><li>type external; </li></ul><ul><li> peer-as 666 </li></ul><ul><li>local-preference 100; </li></ul><ul><li>neighbor 1.1.1.1; </li></ul><ul><li>} </li></ul><ul><li>} </li></ul><ul><ul><li>Local Preference </li></ul></ul>
    26. 26. Concepts <ul><li>Multi-Exit Discriminator (MED) </li></ul><ul><li>32-bit, non-negative </li></ul><ul><ul><li>Affects all routes from same AS path </li></ul></ul><ul><ul><li>Advertised to external neighbors </li></ul></ul><ul><ul><li>Lower MED value is more preferable </li></ul></ul>
    27. 27. Concepts <ul><li>Applies on a AS path basis </li></ul><ul><ul><li>Multi-Exit Discriminator (MED) </li></ul></ul>
    28. 28. Concepts <ul><li>Multi-Exit Discriminator (MED) </li></ul>Router A: bgp { group EXTERNAL { type external; neighbor 1.1.1.1 { export MED; peer-as 666; } } } policy-statement MED { from as-path via-200; then { metric 200; accept; } } as-path via-200 &quot;.* 200&quot;;
    29. 29. Concepts <ul><ul><li>Multi-Exit Discriminator (MED) </li></ul></ul>
    30. 30. Concepts <ul><li>Origin </li></ul><ul><li>describes how a route was injected into BGP at the originating AS </li></ul><ul><ul><li>IGP </li></ul></ul><ul><ul><ul><li>Default export type on policy statement for BGP </li></ul></ul></ul><ul><ul><li>EGP </li></ul></ul><ul><ul><ul><li>From protocol EGP, can be specified in the export policy </li></ul></ul></ul><ul><ul><li>Incomplete </li></ul></ul><ul><ul><ul><li>Unknown source of information, can be specified in the export policy </li></ul></ul></ul>
    31. 31. Concepts <ul><li>Atomic Aggregate </li></ul><ul><ul><li>Used to inform BGP speaker about less specific route. </li></ul></ul><ul><ul><li>More specific route exists and is included in it </li></ul></ul><ul><ul><li>BGP speaker receiving this attribute shall not remove the attribute when propagating it </li></ul></ul>
    32. 32. Concepts <ul><li>Aggregator (6-bytes) </li></ul><ul><ul><li>Last AS number that formed the aggregate route (2 bytes) </li></ul></ul><ul><ul><li>IP address of the BGP speaker that formed the aggregate route (4-bytes) </li></ul></ul>
    33. 33. Concepts <ul><li>Route Reflector and Confederation </li></ul><ul><ul><li>Scaling would be an issue when there are too many BGP peer within the AS </li></ul></ul><ul><ul><li>BGP speaker would not pass the BGP routes learn from an IBGP peer to another IBGP peers </li></ul></ul><ul><ul><li>Number of connection required = n(n-1)/2 </li></ul></ul>
    34. 34. Concepts <ul><li>Route Reflector – RFC 1966 </li></ul><ul><ul><li>Acting as a “mirror” to reflect the BGP routes learned from the IBGP peers to the clients </li></ul></ul><ul><ul><li>Update from non-client to all clients </li></ul></ul><ul><ul><li>Update from client to all non-clients and the other clients except the one originated the route </li></ul></ul><ul><ul><li>Provide the normal BGP speaker function to all other non-clients </li></ul></ul><ul><ul><li>Pending cluster-list and originator ID </li></ul></ul>
    35. 35. Concepts <ul><ul><li>Route Reflector </li></ul></ul>
    36. 36. Concepts <ul><li>Route Reflector </li></ul><ul><ul><li>Loop Prevention </li></ul></ul><ul><ul><ul><li>Originator ID </li></ul></ul></ul><ul><ul><ul><li>If the attribute “originator ID” has not been created in the attribute of the route, the RR will create this attribute </li></ul></ul></ul><ul><ul><ul><li>The content of “ originator ID ” is the router ID of the IBGP peer that pass this route to the RR </li></ul></ul></ul><ul><ul><ul><li>The RR would not reflect the route back to the originator </li></ul></ul></ul>
    37. 37. Concepts <ul><li>Route Reflector </li></ul><ul><ul><li>Loop Prevention </li></ul></ul><ul><ul><ul><li>Cluster list </li></ul></ul></ul><ul><ul><ul><li>When the RR reflect the route to other peers, it will prepend it’s cluster ID within the cluster list </li></ul></ul></ul><ul><ul><ul><li>If the RR receive a route with it’s cluster ID within the cluster list, the route would be discarded </li></ul></ul></ul>
    38. 38. Concepts <ul><li>Confederation – RFC 1965 </li></ul><ul><ul><li>Scale down an AS into several Sub-ASs </li></ul></ul><ul><ul><li>Each BGP peers between sub-AS would act as EBGP peer except some of the attributes remain unchanged </li></ul></ul><ul><ul><li>Local-preference passed through such a connect </li></ul></ul><ul><ul><li>MED, next-hop unchanged between member AS’s of the confederation. </li></ul></ul>
    39. 39. Concepts <ul><ul><li>Confederation </li></ul></ul>
    40. 40. Summary <ul><ul><li>BGP Concept </li></ul></ul><ul><ul><li>BGP Operation </li></ul></ul><ul><ul><li>Route Control </li></ul></ul><ul><ul><li>Configuration </li></ul></ul><ul><ul><li>Trouble-shooting </li></ul></ul><ul><ul><li>Juniper vs. Cisco </li></ul></ul>
    41. 41. BGP Protocol Messages <ul><li>Four types of messages </li></ul><ul><ul><li>Open </li></ul></ul><ul><ul><li>Update </li></ul></ul><ul><ul><li>Keepalive </li></ul></ul><ul><ul><li>Notification </li></ul></ul>
    42. 42. BGP Header 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + + | Marker | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length | Type | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <ul><li>Marker: synchronization and authentication </li></ul>
    43. 43. BGP Open message 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+ | Version | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | My Autonomous System | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Hold Time | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | BGP Identifier | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Opt Parm Len | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Optional Parameters | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    44. 44. OPEN Message (Cont.) <ul><li>Authentication Information (type 1) </li></ul>Optional Parameters 0 1 2 3 4 5 6 7 8 +-+-+-+-+-+-+-+-+ | Auth. Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Authentication Data | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    45. 45. NOTIFICATION Message 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error code | Error subcode | Data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ <ul><ul><li>1 = HRD Error </li></ul></ul><ul><ul><li>2 = OPEN Error </li></ul></ul><ul><ul><li>3= UPDATE Error </li></ul></ul><ul><ul><li>4 = Hold Time Expired </li></ul></ul><ul><ul><li>5 = FSM Error </li></ul></ul><ul><ul><li>6 = Cease(for fatal errors besides the ones already listed) </li></ul></ul>
    46. 46. UPDATE Message +-----------------------------------------------------+ | Unfeasible Routes Length (2 octets) | +-----------------------------------------------------+ | Withdrawn Routes (variable) | +-----------------------------------------------------+ | Total Path Attribute Length (2 octets) | +-----------------------------------------------------+ | Path Attributes (variable) | +-----------------------------------------------------+ | Network Layer Reachability Information (variable) | +-----------------------------------------------------+ +---------------------------+ | Length (1 octet) | +---------------------------+ | Prefix (variable) | +---------------------------+ 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Attr. Flags |Attr. Type Code| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    47. 47. BGP Operation <ul><ul><li>BGP-4 Message Exchange </li></ul></ul>BGP TCP TCP BGP Idle Initializing Open Sent Open Confirm Established Syn Sent Listen Syn Received Idle Initializing Open Sent Open Confirm Established Established Established Connect Connect Open Open KeepAlive KeepAlive syn Syn +Ack Ack BGP Peers Update Update
    48. 48. BGP Operation <ul><ul><li>BGP-4 FSM </li></ul></ul>Idle Connect Open Sent Open Confirm Established Active 1 3 11 7 16 14 10 9 6 4 2 12 5 8 15 13
    49. 49. BGP Operation Open sent--- Wait for open from peer Current State New State Event Idle Idle 1). Error Connect 2). Start Connect Idle 3). Any other event Connect 4). ConnectRetry Timer Expired Open Sent 5). Transport Protocol Connect Succeeds Active 6). Transport Protocol Connect Fails Open Sent Idle 7). Stop, Open Error, Connection Collision, Hold Timer Expires, or any other event Open Confirm 8). No Errors Active 9). Disconnect Notification
    50. 50. BGP Operation Current New Event State State Open Confirm (waiting notification or keepalive – handshake) Established 15). Keepalive Open Confirm Idle 14). Hold Timer Expired, Notification, Disconnect, Stop, or any other event Established Idle 16). Notification, UPDATE Message error Disconnect Notification, Hold Timer Expired, Stop, or any other event Active Open Sent Connect Active Idle 10). Transport Connect Protocol Succeeds 11). ConnectRetry Timer Expired 12). Remote Peer Trying, IP Address Not Expected 13). Any Other Event
    51. 51. Summary <ul><ul><li>BGP Concept </li></ul></ul><ul><ul><li>BGP Operation </li></ul></ul><ul><ul><li>Route Control </li></ul></ul><ul><ul><li>Configuration </li></ul></ul><ul><ul><li>Trouble-shooting </li></ul></ul><ul><ul><li>Juniper vs. Cisco </li></ul></ul>
    52. 52. Route Control <ul><li>Route Selection </li></ul><ul><ul><li>Route with lowest preference value </li></ul></ul><ul><ul><li>Route with highest local preference </li></ul></ul><ul><ul><li>Route with the shortest AS path length </li></ul></ul><ul><ul><li>Route with the lowest origin code ( IGP < EGP < incomplete ) </li></ul></ul><ul><ul><li>Route with the lowest MED (cisco-nondeterministic / always-compare-med ) </li></ul></ul><ul><ul><li>Routes are local generated </li></ul></ul><ul><ul><li>Routes from EBGP peer </li></ul></ul><ul><ul><li>Routes with the closest next-hop (determined by IGP metric) </li></ul></ul><ul><ul><li>Routes from the peer with lowest router-id </li></ul></ul><ul><ul><li>Routes from the neighbor with lowest IP address </li></ul></ul>
    53. 53. Route Control <ul><li>Policy Control </li></ul><ul><ul><li>Import / Export Policy </li></ul></ul><ul><ul><li>Communities </li></ul></ul><ul><ul><li>AS path </li></ul></ul><ul><ul><li>Route filtering </li></ul></ul>
    54. 54. Route Control <ul><li>Import / Export Policy </li></ul><ul><ul><li>Per group / neighbor import / export policy </li></ul></ul><ul><ul><li>Used for advertise routes originated from the local AS </li></ul></ul><ul><ul><li>Used for change / add / delete BGP attributes </li></ul></ul><ul><ul><li>Global specific > Group specific > Neighbor specific </li></ul></ul>
    55. 55. Route Control <ul><li>Import / Export Policy </li></ul><ul><ul><li>Applying policies: </li></ul></ul><ul><ul><ul><ul><li>bgp { </li></ul></ul></ul></ul><ul><ul><ul><ul><li>import global-import-policy-here; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>export global-export-policy-here; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>group testing-policy { </li></ul></ul></ul></ul><ul><ul><ul><ul><li>import group-import-policy-here; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>export group-export-policy-here; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>neighbor 1.1.1.1 { </li></ul></ul></ul></ul><ul><ul><ul><ul><li>import neighbor-import-policy-here; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>export neighbor-export-policy-here; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>} </li></ul></ul></ul></ul><ul><ul><ul><ul><li>} </li></ul></ul></ul></ul><ul><ul><ul><ul><li>} </li></ul></ul></ul></ul>
    56. 56. Route Control <ul><li>Import / Export Policy </li></ul><ul><ul><li>Check the routes received from a peer before applying an import policy: </li></ul></ul><ul><ul><ul><ul><li>show route receive-protocol bgp 1.1.1.1 </li></ul></ul></ul></ul><ul><ul><li>Check the routes sent to a peer after applying an export policy: </li></ul></ul><ul><ul><ul><ul><li>show route advertising-protocol bgp 1.1.1.1 </li></ul></ul></ul></ul>
    57. 57. Route Control <ul><li>Community </li></ul><ul><ul><li>Well-known community </li></ul></ul><ul><ul><ul><li>no-advertise Do not advertise to neighbors </li></ul></ul></ul><ul><ul><ul><li>no-export Do not advertise outside your confederation/AS </li></ul></ul></ul><ul><ul><ul><li>no-export-subconfed Do not advertise outside your subconfederation </li></ul></ul></ul><ul><ul><li>Define Community </li></ul></ul><ul><ul><ul><li>community community-name members [ 100:10 100:30 ]; </li></ul></ul></ul>
    58. 58. Route Control <ul><li>AS Path </li></ul><ul><ul><li>AS Path Regular Expressions </li></ul></ul><ul><ul><ul><li>{m,n} at least m and most n repetitions of term. </li></ul></ul></ul><ul><ul><ul><li>{m} Exact m repetitions of term </li></ul></ul></ul><ul><ul><ul><li>{m,} m or more repetitions of term </li></ul></ul></ul><ul><ul><ul><li>* Zero or more repetitions of term </li></ul></ul></ul><ul><ul><ul><li>+ One or more repetitions of term </li></ul></ul></ul><ul><ul><ul><li>? Zero or one repetitions of term </li></ul></ul></ul><ul><ul><ul><li>| One of the two terms on either side of the pipe </li></ul></ul></ul>
    59. 59. Route Control <ul><li>Route filtering </li></ul><ul><ul><li>Filtering based on IP prefix / AS path / Community string / Neighbor / Origin ….. </li></ul></ul><ul><ul><li>Import / Export policy </li></ul></ul>
    60. 60. Route Control <ul><li>Route filtering </li></ul><ul><ul><li>Matching criteria </li></ul></ul><ul><ul><ul><li>+ as-path Name of AS path regular expression (BGP only) </li></ul></ul></ul><ul><ul><ul><li>+ community BGP community </li></ul></ul></ul><ul><ul><ul><li>local-preference Local preference associated with a route </li></ul></ul></ul><ul><ul><ul><li>+ neighbor Neighboring router </li></ul></ul></ul><ul><ul><ul><li>Origin BGP origin attribute </li></ul></ul></ul><ul><ul><ul><li>> prefix-list List of prefix-lists of routes to match </li></ul></ul></ul><ul><ul><ul><li>> route-filter List of routes to match </li></ul></ul></ul>
    61. 61. Route Control <ul><li>Route filtering </li></ul><ul><ul><li>Matching AS Path </li></ul></ul><ul><ul><ul><li>policy-statement filtering { </li></ul></ul></ul><ul><ul><ul><li>from as-path testing-as-path; </li></ul></ul></ul><ul><ul><ul><li>then accept; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>as-path testing-as-path &quot;.* 200&quot;; </li></ul></ul></ul>
    62. 62. Route Control <ul><li>Route filtering </li></ul><ul><ul><li>Matching Community string </li></ul></ul><ul><ul><ul><li>policy-statement filtering { </li></ul></ul></ul><ul><ul><ul><li>from community testing-community; </li></ul></ul></ul><ul><ul><ul><li>then accept; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>community testing-community members 100:200; </li></ul></ul></ul>
    63. 63. Route Control <ul><li>Route filtering </li></ul><ul><ul><li>Matching route entry </li></ul></ul><ul><ul><ul><li>policy-statement filtering { </li></ul></ul></ul><ul><ul><ul><li>from route-filter 100.100.0.0/16 orlonger; </li></ul></ul></ul><ul><ul><ul><li>then accept; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>
    64. 64. Route Control <ul><li>Route filtering </li></ul><ul><ul><li>Matching within a group of route entries </li></ul></ul><ul><ul><ul><li>prefix-list route-list { </li></ul></ul></ul><ul><ul><ul><li>100.100.0.0/16; </li></ul></ul></ul><ul><ul><ul><li>100.110.0.0/16; </li></ul></ul></ul><ul><ul><ul><li>100.120.0.0/16; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>policy-statement filtering { </li></ul></ul></ul><ul><ul><ul><li>from prefix-list route-list; </li></ul></ul></ul><ul><ul><ul><li>then accept; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>
    65. 65. Summary <ul><ul><li>BGP Concept </li></ul></ul><ul><ul><li>BGP Operation </li></ul></ul><ul><ul><li>Route Control </li></ul></ul><ul><ul><li>Configuration </li></ul></ul><ul><ul><li>Trouble-shooting </li></ul></ul><ul><ul><li>Juniper vs. Cisco </li></ul></ul>
    66. 66. Configuration <ul><li>BGP minimum configuration </li></ul><ul><li>[routing-options] </li></ul><ul><li>autonomous-system <your own AS>; </li></ul><ul><li>[protocol bgp] </li></ul><ul><li>group BGP-setup { </li></ul><ul><li> type [external | internal]; </li></ul><ul><li> peer-as <peer’s AS>; </li></ul><ul><li> neighbor <peer IP address>; </li></ul><ul><li>} </li></ul>
    67. 67. Configuration <ul><li>Example </li></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group BGP-setup { </li></ul></ul></ul><ul><ul><ul><li>type external; </li></ul></ul></ul><ul><ul><ul><li>peer-as 100; </li></ul></ul></ul><ul><ul><ul><li>neighbor 100.1.1.2; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>[routing-options] </li></ul></ul></ul><ul><ul><ul><li>autonomous-system 200; </li></ul></ul></ul>
    68. 68. Configuration <ul><li>Set the local-preference </li></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group BGP-setup { </li></ul></ul></ul><ul><ul><ul><li>type external; </li></ul></ul></ul><ul><ul><ul><li>local-preference 100; </li></ul></ul></ul><ul><ul><ul><li>peer-as 100; </li></ul></ul></ul><ul><ul><ul><li>neighbor 100.1.1.2; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><li>Set the MED </li></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group BGP-setup { </li></ul></ul></ul><ul><ul><ul><li>type external; </li></ul></ul></ul><ul><ul><ul><li>metric-out 200; </li></ul></ul></ul><ul><ul><ul><li>local-preference 100; </li></ul></ul></ul><ul><ul><ul><li>peer-as 100; </li></ul></ul></ul><ul><ul><ul><li>neighbor 100.1.1.2; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>
    69. 69. Configuration <ul><li>Change the origin </li></ul><ul><ul><ul><li>[protocol policy-options] </li></ul></ul></ul><ul><ul><ul><li>policy-statement change-origin { </li></ul></ul></ul><ul><ul><ul><li>from protocol aggregate; </li></ul></ul></ul><ul><ul><ul><li>then { </li></ul></ul></ul><ul><ul><ul><li>origin incomplete; </li></ul></ul></ul><ul><ul><ul><li>accept; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group BGP-setup { </li></ul></ul></ul><ul><ul><ul><li>type external; </li></ul></ul></ul><ul><ul><ul><li>export change-origin; </li></ul></ul></ul><ul><ul><ul><li>peer-as 100; </li></ul></ul></ul><ul><ul><ul><li>neighbor 100.1.1.2; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>
    70. 70. Configuration <ul><li>AS-prepend </li></ul><ul><ul><ul><li>[policy-options] </li></ul></ul></ul><ul><ul><ul><li>policy-statement as-prepend { </li></ul></ul></ul><ul><ul><ul><li>from protocol aggregate; </li></ul></ul></ul><ul><ul><ul><li>then { </li></ul></ul></ul><ul><ul><ul><li>as-path-prepend “300 300 300&quot;; </li></ul></ul></ul><ul><ul><ul><li>accept; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group BGP-setup { </li></ul></ul></ul><ul><ul><ul><li>type external; </li></ul></ul></ul><ul><ul><ul><li>export as-prepend; </li></ul></ul></ul><ul><ul><ul><li>peer-as 100; </li></ul></ul></ul><ul><ul><ul><li>neighbor 100.1.1.2; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>
    71. 71. Configuration <ul><li>Attach community </li></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group BGP-setup { </li></ul></ul></ul><ul><ul><ul><li>type external; </li></ul></ul></ul><ul><ul><ul><li>export att-community; </li></ul></ul></ul><ul><ul><ul><li>peer-as 100; </li></ul></ul></ul><ul><ul><ul><li>neighbor 100.1.1.2; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>[policy-options] </li></ul></ul></ul><ul><ul><ul><li>policy-statement att-community { </li></ul></ul></ul><ul><ul><ul><li>then { </li></ul></ul></ul><ul><ul><ul><li>community set send-community; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>community send-community members [ 100:10 200:10 ]; </li></ul></ul></ul>
    72. 72. Configuration <ul><li>Route Reflector </li></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group RR-client { </li></ul></ul></ul><ul><ul><ul><li>type internal; </li></ul></ul></ul><ul><ul><ul><li>cluster 100.1.1.1 ; </li></ul></ul></ul><ul><ul><ul><li>neighbor 100.1.1.2; </li></ul></ul></ul><ul><ul><ul><li>neighbor 100.1.1.3; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>group non-client { </li></ul></ul></ul><ul><ul><ul><li>type internal; </li></ul></ul></ul><ul><ul><ul><li>neighbor 10.1.1.2; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>group EBGP { </li></ul></ul></ul><ul><ul><ul><li>type external; </li></ul></ul></ul><ul><ul><ul><li>peer-as 100; </li></ul></ul></ul><ul><ul><ul><li>neighbor 192.168.1.2; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>
    73. 73. Configuration <ul><li>Confederation </li></ul><ul><ul><ul><li>[routing-options] </li></ul></ul></ul><ul><ul><ul><li>autonomous-system 65000; </li></ul></ul></ul><ul><ul><ul><li>confederation 200 members [ 65000 65001 ]; </li></ul></ul></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group confe { </li></ul></ul></ul><ul><ul><ul><li>type external; </li></ul></ul></ul><ul><ul><ul><li>peer-as 65001; </li></ul></ul></ul><ul><ul><ul><li>neighbor 100.1.1.2; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>
    74. 74. Configuration <ul><li>Advertise summary network </li></ul><ul><ul><ul><li>[routing-options] </li></ul></ul></ul><ul><ul><ul><li>aggregate { </li></ul></ul></ul><ul><ul><ul><li>route 202.168.0.0/17 discard; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>[policy-options] </li></ul></ul></ul><ul><ul><ul><li>policy-statement adv-summary { </li></ul></ul></ul><ul><ul><ul><li>from protocol aggregate; </li></ul></ul></ul><ul><ul><ul><li>then accept; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group BGP-setup { </li></ul></ul></ul><ul><ul><ul><li>type external; </li></ul></ul></ul><ul><ul><ul><li>export adv-summary; </li></ul></ul></ul><ul><ul><ul><li>peer-as 100; </li></ul></ul></ul><ul><ul><ul><li>neighbor 100.1.1.2; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>
    75. 75. Configuration <ul><li>Advertise the routing entries in other protocol </li></ul><ul><ul><li> [policy-options] </li></ul></ul><ul><ul><ul><li>policy-statement adv-ospf { </li></ul></ul></ul><ul><ul><ul><li>from protocol ospf; </li></ul></ul></ul><ul><ul><ul><li>then accept; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group BGP-setup { </li></ul></ul></ul><ul><ul><ul><li>type external; </li></ul></ul></ul><ul><ul><ul><li>export adv-ospf; </li></ul></ul></ul><ul><ul><ul><li>peer-as 100; </li></ul></ul></ul><ul><ul><ul><li>neighbor 100.1.1.2; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>
    76. 76. Summary <ul><ul><li>BGP concepts </li></ul></ul><ul><ul><li>BGP Operation </li></ul></ul><ul><ul><li>Route Control </li></ul></ul><ul><ul><li>Configuration </li></ul></ul><ul><ul><li>Trouble-shooting </li></ul></ul><ul><ul><li>Juniper vs. Cisco </li></ul></ul>
    77. 77. Trouble-shooting <ul><li>Checking the BGP neighbor status </li></ul><ul><ul><li>root@router> show bgp summary </li></ul></ul><ul><ul><li>Groups: 1 Peers: 1 Down Peers: 0 </li></ul></ul><ul><ul><li>Table Tot Paths Act Paths Suppressed History Damp State Pending </li></ul></ul><ul><ul><li>inet.0 0 0 0 0 0 0 </li></ul></ul><ul><ul><li>inet.2 0 0 0 0 0 0 </li></ul></ul><ul><ul><li>Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Damped... </li></ul></ul><ul><ul><li>100.1.1.2 65001 275 279 0 0 02:17:30 0/0/0 0/0/0 </li></ul></ul>
    78. 78. Trouble-shooting <ul><li>Neighbor can’t establish </li></ul><ul><ul><li>Groups: 1 Peers: 1 Down Peers: 1 </li></ul></ul><ul><ul><li>Table Tot Paths Act Paths Suppressed History Damp State Pending </li></ul></ul><ul><ul><li>inet.0 0 0 0 0 0 0 </li></ul></ul><ul><ul><li>inet.2 0 0 0 0 0 0 </li></ul></ul><ul><ul><li>Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Damped... </li></ul></ul><ul><ul><li>100.1.1.2 65001 0 4 0 0 00:00:57 Active </li></ul></ul><ul><li>Enable traceoption </li></ul><ul><ul><li>[protocol bgp] </li></ul></ul><ul><ul><li>traceoptions { </li></ul></ul><ul><ul><li>file bgp-trace; </li></ul></ul><ul><ul><li>flag packets detail; </li></ul></ul><ul><ul><li>flag open detail; </li></ul></ul><ul><ul><li>} </li></ul></ul>
    79. 79. Trouble-shooting <ul><li>Monitoring </li></ul><ul><li>root@router> monitor start bgp-trace </li></ul><ul><ul><li>*** bgp-trace *** </li></ul></ul><ul><ul><li>Nov 10 14:53:50 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 BGP RECV 100.1.1.2+1113 -> 100.1.1.1+179 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 BGP RECV message type 1 (Open) length 45 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 BGP RECV version 4 as 65001 holdtime 90 id 192.168.1.2 parmlen 16 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 MP capability AFI=1, SAFI=1 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 Refresh capability, code=128 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 Refresh capability, code=2 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 bgp_pp_recv: dropping 100.1.1.2 (External AS 65001), connection collision prefers 100.1.1.2+1113 (proto) </li></ul></ul><ul><ul><li>Nov 10 14:53:50 bgp_send: sending 45 bytes to 100.1.1.2 (External AS 65001) </li></ul></ul><ul><ul><li>Nov 10 14:53:50 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 BGP SEND 100.1.1.1+179 -> 100.1.1.2+1113 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 BGP SEND message type 1 (Open) length 45 </li></ul></ul>
    80. 80. Trouble-shooting <ul><li>Monitoring </li></ul><ul><ul><li>Nov 10 14:53:50 BGP SEND version 4 as 65000 holdtime 90 id 192.168.1.1 parmlen 16 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 MP capability AFI=1, SAFI=1 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 Refresh capability, code=128 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 Refresh capability, code=2 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 bgp_send: sending 19 bytes to 100.1.1.2 (External AS 65001) </li></ul></ul><ul><ul><li>Nov 10 14:53:50 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 BGP SEND 100.1.1.1+179 -> 100.1.1.2+1113 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 BGP SEND message type 4 (KeepAlive) length 19 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 BGP RECV 100.1.1.2+1113 -> 100.1.1.1+179 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 BGP RECV message type 3 (Notification) length 21 </li></ul></ul><ul><ul><li>Nov 10 14:53:50 BGP RECV Notification code 2 (Open Message Error) subcode 2 (bad peer AS number) </li></ul></ul><ul><ul><li>root@router> monitor stop bgp-trace </li></ul></ul>
    81. 81. Trouble-shooting <ul><li>Configuration </li></ul><ul><ul><li>Near end </li></ul></ul><ul><ul><li>[routing-options] </li></ul></ul><ul><ul><li>autonomous-system 65000 ; </li></ul></ul><ul><ul><li>confederation 200 members [ 65000 65001 65002 ]; </li></ul></ul><ul><ul><li>[protocol bgp] </li></ul></ul><ul><ul><li>group bgp-demo { </li></ul></ul><ul><ul><li> type external; </li></ul></ul><ul><ul><li> peer-as 65001; </li></ul></ul><ul><ul><li> neighbor 100.1.1.2; </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>Far End </li></ul></ul><ul><ul><li>[routing-options] </li></ul></ul><ul><ul><li>autonomous-system 65001; </li></ul></ul><ul><ul><li>confederation 200 members [ 65000 65001 65002 ]; </li></ul></ul><ul><ul><li>[protocol bgp] </li></ul></ul><ul><ul><li>admin@Jessie# show protocols bgp </li></ul></ul><ul><ul><li>group testing { </li></ul></ul><ul><ul><li>type external; </li></ul></ul><ul><ul><li>peer-as 65002 ; </li></ul></ul><ul><ul><li>neighbor 100.1.1.1; </li></ul></ul><ul><ul><li>} </li></ul></ul>
    82. 82. Trouble-shooting <ul><li>Logged result: </li></ul><ul><ul><li>root@router> file show /var/log/? </li></ul></ul><ul><ul><li>Possible completions: </li></ul></ul><ul><ul><li><[Enter]> Execute this command </li></ul></ul><ul><ul><li><filename> Filename to display </li></ul></ul><ul><ul><li>/var/log/bgp-trace Size: 2459, Last changed: Nov 7 18:41:08 </li></ul></ul><ul><li>Stop logging: </li></ul><ul><ul><li>root@router# delete protocols bgp traceoptions </li></ul></ul><ul><ul><li>root@router# commit </li></ul></ul>
    83. 83. Trouble-shooting <ul><li>Other problem </li></ul><ul><ul><li>Local-address definition (cisco’s update-source) </li></ul></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group <group> { </li></ul></ul></ul><ul><ul><ul><li>local-address <local IP address>; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><li>Peer AS mis-configured </li></ul></ul><ul><ul><li>Peer address unreachable </li></ul></ul><ul><ul><li>Mulithop issue for EBGP </li></ul></ul><ul><ul><ul><li>[protocol bgp] </li></ul></ul></ul><ul><ul><ul><li>group <group> { </li></ul></ul></ul><ul><ul><ul><li>multihop; </li></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul>
    84. 84. Trouble-shooting <ul><ul><li>Problem Report </li></ul></ul><ul><ul><ul><li>“ show bgp summary” </li></ul></ul></ul><ul><ul><ul><li>“ show bgp neighbor” </li></ul></ul></ul><ul><ul><ul><li>“ show bgp group” </li></ul></ul></ul><ul><ul><ul><li>“ show version” </li></ul></ul></ul><ul><ul><ul><li>“ show configuration” </li></ul></ul></ul>
    85. 85. Summary <ul><ul><li>BGP concepts </li></ul></ul><ul><ul><li>BGP Operation </li></ul></ul><ul><ul><li>Route Control </li></ul></ul><ul><ul><li>Configuration </li></ul></ul><ul><ul><li>Trouble-shooting </li></ul></ul><ul><ul><li>Juniper vs. Cisco </li></ul></ul>
    86. 86. Presentation and command difference between Juniper and Cisco <ul><ul><li>Juniper: </li></ul></ul><ul><ul><li>fxp1 { </li></ul></ul><ul><ul><li>unit 0 { </li></ul></ul><ul><ul><li>family inet { address 172.27.4.172/24; } </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>lo0 { </li></ul></ul><ul><ul><li>unit 0 { </li></ul></ul><ul><ul><li>family inet { address 192.168.1.3/32; } </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>routing-options { </li></ul></ul><ul><ul><li>autonomous-system 100; </li></ul></ul><ul><ul><li>} </li></ul></ul><ul><ul><li>group Cisco { </li></ul></ul><ul><ul><li>type external; </li></ul></ul><ul><ul><li>multihop; </li></ul></ul><ul><ul><li>local-address 192.168.1.3; </li></ul></ul><ul><ul><li>peer-as 200; </li></ul></ul><ul><ul><li>neighbor 192.168.1.254; </li></ul></ul><ul><ul><li>} </li></ul></ul>Cisco: interface Loopback0 ip address 192.168.1.254 255.255.255.255 ! interface Ethernet0 ip address 172.27.4.173 255.255.255.0 ! router bgp 200 neighbor 192.168.1.3 remote-as 100 neighbor 192.168.1.3 ebgp-multihop 255 neighbor 192.168.1.3 update-source Loopback0 !
    87. 87. Presentation and command difference between Juniper and Cisco <ul><ul><li>root@Juniper> show bgp summary </li></ul></ul><ul><ul><li>Groups: 1 Peers: 1 Down Peers: 0 </li></ul></ul><ul><ul><li>Table Tot Paths Act Paths Suppressed History Damp State Pending </li></ul></ul><ul><ul><li>inet.0 0 0 0 0 0 0 </li></ul></ul><ul><ul><li>inet.2 0 0 0 0 0 0 </li></ul></ul><ul><ul><li>Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Damped... </li></ul></ul><ul><ul><li>192.168.1.254 200 12 14 0 0 00:05:46 0/0/0 0/0/0 </li></ul></ul>Cisco#show ip bgp summary BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.1.3 4 100 14 14 1 0 0 00:05:39 0
    88. 88. Presentation and command difference between Juniper and Cisco <ul><ul><li>root@Juniper> show bgp neighbor </li></ul></ul><ul><ul><li>Peer: 192.168.1.254+179 AS 200 Local: 192.168.1.3+3844 AS 100 </li></ul></ul><ul><ul><li>Type: External State: Established Flags: <> </li></ul></ul><ul><ul><li>Last State: OpenConfirm Last Event: RecvKeepAlive </li></ul></ul><ul><ul><li>Last Error: None </li></ul></ul><ul><ul><li>Options: <Multihop Preference LocalAddress HoldTime PeerAS Refresh> </li></ul></ul><ul><ul><li>Local Address: 192.168.1.3 Holdtime: 90 Preference: 170 </li></ul></ul><ul><ul><li>Number of flaps: 0 </li></ul></ul><ul><ul><li>Peer ID: 192.168.1.254 Local ID: 192.168.1.3 Active Holdtime: 90 </li></ul></ul><ul><ul><li>Keepalive Interval: 30 </li></ul></ul><ul><ul><li>NLRI advertised by peer: </li></ul></ul><ul><ul><li>NLRI for this session: inet-unicast </li></ul></ul><ul><ul><li>Peer does not support Refresh capability </li></ul></ul>
    89. 89. Presentation and command difference between Juniper and Cisco <ul><ul><li>Table inet.0 Bit: 10000 </li></ul></ul><ul><ul><li>Active Prefixes: 0 </li></ul></ul><ul><ul><li>Received Prefixes: 0 </li></ul></ul><ul><ul><li>Suppressed due to damping: 0 </li></ul></ul><ul><ul><li>Table inet.2 Bit: 20000 </li></ul></ul><ul><ul><li>Active Prefixes: 0 </li></ul></ul><ul><ul><li>Received Prefixes: 0 </li></ul></ul><ul><ul><li>Suppressed due to damping: 0 </li></ul></ul><ul><ul><li>Last traffic (seconds): Received 3 Sent 3 Checked 3 </li></ul></ul><ul><ul><li>Input messages: Total 16 Updates 0 Refreshes 0 Octets 304 </li></ul></ul><ul><ul><li>Output messages: Total 18 Updates 0 Refreshes 0 Octets 368 </li></ul></ul><ul><ul><li>Output Queue[0]: 0 </li></ul></ul><ul><ul><li>Output Queue[1]: 0 </li></ul></ul><ul><ul><li>Route Queue Timer: unset Route Queue: empty </li></ul></ul>
    90. 90. Presentation and command difference between Juniper and Cisco <ul><ul><li>Cisco#show ip bgp neighbors </li></ul></ul><ul><ul><li>BGP neighbor is 192.168.1.3, remote AS 100, external link </li></ul></ul><ul><ul><li>Index 1, Offset 0, Mask 0x2 </li></ul></ul><ul><ul><li>BGP version 4, remote router ID 192.168.1.3 </li></ul></ul><ul><ul><li>BGP state = Established, table version = 1, up for 00:08:45 </li></ul></ul><ul><ul><li>Last read 00:00:15, hold time is 90, keepalive interval is 30 seconds </li></ul></ul><ul><ul><li>Minimum time between advertisement runs is 30 seconds </li></ul></ul><ul><ul><li>Received 20 messages, 0 notifications, 0 in queue </li></ul></ul><ul><ul><li>Sent 20 messages, 0 notifications, 0 in queue </li></ul></ul><ul><ul><li>Connections established 1; dropped 0 </li></ul></ul><ul><ul><li>Last reset never </li></ul></ul><ul><ul><li>No. of prefix received 0 </li></ul></ul><ul><ul><li>External BGP neighbor may be up to 255 hops away. </li></ul></ul><ul><ul><li>Connection state is ESTAB, I/O status: 1, unread input bytes: 0 </li></ul></ul><ul><ul><li>Local host: 192.168.1.254, Local port: 179 </li></ul></ul><ul><ul><li>Foreign host: 192.168.1.3, Foreign port: 3844 </li></ul></ul><ul><ul><li>Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes) </li></ul></ul>
    91. 91. Presentation and command difference between Juniper and Cisco <ul><ul><li>Event Timers (current time is 0x2590F0): </li></ul></ul><ul><ul><li>Timer Starts Wakeups Next </li></ul></ul><ul><ul><li>Retrans 21 0 0x0 </li></ul></ul><ul><ul><li>TimeWait 0 0 0x0 </li></ul></ul><ul><ul><li>AckHold 20 17 0x0 </li></ul></ul><ul><ul><li>SendWnd 0 0 0x0 </li></ul></ul><ul><ul><li>KeepAlive 0 0 0x0 </li></ul></ul><ul><ul><li>GiveUp 0 0 0x0 </li></ul></ul><ul><ul><li>PmtuAger 0 0 0x0 </li></ul></ul><ul><ul><li>DeadWait 0 0 0x0 </li></ul></ul><ul><ul><li>iss: 401687383 snduna: 401687774 sndnxt: 401687774 sndwnd: 16384 </li></ul></ul><ul><ul><li>irs: 486200570 rcvnxt: 486200977 rcvwnd: 15978 delrcvwnd: 406 </li></ul></ul><ul><ul><li>SRTT: 342 ms, RTTO: 1337 ms, RTV: 326 ms, KRTT: 0 ms </li></ul></ul><ul><ul><li>minRTT: 4 ms, maxRTT: 300 ms, ACK hold: 200 ms </li></ul></ul><ul><ul><li>Flags: passive open, nagle, gen tcbs </li></ul></ul><ul><ul><li>Datagrams (max data segment is 556 bytes): </li></ul></ul><ul><ul><li>Rcvd: 25 (out of order: 0), with data: 20, total data bytes: 406 </li></ul></ul><ul><ul><li>Sent: 38 (retransmit: 0), with data: 20, total data bytes: 390 </li></ul></ul>
    92. 92. Presentation and command difference between Juniper and Cisco Juniper no synchronization ( Default behavior ) set policy-options damping cisco set routing-options confederation members set protocols bgp group Cisco cluster show bgp neighbor show bgp summary show route aspath-regex &quot;200&quot; Cisco no synchronization bgp damping bgp confederation bgp cluster-id show ip bgp neighbor show ip bgp summary show ip bgp regexp ^200$
    93. 93. http://www.juniper.net Thank you!

    ×