system-view
[Huawei] interface GigabitEthernet0/0/0
[Huawei-GigabitEthernet0/0/0] ip address 192.168.1.1 255.255.255.0
[Huawei-GigabitEthernet0/0/0] quit
[Huawei] interface GigabitEthernet0/0/1
[Huawei-GigabitEthernet0/0/1] ip address 10.1.1.1 255.255.255.252
[Huawei-GigabitEthernet0/0/1] ospf cost 100
[Huawei-GigabitEthernet0/0/1] quit
[Huawei] interface GigabitEthernet0/0/2
[Huawei-GigabitEthernet0/0/2] ip address 10.1.2.1 255.255.255.252
[Huawei-GigabitEthernet0/0/2] ospf cost 50
[Huawei-GigabitEthernet0/0/2] quit
[Huawei] ospf 1 router-id 192.168.1.1
[Huawei-ospf-1] area 0
[Huawei-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.3
[Huawei-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.3
system-view
[Huawei] interface GigabitEthernet0/0/0
[Huawei-GigabitEthernet0/0/0] ip address 192.168.2.1 255.255.255.0
[Huawei-GigabitEthernet0/0/0] quit
[Huawei] interface GigabitEthernet0/0/1
[Huawei-GigabitEthernet0/0/1] ip address 10.1.1.2 255.255.255.252
[Huawei-GigabitEthernet0/0/1] ospf cost 50
[Huawei-GigabitEthernet0/0/1] quit
[Huawei] interface GigabitEthernet0/0/2
[Huawei-GigabitEthernet0/0/2] ip address 10.1.2.2 255.255.255.252
[Huawei-GigabitEthernet0/0/2] ospf cost 100
[Huawei-GigabitEthernet0/0/2] quit
[Huawei] interface GigabitEthernet0/0/3
[Huawei-GigabitEthernet0/0/3] ip address 10.1.3.1 255.255.255.0
[Huawei-GigabitEthernet0/0/3] ospf cost 50
[Huawei-GigabitEthernet0/0/3] quit
[Huawei] ospf 1 router-id 192.168.2.1
[Huawei-ospf-1] area 0
[Huawei-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.3
[Huawei-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.3
[Huawei-ospf-1-area-0.0.0.0] network 10.1.3.0 0.255.255.255
system-view
[Huawei] interface GigabitEthernet0/0/0
[Huawei-GigabitEthernet0/0/0] ip address 192.168.3.1 255.255.255.0
[Huawei-GigabitEthernet0/0/0] quit
[Huawei] interface GigabitEthernet0/0/1
[Huawei-GigabitEthernet0/0/1] ip address 10.1.3.2 255.255.255.0
[Huawei-GigabitEthernet0/0/1] ospf cost 50
[Huawei-GigabitEthernet0/0/1] quit
[Huawei] ospf 1 router-id 192.168.3.1
[Huawei-ospf-1] area 0
[Huawei-ospf-1-area-0.0.0.0] network 192.168.3.0 0.0.0.255
[Huawei-ospf-1-area-0.0.0.0] network 10.1.3.0 0.255.255.255