第一步,搭建环境,配置接口IP地址和添加环路
R1
[Huawei]in lo0
[Huawei-LoopBack0]ip add 1.1.1.1 24
[Huawei-LoopBack0]in g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 12.1.1.1 24
[Huawei-GigabitEthernet0/0/1]in g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 14.1.1.1 24
[Huawei]in lo1
[Huawei-LoopBack1]ip add 172.16.1.1 24
[Huawei-LoopBack1]in lo2
[Huawei-LoopBack2]ip add 172.16.2.1 24
[Huawei-LoopBack2]in lo3
[Huawei-LoopBack3]ip add 172.16.3.1 24
R2
[Huawei]in lo0
[Huawei-LoopBack0]ip add 2.2.2.2 24
[Huawei-LoopBack0]in g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[Huawei-GigabitEthernet0/0/0]in g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 23.1.1.1 24
R3
[Huawei]in lo0
[Huawei-LoopBack0]ip add 3.3.3.3 24
[Huawei-LoopBack0]in g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 23.1.1.2 24
[Huawei-GigabitEthernet0/0/0]in g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 34.1.1.1 24
R4
[Huawei]in lo0
[Huawei-LoopBack0]ip add 4.4.4.4 24
[Huawei-LoopBack0]in g 0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 34.1.1.2 24
[Huawei-GigabitEthernet0/0/0]in g 0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 14.1.1.2 24
[Huawei-GigabitEthernet0/0/1]in g 0/0/2
[Huawei-GigabitEthernet0/0/2]ip add 45.1.1.1 24
[Huawei-GigabitEthernet0/0/2]in s4/0/1
[Huawei-Serial4/0/1]ip add 46.1.1.1 24
R5
[Huawei]i