华为路由器BGP联盟详解

2022-12-02 1514阅读

温馨提示:这篇文章已超过620天没有更新,请注意相关的内容是否还可用!

R1

sysname R1

华为路由器BGP联盟详解

interface g0/0/0

ip address 192.168.12.1 24

interface LoopBack 0

ip address 10.10.1.1 24

quit

R2

sysname R2

interface g0/0/1

ip address 192.168.12.2 24

interface g0/0/0

ip address 192.168.23.2 24

quit

interface LoopBack 0

ip address 10.10.2.2 24

quit

R3

sysname R3

interface g0/0/1

ip address 192.168.23.3 24

interface g0/0/0

ip address 192.168.34.3 24

interface LoopBack 0

ip address 10.10.3.3 24

quit

R4

sysname R4

interface g0/0/1

ip address 192.168.34.4 24

interface g0/0/0

ip address 192.168.45.4 24

interface LoopBack 0

ip address 10.10.4.4 24

quit

R5

sysname R5

interface g0/0/1

ip address 192.168.45.5 24

interface g0/0/0

ip address 192.168.56.5 24

quit

interface LoopBack 0

ip address 10.10.5.5 24

quit

R6

sysname R6

interface g0/0/1

ip address 192.168.56.6 24

interface LoopBack 0

ip address 10.10.6.6 24

quit

路由器R2、R3、R4、R5路由器通过内部网关协议(IGP)OSP实现内网互通,配置如下:

R2

ospf 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

R3

ospf 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

network 10.10.3.0 0.0.0.255

quit

quit

R4

ospf 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

network 10.10.4.0 0.0.0.255

quit

quit

R5

ospf 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配置:BGP联盟

配置命令如下:

R1

bgp 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

R2

bgp 64523

router-id 2.2.2.2

confederation id 200

peer 192.168.12.1 as-number 100

peer 10.10.3.3 as-number 64523

peer 10.10.3.3 connect-interface LoopBack0

peer 10.10.3.3 next-hop-local

quit

R3

bgp 64523

router-id 3.3.3.3

confederation id 200

confederation peer-as 64545

peer 10.10.2.2 as-number 64523

peer 10.10.2.2 connect-interface LoopBack0

peer 10.10.4.4 as-number 64545

peer 10.10.4.4 connect-interface LoopBack0

peer 10.10.4.4 ebgp-max-hop

quit

R4

bgp 64545

router-id 4.4.4.4

confederation id 200

confederation peer-as 64523

peer 10.10.3.3 as-number 64523

peer 10.10.3.3 connect-interface LoopBack0

peer 10.10.3.3 ebgp-max-hop

peer 10.10.5.5 as-number 64545

peer 10.10.5.5 connect-interface LoopBack0

quit

R5

bgp 64545

router-id 5.5.5.5

peer 192.168.56.6 as-number 600

peer 10.10.4.4 as-number 64545

peer 10.10.4.4 connect-interface LoopBack 0

peer 10.10.4.4 next-hop-local

quit

R6

bgp 600

router-id 6.6.6.6

peer 192.168.56.5 as-number 200

import-route direct

quit

验证测试:R1的 LoopBack0接口和R6的 LoopBack0接口网络互通。

结果如下图:

验证成功!!!

VPS购买请点击我

文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

目录[+]