華為ebgp 華為路由器BGP鄰居詳解

2021-10-13 09:28:53 字數 3833 閱讀 7177

本篇文章為大家分享下華為路由bgp鄰居的建立,主要包括三部分類容:

bgp配置一:非直連鄰居;

bgp配置二:ibgp通過回環口建立鄰居;

bgp配置三:ebgp通過回環口建立鄰居。

基本網路配置:

r1sysname r1

inte***ce g0/0/0

ip address 192.168.12.1 24

inte***ce loopback 0

ip address 10.10.1.1 24

quit

r2sysname r2

inte***ce g0/0/1

ip address 192.168.12.2 24

inte***ce g0/0/0

ip address 192.168.23.2 24

quit

inte***ce loopback 0

ip address 10.10.2.2 24

quit

r3sysname r3

inte***ce g0/0/1

ip address 192.168.23.3 24

inte***ce g0/0/0

ip address 192.168.34.3 24

quit

r4sysname r4

inte***ce g0/0/1

ip address 192.168.34.4 24

inte***ce g0/0/0

ip address 192.168.45.4 24

quit

r5sysname r5

inte***ce g0/0/1

ip address 192.168.45.5 24

inte***ce g0/0/0

ip address 192.168.56.5 24

quit

inte***ce loopback 0

ip address 10.10.5.5 24

quit

r6sysname r6

inte***ce g0/0/1

ip address 192.168.56.6 24

inte***ce loopback 0

ip address 10.10.6.6 24

quit

ospf配置:

r2ospf 1 router-id 2.2.2.2

area 0

network 192.168.23.0 0.0.0.255

network 10.10.2.0 0.0.0.255

quit

quit

r3ospf 1 router-id 3.3.3.3

area 0

network 192.168.23.0 0.0.0.255

network 192.168.34.0 0.0.0.255

quit

quit

r4ospf 1 router-id 4.4.4.4

area 0

network 192.168.45.0 0.0.0.255

network 192.168.34.0 0.0.0.255

quit

quit

r5ospf 1 router-id 5.5.5.5

area 0

network 192.168.45.0 0.0.0.255

network 10.10.5.0 0.0.0.255

quit

quit

bgp配置一:非直連鄰居

r1bgp 100

router-id 1.1.1.1

peer 192.168.12.2 as-number 200

network 10.10.1.0 255.255.255.0

quit

r2bgp 200

router-id 2.2.2.2

peer 192.168.12.1 as-number 100

peer 192.168.45.5 as-number 200

quit

r5bgp 200

router-id 5.5.5.5

peer 192.168.23.2 as-number 200

peer 192.168.56.6 as-number 600

quit

r6bgp 600

router-id 6.6.6.6

peer 192.168.56.5 as-number 200

network 10.10.6.0 255.255.255.0

quit

r2bgp 200

peer 192.168.45.5 next-hop-local

r5bgp 200

peer 192.168.23.2 next-hop-local

bgp配置二:ibgp通過回環口建立鄰居

r2-------r5

10.10.2.2 10.10.5.5

r2bgp 200

undo peer 192.168.45.5

peer 10.10.5.5 as-number 200

peer 10.10.5.5 connect-inte***ce loopback0

quit

#ibgp的更新源檢測機制(乙個鄰居上面敲即可)

r5bgp 200

undo peer 192.168.23.2

peer 10.10.2.2 as-number 200

peer 10.10.2.2 connect-inte***ce loopback0

quit

bgp配置三:ebgp通過回環口建立鄰居

r1------------r2

10.10.11.1 10.10.22.2

r1inte***ce gigabitethernet 0/0/2

ip address 192.168.21.1 24

inte***ce loopback 12

ip address 10.10.11.1 24

quit

ip route-static 10.10.22.0 255.255.255.0 192.168.12.2

ip route-static 10.10.22.0 255.255.255.0 192.168.21.2

r2inte***ce gigabitethernet 0/0/2

ip address 192.168.21.2 24

inte***ce loopback 12

ip address 10.10.22.2 24

quit

ip route-static 10.10.11.0 255.255.255.0 192.168.12.1

ip route-static 10.10.11.0 255.255.255.0 192.168.21.1

r1bgp 100

undo peer 192.168.12.2

peer 10.10.22.2 as-number 200

peer 10.10.22.2 connect-inte***ce loopback 12

peer 10.10.22.2 ebgp-max-hop 2

#修改ttl值》1,跳過ebgp直連檢測機制(兩邊都得敲)

r2bgp 200

undo peer 192.168.12.1

peer 10.10.11.1 as-number 100

peer 10.10.11.1 connect-inte***ce loopback 12

peer 10.10.11.1 ebgp-max-hop 2

華為路由器BGP聯盟詳解教程

實驗拓撲圖如下 實驗說明 路由器r2 r3 r4 r5路由器所在配置為聯盟區域,聯盟as號碼為200,r1的as號為100,r6的as號為600。實驗要求 1.ibgp通過回環口建立鄰居 2.ebgp通過直連線口建立鄰居。3.最終實現r1的 loopback0介面和r6的 loopback0介面網路...

華為路由器BGP聯盟詳解 11796823

實驗拓撲圖如下 實驗說明 路由器r2 r3 r4 r5路由器所在配置為聯盟區域,聯盟as號碼為200,r1的as號為100,r6的as號為600。實驗要求 1.ibgp通過回環口建立鄰居 2.ebgp通過直連線口建立鄰居。3.最終實現r1的 loopback0介面和r6的 loopback0介面網路...

華為策略路由加等價路由 華為路由器配置路由策略

如圖1所示,某公司的部門a和部門b相距較遠,router 1和router 6分別作為這兩個部門的出口裝置,as 100內部使用ospf作為igp。現要求 通過部署bgp,使部門a和部門b可以通訊。通過配置路由策略,將router 2 router 3 router 4鏈路作為主鏈路,負責 rout...