题目
实验内容:
子网划分:
用于建邻环回接口网段划分:
172.16.0.0/24
用于骨干链路接口网段划分:
172.16.1.0/24
172.16.1.0/30 (AR2-AR3)
172.16.1.4/30 (AR3-AR4)
172.16.1.8/30 (AR4-AR7)
172.16.1.12/30 (AR7-AR6)
172.16.1.16/30 (AR6-AR5)
172.16.1.20/30 (AR5-AR2)
***
用户:
172.16.2.0/24 (AR2)
172.16.3.0/24 (AR3)
172.16.4.0/24 (AR4)
172.16.5.0/24 (AR5)
172.16.6.0/24 (AR6)
172.16.7.0/24 (AR7)
划分后的拓扑图:
配置每台路由器的IP:
AR1:
AR2:
AR3:
AR4:
AR5:
AR6:
AR7:
AR8:
AS2中的ospf配置:
AR2配置:
AR3配置:
AR4配置:
AR5配置:
AR6配置:
AR7配置:
AR2的路由表:
BGP配置:
R1:
R2:
R3:
R4:
R5:
R6:
R7:
R8:
配置反射器
AR3
[AR3]bgp 64512
[AR3-bgp]peer 172.16.1.6 reflect-client
AR6
[AR6]bgp 64513
[AR6-bgp]peer 172.16.1.17 reflect-client
宣告1.1.1.1/8.8.8.8
[AR1-bgp]network 1.1.1.1 32
[AR8-bgp]net 8.8.8.8 32
R1路由表:
查看ping通测试:
减少路由条目数量
AR2
[AR2]ip route-static 172.16.0.0 16 NULL 0
[AR2]bgp 64512
[AR2-bgp]net 172.16.0.0 16
AR7
[AR7]ip route-static 172.16.0.0 16 NULL 0
[AR7]bgp 64513
[AR7-bgp]net 172.16.0.0 16
查看R1的bgp路由表
配置GRE:
AR1配置:
[r1]interface Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 10.1.1.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre
[r1-Tunnel0/0/0]source 1.1.1.1
[r1-Tunnel0/0/0]destination 8.8.8.8
Jul 22 2024 16:58:06-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r1-Tunnel0/0/0]
[r1-Tunnel0/0/0]q
[r1]ip route-static 192.168.2.0 24 10.1.1.2
AR8配置:
[r8]int Tunnel 0/0/0
[r8-Tunnel0/0/0]ip add 10.1.1.2 24
[r8-Tunnel0/0/0]tunnel-protocol gre
[r8-Tunnel0/0/0]source 8.8.8.8
[r8-Tunnel0/0/0]destination 1.1.1.1
Jul 22 2024 16:59:07-08:00 r8 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r8-Tunnel0/0/0]
[r8-Tunnel0/0/0]q
[r8]ip route-static 192.168.1.0 24 10.1.1.1