1. AS1存在两个环回,一个地址为192.168.1.0 /24该地址不能在任何协议中宣告
AS3存在两个环回,一个地址为192.168.2.0 /24该地址不能在任何协议中宣告
最终要求这两个环回可以相互通讯
AS1的另一个环回为10.1.1.0/24,AS3的另一个环回为10.1.2.0/24
2.整个AS2的IP地址为176.16.0.0 请合理分配
3.AS间的骨干链路IP地址随意定制
4.使用BGP协议让整个网络所有设备的环回可以互相访问
5.减少条目数量,避免环路出现
配置IP
R1
sys
sys R1
int g 0/0/0
ip a 12.0.0.1 24
int lo0
ip a 192.168.1.1 24
int lo1
ip a 10.0.0.1 24
R2
sys
sys R2
int g0/0/0
ip a 12.0.0.2 24
int lo0
ip a 172.16.2.1 24
int g 0/0/1
ip a 172.16.1.1 29
int g0/0/2
ip a 172.16.1.9 29
R3
sys
sys R3
int g0/0/0
ip a 172.16.1.2 29
rnet0/0/0]int lo0
ip a 172.16.3.1 24
int g 0/0/1
ip a 172.16.1.17 29
R4
sys
sys R4
int g0/0/0
ip a 172.16.1.18 29
int g 0/0/1
ip a 172.16.1.25 29
int lo0
ip a 172.16.4.1 24
R5
sys
sys R5
int g 0/0/0
ip a 172.16.1.10 29
int g 0/0/1
ip a 172.16.1.133 29
int lo0
ip a 172.16.5.1 24
R6
sys
sys R6
int g 0/0/0
ip a 172.16.1.34 29
int lo0
ip a 172.16.6.1 24
int g0/0/1
ip a 172.16.1.41 29
R7
sys
sys R7
int g0/0/0
ip a 172.16.1.42 29
int lo0
ip a 172.16.7.1 24
int g 0/0/1
ip a 172.16.1.26 29
int g 0/0/2
ip a 78.0.0.1 24
R8
sys
sys R8
int g 0/0/0
ip a 78.0.0.2 24
int lo0
ip a 192.168.2.1 24
int lo1
ip a 11.0.0.1 24
AS2上配置OSPF
R2:
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 172.16.0.0 0.0.255.255
R3:
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 172.16.0.0 0.0.255.255
R4:
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 172.16.0.0 0.0.255.255
R5:
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 172.16.0.0 0.0.255.255
R6:
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 172.16.0.0 0.0.255.255
BGP邻居建立
R1:
bgp 1
router-id 1.1.1.1
peer 12.1.1.2 as-number 2
R2:
bgp 64512
router-id 2.2.2.2
confederation id 2
confederation peer-as 64513
peer 12.1.1.1 as-number 1
peer 172.16.3.1 as-number 64512
peer 172.16.3.1 connect-interface LoopBack0
peer 172.16.5.1 as-number 64513
peer 172.16.5.1 ebgp-max-hop 2
peer 172.16.5.1 connect-interface LoopBack0
R3:
bgp 64512
router-id 3.3.3.3
confederation id 2
peer 172.16.2.1 as-number 64512
peer 172.16.2.1 connect-interface LoopBack0
peer 172.16.4.1 as-number 64512
peer 172.16.4.1 connect-interface LoopBack0
R4:
bgp 64512
router-id 4.4.4.4
confederation id 2
confederation peer-as 64513
peer 172.16.3.1 as-number 64512
peer 172.16.3.1 connect-interface LoopBack0
peer 172.16.7.1 as-number 64513
peer 172.16.7.1 ebgp-max-hop 2
peer 172.16.7.1 connect-interface LoopBack0
R5:
bgp 64513
router-id 5.5.5.5
confederation id 2
confederation peer-as 64512
peer 172.16.2.1 as-number 64512
peer 172.16.2.1 ebgp-max-hop 2
peer 172.16.2.1 connect-interface LoopBack0
peer 172.16.6.1 as-number 64513
peer 172.16.6.1 connect-interface LoopBack0
R6:
bgp 64513
router-id 6.6.6.6
confederation id 2
peer 172.16.5.1 as-number 64513
peer 172.16.5.1 connect-interface LoopBack0
peer 172.16.7.1 as-number 64513
peer 172.16.7.1 connect-interface LoopBack0
R7:
bgp 64513
router-id 7.7.7.7
confederation id 2
confederation peer-as 64512
peer 78.1.1.2 as-number 3
peer 172.16.4.1 as-number 64512
peer 172.16.4.1 ebgp-max-hop 2
peer 172.16.4.1 connect-interface LoopBack0
peer 172.16.6.1 as-number 64513
peer 172.16.6.1 connect-interface LoopBack0
R8:
bgp 3
router-id 8.8.8.8
peer 78.1.1.1 as-number 2
宣告路由
R1:
bgp 1
network 10.1.1.0 255.255.255.0
R2:
bgp 64512
peer 172.16.3.1 next-hop-local
peer 172.16.5.1 next-hop-local
R3:
bgp 64512
peer 172.16.2.1 reflect-client
R6:
bgp 64513
peer 172.16.5.1 reflect-client
R7:
bgp 64513
peer 172.16.4.1 next-hop-local
peer 172.16.6.1 next-hop-local
R8:
bgp 3
network 10.1.2.0 255.255.255.0
AS1与AS3配置GRE 与 静态
R1:
interface Tunnel0/0/0
ip address 10.1.3.1 255.255.255.0
tunnel-protocol gre
source 10.1.1.1
destination 10.1.2.1
q
ip route-static 192.168.2.0 24 10.1.3.2
R8:
interface Tunnel0/0/0
ip address 10.1.3.2 255.255.255.0
tunnel-protocol gre
source 10.1.2.1
destination 10.1.1.1
q
ip route-static 192.168.1.0 24 Tunnel 0/0/0