IP地址划分:
IP地址 | 网段 |
192.168.1.1 /24 | LoopBack1(AR1) |
10.0.0.1 /24 | LoopBack2(AR2) |
172.16.1.0 /29 | AR2--AR3 |
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 |
172.16.1.0/24 | MA骨干链路 |
172.16.8.0/29 | AR3--AR4 |
172.16.16.0/29 | AR2--AR5 |
172.16.24.0/29 | AR5-AR6 |
172.16.32.0/29 | AR6--AR7 |
172.16.40.0/29 | AR4--AR7 |
192.168.2.0/29 | Loopback1,2 (AR8) |
IP的配置
[Huawei]interface l0
[Huawei-LoopBack0]ip address 192.168.1.1 24
[Huawei]interface l1
[Huawei-LoopBack1]ip address 10.0.0.1 24
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.2.1 24
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.2.2 24
。。。
启动OSPF
[Huawei]ospf 1 ro
[Huawei]ospf 1 router-id 1.1.1.1
[Huawei-ospf-1]a
[Huawei-ospf-1]area 1
[Huawei-ospf-1-area-0.0.0.1]ne
[Huawei-ospf-1-area-0.0.0.1]network 172.16.0.0 0.0.255.255
。。。(每个路由器都需要启动ospf进程)
启动bgp
[Huawei]bgp 1
[Huawei-bgp]rou
[Huawei-bgp]route-select
[Huawei-bgp]router-id 1.1.1.1
[Huawei-bgp]pee
[Huawei-bgp]peer 12.0.0.2 as
[Huawei-bgp]peer 12.0.0.2 as-number 2
[Huawei-bgp]bgp 64512 (在联邦中启动的是小的as号)
[Huawei-bgp]router - id 2.2.2.2
[Huawei-bgp]peer 172.16.3.1 connect-interface LoopBack 0
[Huawei-bgp]peer 172.16.5.1 ebgp-max-hop 2