BSCI Module 6 BGP. Configuring Basic BGP. BSCI Module 6

Size: px
Start display at page:

Download "BSCI Module 6 BGP. Configuring Basic BGP. BSCI Module 6"

Transcription

1 Configuring Basic BGP BSCI Module 6 BSCI Module Cisco Systems, Inc. All rights reserved. Cisco Public 1 BSCI Module 6 BGP An AS is a collection of networks under a single technical administration. IGPs operate within an AS. BGP is used between autonomous systems. Exchange of loop-free routing information is guaranteed. 2

2 BSCI Module 6 BGP An AS is a group of routers that share similar routing policies and operate within a single administrative domain. An AS can be a collection of routers running a single IGP, or it can be a collection of routers running different protocols all belonging to one organization. In either case, the outside world views the entire Autonomous System as a single entity. 3 BSCI Module 6 BGP Internet Assigned Numbers Authority (IANA) is enforcing a policy whereby organizations that connect to a single provider and share the provider's routing policies use an AS number from the private pool, to These private AS numbers appear only within the provider's network and are replaced by the provider's registered number upon exiting the network. 4

3 Using BGP to Connect to the Internet 5 Single-Homed AS When an AS has only 1 exit point to outside Often referred to as stub networks, or stubs Can rely on a default route for all traffic to nonlocal networks Methods to advertise the network ISP has a static entry and advertises it to Internet IGP Both the provider and the customer use an IGP to share information regarding the customer's networks EGP, such as BGP. But it s not normally needed in this situation ip route

4 Multi-homed Autonomous Systems Same ISP An AS is a multi-homed system if it has more than one exit point to outside networks Provides for redundancy An AS connected to the Internet can be multi-homed to: A single provider (AS) Multiple providers (ASs) 7 Example: Default Routes from All Providers 8

5 Default Routes from All Providers and Partial Table 9 Multi-homed Non-transit Autonomous Systems Multi-homed non-transit ASs Don t allow transit traffic to pass through it Don t really need to run BGP4 with their providers, although it is recommended, and often required by ISPs BGP4 offers increased control of route propagation and filtering X 10

6 Multi-homed Transit Autonomous Systems A multi-homed transit system Has more than one connection to the outside world Can be used for transit traffic by other ASs Can run BGP inside an AS IBGP Transit traffic any traffic originating from outside sources bound for outside destinations EBGP External BGP: BGP between ASs 11 When not to use BGP Do not use BGP if : There s a single connection to Internet or another AS No concern for routing policy or routing selection A limited understanding of route filtering and BGP path selection process A lack of memory or processing power on your routers to handle constant BGP updates Low BW between AS s Use BGP if : There are different policy requirements than the ISP The AS has multiple connections to other AS s and they are active 12

7 BGP Basics Functions: Exchange routing information between AS Guarantee the selection of a loop free path Supports CIDR and route aggregation BGP makes routing decisions based on network policies BGP constructs a graph of ASs based on the information between BGP neighbors BGP sees only a tree of autonomous systems PATH Connection between any two systems AS_PATH Sequence of AS numbers that forms a route 13 BGP Operation BGP updates use TCP on port 179 IP connectivity must exist between BGP peers TCP connections must be negotiated between them before updates can be exchanged When 2 routers establish a TCP-enabled BGP connection between each other They are called neighbors or peers First, they exchange their entire BGP routing tables After that, they exchange incremental, partial updates with only the information that has changed They contain route prefix, AS path, path attributes, withdrawn routes Each router running BGP is called a BGP speaker 14

8 BGP Terms 15 BGP Databases Neighbor table List of BGP neighbors BGP table (forwarding database) List of all networks learned from each neighbor Can contain multiple paths to destination networks Contains BGP attributes for each path IP routing table List of best paths to destination networks 16

9 BGP Message Types BGP defines the following message types: Open Includes holdtime and BGP router ID Keepalive Update Information for one path only (could be to multiple networks) Includes path attributes and networks Notification When error is detected BGP connection is closed after being sent 17 Peers = Neighbors A BGP peer, also known as a BGP neighbor, is a specific term that is used for BGP speakers that have established a neighbor relationship. Any two routers that have formed a TCP connection to exchange BGP routing information are called BGP peers or BGP neighbors. 18

10 External BGP When BGP is running between neighbors that belong to different autonomous systems, it is called EBGP. EBGP neighbors, by default, need to be directly connected. 19 Internal BGP When BGP is running between neighbors within the same AS, it is called IBGP. The neighbors do not have to be directly connected. 20

11 BGP Commands 21 BGP Commands Router(config)# router bgp autonomous-system This command just enters router configuration mode; subcommands must be entered in order to 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. 22

12 BGP neighbor remote-as Command Router(config-router)# neighbor {ip-address peer-group-name} remote-as autonomous-system The neighbor command activates a BGP session with this neighbor. The IP address that is specified is the destination address of BGP packets going to this neighbor. This router must have an IP path to reach this neighbor before it can set up a BGP relationship. The 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. 23 BGP neighbor shutdown Command Router(config-router)# neighbor {ip-address peer-group-name} shutdown Administratively brings down a BGP neighbor Used for maintenance and policy changes to prevent route flapping Router(config-router)# no neighbor {ip-address peer-group-name} shutdown Re-enables a BGP neighbor that has been administratively shut down 24

13 Example: BGP neighbor Command 25 BGP neighbor update-source Command Router(config-router)# neighbor {ip-address peer-group-name} update-source interface-type interface-number 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, because it will be available as long as the router is operational. The IP address used in the neighbor command on the other router will be the destination IP address of all BGP updates and should be the loopback interface of this router. The neighbor 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. 26

14 Example: BGP Using Loopback Addresses Without the update-source loopback 0 command, BGP routers can use only the closest IP interface to the peer 27 IBGP and EBGP EBGP RTA(config)#router bgp 100 RTA(config-router)#neighbor remote-as 200 RTB(config)#router bgp 200 RTB(config-router)#neighbor remote-as 100 IBGP RTB(config)#router bgp 200 RTB(config-router)#neighbor remote-as 200 RTB(config-router)#neighbor update-source loopback 0 RTC(config)#router bgp 200 RTC(config-router)#neighbor remote-as 200 RTC(config-router)#neighbor update-source loopback 0 28

15 BGP neighbor ebgp-multihop Command Router(config-router)# neighbor {ip-address peer-group-name} ebgp-multihop [ttl] This command increases the default of one hop for EBGP peers. It allows routes to the EBGP loopback address (which will have a hop count greater than 1). The neighbor ebgp multihop Command Parameters ip-address is the IP address of the BGP-speaking neighbor. peer-group-name is the Name of a BGP peer group. ttl (Optional) TTL in the range from 1 to 255 hops 29 Example: ebgp-multihop Command 30

16 EBGP multihop EBGP neighbors must be directly connected to establish an EBGP session EBGP multihop Cisco IOS option It allows RTW and RTU to be logically connected in an EBGP session, although RTV does not support BGP It is configured on each peer: R(config-router)#neighbor IP-address ebgp-multihop [hops] RTW(config)#router bgp 200 RTW(config-router)#neighbor remote-as 300 RTW(config-router)#neighbor ebgp-multihop 2 RTU(config)#router bgp 300 RTU(config-router)#neighbor remote-as 200 RTU(config-router)#neighbor ebgp-multihop 2 31 BGP network Command To begin configuring a BGP process: Router(config)#router bgp AS-number IOS permits only 1 BGP process to run at a time a router cannot belong to more than one AS Router(config-router)#network network-number [mask network-mask] network command IGPs determine the interfaces on which to send and receive updates, and which directly connected networks to advertise BGP it does not affect what interfaces BGP runs on. It tells the BGP process what locally learned networks to advertise Configuring just a network statement will not establish a BGP neighbor relationship These networks must also exist in the local router s routing table or they will not be sent out in updates 32

17 Verifying BGP Configuration If the router has not installed the BGP routes, you can use the show ip bgp command to verify that BGP has learned these routes If an expected BGP route does not appear in the BGP table, you can use the show ip bgp neighbors command to verify that your router has established a BGP connection with its neighbors 33 Example: BGP Peering RouterA# show ip bgp summary BGP router identifier , local AS number BGP table version is 124, main routing table version network entries using 1053 bytes of memory 22 path entries using 1144 bytes of memory 12/5 BGP path/bestpath attribute entries using 1488 bytes of memory 6 BGP AS-PATH entries using 144 bytes of memory 0 BGP route-map cache entries using 0 bytes of memory 0 BGP filter-list cache entries using 0 bytes of memory BGP using 3829 total bytes of memory BGP activity 58/49 prefixes, 72/50 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd :02: :01: :01:

18 BGP Peering BGP does not advertise routes learned via IBGP peers to other IBGP peers If they did, BGP routing inside the AS would present a dangerous potential for routing loops For IBGP routers to learn about all BGP routes inside the AS, they must connect to every other IBGP router in a logical full IBGP mesh Possible even if the routers aren t directly connected IBGP peers can connect to each other using TCP/IP 35 BGP States 36

19 BGP Message Types 4 BGP message types: Type 1: OPEN Used to establish connections with peers Includes fields for the BGP version, AS number, hold time, router ID Type 2: UPDATE Contains all the information that BGP uses to construct a loopfree picture of the internetwork Type 3: NOTIFICATION Used to inform the receiving router of errors Includes a field for error codes Type 4: KEEPALIVE Sent periodically between peers to maintain connections 37 BGP Finite State Machine BGP FSM includes six states: Idle Connect Active OpenSent Open Confirm Established 38

20 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 a route to the neighbor and has completed the 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. Alternatively, router goes into Active state if no response to open message Established: Peering is established; routing begins. 39 BGP Established and Idle 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 has a number, then the route is in the established state. The number is how many routes have been learned from this neighbor. 40

21 Example: show ip bgp neighbors Command RouterA#sh ip bgp neighbors BGP neighbor is , remote AS 64998, external link BGP version 4, remote router ID BGP state = Established, up for 00:19:10 Last read 00:00:10, last write 00:00:10, hold time is 180, keepalive interval is 60 seconds Neighbor capabilities: Route refresh: advertised and received(old & new) Address family IPv4 Unicast: advertised and received Message statistics: InQ depth is 0 OutQ depth is 0 Sent Rcvd Opens: 7 7 Notifications: 0 0 Updates: <output omitted> 41 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: 1. Neighbor does not have a route to the source IP address of the BGP open packet generated by this router 2. Neighbor peering with the wrong address 3. Neighbor does not have a neighbor statement for this router 4. AS number misconfiguration 42

22 Example: BGP Active State Troubleshooting AS number misconfiguration: At the router with the wrong remote-as number: %BGP-3-NOTIFICATION: sent to neighbor /2 (peer in wrong AS) 2 bytes FDE6 FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 002D 0104 FDE6 00B4 AC1F At the remote router: %BGP-3-NOTIFICATION: received from neighbor /2 (peer in wrong AS) 2 bytes FDE6 43 BGP Update Message The UPDATE messages contain all the information BGP uses to construct a loop-free picture of the internetwork Update messages advertises feasible routes, withdrawn routes, or both. The three basic components of an UPDATE message are: Network-Layer Reachability Information (NLRI) Path Attributes Withdrawn Routes 44

23 BGP Update Message Network-Layer Reachability Information (NLRI) One or more (Length, Prefix) tuples that advertise IP address prefixes and their lengths /19 Length = /19 Prefix = Path Attributes Provides the information that allows BGP to choose a shortest path, detect routing loops, and determine routing policy Withdrawn Routes Tuples describing destination that have become unreachable and are being withdrawn from service 45 Path Attributes Each route has its own set of defined attributes Path information, route preference, next-hop Administrators use them to enforce routing policy Filter routing information, prefer certain paths Every UPDATE message has a variable-length sequence of path attributes in the form <attribute type, attribute length, attribute value> Types of path attributes: Well-known mandatory Well-known discretionary Optional transitive Optional non-transitive 46

24 Path Attributes Well-known mandatory Attribute that must exist in the BGP UPDATE packet It must be recognized by all BGP implementations If a well-known attribute is missing, a notification error will be generated Example: AS_PATH attribute Well-known discretionary Attribute recognized by all BGP implementations May or may not be sent in the BGP UPDATE Example: LOCAL_PREF 47 Path Attributes Optional transitive Attribute that may or may not be recognized by all BGP implementations BGP should accept and advertise the attribute even if it isn t recognized Example: COMMUNITY Optional non-transitive An attribute that may or may not be recognized by all BGP implementations. Whether or not the receiving BGP router recognizes the attribute, it is non-transitive, and should not be passed along to other BGP peers Example: MULTI_EXIT_DISC 48

25 Path Attributes 49 BGP Attributes NEXT_HOP AS_PATH ATOMIC_AGGREGATE AGGREGATOR LOCAL_PREF Weight MULTI_EXIT_DISC (MED) ORIGIN COMMUNITY 50

26 NEXT_HOP Well-known mandatory attribute For EBGP sessions IP address of the neighbor that announced the route For IBGP sessions For routes originated inside the AS IP address of the neighbor that announced the route For routes injected into the AS via EBGP The next hop learned from EBGP is carried unaltered into IBGP The next hop is the IP address of the EBGP neighbor from which the route was learned When the route is advertised on a multiaccess medium, the next hop is usually the IP address of the interface of the router 51 NEXT_HOP on multiaccess media BGP speakers should always advertise the actual source of the route if the source is on the same multiaccess link as the speaker For example: RTA, RTB, and RTC share a common multi-access media. RTA and RTC are running EBGP; RTC and RTB are running OSPF RTC has learned /24 from RTB via OSPF and advertises it to RTA via EBGP Because RTA and RTB are running different protocols, it would seem logical that RTA would consider RTC ( ) as its next hop to reach /24, but this is incorrect. The correct behavior is for RTA to consider RTB ( ) as the next hop because RTB shares the same media with RTC 52

27 NEXT_HOP - NBMA RTA gets a BGP routing update about /24 from RTC and would try to use RTB ( ) as the next hop Routing will fail: no virtual circuit exists between RTA and RTB Cisco IOS solution: next-hop-self keyword It forces the router (RTC) to advertise /24 with itself as the next hop ( ) RTA would then direct its traffic to RTC to reach destination /24 R(config-router)#neighbor IP-address next-hop-self So: RTC(config-router)#neighbor next-hop-self /24 AS 300 RouterA / /30 AS 200 AS 400 RouterB /8 RouterC /8 RouterC#show ip bgp BGP table version is 8, local router ID is 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 *> i *> i *> i 54

28 AS_PATH Well-known mandatory attribute Sequence of AS numbers a route has traversed to reach a destination The AS that originates the route adds its own AS number when sending the route to its external BGP peers Thereafter, each AS that receives the route and passes it on to other BGP peers will prepend its own AS number Prepending add the AS to the beginning of the list AS_SEQUENCE AS_PATH list where the AS numbers are ordered sequentially EBGP BGP speakers prepend their AS numbers when advertising routing updates to other AS IBGP When the route is passed to a BGP speaker within the same AS, the AS_PATH information is left intact 55 AS_PATH BGP uses the AS_PATH attribute to ensure a loop-free topology In comparing different routes, given that all other attributes are identical, a shorter path is always preferred Each route that gets passed between BGP peers will carry a list of all AS numbers that the route has already been through If the route is advertised to the AS that originated it, that AS will see itself as part of the AS_PATH attribute list and will not accept the route 56

29 AS_PATH private AS numbers Private AS numbers cannot be leaked to the Internet because they are not unique Cisco uses remove-private-as, to strip private AS numbers out of the AS_PATH list before the routes get propagated to the Internet RTB(config)#router bgp 1 RTB(config-router)#neighbor remote-as RTB(config-router)#neighbor remote-as 7 RTB(config-router)#neighbor remove-private-as 57 ATOMIC_AGGREGATE Well-know discretionary attribute Set to either True or False If True, Alerts BGP routers that multiple destinations have been grouped into a single update The BGP router that sent the update had a more specific route to the destination, but did not send it. It warns receiving routers that the information is not necessarily the most complete route information available This attribute uses the aggregate-address command Router(config-router)#aggregate-address address mask [asset][summary-only] [suppress-map map-name][advertisemap map-name] [attribute-map map-name] An aggregate is created only if a more-specific route to the aggregate exists in the BGP table 58

30 Example: Aggregating Local Routes / / / / /22 (Aggregate) / /24 RTA RTB / /24 RTB router bgp 2 neighbor remote-as 1 network mask network mask {/24} network mask {/24} network mask {/24} aggregate-address AS 1 AS 2 By configuring all of them the aggregate will be sent in case one of the networks goes down RTA and RTB will have all n.0/24 routes in its BGP table (show ip bgp), and the the aggregate address of /22 59 AGGREGATOR Well-known discretionary attribute The router can also include its router ID and local AS number along with the supernet route if aggregation is configured It enables ISP administrators to determine which BGP router is responsible for a particular instance of aggregation 60

31 The LOCAL_PREF Attribute Well-known discretionary attribute Degree of preference given to a route to compare it with other routes for the same destination Higher LOCAL_PREF values are preferred There could be two or more exit points from the local AS to any given destination Local to the AS Exchanged between IBGP peers only Not advertised to EBGP peers Force BGP routers to prefer one exit point over another when routing to a particular destination To manipulate LOCAL_PREF: bgp default local-preference route map to set local preference 61 62

32 The LOCAL_PREF Attribute Router C router bgp 256 neighbor remote-as 100 neighbor remote-as 256 bgp default local-preference 150 Router D router bgp 256 neighbor remote-as 300 neighbor remote-as 256 bgp default local-preference 200 Result: all traffic in AS 256 destined for network is sent by RTD 63 The LOCAL_PREF Attribute Using a Route Map to set LOCAL_PREF on Router D specifically for updates regarding AS 300: Router D router bgp 256 neighbor remote-as 300 neighbor route-map SETLOCALIN in neighbor remote-as 256 ip as-path access-list 7 permit ^300$ route-map SETLOCALIN permit 10 match as-path 7 set local-preference 200 The local preference attribute of any update coming from AS 300 is set to 200 Instance 20 of the SETLOCALIN route map accepts all other routes 64

33 The WEIGHT attribute Cisco proprietary attribute Used in the path selection process when there is more than one route to the same destination Local to the router on which it is assigned, and it is not propagated in routing updates By default, the weight attribute is for paths that the router originates and zero for other paths Routes with a higher weight are preferred when there are multiple routes to the same destination The most important attribute when determining route preference /24 AS 300 RouterA / /30 AS 200 AS 400 RouterB /8 RouterC /8 RouterC#show ip bgp BGP table version is 8, local router ID is 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 *> i *> i *> i 66

34 The MED attribute MULTI_EXIT_DISC (Multi-Exit Discriminator) Optional non-transitive attribute Informs external neighbors about the preferred path into an AS that has multiple entry points A lower MED is preferred over a higher MED The MED attribute is exchanged between ASs A MED that comes into an AS does not leave the AS When BGP forwards the routing update to another AS, the MED is reset to zero The router compares MED attributes for paths from external neighbors that are in the same AS To compare MED attributes from neighbors in other ASs, configure bgp always-compare-med 67 The MED attribute Router A router bgp 100 neighbor remote-as 300 neighbor remote-as 300 neighbor remote-as 400 Router B router bgp 400 neighbor remote-as 100 neighbor route-map SETMEDOUT out neighbor remote-as 300 route-map SETMEDOUT permit 10 set metric 50 Router C router bgp 300 neighbor remote-as 100 neighbor route-map SETMEDOUT out neighbor remote-as 400 neighbor remote-as 300 route-map SETMEDOUT permit 10 set metric 120 Router D router bgp 300 neighbor remote-as 100 neighbor route map SETMEDOUT out neighbor remote-as 300 route-map SETMEDOUT permit 10 set metric 200 AS100 receives updates regarding from B, C, and D C & D are in AS300, B is in AS400 A can only compare the MED coming from C to the MED coming from D, even though B has the lowest MED value A will choose C as the best path for reaching network To force A to include updates for from B in the comparison, use the bgp alwayscompare-med command Now, Router A will choose Router B as the best next hop for reaching network

35 The ORIGIN attribute Well-known mandatory attribute Indicates the origin of the routing update IGP EGP The prefix is internal to the originating AS The prefix was learned via some EGP INCOMPLETE The prefix was learned by some other means, probably redistribution BGP prefers the path with the lowest origin type, where IGP is lower than EGP, and EGP is lower than INCOMPLETE 69 The BGP decision process 70

36 Resetting BGP Sessions 71 Clearing the BGP Session When policies such as access lists or attributes are changed, the change takes effect immediately, and the next time that a prefix or path 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. You must trigger an update to ensure that the policy is immediately applied to all affected prefixes and paths. Ways to trigger an update: Hard reset Soft reset Route refresh 72

37 Hard Reset of BGP Sessions Router# clear ip bgp * Resets all BGP connections with this router. Entire BGP forwarding table is discarded. BGP session makes the transition from established to idle; everything must be relearned. Router# clear ip bgp [neighbor-address] Resets only a single neighbor. BGP session makes the transition from established to idle; everything from this neighbor must be relearned. Less severe than clear ip bgp *. 73 Soft Reset Outbound Router# clear ip bgp {* neighbor-address} soft out 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 you are changing outbound policy. The soft out option does not help if you are changing inbound policy. 74

38 Inbound Soft Reset Router(config-router)# neighbor [ip-address] soft-reconfiguration inbound This command stores all updates from this neighbor in case the inbound policy is changed. The command is memory-intensive. Router# clear ip bgp {* neighbor-address} soft in Uses the stored information to generate new inbound updates. 75 Route Refresh: Dynamic Inbound Soft Reset Router# clear ip bgp {* neighbor-address} [soft in in] Routes advertised to this neighbor are not withdrawn. Does not store update information locally. The connection remains established. Introduced in IOS 12.0(2)S and 12.0(6)T 76

39 debug ip bgp updates Command RouterA#debug ip bgp updates Mobile router debugging is on for address family: IPv4 Unicast RouterA#clear ip bgp <output omitted> *Feb 24 11:06:41.309: %BGP-5-ADJCHANGE: neighbor Up *Feb 24 11:06:41.309: BGP(0): send UPDATE (format) /24, next , metric 0, path Local *Feb 24 11:06:41.309: BGP(0): send UPDATE (prepend, chgflags: 0x0) /24, next , metric 0, path Local *Feb 24 11:06:41.309: BGP(0): NEXT_HOP part 1 net /24, next *Feb 24 11:06:41.309: BGP(0): send UPDATE (format) /24, next , metric 0, path *Feb 24 11:06:41.309: BGP(0): NEXT_HOP part 1 net /24, next *Feb 24 11:06:41.309: BGP(0): send UPDATE (format) /24, next , metric 0, path <output omitted> *Feb 24 11:06:41.349: BGP(0): rcvd UPDATE w/ attr: nexthop , origin i, localpref 100, metric 0 *Feb 24 11:06:41.349: BGP(0): rcvd /24 *Feb 24 11:06:41.349: BGP(0): rcvd /24 77 BGP Peer Groups & Neighbors 78

40 Using a Peer Group Router(config-router)# neighbor peer-group-name peer-group This command creates a peer group. Router(config-router)# neighbor ip-address peer-group peer-group-name This command defines a template with parameters set for a group of neighbors instead of individually. This command is useful when many neighbors have the same outbound policies. Members can have a different inbound policy. Updates are generated once per peer group. Configuration is simplified. 79 Peer Groups 80

41 Example: Using a Peer Group 81 BGP Neighbor Authentication Router(config-router)# neighbor {ip-address peer-group-name} password string BGP authentication uses MD5. Configure a key (password); router generates a message digest, or hash, of the key and the message. Message digest is sent; key is not sent. Router generates and checks the MD5 digest of every segment sent on the TCP connection. Router authenticates the source of each routing update packet that it receives 82

42 Example: BGP Neighbor Authentication 83 Example: show ip bgp Command RouterA# show ip bgp BGP table version is 14, local router ID is Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path *> / i * i i *> / i *>i / i *> / i * i * i i *> / i * i * i i r> / i r i r i i *> / i <output omitted> Displays networks from lowest to highest. 84

43 BGP Local Preference Case Study 85 Local Preference Attribute Paths with highest local preference value are preferred: Local preference is used to advertise to IBGP neighbors about how to leave their AS. The local preference is sent to IBGP neighbors only (that is, within AS only). The local preference attribute is well-known and discretionary. Default value =

44 Changing BGP Local Preference For All Routes Local preference is used in these ways: Within an AS between IBGP speakers. To determine the best path to exit the AS to reach an outside network. Set to 100 by default; higher values are preferred. Router(config-router)# bgp default local-preference value Changes the default local preference value. All routes advertised to an IBGP neighbor have the local preference set to the value specified. 87 Local Preference Case Study What is the best path for router C to 65003, 65004, and 65005? 88

45 Router C BGP Table With Default Settings RouterC# show ip bgp BGP table version is 7, local router ID is Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path * i i *>i i *>i i * i i *>i i * i i By default, BGP selects the shortest AS path as the best (>) path. In AS 65001, the percent of traffic going to is 30%, is 20%, and is 10%. 50% of all traffic will go to the next hop of (AS 65005), and 10% of all traffic will go to the next hop of (AS 65002). Make traffic to select the next hop of to achieve load sharing where both external links get approximately 30% of the load. 89 Route Map for Router A Router A s configuration: router bgp neighbor remote-as neighbor remote-as neighbor remote-as update-source loopback0 neighbor remote-as update-source loopback0 neighbor remote-as neighbor route-map local_pref in! access-list 65 permit ! route-map local_pref permit 10 match ip address 65 set local-preference 400! route-map local_pref permit 20 90

46 Router C BGP Table with Local Preference Learned RouterC# show ip bgp BGP table version is 7, local router ID is Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path * i i *>i i *>i i * i i * i i *>i i Best (>) paths for networks /16 and /16 have not changed. Best (>) path for network has changed to a new next hop of due to the next hop of having a higher local preference, 400. In AS 65001, the percentage of traffic going to is 30%, is 20%, and is 10%. 30% of all traffic will go to the next hop of (AS 65005), and 30% of all traffic will go to the next hop of (AS 65002). 91 BGP MED 92

47 MED Attribute The paths with the lowest MED (also called the metric) value are the most desirable: MED is used to advertise to EBGP neighbors how to exit their AS to reach networks owned by this AS. The MED attribute is optional and nontransitive. 93 Changing BGP MED For All Routes MED is used when multiple paths exist between two autonomous systems. A lower MED value is preferred. The default setting for Cisco is MED = 0. The metric is optional, nontransitive attribute. Usually, MED is shared only between two autonomous systems that have multiple EBGP connections with each other. Router(config-router)# default-metric number MED is considered the metric of BGP. All routes that are advertised to an EBGP neighbor are set to the value specified using this command. 94

48 BGP Using Route Maps and the MED 95 Route Map for Router A Router A s Configuration: router bgp neighbor remote-as neighbor remote-as neighbor update-source loopback0 neighbor update-source loopback0 neighbor remote-as neighbor route-map med_65004 out! access-list 66 permit access-list 66 permit ! route-map med_65004 permit 10 match ip address 66 set metric 100! route-map med_65004 permit 100 set metric

49 Route Map for Router B Router B s Configuration: router bgp neighbor remote-as neighbor remote-as neighbor update-source loopback0 neighbor update-source loopback0 neighbor remote-as neighbor route-map med_65004 out! access-list 66 permit ! route-map med_65004 permit 10 match ip address 66 set metric 100! route-map med_65004 permit 100 set metric MED Learned by Router Z RouterZ# show ip bgp BGP table version is 7, local router ID is Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path *>i i * i i * i i *>i i * i i *>i i Examine the networks that have been learned from AS on Router Z in AS For all networks: Weight is equal (0); local preference is equal (100); routes are not originated in this AS; AS path is equal (65001); origin code is equal (i) has a lower metric (MED) through (100) than (200) has a lower metric (MED) through (100) than (200) has a lower metric (MED) through (100) than (200). 98

50 Route Selection Decision Process Consider only (synchronized) routes with no AS loops and a valid next hop, and then: Prefer highest weight (local to router). Prefer highest local preference (global within AS). Prefer route originated by the local router (next hop = ). Prefer shortest AS path. Prefer lowest origin code (IGP < EGP < incomplete). Prefer lowest MED (exchanged between autonomous systems). Prefer EBGP path over IBGP path. Prefer the path through the closest IGP neighbor. Prefer oldest route for EBGP paths. Prefer the path with the lowest neighbor BGP router ID. Prefer the path with the lowest neighbor IP address. 99 Filtering routes 100

51 Route filtering A BGP speaker can choose what routes to exchange with any of its BGP peers Incoming route advertisements influence outgoing traffic, and outgoing advertisements influence your incoming traffic Inbound filtering At the peer level, the BGP speaker is filtering routing updates coming from other peers At the protocol level, limits the routing updates being redistributed into BGP Outbound filtering At the peer level, filters the routing updates advertised from this BGP speaker towards other peers At the protocol level, limits the routing updates redistributed from BGP into an IGP 101 Manipulating a route 2 steps: Identify the network number and subnet mask of the route to which the policies are to be applied NLRI (prefix) It relies on route maps Implement the policies Filter prefixes Manipulate attributes 102

52 Distribute-list to filter updates To restrict the routing information that the router learns or advertises, filter routing updates Distribute-list command can be used To prevent an AS become a transit AS Distribute-list command can be used Router A router bgp 3 neighbor remote-as 3 neighbor remote-as 1 neighbor distribute-list 1 out access-list 1 deny access-list 1 permit IP prefix-list command ip prefix-list Alternative to access-lists with many BGP route filtering commands Advantages: Significant performance improvement in loading and route lookup of large lists Support for incremental updates A more user friendly command-line interface Greater flexibility R(config)#ip prefix-list list-name [seq seq-val] deny permit network/len [ge ge-val] [le le-val] Example: applied to outgoing EBGP updates to R(config)# ip prefix-list ELMO permit /16 R(config)# router bgp 100 R(config-router)# neighbor remote-as 200 R(config-router)# neighbor prefix-list ELMO out 104

53 IP prefix-list command ip prefix-list Optional parameters: ge and le Specify the range of the prefix length to be matched for prefixes that are more specific than the network/len value len < ge-value <= le-value <= 32 Ex: Accept a mask length of up to 24 bits in routes with the prefix /8, and to deny more specific routes RTA(config)#ip prefix-list GROVER permit /8 le 24 RTA(config)#ip prefix-list GROVER deny /8 ge /19 and /24 match the permit, but /27 doesn t All prefixes in /8 that have a mask length from 16 to 24 bits RTA(config)#ip prefix-list OSCAR permit /8 ge 16 le 24 Each prefix list entry is assigned a sequence number new entries can be inserted at any point in the list automatically generated in increments of five 105 Redundancy, Symmetry and Load Balancing Redundancy Achieved by providing multiple alternate paths Having multiple connections to one or more ASs Problem the more redundant links a network has, the more unpredictable the entrance and exit points become Alternate routes imply additional information in the routing tables Symmetry Solution default routing If traffic leaves the AS from a certain exit point and returns through the same point Choose a primary path and configure routing policies that force traffic to flow along this path Load Balancing Division of traffic optimally over multiple links To enable BGP load balancing over equal cost paths: Router(config-router)# maximum-paths number 106

54 Redundancy Default routes Minimize the size of a routing table Provide networks with redundancy in the event of failures and connectivity interruptions In BGP Local Preference attribute can be manipulated on the various default routes One default route is the primary the highest Local Preference 107 BGP Redistribution Relationship between Internet route stability and the method used to inject routes into BGP Information can be injected into BGP Dynamically Routes come and go from the BGP routing table, depending on the status of the networks Purely dynamic redistribution All the IGP routes are redistributed into BGP using the redistribute command Semi-dynamic redistribution Only certain IGP routes are injected into BGP using the BGP network command Statically More selective than a completely dynamic method Network command is necessary for each route prefix Routes are constantly maintained by the BGP routing tables 108

55 Synchronization 109 BGP Peering BGP does not advertise routes learned via IBGP peers to other IBGP peers. If they did, BGP routing inside the AS would present a dangerous potential for routing loops. For IBGP routers to learn about all BGP routes inside the AS, they must connect to every other IBGP router in a logical full IBGP mesh. You can create a logical full mesh even if the routers aren t directly connected, as long as the IBGP peers can connect to each other using TCP/IP. 110

56 AS Synchronization When an IBGP router receives an update about a destination from an IBGP peer, it tries to verify reachability to that destination via an IGP, such as RIP or OSPF. If the IBGP router can t find the destination network in it s IGP routing table, it will not advertise the destination to other BGP peers. 111 AS Synchronization If the IBGP router does have an IGP route to this destination, the route is considered synchronized, and the router will announce it to other BGP peers. Otherwise, the router will treat the route as not being synchronized with the IGP and will not advertise it. 112

57 AS Synchronization The Cisco IOS offers an optional command called no synchronization. This command enables BGP to override the synchronization requirement, allowing the router to advertise routes learned via IBGP irrespective of an existence of an IGP route. 113 AS Synchronization Usually a BGP speaker does not advertise a route to an external neighbor unless that route is local or exists in the IGP. no synchronization command It permits BGP to advertise networks without caring whether the IGP (OSPF, IS-IS, EIGRP, etc.) has the route. 114

58 AS Synchronization In practice, two situations exist where synchronization can be safely turned off on border routers: 1. When all transit routers inside the AS are running fully meshed IBGP. Internal reachability is guaranteed because a route that is learned via EBGP on any of the border routers will automatically be passed on via IBGP to all other transit routers. 2. When the AS is not a transit AS. 115 BGP Configuration Finally, whenever configuring BGP, you will notice that changes you make to an existing configuration may not appear immediately. To force BGP to clear its table and reset BGP sessions, use the clear ip bgp command. The easiest way to enter this command is as follows: Router#clear ip bgp * 116

59 BGP Routing Routes are exchanged between BGP peers via UPDATE messages BGP routers Receive the UPDATE messages Run some policies or filters over the updates Pass on the routes to other BGP peers BGP Cisco implementation has a BGP table separate from the IP routing table 117 Regular Expressions For example, the following command will match any AS_PATH that includes 364: Router(config)#ip as-path access-list 1 permit 364 Unfortunately, the regular expression, 364, will match not only AS 364, but also 1364, 2364, 3364, etc. Because policy routing demands a certain degree of precision, you will typically use one or more these special characters when creating a regular expression. 118

60 Regular Expressions Character Description ^ $ _. * Matches the beginning of the input string. Matches the end of the input string. Matches a space, comma, left brace, right brace, the beginning of an input string, or the ending of an input stream Matches any single character Matches 0 or more single- or multiplecharacter patterns. Router(config)#ip as-path access-list 1 permit ^364$ 119 BGP Redistribution Information can be injected into BGP Dynamically Routes come and go from the BGP routing table, depending on the status of the networks Purely dynamic redistribution All the IGP routes are redistributed into BGP using the redistribute command Semi-dynamic redistribution Statically Only certain IGP routes are injected into BGP using the BGP network command More selective than a completely dynamic method Network command is necessary for each route prefix Routes are constantly maintained by the BGP routing tables 120

61 Redistribute BGP RTB(config)#router bgp 200 RTB(config-router)#neighbor remote-as 100 RTB(config-router)#neighbor route-map BLOCK-BAD-ADDRESSES out RTB(config-router)#redistribute ospf 1 match internal metric 50 RTB(config-router)#redistribute static RTB(config)#router bgp 200 RTB(config-router)#neighbor remote-as 100 RTB(config-router)#neighbor route-map BLOCK-BAD-ADDRESSES out RTB(config-router)#network RTB(config-router)#network Q and A 122

BGP Terminology, Concepts, and Operation. Chapter 6 2007 2010, Cisco Systems, Inc. All rights reserved. Cisco Public

BGP Terminology, Concepts, and Operation. Chapter 6 2007 2010, Cisco Systems, Inc. All rights reserved. Cisco Public BGP Terminology, Concepts, and Operation 1 IGP versus EGP Interior gateway protocol (IGP) A routing protocol operating within an Autonomous System (AS). RIP, OSPF, and EIGRP are IGPs. Exterior gateway

More information

APNIC elearning: BGP Basics. Contact: training@apnic.net. erou03_v1.0

APNIC elearning: BGP Basics. Contact: training@apnic.net. erou03_v1.0 erou03_v1.0 APNIC elearning: BGP Basics Contact: training@apnic.net Overview What is BGP? BGP Features Path Vector Routing Protocol Peering and Transit BGP General Operation BGP Terminology BGP Attributes

More information

Routing Protocol - BGP

Routing Protocol - BGP Routing Protocol - BGP BGP Enterprise Network BGP ISP AS 3000 AS 2000 BGP is using between Autonomous Systems BGP(cont.) RFC 1771(BGPv4) Support CIDR Transfer the AS information to reach destination Using

More information

Using the Border Gateway Protocol for Interdomain Routing

Using the Border Gateway Protocol for Interdomain Routing CHAPTER 12 Using the Border Gateway Protocol for Interdomain Routing The Border Gateway Protocol (BGP), defined in RFC 1771, provides loop-free interdomain routing between autonomous systems. (An autonomous

More information

Chapter 6: Implementing a Border Gateway Protocol Solution for ISP Connectivity

Chapter 6: Implementing a Border Gateway Protocol Solution for ISP Connectivity : Implementing a Border Gateway Protocol Solution for ISP Connectivity CCNP ROUTE: Implementing IP Routing ROUTE v6 1 Objectives Describe basic BGP terminology and operation, including EBGP and IBGP. Configure

More information

BGP4 Case Studies/Tutorial

BGP4 Case Studies/Tutorial BGP4 Case Studies/Tutorial Sam Halabi-cisco Systems The purpose of this paper is to introduce the reader to the latest in BGP4 terminology and design issues. It is targeted to the novice as well as the

More information

How To Understand Bg

How To Understand Bg Table of Contents BGP Case Studies...1 BGP4 Case Studies Section 1...3 Contents...3 Introduction...3 How Does BGP Work?...3 ebgp and ibgp...3 Enabling BGP Routing...4 Forming BGP Neighbors...4 BGP and

More information

APNIC elearning: BGP Attributes

APNIC elearning: BGP Attributes APNIC elearning: BGP Attributes Contact: training@apnic.net erou04_v1.0 Overview BGP Attributes Well-known and Optional Attributes AS Path AS Loop Detection ibgp and ebgp Next Hop Next Hop Best Practice

More information

Configuring BGP. Cisco s BGP Implementation

Configuring BGP. Cisco s BGP Implementation Configuring BGP This chapter describes how to configure Border Gateway Protocol (BGP). For a complete description of the BGP commands in this chapter, refer to the BGP s chapter of the Network Protocols

More information

Inter-domain Routing Basics. Border Gateway Protocol. Inter-domain Routing Basics. Inter-domain Routing Basics. Exterior routing protocols created to:

Inter-domain Routing Basics. Border Gateway Protocol. Inter-domain Routing Basics. Inter-domain Routing Basics. Exterior routing protocols created to: Border Gateway Protocol Exterior routing protocols created to: control the expansion of routing tables provide a structured view of the Internet by segregating routing domains into separate administrations

More information

Multihomed BGP Configurations

Multihomed BGP Configurations Multihomed BGP Configurations lvaro Retana Cisco IOS Deployment and Scalability 1 genda General Considerations Multihomed Networks Best Current Practices 2 The Basics General Considerations 3 General Considerations

More information

Border Gateway Protocol (BGP)

Border Gateway Protocol (BGP) Border Gateway Protocol (BGP) Petr Grygárek rek 1 Role of Autonomous Systems on the Internet 2 Autonomous systems Not possible to maintain complete Internet topology information on all routers big database,

More information

Configuring BGP. The Cisco BGP Implementation

Configuring BGP. The Cisco BGP Implementation Configuring BGP This chapter describes how to configure Border Gateway Protocol (BGP). For a complete description of the BGP commands in this chapter, refer to the BGP s chapter of the Cisco IOS IP Reference,

More information

- Border Gateway Protocol -

- Border Gateway Protocol - 1 Border Gateway Protocol (BGP) - Border Gateway Protocol - BGP is a standardized exterior gateway protocol (EGP), as opposed to RIP, OSPF, and EIGRP which are interior gateway protocols (IGP s). BGP Version

More information

How To Set Up Bgg On A Network With A Network On A Pb Or Pb On A Pc Or Ipa On A Bg On Pc Or Pv On A Ipa (Netb) On A Router On A 2

How To Set Up Bgg On A Network With A Network On A Pb Or Pb On A Pc Or Ipa On A Bg On Pc Or Pv On A Ipa (Netb) On A Router On A 2 61200860L1-29.4E March 2012 Configuration Guide Configuring Border Gateway Protocol in AOS for Releases Prior to 18.03.00/R10.1.0 This guide only addresses BGP in AOS data products using AOS firmware prior

More information

Gateway of last resort is 192.208.10.5 to network 192.208.10.0

Gateway of last resort is 192.208.10.5 to network 192.208.10.0 RTB#sh ip bgp BGP table version is 14, local router ID is 203.250.15.10 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP,? - incomplete Network

More information

IP Routing Tecnologie e Protocolli per Internet II rev 1

IP Routing Tecnologie e Protocolli per Internet II rev 1 IP Routing Tecnologie e Protocolli per Internet II rev 1 Andrea Detti Vergata Electronic Engineering dept. E-mail: andrea.detti@uniroma2.it Some sources: Cisco CCNA Routing and Switching ICND1 and ICND2

More information

basic BGP in Huawei CLI

basic BGP in Huawei CLI basic BGP in Huawei CLI BGP stands for Border Gateway Protocol. It is widely used among Internet Service Providers to make core routing decisions on the Internet. The current BGP version is BGP-4 defined

More information

BGP Attributes and Path Selection

BGP Attributes and Path Selection BGP Attributes and Path Selection ISP Workshops Last updated 29 th March 2015 1 BGP Attributes BGP s policy tool kit 2 What Is an Attribute?... Next Hop AS Path MED...... p Part of a BGP Update p Describes

More information

MPLS VPN Route Target Rewrite

MPLS VPN Route Target Rewrite The feature allows the replacement of route targets on incoming and outgoing Border Gateway Protocol (BGP) updates Typically, Autonomous System Border Routers (ASBRs) perform the replacement of route targets

More information

Module 7. Routing and Congestion Control. Version 2 CSE IIT, Kharagpur

Module 7. Routing and Congestion Control. Version 2 CSE IIT, Kharagpur Module 7 Routing and Congestion Control Lesson 4 Border Gateway Protocol (BGP) Specific Instructional Objectives On completion of this lesson, the students will be able to: Explain the operation of the

More information

BGP overview BGP operations BGP messages BGP decision algorithm BGP states

BGP overview BGP operations BGP messages BGP decision algorithm BGP states BGP overview BGP operations BGP messages BGP decision algorithm BGP states 1 BGP overview Currently in version 4. InterAS (or Interdomain) routing protocol for exchanging network reachability information

More information

BGP-4 Case Studies. Nenad Krajnovic. e-mail: krajko@etf.bg.ac.yu

BGP-4 Case Studies. Nenad Krajnovic. e-mail: krajko@etf.bg.ac.yu BGP-4 Case Studies Nenad Krajnovic e-mail: krajko@etf.bg.ac.yu Today topics load balancing over multiple links multihoming to a single provider multihoming to different providers following defaults inside

More information

no aggregate-address address mask [as-set] [summary-only] [suppress-map map-name] [advertise-map map-name] [attribute-map map-name]

no aggregate-address address mask [as-set] [summary-only] [suppress-map map-name] [advertise-map map-name] [attribute-map map-name] BGP Commands Use the commands in this chapter to configure and monitor Border Gateway Protocol (BGP). For BGP configuration information and examples, refer to the Configuring BGP chapter of the Network

More information

Chapter 49 Border Gateway Protocol version 4 (BGP-4)

Chapter 49 Border Gateway Protocol version 4 (BGP-4) Chapter 49 Border Gateway Protocol version 4 (BGP-4) Introduction... 1-3 Overview of BGP-4... 1-3 BGP Operation... 1-5 BGP Attributes... 1-6 BGP Route Selection... 1-8 Classless Inter-domain Routing (CIDR)

More information

> Border Gateway Protocol (BGP-4) Technical Configuration Guide. Ethernet Routing Switch. Engineering

> Border Gateway Protocol (BGP-4) Technical Configuration Guide. Ethernet Routing Switch. Engineering Ethernet Routing Switch 8600 Engineering > Border Gateway Protocol (BGP-4) Technical Configuration Guide Enterprise Solution Engineering Document Date: November, 2007 Document Number: NN48500-538 Document

More information

Advanced BGP Policy. Advanced Topics

Advanced BGP Policy. Advanced Topics Advanced BGP Policy George Wu TCOM690 Advanced Topics Route redundancy Load balancing Routing Symmetry 1 Route Optimization Issues Redundancy provide multiple alternate paths usually multiple connections

More information

BGP Support for Next-Hop Address Tracking

BGP Support for Next-Hop Address Tracking The feature is enabled by default when a supporting Cisco software image is installed. BGP next-hop address tracking is event driven. BGP prefixes are automatically tracked as peering sessions are established.

More information

Understanding Route Aggregation in BGP

Understanding Route Aggregation in BGP Understanding Route Aggregation in BGP Document ID: 5441 Contents Introduction Prerequisites Requirements Components Used Conventions Network Diagram Aggregate Without the as set Argument Aggregate with

More information

Configuring and Testing Border Gateway Protocol (BGP) on Basis of Cisco Hardware and Linux Gentoo with Quagga Package (Zebra)

Configuring and Testing Border Gateway Protocol (BGP) on Basis of Cisco Hardware and Linux Gentoo with Quagga Package (Zebra) Configuring and Testing Border Gateway Protocol (BGP) on Basis of Cisco Hardware and Linux Gentoo with Quagga Package (Zebra) Contents Introduction Used Abbreviations Border Gateway Protocol (BGP) Overview

More information

Border Gateway Protocol BGP4 (2)

Border Gateway Protocol BGP4 (2) Border Gateway Protocol BGP4 (2) Professor Richard Harris School of Engineering and Advanced Technology (SEAT) Presentation Outline Border Gateway Protocol - Continued Computer Networks - 1/2 Learning

More information

Simple Multihoming. ISP/IXP Workshops

Simple Multihoming. ISP/IXP Workshops Simple Multihoming ISP/IXP Workshops 1 Why Multihome? Redundancy One connection to internet means the network is dependent on: Local router (configuration, software, hardware) WAN media (physical failure,

More information

netkit lab bgp: prefix-filtering Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

netkit lab bgp: prefix-filtering Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group netkit lab bgp: prefix-filtering Version Author(s) E-mail Web Description 2.1 G. Di Battista,

More information

DD2491 p1 2008. Inter-domain routing and BGP part I Olof Hagsand KTH/CSC

DD2491 p1 2008. Inter-domain routing and BGP part I Olof Hagsand KTH/CSC DD2491 p1 2008 Inter-domain routing and BGP part I Olof Hagsand KTH/CSC Inter-domain routing The objective of inter-domain routing is to bind together all the thousands of independent IP networks that

More information

BGP Router Startup Message Flow

BGP Router Startup Message Flow LEG: Brief BGP Router Startup Message Flow This sequence diagram was generated with EventStudio System Designer (http://www.eventhelix.com/eventstudio). The Border Gateway Protocol (BGP) is an inter-autonomous

More information

BGP Advanced Routing in SonicOS

BGP Advanced Routing in SonicOS BGP Advanced Routing in SonicOS Document Scope This document provides an overview of SonicWALL s implmenetation of Border Gateway protocol (BGP), how BGP operates, and how to configure BGP for your network.

More information

BGP Link Bandwidth. Finding Feature Information. Contents

BGP Link Bandwidth. Finding Feature Information. Contents The BGP (Border Gateway Protocol) Link Bandwidth feature is used to advertise the bandwidth of an autonomous system exit link as an extended community. This feature is configured for links between directly

More information

Exterior Gateway Protocols (BGP)

Exterior Gateway Protocols (BGP) Exterior Gateway Protocols (BGP) Internet Structure Large ISP Large ISP Stub Dial-Up ISP Small ISP Stub Stub Stub Autonomous Systems (AS) Internet is not a single network! The Internet is a collection

More information

BGP Best Path Selection Algorithm

BGP Best Path Selection Algorithm BGP Best Path Selection Algorithm Document ID: 13753 Contents Introduction Prerequisites Requirements Components Used Conventions Why Routers Ignore Paths How the Best Path Algorithm Works Example: BGP

More information

BGP Link Bandwidth. Finding Feature Information. Prerequisites for BGP Link Bandwidth

BGP Link Bandwidth. Finding Feature Information. Prerequisites for BGP Link Bandwidth The Border Gateway Protocol (BGP) Link Bandwidth feature is used to advertise the bandwidth of an autonomous system exit link as an extended community. This feature is configured for links between directly

More information

Internet inter-as routing: BGP

Internet inter-as routing: BGP Internet inter-as routing: BGP BGP (Border Gateway Protocol): the de facto standard BGP provides each AS a means to: 1. Obtain subnet reachability information from neighboring ASs. 2. Propagate the reachability

More information

Border Gateway Protocol Best Practices

Border Gateway Protocol Best Practices Border Gateway Protocol Best Practices By Clifton Funakura The Internet has grown into a worldwide network supporting a wide range of business applications. Many companies depend on the Internet for day-to-day

More information

Module 12 Multihoming to the Same ISP

Module 12 Multihoming to the Same ISP Module 12 Multihoming to the Same ISP Objective: To investigate various methods for multihoming onto the same upstream s backbone Prerequisites: Module 11 and Multihoming Presentation The following will

More information

Introduction to BGP. Cisco ISP Workshops. 2003, Cisco Systems, Inc. All rights reserved.

Introduction to BGP. Cisco ISP Workshops. 2003, Cisco Systems, Inc. All rights reserved. Introduction to BGP Cisco ISP Workshops 1 Border Gateway Protocol Routing Protocol used to exchange routing information between networks exterior gateway protocol RFC1771 work in progress to update draft-ietf-idr-bgp4-18.txt

More information

Simple Multihoming. ISP Workshops. Last updated 30 th March 2015

Simple Multihoming. ISP Workshops. Last updated 30 th March 2015 Simple Multihoming ISP Workshops Last updated 30 th March 2015 1 Why Multihome? p Redundancy n One connection to internet means the network is dependent on: p Local router (configuration, software, hardware)

More information

E6998-02: Internet Routing

E6998-02: Internet Routing E6998-02: Internet Routing Lecture 13 Border Gateway Protocol, Part II John Ioannidis AT&T Labs Research ji+ir@cs.columbia.edu Copyright 2002 by John Ioannidis. All Rights Reserved. Announcements Lectures

More information

Textbook Required: Cisco Networking Academy Program CCNP: Building Scalable Internetworks v5.0 Lab Manual.

Textbook Required: Cisco Networking Academy Program CCNP: Building Scalable Internetworks v5.0 Lab Manual. Course: NET 251 Building Scalable Internetworks Credits: 3 Textbook Required: Cisco Networking Academy Program CCNP: Building Scalable Internetworks v5.0 Lab Manual. Course Description: In this course,

More information

BGP Basics. BGP Uses TCP 179 ibgp - BGP Peers in the same AS ebgp - BGP Peers in different AS's. 64512-65535 Private BGP ASN. BGP Router Processes

BGP Basics. BGP Uses TCP 179 ibgp - BGP Peers in the same AS ebgp - BGP Peers in different AS's. 64512-65535 Private BGP ASN. BGP Router Processes BGP Basics BGPv4 - RFC 4271 - IPv6 support Path vector routing protocol EGP Routing between AS'es Classless Transit Area - Area used to reach other areas. Requires full routing table (no default routes).

More information

IPv6 over MPLS VPN. Contents. Prerequisites. Document ID: 112085. Requirements

IPv6 over MPLS VPN. Contents. Prerequisites. Document ID: 112085. Requirements IPv6 over MPLS VPN Document ID: 112085 Contents Introduction Prerequisites Requirements Components Used Conventions Configure Network Diagram VRF Configuration Multiprotocol BGP (MP BGP) Configuration

More information

Border Gateway Protocol (BGP-4)

Border Gateway Protocol (BGP-4) Vanguard Applications Ware IP and LAN Feature Protocols Border Gateway Protocol (BGP-4) Notice 2008 Vanguard Networks 25 Forbes Blvd Foxboro, MA 02035 Phone: (508) 964 6200 Fax: (508) 543 0237 All rights

More information

Lab 10: Confi guring Basic Border Gateway Protocol

Lab 10: Confi guring Basic Border Gateway Protocol Lab 10: Objective Confi gure P1R1 for basic Exterior Border Gateway Protocol (EBGP). Confi gure P1R1 and P1R2 for Interior Border Gateway Protocol (IBGP). Confi rm BGP connectivity. Lab Topology For this

More information

IK2205 Inter-domain Routing

IK2205 Inter-domain Routing IK2205 Inter-domain Routing Lecture 5 Voravit Tanyingyong, voravit@kth.se Outline Redundancy, Symmetry, and Load Balancing Redundancy Symmetry Load balancing Scenarios Controlling Routing Inside the AS

More information

BGP1 Multihoming and Traffic Engineering

BGP1 Multihoming and Traffic Engineering 83950 Telecommunications Laboratory Course BGP1 BGP1 Multihoming and Traffic Engineering date & time student # name 1 2 bgp-tyo.tex,v 1.11 2005/04/18 14:09:14 ams Exp 1/17 Part I Home Assignment 1 General

More information

- Route Filtering and Route-Maps -

- Route Filtering and Route-Maps - 1 Prefix-Lists - Route Filtering and Route-Maps - Prefix-lists are used to match routes as opposed to traffic. Two things are matched: The prefix (the network itself) The prefix-length (the length of the

More information

--BGP 4 White Paper Ver.1.0-- BGP-4 in Vanguard Routers

--BGP 4 White Paper Ver.1.0-- BGP-4 in Vanguard Routers BGP-4 in Vanguard Routers 1 Table of Contents Introduction to BGP... 6 BGP terminology... 6 AS (Autonomous system):... 6 AS connection:... 6 BGP Speaker:... 6 BGP Neighbor/Peer:... 7 BGP Session:... 7

More information

MPLS VPN - Route Target Rewrite

MPLS VPN - Route Target Rewrite MPLS VPN - Route Target Rewrite The MPLS VPN - Route Target Rewrite feature allows the replacement of route targets on incoming and outgoing Border Gateway Protocol (BGP) updates. Typically, autonomous

More information

Example: Advertised Distance (AD) Example: Feasible Distance (FD) Example: Successor and Feasible Successor Example: Successor and Feasible Successor

Example: Advertised Distance (AD) Example: Feasible Distance (FD) Example: Successor and Feasible Successor Example: Successor and Feasible Successor 642-902 Route: Implementing Cisco IP Routing Course Introduction Course Introduction Module 01 - Planning Routing Services Lesson: Assessing Complex Enterprise Network Requirements Cisco Enterprise Architectures

More information

Exam Name: BGP + MPLS Exam Exam Type Cisco Case Studies: 3 Exam Code: 642-691 Total Questions: 401

Exam Name: BGP + MPLS Exam Exam Type Cisco Case Studies: 3 Exam Code: 642-691 Total Questions: 401 Question: 1 Every time a flap occurs on a route, the route receives A. 750 per-flap penalty points which are user configurable B. 1500 per-flap penalty points which are user configurable C. 200 per-flap

More information

The ISP Column. An Introduction to BGP the Protocol

The ISP Column. An Introduction to BGP the Protocol The ISP Column An occasional column on things Internet May 2006 Geoff Huston An Introduction to BGP the Protocol Routing in the Internet is divided into two parts fine-grained topological detail of connected

More information

BGP: Frequently Asked Questions

BGP: Frequently Asked Questions BGP: Frequently Asked Questions Document ID: 5816 Contents Introduction How do I configure BGP? How do I configure BGP with the use of a loopback address? What is the order of preference of attributes

More information

BGP Multihoming Techniques

BGP Multihoming Techniques BGP Multihoming Techniques Philip Smith SANOG 12 6th-14th August 2008 Kathmandu 1 Presentation Slides Available on ftp://ftp-eng.cisco.com /pfs/seminars/sanog12-multihoming.pdf And on the

More information

Application Note. Failover through BGP route health injection

Application Note. Failover through BGP route health injection Application Note Document version: v1.2 Last update: 8th November 2013 Purpose This application note aims to describe how to build a high available platform using BGP routing protocol to choose the best

More information

Fireware How To Dynamic Routing

Fireware How To Dynamic Routing Fireware How To Dynamic Routing How do I configure my Firebox to use BGP? Introduction A routing protocol is the language a router speaks with other routers to share information about the status of network

More information

Cisco Router Configuration Tutorial

Cisco Router Configuration Tutorial Cisco Router Configuration Tutorial Cisco Inter-network Operating System: Cisco IOS Modes of Operation The Cisco IOS software provides access to several different command modes. Each command mode provides

More information

MPLS VPN over mgre. Finding Feature Information. Prerequisites for MPLS VPN over mgre

MPLS VPN over mgre. Finding Feature Information. Prerequisites for MPLS VPN over mgre The feature overcomes the requirement that a carrier support multiprotocol label switching (MPLS) by allowing you to provide MPLS connectivity between networks that are connected by IP-only networks. This

More information

BGP Multihoming. Why Multihome? Why Multihome? Why Multihome? Why Multihome? Why Multihome? Redundancy. Reliability

BGP Multihoming. Why Multihome? Why Multihome? Why Multihome? Why Multihome? Why Multihome? Redundancy. Reliability Why Multihome? BGP Multihoming ISP/IXP Redundancy One connection to internet means the network is dependent on: Local router (configuration, software, hardware) WN media (physical failure, carrier failure)

More information

BGP Multihoming Techniques

BGP Multihoming Techniques BGP Multihoming Techniques Philip Smith 26th July - 4th August 2006 Karachi 1 Presentation Slides Available on ftp://ftp-eng.cisco.com /pfs/seminars/sanog8-multihoming.pdf And on the SANOG8

More information

Load balancing and traffic control in BGP

Load balancing and traffic control in BGP DD2491 p2 2011 Load balancing and traffic control in BGP Olof Hagsand KTH CSC 1 Issues in load balancing Load balancing: spread traffic on several paths instead of a single. Why? Use resources better Can

More information

This feature was introduced. This feature was integrated in Cisco IOS Release 12.2(11)T.

This feature was introduced. This feature was integrated in Cisco IOS Release 12.2(11)T. BGP Link Bandwidth The Border Gateway Protocol (BGP) Link Bandwidth feature is used to advertise the bandwidth of an autonomous system exit link as an extended community. This feature is configured for

More information

How To Import Ipv4 From Global To Global On Cisco Vrf.Net (Vf) On A Vf-Net (Virtual Private Network) On Ipv2 (Vfs) On An Ipv3 (Vv

How To Import Ipv4 From Global To Global On Cisco Vrf.Net (Vf) On A Vf-Net (Virtual Private Network) On Ipv2 (Vfs) On An Ipv3 (Vv BGP Support for IP Prefix Import from Global Table into a VRF Table The BGP Support for IP Prefix Import from Global Table into a VRF Table feature introduces the capability to import IPv4 unicast prefixes

More information

Interdomain Routing. Project Report

Interdomain Routing. Project Report Interdomain Routing Project Report Network Infrastructure improvement proposal To Company A Team 4: Zhang Li Bin Yang Md. Safiqul Islam Saurabh Arora Network Infrastructure Improvement Interdomain routing

More information

Bell Aliant. Business Internet Border Gateway Protocol Policy and Features Guidelines

Bell Aliant. Business Internet Border Gateway Protocol Policy and Features Guidelines Bell Aliant Business Internet Border Gateway Protocol Policy and Features Guidelines Effective 05/30/2006, Updated 1/30/2015 BGP Policy and Features Guidelines 1 Bell Aliant BGP Features Bell Aliant offers

More information

MPLS. Cisco MPLS. Cisco Router Challenge 227. MPLS Introduction. The most up-to-date version of this test is at: http://networksims.com/i01.

MPLS. Cisco MPLS. Cisco Router Challenge 227. MPLS Introduction. The most up-to-date version of this test is at: http://networksims.com/i01. MPLS Cisco MPLS MPLS Introduction The most up-to-date version of this test is at: http://networksims.com/i01.html Cisco Router Challenge 227 Outline This challenge involves basic frame-mode MPLS configuration.

More information

Today s Agenda. Note: it takes years to really master BGP Many slides stolen from Prof. Zhi-Li Zhang at Minnesota and from Avi Freedman s slides

Today s Agenda. Note: it takes years to really master BGP Many slides stolen from Prof. Zhi-Li Zhang at Minnesota and from Avi Freedman s slides Today s Agenda BGP Overview Note: it takes years to really master BGP Many slides stolen from Prof. Zhi-Li Zhang at Minnesota and from Avi Freedman s slides AS Relationship Inference There ll be some openresearch

More information

Presentation_ID. 2001, Cisco Systems, Inc. All rights reserved.

Presentation_ID. 2001, Cisco Systems, Inc. All rights reserved. 1 Session Number BGP Feature Update 12.0S July 2003 Mike Pennington mpenning@cisco.com Cisco Systems - Denver, CO 2 Overview Overview Definition of Terms BGP Convergence optimization Issues w/ Static peer-groups

More information

JNCIA Juniper Networks Certified Internet Associate

JNCIA Juniper Networks Certified Internet Associate JNCIA Juniper Networks Certified Internet Associate Study Guide - Chapter 8 by Joseph M. Soricelli with John L. Hammond, Galina Diker Pildush, Thomas E. Van Meter, and Todd M. Warble This book was originally

More information

Routing in Small Networks. Internet Routing Overview. Agenda. Routing in Large Networks

Routing in Small Networks. Internet Routing Overview. Agenda. Routing in Large Networks Routing in Small Networks Internet Routing Overview AS, IGP,, BGP in small networks distance vector or link state protocols like RIP or OSPF can be used for dynamic routing it is possible that every router

More information

EIGRP Commands. Cisco IOS IP Command Reference, Volume 2 of 3: Routing Protocols IP2R-141

EIGRP Commands. Cisco IOS IP Command Reference, Volume 2 of 3: Routing Protocols IP2R-141 EIGRP Commands Use the commands in this chapter to configure and monitor Enhanced Interior Gateway Routing Protocol (EIGRP). For EIGRP configuration information and examples, refer to the Configuring IP

More information

HP Networking BGP and MPLS technology training

HP Networking BGP and MPLS technology training Course overview HP Networking BGP and MPLS technology training (HL046_00429577) The HP Networking BGP and MPLS technology training provides networking professionals the knowledge necessary for designing,

More information

GregSowell.com. Mikrotik Routing

GregSowell.com. Mikrotik Routing Mikrotik Routing Static Dynamic Routing To Be Discussed RIP Quick Discussion OSPF BGP What is Routing Wikipedia has a very lengthy explanation http://en.wikipedia.org/wiki/routing In the context of this

More information

Internet inter-as routing: BGP

Internet inter-as routing: BGP Internet inter-as routing: BGP BGP (Border Gateway Protocol): the de facto standard BGP provides each AS a means to: 1. Obtain subnet reachability information from neighboring ASs. 2. Propagate the reachability

More information

Transitioning to BGP. ISP Workshops. Last updated 24 April 2013

Transitioning to BGP. ISP Workshops. Last updated 24 April 2013 Transitioning to BGP ISP Workshops Last updated 24 April 2013 1 Scaling the network How to get out of carrying all prefixes in IGP 2 Why use BGP rather than IGP? p IGP has Limitations: n The more routing

More information

Chapter 2 Lab 2-2, EIGRP Load Balancing

Chapter 2 Lab 2-2, EIGRP Load Balancing Chapter 2 Lab 2-2, EIGRP Load Balancing Topology Objectives Background Review a basic EIGRP configuration. Explore the EIGRP topology table. Identify successors, feasible successors, and feasible distances.

More information

BGP Advanced Features and Enhancements

BGP Advanced Features and Enhancements BGP Advanced Features and Enhancements George Wu TCOM610 Conditional Route Injection Network: originate route into BGP if there is corresponding routes in IP routing table Aggregate-address: inject route

More information

IP Routing Configuring RIP, OSPF, BGP, and PBR

IP Routing Configuring RIP, OSPF, BGP, and PBR 13 IP Routing Configuring RIP, OSPF, BGP, and PBR Contents Overview..................................................... 13-6 Routing Protocols.......................................... 13-6 Dynamic Routing

More information

Lecture 18: Border Gateway Protocol"

Lecture 18: Border Gateway Protocol Lecture 18: Border Gateway Protocol" CSE 123: Computer Networks Alex C. Snoeren HW 3 due Wednesday! Some figures courtesy Mike Freedman Lecture 18 Overview" Path-vector Routing Allows scalable, informed

More information

BGP Multihoming Techniques. Philip Smith <philip@apnic.net> APRICOT 2012 21 st February 2 nd March 2012 New Delhi

BGP Multihoming Techniques. Philip Smith <philip@apnic.net> APRICOT 2012 21 st February 2 nd March 2012 New Delhi BGP Multihoming Techniques Philip Smith APRICOT 2012 21 st February 2 nd March 2012 New Delhi Presentation Slides p Available on n http://thyme.apnic.net/ftp/seminars/ APRICOT2012-BGP-Multihoming.pdf

More information

Tutorial: Options for Blackhole and Discard Routing. Joseph M. Soricelli Wayne Gustavus NANOG 32, Reston, Virginia

Tutorial: Options for Blackhole and Discard Routing. Joseph M. Soricelli Wayne Gustavus NANOG 32, Reston, Virginia Tutorial: Options for Blackhole and Discard Routing Joseph M. Soricelli Wayne Gustavus NANOG 32, Reston, Virginia Caveats and Assumptions The views presented here are those of the authors and they do not

More information

Configuring Route Maps and Policy-Based Routing

Configuring Route Maps and Policy-Based Routing C H A P T E R 2 Configuring Route Maps and Policy-Based Routing Perhaps one of the most colorful descriptions for route maps is that route maps are like duct tape for the network not necessarily because

More information

MPLS VPN Implementation

MPLS VPN Implementation MPLS VPN Implementation Overview Virtual Routing and Forwarding Table VPN-Aware Routing Protocols VRF Configuration Tasks Configuring BGP Address families Configuring BGP Neighbors Configuring MP-BGP Monitoring

More information

Understanding Route Redistribution & Filtering

Understanding Route Redistribution & Filtering Understanding Route Redistribution & Filtering When to Redistribute and Filter PAN-OS 5.0 Revision B 2013, Palo Alto Networks, Inc. www.paloaltonetworks.com Contents Overview... 3 Route Redistribution......

More information

ITRI CCL. IP Routing Primer. Paul C. Huang, Ph.D. ITRI / CCL / N300. CCL/N300; Paul Huang 1999/6/2 1

ITRI CCL. IP Routing Primer. Paul C. Huang, Ph.D. ITRI / CCL / N300. CCL/N300; Paul Huang 1999/6/2 1 IP Routing Primer Paul C. Huang, Ph.D. ITRI / / N300 /N300; Paul Huang 1999/6/2 1 Basic Addressing / Subnetting Class A 0 Network Host Host Host 127 networks / 16,777,216 hosts Class A natural mask 255.0.0.0

More information

BGP Multihoming Techniques

BGP Multihoming Techniques BGP Multihoming Techniques Philip Smith , Oakland 2001, Cisco Systems, Inc. All rights reserved. 1 Presentation Slides Available on NANOG Web site www.nanog.org/mtg-0110/smith.html Available

More information

Community tools to fight against DDoS

Community tools to fight against DDoS Community tools to fight against DDoS Fakrul Alam Senior Training Officer SANOG 27 & APNIC Regional Meeting, Kathmandu, Nepal 25 Jan - 01 Feb, 2016 Issue Date: Revision: 26-12-2015 1.3 DDoS Denial of Service

More information

BGP Multihoming Techniques

BGP Multihoming Techniques BGP Multihoming Techniques Philip Smith , Seoul, South Korea August 2003 1 Presentation Slides Available on ftp://ftp-eng.cisco.com/pfs/seminars/ 2 Preliminaries Presentation has many configuration

More information

CS551 External v.s. Internal BGP

CS551 External v.s. Internal BGP CS551 External v.s. Internal BGP Bill Cheng http://merlot.usc.edu/cs551-f12 1 Exterior vs. Interior World vs. me EGP vs. IGP Little control vs. complete administrative control BGP (and GGP, Hello, EGP)

More information

Notice the router names, as these are often used in MPLS terminology. The Customer Edge router a router that directly connects to a customer network.

Notice the router names, as these are often used in MPLS terminology. The Customer Edge router a router that directly connects to a customer network. Where MPLS part I explains the basics of labeling packets, it s not giving any advantage over normal routing, apart from faster table lookups. But extensions to MPLS allow for more. In this article I ll

More information

Configuring BGP Services

Configuring BGP Services Part No. 314721-C Rev 00 May 2004 4655 Great America Parkway Santa Clara, CA 95054 Passport 8000 Series Software Release 3.7 *314721-C Rev 00* 2 Copyright 2003 Nortel Networks All rights reserved. May

More information

Understanding Virtual Router and Virtual Systems

Understanding Virtual Router and Virtual Systems Understanding Virtual Router and Virtual Systems PAN- OS 6.0 Humair Ali Professional Services Content Table of Contents VIRTUAL ROUTER... 5 CONNECTED... 8 STATIC ROUTING... 9 OSPF... 11 BGP... 17 IMPORT

More information