模拟三个自治域互通
省略IP配置步骤
OSPF
R2
ospf 1
area 0
network 23.23.23.1 0.0.0.0
network 2.2.2.2 0.0.0.0
qu
R3
ospf 1
area 0
network 23.23.23.2 0.0.0.0
network 3.3.3.3 0.0.0.0
qu
BGP
R1 宣告自身AS100域与自身IP段,同时与AS200建立连接
bgp 100
peer 12.12.12.2 as-number 200
address-family ipv4
network 192.168.1.1 255.255.255.25
peer 12.12.12.2 enable
R2 宣告自身AS200域以及与AS100建立连接
bgp 200
peer 12.12.12.1 as 100
address-family ipv4
peer 12.12.12.1 enable
R2 确定R3的AS200域,以及指定与R3的BGP通讯接口为LoopBack 0
, 指定来自R3的下一跳为自身。
bgp 200
peer 3.3.3.3 as 200
peer 3.3.3.3 connect-interface LoopBack 0
address-family ipv4
peer 3.3.3.3 enable
peer 3.3.3.3 next-hop-local
R3 宣告自身AS200域,指定与同域R2的通讯接口为LoopBack 0,指定R4的自治域为AS300,指定来自R2的下一跳为自身
bgp 200
peer 2.2.2.2 as 200
peer 34.34.34.2 as 300
peer 2.2.2.2 connect-interface LoopBack 0
address-family ipv4
peer 2.2.2.2 enable
peer 34.34.34.2 enable
peer 2.2.2.2 next-hop-local
R4宣告自身AS300域与自身IP段,并建立与R3的通讯
bgp 300
peer 34.34.34.1 as 200
address-family ipv4
peer 34.34.34.1 enable
network 172.16.1.0 24
R1与R4测试通讯
ping -a 192.168.1.1 172.16.1.1
© 版权声明
文章版权由CC-BY-NC-SA 4.0协议分发共享
THE END
暂无评论内容