Border Gateway Protocol (BGP) Algorithm

The meanings of the fields are described as follows:


Version numberIdentifies the OSPF version used .

Type —Identifies the OSPF packet type, which is one of the following:

o Hello —Establish and maintain relationships with neighbors.

Maybe you are interested!

o Database description —Describes the contents of the network topology database. Messages of this type are exchanged when a new neighbor appears.

o Link-state request —A request for a link state database from a neighbor. These messages are sent after a router detects that a portion of its link state database is out of date.

o Link-state update —Responses to link-state request packets.

This message is also used for normal LSAs distribution.

o Link-state acknowledgment —Acknowledgement for link-state update packets.

Packet length —Describes the length of the packet, including the header, in bytes.

Router ID —Identification of the router sending the packet.

Area ID —Identification of the area to which the packet belongs.

Checksum —The error checksum of the packet.

Authentication type —Contains the authentication type. All information exchanged in OSPF must be authenticated.

Authentication — Contains authentication information.

Data — Contains information from the layer above.


5.5.8 BGP (Border Gateway Protocol) routing algorithm

5.5.8.1 Introduction

BGP is an inter-autonomous system. BGP is used to share routing information on the Internet and is the protocol used to route between Internet service providers. Corporate and university networks often use Interior Gateway Protocols (IGPs) such as RIP or OSPF to exchange routing information between their networks. Customers connect to ISPs and ISPs use BGP to exchange routes with them.

When BGP is used between autonomous regions, the protocol is known as External Border Gateway Protocol (EBGP). If a service provider uses BGP to communicate between routers within an autonomous region, it is known as Internal External Border Gateway Protocol (IBGP).


Figure 5.13 – Distinguishing between IBGP and EBGP

BGP is a powerful and scalable routing protocol, which is why it is used for the Internet. The BGP routing table can contain more than 90,000 routes.

In addition, BGP supports the CIDR classless inter-domain routing mechanism to reduce the size of the routing table for the Internet. For example, suppose that an ISP owns the 195.10.xx IP address block from the fully classified class C address space. This address block consists of 256 class C addresses from 195.10.0.0 to 195.10.255.0. Suppose that the ISP assigns each customer a network address. Without CIDR, the ISP must advertise these 256 addresses to its BGP neighbors. With CIDR, BGP only needs to send the common part of these 256 network addresses, 195.10.xx, to its BGP neighbors. This common part corresponds to only one traditional class B IP address, which reduces the size of the BGP routing table.

BGP neighbors exchange all routing information when a TCP connection between them is first established. When a BGP route finder detects a change in the network topology, it sends its neighbors information about only the routes that have changed. BGP route finders do not periodically send route updates, and route updates contain only the optimal routes to a destination.

5.5.8.2 BGP Attributes

Routes learned by BGP have attributes assigned to them that are used to determine the best path to a destination when multiple paths exist to that destination. These include attributes such as:

Weight

Local preference

Multi-exit discriminator

Origin

AS_path

Next hop

Community

Weight Attribute

Weight is a Cisco-defined attribute that is local to a router. If a router knows of more than one path to a destination, the path with the highest weight is used.

In the diagram below, Router A receives a message about 172.16.1.0 from routers B and C. When A receives the message from B, the route weight is set to 50. When A receives the message from C, the route weight is set to 100. Both routes to network 172.16.1.0 are stored in the BGP routing table along with their respective weights. The route with the highest weight is installed in the IP routing table.


Figure 5.14 – Using the weight attribute in BGP

Local Preference Attribute

The local reference attribute is used to refer to an exit from the local autonomous system. Unlike the weight attribute, local reference attributes are propagated across all routers of the local autonomous system. If there are multiple exits from the autonomous system, the local reference attribute is used to assign the exit to a specific path.

As shown below, AS 100 receives 2 route updates for the network.

172.16.1.0 from AS 200. When Router A receives route update information for network 172.16.1.0, the corresponding local reference attribute will be set to 50. When Router B receives route update information for network 172.16.1.0, the corresponding local reference attribute will be set to 100. These local reference values ​​will be exchanged between routers A and B.

B. Because Router B has a higher reference number than Router A, Router B will be used as the exit route out of AS 100 to reach network 172.16.1.0 in AS 200.


Figure 5.15 – Using the Local Preference attribute in BGP

Multi-Exit Discriminator Attribute

The Multi-Exit Discriminator (MED) or metric attribute is used as a suggestion to an external AS regarding the metrics of the routes being sent. The term suggestion is used because the external AS receiving the MED may use different attributes to choose routes than the AS sending the route update.

For example, as shown in Figure 5.16, Router C is advertising a route to network 172.16.1.0 with a metric of 10, while Router D is advertising a route to network 172.16.1.0 with a metric of 5. The lower value of the metric will be taken into account, so AS 100 will choose router D to reach network 172.16.1.0 in AS 200. And the MEDs will be advertised throughout AS 100.


Figure 5.16 – Using the Multi-Exit Discriminator attribute in BGP

Origin Attribute

The origin attribute represents how BGP learned a particular route. The origin attribute can have one of three values:


IGP: The route is inside an AS. This value is set by the configuration command for the network router to include the route in BGP.

EGP : Routes learned through the external BGP protocol.

Incomplete: The root of the route is not known or learned by some other means. An incomplete root occurs when a route is redistributed to BGP.


AS_path Attribute

When a route advertisement passes through an autonomous system, the autonomous system number is included in the ordered list of ASs through which the route advertisement has passed. The figure below illustrates a case where a route is sent through three autonomous systems.


Figure 5.17 – Using the AS_path attribute in BGP

AS 1 locates a route to network 172.16.1.0 and advertises this route to AS 2 and AS 3 with an autonomous system cost of {1}. AS 3 will advertise back to AS 1 with an autonomous system cost of {3,1} and AS 2 will advertise back to AS 1 with an autonomous system cost of {2,1}. AS 1 will reject these routes when it detects its own identifier in the route advertisement. This is the mechanism that BGP uses to detect loops in routes.

AS 2 and AS 3 send routes to other ASs with their numbers entered into the route attribute through the autonomous system. These routes will not be installed in the IP routing table because AS 2 and AS 3 have already learned a route to the network.

172.16.1.0 from AS 1 with a list of autonomous systems is the shortest.

Next-Hop Attribute

The EBGP next hop attribute value is an IP address used to reach the router sending the advertisement. For EBGP neighbors, the next hop address is the IP address of the link between the neighbors. For IBGP, the EBGP next hop address is included in an AS as shown below:


Figure 5.18 – Using the Next-Hop attribute in BGP

Router C advertises a route to network 172.16.1.0 with the next hop being 10.1.1.1. When router A propagates this route within its AS, the next hop information outside the current AS is retained. If router B does not have the routing information regarding

At this next hop, the path will be discarded. Therefore, it is important to have an IGP operating within an AS to continue transmitting the path information to the next hop.

Community Attribute

Community attributes provide a means of grouping destinations together into communities upon which routing decisions are made. Road maps are used for community attributes. Predefined community attributes include:


no-export: Do not advertise this route to EBGP neighbors.

no-advertise: Do not advertise this route to any neighbors.

internet: Promote this path to the Internet community.


The figure below illustrates a no-export community. AS 1 advertises the network 172.16.1.0 to AS 2 with the no-export community attribute. AS 2 will propagate this route within AS 2 but will not forward it to AS 3 or any other AS.


Figure 5.19 – Using the community attribute in BGP

The figure below illustrates the case where AS1 advertises the network 172.16.1.0 to AS 2 with the community attribute no-advertise. Router B in AS 2 will not advertise this information to any other routers.


Figure 5.20 – Using the no-advertise attribute in BGP


The figure below illustrates the Internet community attribute. There is no restriction on the routers that will receive this advertisement from AS 1.


Figure 5.21 – Using Internet Attributes in BGP

5.5.8.3 BGP Path Selection

A BGP router can receive multiple route advertisements for the same destination from multiple sources. BGP chooses one of them as the best route. Once a route is chosen, BGP places the route in the IP routing table and sends the route to its neighbors. BGP uses the following criteria, in the order listed, to choose a route to a given destination:


If the next step in the path is unreachable, discard the update.

this way

Refer to the paths with the greatest weight.

If there are multiple paths with the same maximum weight, the path with the largest local reference attribute will be selected.

If the local reference attributes are the same, the route originating from the current BGP router is chosen.

If there is no path with the origin at the current router, refer to the path through the shortest AS.

If all paths have the same AS number, refer to the path with the smallest departure type (With IGP lower than EGP, and EGP lower than incomplete).

If the origin codes are the same, refer to the path with the lowest MED attribute.

If same MED, refer to external routes rather than internal routes.

If the path is still the same, refer to the paths through a nearest neighbor IGP.

Refers to the path with the lowest IP address as specified by the BGP router numbers.


Chapter 6

Virtual LAN

Purpose

This chapter aims to introduce the reader to the following issues:

The role of VLANs

The role of Switch in VLAN

Benefits of VLANs

VLAN setup models: port-based, static, dynamic

Comment


Agree Privacy Policy *