1 / 92

Configuring Basic BGP

Configuring Basic BGP. BSCI Module 6. Review. BSCI Module 6 BGP (review). 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.

albin
Télécharger la présentation

Configuring Basic BGP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Configuring Basic BGP BSCI Module 6

  2. Review

  3. BSCI Module 6 BGP (review) • 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.

  4. BSCI Module 6 BGP (review) • Enterprises that want to connect to the Internet do so through one or more ISPs. • If an organization has only one connection to one ISP, they probably do not need to use BGP. Instead, they would use a default route. • If they have multiple connections to one or to multiple ISPs, BGP may be appropriate because it allows them to manipulate path attributes to select the optimal path.

  5. BSCI Module 6 BGP (review) • From the BGP point of view, the most important characteristic of an autonomous system is that it appears to other autonomous systems to have a single coherent interior routing plan and presents a consistent picture of reachable destinations

  6. BGP Multihoming Options • Multihoming is when an autonomous system has more than one connection to the Internet. • The benefits of BGP are apparent when an autonomous system has multiple EBGP connections to either single or multiple autonomous systems. Multiple connections allows an organization to have redundant connections to the Internet so that connectivity can still be maintained if a single path becomes unavailable

  7. BSCI Module 6 BGP (review) • 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.

  8. BSCI Module 6 BGP (review) • 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, 64,512 to 65,535. • These private AS numbers appear only within the provider's network and are replaced by the provider's registered number upon exiting the network.

  9. BSCI Module 6 BGP (review) • When two routers establish a TCP enabled BGP connection, they are called neighbors or peers. • Each router running BGP is called a BGP speaker. • Peer routers exchange multiple messages to open and confirm the connection parameters, such as the version of BGP to be used. • If there are any disagreements between the peers, notification errors are sent and the connection fails.

  10. BSCI Module 6 BGP (review) • When BGP neighbors first establish a connection, they exchange all candidate BGP routes. • After this initial exchange, incremental updates are sent as network information changes. • Incremental updates are more efficient than complete table updates. • This is especially true with BGP routers, which may contain the complete Internet routing table.

  11. Using BGP to Connect to the Internet (review)

  12. Example: Default Routes from All Providers (review)

  13. Default Routes from All Providers and Partial Table (review)

  14. BGP benefits • BGP4 carries a network mask for each advertised network and supports both variable-length subnet masking (VLSM) and CIDR • When CIDR is used on a core router for a major ISP, the IP routing table, which is composed mostly of BGP routes, has more than 170,000 CIDR blocks. • Not using CIDR at the Internet level would cause the IP routing table to have more than 2,000,000 entries. Using BGP4 and CIDR prevents the Internet routing table from becoming too large for interconnecting millions of users.

  15. Autonomous System Numbers • Autonomous system numbers are 16-bits, ranging from 1 to 65535. RFC 1930 provides guidelines for the use of numbers. The numbers 64512 through 65535 are reserved for private use • IANA maintains records of global IP address allocation. • The Regional Internet Registry (RIR) is an organization overseeing the allocation and registration of Internet number resources (both IPv4 and IPv6 and autonomous system numbers) within a particular region of the world.

  16. Autonomous System Numbers • Currently there are five RIRs: • The American Registry for Internet Numbers (ARIN) - Americas and some islands in the Caribbean. • Réseaux IP Européens Network Coordination Center (RIPE NCC) - Europe, the Middle East, and Central Asia. • The Asia Pacific Network Information Center (APNIC) - Asia-Pacific region. • Latin American and Caribbean Internet Addresses Registry (LACNIC) - Latin America and some of the Caribbean. • AfriNIC is responsible for Africa.

  17. Path-Vector Functionality • BGP views the whole internetwork as a graph (tree) of autonomous systems. • The connection between any two systems forms a path. • The collection of path information is expressed as a sequence of autonomous system numbers called the AS path. • This sequence forms a route to reach a specific destination. • The AS path is always loop-free - a router running BGP does not accept a routing update that already includes the router autonomous system number in the path list.

  18. BGP Routing Policies • BGP allows routing-policy decisions at the autonomous system level to be enforced. • These policies can be implemented for: • all networks owned by an autonomous system, • a certain CIDR block of network numbers (prefixes), • for individual networks or subnetworks. • The hop-by-hop routing paradigm does not support all possible policies - we cannot influence how a neighboring autonomous system routes traffic, but we can influence how our traffic gets to a neighboring autonomous system (see picture on the next slide).

  19. BGP Routing Policies To reach the networks in AS 64700, AS 64512 can choose to use AS 64520 or it can choose to go through the path that AS 64530 is advertising. AS 64512 selects the best path to take based on its own BGP routing policies.

  20. BGP Terms

  21. 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

  22. Adminstrative distances • EBGP routes – 20 • IBGP routes - 200.

  23. BGP router ID • IP address that is assigned to that router, and it is determined at startup. • Chosen in the same way that the OSPF router ID is chosen: • Highest active IP address on the router, • If a loopback interface with an IP address exists, the router ID is the highest loopback IP address. • The router ID can also be statically configured.

  24. 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

  25. 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.

  26. 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.

  27. 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.

  28. IBGP • To avoid routing loops within an autonomous system, BGP specifies that routes learned through IBGP are never propagated to other IBGP peers. • IBGP have to be fully meshed: • To avoid routing loops within an autonomous system, BGP specifies that routes learned through IBGP are never propagated to other IBGP peers.

  29. IBGP – problem of not fully meshed topo. • If the sending IBGP neighbor is not fully meshed with each IBGP router, the routers that are not peering with this router have different IP routing tables from the routers that are peering with it.

  30. IBGP • When all routers running BGP in an autonomous system are fully meshed and have the same database as a result of a consistent routing policy, they can apply the same path selection formula. • The path selection results are therefore uniform across the autonomous system, which ensures no routing loops and a consistent policy for exiting and entering the autonomous system.

  31. Routing Issues in a Transit Autonomous System

  32. Routing Issues in a Transit Autonomous System (cont.) • All routers in the transit path within the autonomous system must be running BGP, and the IBGP sessions must be fully meshed.

  33. BGP Commands

  34. 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.

  35. 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-asshows 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.

  36. Example: BGP neighbor Command

  37. 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 preventroute flapping Router(config-router)# no neighbor {ip-address | peer-group-name} shutdown • Re-enables a BGP neighbor that has been administratively shut down

  38. 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 (see BGP Issues with source IP Adress – next slide). • The address of an EBGP neighbor must be directly connected by default; the loopback of an EBGP neighbor is not directly connected.

  39. IBGP Peering Issue

  40. Example: BGP Using Loopback Addresses

  41. 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-addressis the IP address of the BGP-speaking neighbor. • peer-group-nameis the Name of a BGP peer group. • ttl(Optional) TTL in the range from 1 to 255 hops

  42. Example: ebgp-multihop Command

  43. Example: BGP Peering RouterA# show ip bgp summary BGP router identifier 10.1.1.1, local AS number 65001 BGP table version is 124, main routing table version 124 9 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 10.1.0.2 4 65001 11 11 124 0 0 00:02:28 8 172.31.1.3 4 64998 21 18 124 0 0 00:01:13 6 172.31.11.4 4 64999 11 10 124 0 0 00:01:11 6

  44. Next Hop Behavior • BGP informs the next autonomous system about paths to other autonomous systems and the networks that those other autonomous systems own. • BGP, like IGPs, is a hop-by-hop routing protocol. • BGP routes from AS to AS, and the default next hop is the next AS (entry point for the next AS - IP address of the neighboring router that sent the update ). • Command neighbor next-hop-self (see curriculum)

  45. Next Hop Behavior (example)

  46. Next Hop Behavior (example)

  47. Injection Routing Information into BGP • Use the networknetwork-number command to permit BGP to advertise a network if it is present in the IP routing table. • The network command determines which networks that router originates (This is a sole purpose of the network command). • Unlike an IGP, the network command does not start BGP on specific interfaces. • The neighbor command tells BGP where to advertise, and the network command tells BGP what to advertise.

  48. Injection Routing Information into BGP

  49. Injection Routing Information into BGP • The sole purpose of the network command is to notify BGP which network to advertise. • Without the mask option, this command announces only the classful network number. • At least one subnet of the specified major network must be present in the IP routing table to allow BGP to start announcing the classful network as a BGP route. • When we specify a network-mask option, an exact match to the network (both address and mask) must exist in the routing table before BGP announce a routes. • BGP checks whether it can reach it before it starts announcing the network as a BGP route.

More Related