实验题目:
实验分析:
IP地址配置完成后,配置路由,包含R1/2和R7/8之间的静态和R2/3/4/5/6/7的动态路由协议(OSPF)
建立EBGP和IBGP关系以及内部的反射
对应网段在BGP协议内的宣告
汇总(在此使用不正规的路由汇总,直接书写一条防环路由——指向空接口,随后直接宣告汇总路由)
实验拓扑:
实验配置:
R1:
[Huawei]sysname r1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[r1-GigabitEthernet0/0/0]int l0
[r1-LoopBack0]ip add 1.1.1.1 32
[r1-LoopBack0]q
[r1]bgp 1
[r1-bgp]peer 172.16.0.2 as-number 2
[r1-bgp]peer 172.16.0.2 connect-interface l0
[r1-bgp]peer 172.16.0.2 ebgp-max-hop 2
[r1-bgp]int l1
[r1-LoopBack1]ip add 192.168.1.1 24
[r1-LoopBack1]bgp 1
[r1-bgp]network 192.168.1.0 24
R2:
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0/0]int l0
[R2-LoopBack0]ip add 172.16.0.2 32
[R2-LoopBack0]int l1
[R2-LoopBack1]ip add 172.16.2.1 24
[R2-LoopBack1]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 172.16.1.21 30
[R2-GigabitEthernet0/0/1]int g0/0/2
[R2-GigabitEthernet0/0/2]ip add 172.16.1.1 30
[R2-GigabitEthernet0/0/2]q
[R2]ip route-static 1.1.1.1 32 12.1.1.1
[R2]bgp 64512
[R2-bgp]confederation id 2
[R2-bgp]peer 1.1.1.1 as-number 1
[R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[R2-bgp]peer 1.1.1.1 ebgp-max-hop 2
[R2-bgp]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[R2-ospf-1-area-0.0.0.0]int l1
[R2