LSW1
<Huawei>
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan batch 2 3 4 5
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]interface e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 2
[Huawei-Ethernet0/0/2]quit
[Huawei]interface e0/0/3
[Huawei-Ethernet0/0/3]port link-type access
[Huawei-Ethernet0/0/3]port default vlan 3
[Huawei-Ethernet0/0/3]quit
[Huawei]interface e0/0/4
[Huawei-Ethernet0/0/4]port l
[Huawei-Ethernet0/0/4]port link-t
[Huawei-Ethernet0/0/4]port link-type a
[Huawei-Ethernet0/0/4]port link-type access
[Huawei-Ethernet0/0/4]port default vlan 4
[Huawei-Ethernet0/0/4]quit
[Huawei]interface e0/0/5
[Huawei-Ethernet0/0/5]port link-type access
[Huawei-Ethernet0/0/5]port default vlan 5
[Huawei-Ethernet0/0/5]quit
[Huawei]interface e0/0/1
[Huawei-Ethernet0/0/1]port link-type trunk
[Huawei-Ethernet0/0/1]port trunk allow-pass vlan all
R1
<Huawei>
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r1
[r1]dhcp en
[r1]dhcp enable
[r1]interface g0/0/0.1
[r1-GigabitEthernet0/0/0.1]ip address 172.16.1.1 24
[r1-GigabitEthernet0/0/0.1]dot1q termination vid 2
[r1-GigabitEthernet0/0/0.1]quit
[r1]interface g0/0/0.2
[r1-GigabitEthernet0/0/0.2]ip address 172.16.2.1 24
[r1-GigabitEthernet0/0/0.2]dot1q termination vid 3
[r1-GigabitEthernet0/0/0.2]quit
[r1]interface g0/0/0.3
[r1-GigabitEthernet0/0/0.3]ip address 172.16.3.1 24
[r1-GigabitEthernet0/0/0.3]dot1q termination vid 4
[r1-GigabitEthernet0/0/0.3]quit
[r1]interface g0/0/0.4
[r1-GigabitEthernet0/0/0.4]ip address 172.16.4.1 24
[r1-GigabitEthernet0/0/0.4]dot1q termination vid 5
[r1-GigabitEthernet0/0/0.4]quit
[r1]ip pool 1
Info: It's successful to create an IP address pool.
[r1-ip-pool-1]network 172.16.1.0 mask 255.255.255.0
[r1-ip-pool-1]gateway-list 172.16.1.1
[r1-ip-pool-1]dns-list 8.8.8.8 114.114.114.114
[r1-ip-pool-1]quit
[r1]ip pool 2
Info: It's successful to create an IP address pool.
[r1-ip-pool-2]network 172.16.2.0 mask 255.255.255.0
[r1-ip-pool-2]gateway-list 172.16.2.1
[r1-ip-pool-2]dns-list 8.8.8.8 114.114.114.114
[r1-ip-pool-2]quit
[r1]ip pool 3
Info: It's successful to create an IP address pool.
[r1-ip-pool-3]network 172.16.3.0 mask 255.255.255.0
[r1-ip-pool-3]gateway-list 172.16.3.1
[r1-ip-pool-3]dns-list 8.8.8.8 114.114.114.114
[r1-ip-pool-3]quit
[r1]ip pool 4
Info: It's successful to create an IP address pool.
[r1-ip-pool-4]network 172.16.4.0 mask 255.255.255.0
[r1-ip-pool-4]gat
[r1-ip-pool-4]gateway-list 172.16.4.1
[r1-ip-pool-4]dns-list 8.8.8.8 114.114.114.114
[r1-ip-pool-4]quit
[r1]interface g0/0/0.1
[r1-GigabitEthernet0/0/0.1]dhcp select global
[r1-GigabitEthernet0/0/0.1]arp broadcast enable
Info: This interface has already been configured with ARP broadcast.
[r1-GigabitEthernet0/0/0.1]quit
[r1]interface g0/0/0.2
[r1-GigabitEthernet0/0/0.2]dhcp select global
[r1-GigabitEthernet0/0/0.2]arp broadcast enable
Info: This interface has already been configured with ARP broadcast.
[r1-GigabitEthernet0/0/0.2]quit
[r1]interface g0/0/0.3
[r1-GigabitEthernet0/0/0.3]dhcp select global
[r1-GigabitEthernet0/0/0.3]arp broadcast enable
Info: This interface has already been configured with ARP broadcast.
[r1-GigabitEthernet0/0/0.3]quit
[r1]interface g0/0/0.4
[r1-GigabitEthernet0/0/0.4]dhcp select global
[r1-GigabitEthernet0/0/0.4]arp broadcast enable
Info: This interface has already been configured with ARP broadcast.
[r1-GigabitEthernet0/0/0.4]quit
[r1] [r1]interface lo
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 1.1.1.1 32
[r1-LoopBack0]quit
[r1]ospf 100 router-id 1.1.1.1
[r1-ospf-100]area 1
[r1-ospf-100-area-0.0.0.1]network 1.1.1.1 0.0.0.0
[r1-ospf-100-area-0.0.0.1]network 12.1.1.1 0.0.0.0
[r1-ospf-100-area-0.0.0.1]network 172.16.0.0 0.0.255.255
[r1-ospf-100-area-0.0.0.1]quit
R2
<Huawei>
<Huawei>
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname r2
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
[r2-GigabitEthernet0/0/0]quit
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 2.2.2.2 32
[r2-LoopBack0]quit
[r2]interface g0/0/1
[r2-GigabitEthernet0/0/1]ip address 23.1.1.1 24
[r2-GigabitEthernet0/0/1]
Jul 23 2022 20:52:22-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r2-GigabitEthernet0/0/1]quit
[r2]ospf 100 router-id 2.2.2.2
[r2-ospf-100]area 1
[r2-ospf-100-area-0.0.0.1]network 2.2.2.2 0.0.0.0
[r2-ospf-100-area-0.0.0.1]network 23.1.1.1 0.0.0.0
[r2-ospf-100-area-0.0.0.1]network 12.1.1.2 0.0.0.0
[r2-ospf-100-area-0.0.0.1]quit
R3
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sys
[Huawei]sysname r3
[r3]dhcp enable
[r3]interface g0/0/1.1
[r3-GigabitEthernet0/0/1.1]dot1q termination vid 2
[r3-GigabitEthernet0/0/1.1]ip address 192.168.1.1 24
[r3-GigabitEthernet0/0/1.1]quit
[r3]interface g0/0/1.2
[r3-GigabitEthernet0/0/1.2]dot1q termination vid 3
[r3-GigabitEthernet0/0/1.2]ip address 192.168.2.1 24
[r3-GigabitEthernet0/0/1.2]quit
[r3]ip pool 1
Info: It's successful to create an IP address pool.
[r3-ip-pool-1]network 192.168.1.0 mask 255.255.255.0
[r3-ip-pool-1]gateway-list 192.168.1.1
[r3-ip-pool-1]dns-list 8.8.8.8 114.114.114.114
[r3-ip-pool-1]quit
[r3]ip pool 2
Info: It's successful to create an IP address pool.
[r3-ip-pool-2]network 192.168.2.0 mask 255.255.255.0
[r3-ip-pool-2]gateway-list 192.168.2.1
[r3-ip-pool-2]dns-list 8.8.8.8 114.114.114.114
[r3-ip-pool-2]quit
[r3]interface g0/0/1.1
[r3-GigabitEthernet0/0/1.1]dhcp select global
[r3-GigabitEthernet0/0/1.1]arp broadcast enable
Info: This interface has already been configured with ARP broadcast.
[r3-GigabitEthernet0/0/1.1]quit
[r3]interface g0/0/1.2
[r3-GigabitEthernet0/0/1.2]dhcp select global
[r3-GigabitEthernet0/0/1.2]arp broadcast enable
Info: This interface has already been configured with ARP broadcast.
[r3-GigabitEthernet0/0/1.2]quit
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 3.3.3.3 32
[r3-LoopBack0]quit
[r3]ospf 100 router-id 3.3.3.3
[r3-ospf-100]area 1
[r3-ospf-100-area-0.0.0.1]network 3.3.3.3 0.0.0.0
[r3-ospf-100-area-0.0.0.1]network 0.0.0.0 255.255.255.255
Lsw2
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]v
[Huawei]vlan b
[Huawei]vlan batch 2 3
Info: This operation may take a few seconds. Please wait for a moment...done.
[Huawei]interface e0/0/2
[Huawei-Ethernet0/0/2]port link-type access
[Huawei-Ethernet0/0/2]port default vlan 2
[Huawei-Ethernet0/0/2]quit
[Huawei-Ethernet0/0/3]port link-type access
[Huawei-Ethernet0/0/3]port default vlan 3
[Huawei-Ethernet0/0/3]quit
[Huawei-Ethernet0/0/1]port link-type trunk
[Huawei-Ethernet0/0/1]port trunk allow-pass vlan all
[Huawei-Ethernet0/0/1]quit
[Huawei]quit