BGP配置实例讲解

BGP配置实例

BGP配置实例讲解

1,IBGP

R1

interface GigabitEthernet0/0/0

ip address 10.1.1.1 255.255.255.0

interface LoopBack0

ip address 1.1.1.1 255.255.255.0

# IBGP的底层是IGP,所以要配置IBGP前,要先配置要IGP(如这里的ospf)

ospf 1

area 0.0.0.0

network 1.1.1.0 0.0.0.255

network 10.1.1.0 0.0.0.255

router id 1.1.1.1

bgp 100

peer 2.2.2.2 as-number 100

peer 2.2.2.2 connect-interface LoopBack0 指定源为环回口(IBGP指定源地址一般为换回口, ebgp指定源地址一般为直连接口)

peer 2.2.2.2 password cipher gu MD5密码

network 1.1.1.0 255.255.255.0

R2

interface GigabitEthernet0/0/0

ip address 10.1.1.2 255.255.255.0

interface LoopBack0

ip address 2.2.2.2 255.255.255.0

#

ospf 1

area 0.0.0.0

network 2.2.2.0 0.0.0.255

network 10.1.1.0 0.0.0.255 注意这里R2对R3不能宣告ospf,因为他们是EBGP

router id 2.2.2.2

bgp 100

peer 1.1.1.1 as-number 100

peer 1.1.1.1 connect-interface LoopBack0

peer 1.1.1.1 password cipher gu

network 2.2.2.0 255.255.255.0

BGP配置实例讲解

BGP配置实例讲解

2.EBGP

R2

pee 10.1.2.2 as-number 200

R3

interface LoopBack0

ip address 3.3.3.3 255.255.255.0

router id 3.3.3.3

bgp 200

peer 10.1.2.1 as-number 100

BGP配置实例讲解

BGP配置实例讲解


分享到:


相關文章: