BGP基础实验
拓扑
步骤:
1、 完成基本的配置
2、 按照需求自治系统AS 100 全网运行OSPF 单区域
3、 完成BGP基本配置
[RT2]bgp 100
[RT2-bgp]peer 67.0.0.2 as-number 300
[RT3]bgp 300
[RT3-bgp]peer 67.0.0.1 as-number 100
[RT1]bgp 100
[RT1-bgp]peer 2.2.2.2 as-number 100
[RT1-bgp]peer 2.2.2.2 connect-interface LoopBack 100
[RT2-bgp]peer 1.1.1.1 as-number 100
[RT2-bgp]peer 1.1.1.1 connect-interface LoopBack 100
[RT1-bgp]peer 5.5.5.5 as-number 100
[RT1-bgp]peer 5.5.5.5 connect-interface LoopBack 100
[RT5]bgp 100
[RT5-bgp]peer 1.1.1.1 as-number 100
[RT5-bgp]peer 1.1.1.1 connect-interface LoopBack 100
4、 注入路由
[RT1]ip ip-prefix prefix_a permit 192.168.1.1 32
[RT1]route-policy imput_bgp permit node 10
[RT1-route-policy]if-match ip-prefix prefix_a
[RT1-bgp]import-route direct route-policy imput_bgp
[RT5]ip ip-prefix prefix_b permit 88.88.88.88 32
[RT5]route-policy bgp-imp permit node 10
[RT5-route-policy]if-match ip-prefix prefix_b
[RT5-bgp]import-route direct route-policy bgp-imp
[RT2]ip ip-prefix prefix_c permit 188.188.188.188 32
[RT2]route-policy bgp-imp permit node 10
[RT2-route-policy]if-match ip-prefix prefix_c
[RT3]ip ip-prefix prefix_3 permit 172.16.1.1 32
[RT3]route-policy pr_3 permit node 10
[RT3-route-policy]if-match ip-prefix prefix_3
[RT3-bgp]import-route direct route-policy pr_3
5、 测试
查看BGP邻居
查看BGP路由表
查看IP 路由表
AS 100访问AS 300