@实验要求:
1.构建拓扑、划分网段
2.配置接口、环回
R1的配置:
R2的配置:
R3的配置:
R4的配置:
R5的配置:
R6的配置:
R7的配置:
R8的配置:
3.AS2配置OSPF
R2的配置:
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255
[R2-ospf-1-area-0.0.0.0]
R3的配置:
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255
[R3-ospf-1-area-0.0.0.0]
R4的配置:
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255
[R4-ospf-1-area-0.0.0.0]
R5的配置:
[R5]ospf 1 router-id 5.5.5.5
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255
[R5-ospf-1-area-0.0.0.0]
R6的配置:
[R6]ospf 1 router-id 6.6.6.6
[R6-ospf-1]area 0
[R6-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255
[R6-ospf-1-area-0.0.0.0]
R7的配置:
[R7]ospf 1 router-id 7.7.7.7
[R7-ospf-1]area 0
[R7-ospf-1-area-0.0.0.0]net 172.16.0.0 0.0.255.255
[R7-ospf-1-area-0.0.0.0]
因为AS2的网段是由172.16.0.0网段划分的,所以可以只宣告汇总路由
4.AS1区域及AS2边缘配置BGP
R1的配置:
[R1]bgp 1
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 12.1.1.2 as-number 2
[R1-bgp]
R2的配置:
[R2]bgp 64512
[R2-bgp]peer 12.1.1.1 as-number 1
[R2-bgp]
5.设置BGP,划分AS2区域
- R2\R3\R4为一个区域
R2的配置:
R3的配置:
R4的配置:
- R4\R5\R6为一个区域
R5的配置:R6的配置:
[R6]bgp 64513
[R6-bgp]router-id 172.16.176.1
[R6-bgp]confederation id 2
[R6-bgp]peer 172.16.160.1 as-number 64513
[R6-bgp]peer 172.16.160.1 con
[R6-bgp]peer 172.16.160.1 connect-interface l0
[R6-bgp]peer 172.16.192.1 as-number 64513
[R6-bgp]peer 172.16.192.1 con
[R6-bgp]peer 172.16.192.1 connect-interface l0
R7的配置:
[R7]bgp 64513
[R7-bgp]router-id 172.16.192.1
[R7-bgp]
[R7-bgp]confederation id 2
[R7-bgp]con
[R7-bgp]confederation peer-as 64512
[R7-bgp]peer 172.16.144.1 as-number 64512
[R7-bgp]peer 172.16.144.1 ebg
[R7-bgp]peer 172.16.144.1 ebgp-max-hop 2
[R7-bgp]peer 172.16.144.1 con
[R7-bgp]peer 172.16.144.1 connect-interface l0
[R7-bgp]peer 172.16.176.1 as-number 64513
[R7-bgp]peer 172.16.176.1 con
[R7-bgp]peer 172.16.176.1 connect-interface l0
R7的配置:
6.AS3配置BGP
R8的配置:
7.R1、R8配置TUNNEL
R1的配置:
[R1]inter t0/0/0
[R1-Tunnel0/0/0]ip add 192.168.3.1 255.255.255.255
[R1-Tunnel0/0/0]tun
[R1-Tunnel0/0/0]tunnel-protocol gre
[R1-Tunnel0/0/0]source 10.1.1.1
[R1-Tunnel0/0/0]de
[R1-Tunnel0/0/0]dest
[R1-Tunnel0/0/0]destination 10.1.2.1
[R1-Tunnel0/0/0]ospf ne
[R1-Tunnel0/0/0]ospf network-type br
[R1-Tunnel0/0/0]ospf network-type broadcast
[R1-Tunnel0/0/0]ip route-static 0.0.0.0 0 t0/0/0
R8的配置:
[R8]inter t0/0/0
[R8-Tunnel0/0/0]ip add 192.168.3.2 255.255.255.255
[R8-Tunnel0/0/0]tu
[R8-Tunnel0/0/0]tunnel-protocol gre
[R8-Tunnel0/0/0]source 10.1.2.1
[R8-Tunnel0/0/0]dest
[R8-Tunnel0/0/0]destination 10.1.1.1
[R8-Tunnel0/0/0]ospf ne
[R8-Tunnel0/0/0]ospf network-type br
[R8-Tunnel0/0/0]ospf network-type broadcast
[R8-Tunnel0/0/0]ip route-static 0.0.0.0 0 t0/0/0
8.配置RR反射器,设置客户端
R1的配置:
R2的配置:
*R3的配置:*配置RR反射器,设置R4为客户端
*R6的配置:*配置RR反射器,R5为客户端
R7的配置:
[R7]ip route-static 10.1.2.1 32 78.1.1.2
[R7]bgp 64513
[R7-bgp]peer 172.16.176.1 n
[R7-bgp]peer 172.16.176.1 next-hop-local //修改下一跳地址
[R7-bgp]
R8的配置:
实验结束