BGP协议学习精华(一)

BGP学习精华

一、BGP FUNDAMENTALS

二、BGP & Route Maps

三、BGP Decicion Algorithm


BGP FUNDAMENTALS l With the exception of the neighbor ebgp-multihop router configuration command,the commands for configuring EBGP&IBGP are the same.
l Within as AS,BGP peers don't need to be directly connected
l router bgp command enables a BGP routing process and assigns to it a AS number
l neighbor remote-as command adds an entry to the BGP neighbor table specifying that the peer identified by a particular IP address belongs to the specified AS.
for EBGP ,neighbor IP address is usually the IP address directly connected.
for IBGP, neighbor IP address can be the IP address of any of the router's interfaces.
l To verify that BGP peers are up,use the show ip bgp neighbor, if it doesn't show that state=established,then the peers are not up. the remote router ID is the highest ip address or highest loopback interface on that router. the table version number increments by new incoming information
l clear ip bgp to reset the bgp session after make a configuration change
INTERNAL BGP
BGP speaker收到同一个AS域中其他的BGP speaker发来的路由信息时,该BGP speaker 只通过EBGP向外部的BGP speaker发送收到的信息,所以在同一AS域中必须full meshed
loopback interface:
当使用某一物理端口作为neighbor remote-as中的地址时,若该端口不能使用,则两个路由器将不能连通。使用loopback interface就没有这一顾虑。
router bgp 100
neighbor 190.225.22.2 remote-as 100
neighbor 190.225.22.2 update-source loopback 0
neighbor update-source
是指明用于连接的是loopback端口,而不是物理端口。 由于EBGP peers之间通常是端对端互连的,必须依赖物理端口的连接,因此较少使用loopback
EXTERNAL BGP
ip multihop:
当两个BGP speaker之间不能直接连接时使用,这时可通过两者的loopback端口互连,并使用neighbor ebgp-multihop,但在配置中必须加上静态路由或起IGP,以保证两者能互通。   !Router A
loopback interface 0
ip address 129.213.1.1
!
router bgp 100
neighbor 180.225.11.1 remote-as 300
neighbor 180.225.11.1 ebgp-multihop
neighbor 180.225.11.1 update-source loopback 0
!Router B
loopback interface 0
ip address 180.225.11.1
!
router bgp 300
neighbor 129.213.1.1 remote-as 100
neighbor 129.213.1.1 ebgp-multihop
neighbor 129.213.1.1 update-source loopback 0
EBGP LOAD BALANCING
当两个AS之间通过多条链路连接时,使用neighbor ebgp-multihop,使BGP同时使用这多条链路,可以实现load balancing router A
interface loopback 0
ip address 150.10.1.1 255.255.255.0
!
router bgp 100
neighbor 160.10.1.1 remote-as 200
neighbor 160.10.1.1 ebgp-multihop
neighbor 160.10.1.1 update-source loopback 0
network 150.10.0.0
!
ip route 160.10.0.0 255.255.0.0 1.1.1.2
ip route 160.10.0.0 255.255.0.0 2.2.2.2

! router B
interface loopback 0
ip address 160.10.1.1 255.255.255.0
!
router bgp 200
neighbor 150.10.1.1 remote-as 100
neighbor 150.10.1.1 ebgp-multihop
neighbor 150.10.1.1 update-source loopback 0
network 160.10.0.0
!
ip route 150.10.0.0 255.255.0.0 1.1.1.1
ip route 150.10.0.0 255.255.0.0 2.2.2.1
SYNCHRONIZATION (no synchronization)
BGP
同步规则规定如果一个 AS 域为另一个 AS 域提供传输服务时,则只有在该 AS 域中所有的路由器都通过 IGP 学到一条路由信息时,才将这条信息广播出去。不使用同步,传输可快速一些,但可能引起数据包丢失。只有符合下列条件时可不使用同步: 1 、该 AS 不为其他两个 AS 提供通道 2 AS 域内都走 BGP

你可能感兴趣的:(职场,协议,休闲,BGP)