一、实验拓扑
二、实验要求
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地址为172.16.0.0.请合理划分
3、AS间的骨干链路ip地址随意定制
4、使用BGP协议让整个网络所有设备的环回可以相互访问
5、减少条目数量,避免环路出现
三、实验配置
1、配置IP
R1
interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0
interface LoopBack0
ip address 192.168.1.1 255.255.255.0
interface LoopBack1
ip address 10.1.1.1 255.255.255.0
R2
interface GigabitEthernet0/0/0
ip address 172.16.2.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 12.1.1.2 255.255.255.0
interface GigabitEthernet0/0/2
ip address 172.16.12.1 255.255.255.0
interface LoopBack0
ip address 172.16.1.1 255.255.255.0
R3
interface GigabitEthernet0/0/0
ip address 172.16.4.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 172.16.2.2 255.255.255.0
interface LoopBack0
ip address 172.16.3.1 255.255.255.0
R4
interface GigabitEthernet0/0/1
ip address 172.16.4.2 255.255.255.0
interface GigabitEthernet0/0/2
ip address 172.16.6.1 255.255.255.0
interface LoopBack0
ip address 172.16.5.1 255.255.255.0
R5
interface GigabitEthernet0/0/0
ip address 172.16.10.1 255.255.255.0
interface GigabitEthernet0/0/1
interface GigabitEthernet0/0/2
ip address 172.16.12.2 255.255.255.0
R6
interface GigabitEthernet0/0/0
ip address 172.16.8.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 172.16.10.2 255.255.255.0
interface LoopBack0
ip address 172.16.9.1 255.255.255.0
R7
interface GigabitEthernet0/0/0
ip address 78.1.1.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 172.16.8.2 255.255.255.0
interface GigabitEthernet0/0/2
ip address 172.16.6.2 255.255.255.0
interface LoopBack0
ip address 172.16.7.1 255.255.255.0
R8
interface GigabitEthernet0/0/0
ip address 78.1.1.2 255.255.255.0
interface LoopBack0
ip address 192.168.2.1 255.255.255.0
interface LoopBack1
ip address 10.1.2.1 255.255.255.0
2、写IGP
R2
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 172.16.1.1 0.0.0.0
network 172.16.2.1 0.0.0.0
network 172.16.12.1 0.0.0.0
R3
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 172.16.2.2 0.0.0.0
network 172.16.3.1 0.0.0.0
network 172.16.4.1 0.0.0.0
R4
ospf 1 router-id 4.4.4.4
area 0.0.0.0
network 172.16.4.2 0.0.0.0
network 172.16.5.1 0.0.0.0
network 172.16.6.0 0.0.0.255
R5
ospf 1 router-id 5.5.5.5
area 0.0.0.0
network 172.16.10.0 0.0.0.255
network 172.16.11.0 0.0.0.255
network 172.16.12.0 0.0.0.255
R6
ospf 1 router-id 6.6.6.6
area 0.0.0.0
network 172.16.8.0 0.0.0.255
network 172.16.9.0 0.0.0.255
network 172.16.10.0 0.0.0.255
R7
ospf 1 router-id 7.7.7.7
area 0.0.0.0
network 172.16.6.0 0.0.0.255
network 172.16.7.0 0.0.0.255
network 172.16.8.0 0.0.0.255
3、检查OSPF的邻居表是否建邻
4、写IGBP
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.11.1 as-number 64513
peer 172.16.11.1 ebgp-max-hop 255
peer 172.16.11.1 connect-interface LoopBack0
peer 172.16.3.1 next-hop-local
peer 172.16.11.1 next-hop-local
R3
bgp 64512
router-id 3.3.3.3
confederation id 2
peer 172.16.1.1 as-number 64512
peer 172.16.1.1 connect-interface LoopBack0
peer 172.16.5.1 as-number 64512
peer 172.16.5.1 connect-interface LoopBack0
peer 172.16.5.1 reflect-client
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 255
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.1.1 as-number 64512
peer 172.16.1.1 ebgp-max-hop 255
peer 172.16.1.1 connect-interface LoopBack0
peer 172.16.9.1 as-number 64513
peer 172.16.9.1 connect-interface LoopBack0
R6
bgp 64513
router-id 6.6.6.6
confederation id 2
peer 172.16.7.1 as-number 64513
peer 172.16.7.1 connect-interface LoopBack0
peer 172.16.11.1 as-number 64513
peer 172.16.11.1 connect-interface LoopBack0
peer 172.16.7.1 reflect-client
peer 172.16.11.1 reflect-client
R7
bgp 64513
router-id 7.7.7.7
confederation id 2
confederation peer-as 64512
peer 10.1.2.1 as-number 3
peer 10.1.2.1 ebgp-max-hop 255
peer 10.1.2.1 connect-interface LoopBack0
peer 78.1.1.2 as-number 3
peer 172.16.5.1 as-number 64512
peer 172.16.5.1 connect-interface LoopBack0
peer 172.16.9.1 as-number 64513
peer 172.16.9.1 connect-interface LoopBack0
peer 192.168.2.1 as-number 3
peer 192.168.2.1 ebgp-max-hop 255
peer 192.168.2.1 connect-interface LoopBack0
R1
bgp 1
peer 12.1.1.2 as-number 2
R8
bgp 3
peer 78.1.1.1 as-number 2
5、ping