Analysis of BGP (EBGP / IBGP)

First, the basic concept

AS: Autonomous System

BGP route is mainly used for the transfer between the AS.

AS Number Range: 1-65535 private AS number ranges: 64512-65535

Difference between BGP and IGP: a, IGP more flexible, such as ospf different processes can be set depending on the interface, but only a part of a route can be configured with a BGP AS, the AS select the optimal route IGP, BGP select the most Inter AS best route. Details can refer to the difference between Wikipedia https://wenku.baidu.com/view/7ac228da33d4b14e85246856.html

The following applications for use BGP

- a large network (or a larger area IGP) the configuration of the plurality of domains IGP, BGP interconnected by these fields.

- the need for complex routing policy routing transfer between the control domain.

- when the interconnection between ISP, you need to pass large routing between different AS -. When run within a variety of IGP Meanwhile, another difficulty redistributed IGP variety is much greater than BGP configuration

BGP state

When BGP session, BGP has the following states:

1. Idle: searching the routing table, the BGP process initializes its resources, resets the retry timer, a connection, initiates a TCP connection, and start listening to the remote peer connections initiated.

2. Connect: After finding the routing table TCP three-way handshake, TCP connection is successful, go to OpenSent state, TCP connection fails, go to the active state, will try to connect again.

3. Open sent: three-way handshake to send a message after a successful Open message, wait for it to open peer sends a message, if an error occurs, it sends an error message and return an idle state, if error-free, then start sending keepalive Keepalive and reset the timer.

4. Open confirm: the other party received the message sent by the Open, if you receive keepalive messages, BGP enters the established state, the neighbor relationship negotiation is complete; if it will receive a system update or keepalive message, restart holding timer; if received Notification message, BGP will return to the idle state. o in addition, if there is no response to the Open message, the router into the active state.

5. Established: session is established, the final status negotiation process neighbor relations; then will begin BGP routing update packet to its peer exchange.

The figure below shows BGP debug out of the corresponding relationship status

 

IBGP (Internal BGP)

When BGP neighbors are running in the same AS inside, their relationship BGP is called IBGP, IBGP need not be directly connected to the network via TCP neighbor device can be set up IBGP adjacency, of course, the middle of established TCP relations, generally IGP protocol carrier, such as OSPF, ISIS like.

neighbor command is used to activate the BGP peer relationship, neighbor IP address is the IP address of the interface when eBGP neighbor BGP router with a direct link, the IP address is iBGP neighbor to neighbor BGP router Loopback interface IP address.

 

 

 

 

to sum up:

BGP is a path vector routing protocol, distance vector routing protocol that is enhanced :

1. reliable updated information: The TCP 179 send port .

2.BGP use unicast delivery routes

3. routing information for the first time the whole table is sent only after the trigger incremental update

4. periodically transmitting keepalive message (equivalent Hello to maintain package) the BGP

The peer between the donor TCP abutting relationship (every 60s sent once, the Holddown time is 180s )

 

BGP three tables:

BGP neighbor table ( Neighbor the Table ): store neighbor information.

 

BGP forwarding table ( Forwarding Database ):

1. store all network information learned from the neighbors

2 can be stored in the same route to the destination network a plurality of

3. Each path contains BGP attributes

 

BGP routing tables ( the IP routing Table ): storing the best route to the destination network

Published 18 original articles · won praise 1 · views 667

Guess you like

Origin blog.csdn.net/wj2555111/article/details/103985347