Bsci20 S07 L03

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Bsci20 S07 L03 - Presentation Transcript

    1. © 2003, Cisco Systems, Inc. All rights reserved.
    2. Building Scalable Cisco Internetworks (BSCI) Version 2.0 Instructor Name
    3. Configuring Basic Border Gateway Protocol © 2003, Cisco Systems, Inc. All rights reserved.
    4. Basic Border Gateway Protocol Operations © 2003, Cisco Systems, Inc. All rights reserved.
    5. Objectives
      • Upon completing this lesson, you will be able to:
        • Describe basic Border Gateway Protocol operations
        • Identify Border Gateway Protocol neighbor states
        • Use Border Gateway Protocol show, debug, and clear commands
    6. BGP Commands router bgp autonomous-system Router(config)#
      • This command, with no subcommands, does not activate BGP.
      • Only one instance of BGP can be configured on the router at a single time.
      • The autonomous system number identifies the autonomous system to which the router belongs.
      • The autonomous system number in this command is compared to the autonomous system numbers listed in neighbor statements to determine if the neighbor is an internal or external neighbor.
    7. BGP neighbor Command neighbor { ip-address | peer-group-name} remote-as autonomous-system Router(config-router)#
      • The neighbor command activates a BGP session with this neighbor.
      • The term remote-as shows what AS this neighbor is in. This AS number is used to determine if the neighbor is internal or external.
      • This command is used for both external and internal neighbors.
      • The IP address specified is the destination address of BGP packets going to this neighbor.
      • This router must have an IP pathway to reach this neighbor before it can set up a BGP relationship.
    8. BGP Synchronization and Shutdown Commands neighbor { ip-address | peer-group-name } shutdown Router(config-router)# no neighbor { ip-address | peer-group-name } shutdown Router(config-router)#
      • Administratively brings down a BGP neighbor
      • Used for maintenance and policy changes to prevent route flapping
      • Re-enables a BGP neighbor that has been administratively shut down
    9. Example: BGP neighbor Command
    10. BGP Issues with Source IP Address
      • When creating a BGP packet, the neighbor statement will be the destination IP address and the outbound interface will be the source IP address.
      • When a BGP packet is received for a new BGP session, the source address of the packet is compared to the list of neighbor statements.
          • If a match is found, a relationship is established.
          • If no match is found, the packet is ignored.
      • Make sure the source IP address matches the address that the other router has in its neighbor statement.
    11. IBGP Peering Issue
    12. BGP Neighbor Update Source Address neighbor { ip-address | peer-group-name } update-source interface-type interface-number Router(config-router)#
      • This command allows the BGP process to use the IP address of a specified interface as the source IP address of all BGP updates to that neighbor.
      • A loopback interface is usually used, as it will be available as long as the router is operational.
      • The IP address used in this command will be the destination IP address of all BGP updates and should be the loopback interface of the other router.
      • The update-source command is normally used only with IBGP neighbors.
      • The address of an EBGP neighbor must be directly connected by default. The loopback of an EBGP neighbor is not directly connected.
    13. Example: BGP Using Loopback Addresses
    14. Example: ebgp-multihop Command
    15. Next-Hop Behavior
      • BGP is an AS-by-AS routing protocol, not a router-by-router routing protocol.
      • In BGP, the next hop does not mean the next router, it means the IP address to reach the next AS.
        • Router A advertises network 172.16.0.0 to router B in EBGP, with a next hop of 10.10.10.3.
        • Router B advertises 172.16.0.0 in IBGP to router C, keeping 10.10.10.3 as the next-hop address.
    16. Next Hop on a Multiaccess Network
      • The following takes place in a multiaccess network:
      • Router B advertises network 172.30.0.0 to router A in EBGP with a next hop of 10.10.10.2, not 10.10.10.1. This avoids an unnecessary hop.
      • BGP is being efficient by informing AS 64520 of the best entry point into AS 65000 for network 172.30.0.0.
      • Router B in AS 65000 also advertises to AS 64520 that the best entry point for each network in AS 64600 is the next hop of router C because that is the best pathway to transit AS 65000 to AS 64600 from AS 64520.
    17. The next-hop-self Command neighbor { ip-address | peer-group-name } next-hop-self Router(config-router)#
        • Forces all updates for this neighbor to be advertised with this router as the next hop.
        • The IP address used for the next-hop-self will be the same as the source IP address of the BGP packet.
    18. Example: next-hop-self Configuration
    19. Peer Groups neighbor [ peer-group-name ] peer-group Router(config-router)#
      • Creates peer group
      neighbor [ ip-address ] peer-group [ peer-group-name ] Router(config-router)#
        • Defines a template with parameters set for a group of neighbors instead of individually
        • Useful when many neighbors have the same outbound policies
        • Members can have a different inbound policy
        • Updates generated once per peer group
        • Simplifies configuration
    20. Example: Peer Group Router C Using a Peer Group Router C Without a Peer Group router bgp 65100 neighbor 192.168.24.1 remote-as 65100 neighbor 192.168.24.1 update-source loopback 0 neighbor 192.168.24.1 next-hop-self neighbor 198.101.24.1 distribute-list 20 out neighbor 192.168.25.1 remote-as 65100 neighbor 192.168.25.1 update-source loopback 0 neighbor 192.168.25.1 next-hop-self neighbor 198.101.25.1 distribute-list 20 out neighbor 192.168.26.1 remote-as 65100 neighbor 192.168.26.1 update-source loopback 0 neighbor 192.168.26.1 next-hop-self neighbor 198.101.26.1 distribute-list 20 out router bgp 65100 neighbor internal peer-group neighbor internal remote-as 65100 neighbor internal update-source loopback 0 neighbor internal next-hop-self neighbor internal distribute-list 20 out neighbor 192.168.24.1 peer-group internal neighbor 192.168.25.1 peer-group internal neighbor 192.168.26.1 peer-group internal
    21. BGP network Command network network-number [mask network-mask ] Router(config-router)#
      • This command tells BGP what network to advertise, not how to advertise the network.
      • The command does not activate the protocol on an interface.
      • Without a mask option, it advertises classful networks. If a subnet of the classful network exists in a routing table, the classful address is announced if autosummary is enabled. Autosummary is enabled by default.
      • BGP looks for an exact match in the local routing table before announcing this route.
    22. BGP Synchronization
      • Synchronization rule: Do not use or advertise to an external neighbor a route learned by IBGP until a matching route has been learned from an IGP.
        • Ensures consistency of information throughout the AS
        • Avoids black holes within the AS
        • Safe to turn off if all routers in the AS are running full-mesh IBGP
      no synchronization Router(config-router)#
      • Disables BGP synchronization so that a router will advertise routes in BGP without learning them in IGP
    23. Example: BGP Synchronization
      • If synchronization is on (the default), then:
        • Routers A, C, and D would not use or advertise the route to 172.16.0.0 until they receive the matching route via an IGP.
        • Router E would not hear about 172.16.0.0.
      • If synchronization is off, then:
        • Routers A, C, and D would use and advertise the route they receive via IBGP; router E would hear about 172.16.0.0.
        • If router E sends traffic for 172.16.0.0, routers A, C, and D would route the packets correctly to router B.
    24. BGP Example
    25. BGP Example Configuration 1. RouterB(config)# router bgp 65000 2. RouterB(config-router)# neighbor 10.1.1.2 remote-as 64520 3. RouterB(config-router)# neighbor 192.168.2.2 remote-as 65000 4. RouterB(config-router)# neighbor 192.168.2.2 update-source loopback 0 5. RouterB(config-router)# neighbor 192.168.2.2 next-hop-self 6. RouterB(config-router)# network 172.16.10.0 mask 255.255.255.0 7. RouterB(config-router)# network 192.168.1.0 8. RouterB(config-router)# network 192.168.3.0 9. RouterB(config-router)# no synchronization
    26. BGP States
      • When establishing a BGP session, BGP goes through the following steps:
      • Idle: Router is searching routing table to see if a route exists to reach the neighbor.
      • Connect: Router found route and has completed three-way TCP handshake.
      • Open sent: Open message sent with the parameters for the BGP session.
      • Open confirm: Router received agreement on the parameters for establishing session.
      • Established: Peering is established; routing begins.
    27. BGP Session Establishment debug ip bgp events BGP events debugging is on RouterA# BGP : 172.16.1.2 passive open BGP : 172.16.1.2 went from idle to connect BGP : 172.16.1.2 open rcvd, version 4 BGP : 172.16.1.2 went from connect to open sent BGP : 172.16.1.2 sending open, version 4 BGP : 172.16.1.2 went from open sent to open confirm BGP : Scanning routing tables BGP : 172.16.1.2 went from open confirm to established The best way to see session setup is with the following command: Router#
    28. BGP Idle and Established States
      • Idle: The router in this state cannot find the address of the neighbor in the routing table. Check for an IGP problem. Is the neighbor announcing the route?
      • Established: The established state is the proper state for BGP operations. In the show ip bgp summary command, if the state column is blank or has a number, then the established state is in place. The number is how many routes have been learned from this neighbor.
    29. BGP Active State Troubleshooting
      • Active: The router has sent out an open packet and is waiting for a response. The state may cycle between active and idle. The neighbor may not know how to get back to this router because of the following reasons:
        • Neighbor peering with the wrong address
        • Neighbor does not have neighbor statement for this router
        • Neighbor does not have a route to the source IP address of the BGP open packet generated by this router
    30. BGP Peering RouterA# show ip bgp summary BGP table version is 23, main routing table version 23 10 network entries and 11 paths using 1242 bytes of memory 4 BGP path attribute entries using 380 bytes of memory BGP activity 23/13 prefixes, 38/27 paths 0 prefixes revised. Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.1.1.100 4 65200 211 211 13 0 0 00:01:53 5 192.168.1.18 4 65101 214 226 23 0 0 00:00:13 1 192.168.1.34 4 65101 214 226 23 0 0 00:00:09 1 192.168.1.50 4 65101 214 225 23 0 0 00:00:06 3
    31. show ip bgp Command RouterA# show ip bgp BGP table version is 23, local router ID is 192.168.1.49 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 *> 10.0.0.0 10.1.1.100 0 0 65200 i *> 172.16.10.0/24 10.1.1.100 0 0 65200 i *> 172.16.11.0/24 10.1.1.100 0 0 65200 i *>i172.26.1.16/28 192.168.1.50 0 100 0 i *>i172.26.1.32/28 192.168.1.50 0 100 0 i *>i172.26.1.48/28 192.168.1.50 0 100 0 i *> 192.168.1.0 0.0.0.0 0 32768 i *> 192.168.2.0 10.1.1.100 0 65200 65102 i *> 192.168.2.64/28 10.1.1.100 0 65200 65102 i * i192.168.101.0 192.168.1.34 0 100 0 i *>i 192.168.1.18 0 100 0 i The table displays networks from lowest network to highest.
    32. Clearing the BGP Session
      • When policies such as access lists, timers, or attributes are changed, the BGP session must be reset.
      • The change takes effect immediately, and the next time a prefix or pathway is advertised or received, the new policy will be used. It can take a long time for the policy to be applied to all networks.
      • The session should be reset to ensure the policy is immediately applied to all affected prefixes and pathways.
    33. Resetting BGP Sessions clear ip bgp * router#
      • Resets all BGP connections with this router
      • Entire BGP forwarding table is discarded
      • BGP session transitions from established to idle; everything must be relearned
      clear ip bgp [ ip-address ] router#
      • Resets only a single neighbor
      • BGP session transitions from established to idle; everything from this neighbor must be relearned
      • Better than the clear ip bgp *
    34. The clear ip bgp soft out Option clear ip bgp { * | address } [soft out] Router#
      • Routes learned from this neighbor are not lost.
      • This router resends all BGP information to the neighbor without resetting the connection.
      • The connection remains established.
      • This option is highly recommended when changing outbound policy.
      • The soft out option does not help if changing inbound policy.
    35. The clear ip bgp soft in Option clear ip bgp { * | address } [soft in] Router#
      • Routes advertised to this neighbor are not withdrawn.
      • This router stores all updates sent from this neighbor so new inbound policies can be evaluated without resetting the BGP session.
      • The connection remains established.
      neighbor [ ip-address ] soft-reconfiguration inbound Router(config-router)#
      • A router BGP subcommand that notifies this router to store all updates from this neighbor in case the inbound policy is changed.
      • The command is memory-intensive.
    36. The show ip bgp neighbors Command RouterA# show ip bgp neighbors BGP neighbor is 10.1.1.1, remote AS 65000, external link Index 1, Offset 0, Mask 0x2 BGP version 4, remote router ID 172.16.10.1 BGP state = Established , table version = 5, up for 00:10:47 Last read 00:00:48, hold time is 180, keepalive interval is 60 seconds Minimum time between advertisement runs is 30 seconds Received 16 messages, 0 notifications, 0 in queue Sent 15 messages, 1 notifications, 0 in queue Prefix advertised 1, suppressed 0, withdrawn 0 Connections established 1; dropped 0 Last reset 00:16:35, due to Peer closed the session 2 accepted prefixes consume 64 bytes 0 history paths consume 0 bytes --More--
    37. The debug ip bgp Command routerA# debug ip bgp updates BGP updates debugging is on RTRA# clear ip bgp * 3w5d: BGP: 10.1.1.1 computing updates, neighbor version 0, table version 1, starting at 0.0.0.0 3w5d: BGP: 10.1.1.1 update run completed, ran for 0ms, neighbor version 0, start version 1, throttled to 1, check point net 0.0.0.0 3w5d: BGP: 10.1.1.1 rcv UPDATE w/ attr: nexthop 10.1.1.1, origin i, aggregated by 65000 172.16.10.1, path 65000 3w5d: BGP: 10.1.1.1 rcv UPDATE about 172.16.0.0/16 3w5d: BGP: nettable_walker 172.16.0.0/16 calling revise_route 3w5d: BGP: revise route installing 172.16.0.0/16 -> 10.1.1.1 3w5d: BGP: 10.1.1.1 rcv UPDATE w/ attr: nexthop 10.1.1.1, origin i, metric 0, path 65000 3w5d: BGP: 10.1.1.1 rcv UPDATE about 192.168.1.0/24 3w5d: BGP: nettable_walker 192.168.1.0/24 calling revise_route 3w5d: BGP: revise route installing 192.168.1.0/24 -> 10.1.1.1
    38. Summary
      • This lesson presented these key points:
        • BGP is configured with the following basic BGP commands:
          • router bgp autonomous-system
          • neighbor ip-address remote-as autonomous-system
          • network network-number
        • The show and debug commands are used to identify the states of a BGP peering relationship and troubleshoot the BGP session.
        • The clear ip bgp commands are used to reset BGP sessions.
    39.  
    SlideShare Zeitgeist 2009

    + Febrian SetiadiFebrian Setiadi Nominate

    custom

    92 views, 0 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 92
      • 92 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 10
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories