配IP
[Huawei]sysname r1
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.1.1 24
Nov 23 2022 00:08:12-08:00 r1 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]quit
[r1]interface g0/0/2
[r1-GigabitEthernet0/0/2]ip address 172.16.2.1 24
Nov 23 2022 00:08:35-08:00 r1 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[r1-GigabitEthernet0/0/2]quit
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
[r1-GigabitEthernet0/0/0]
Nov 23 2022 00:08:48-08:00 r1 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]quit
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 1.1.1.1 32
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r2
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
Nov 23 2022 00:09:52-08:00 r2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]quit
[r2]interface g0/0/1
[r2-GigabitEthernet0/0/1]ip address 23.1.1.1 24
Nov 23 2022 00:10:08-08:00 r2 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r2-GigabitEthernet0/0/1]quit
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 2.2.2.2 32
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3
[r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ip address 23.1.1.2 24
Nov 23 2022 00:11:02-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r3-GigabitEthernet0/0/1]quit
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ip address 123.1.1.1 24
Nov 23 2022 00:11:20-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r3-GigabitEthernet0/0/0]quit
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 3.3.3.3 32
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[r3]sysname r4
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 123.1.1.2 24
Nov 23 2022 00:12:26-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r4-GigabitEthernet0/0/0]quit
[r4]interface g0/0/1
[r4-GigabitEthernet0/0/1]ip address 45.1.1.1 24
Nov 23 2022 00:12:47-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r4-GigabitEthernet0/0/1]quit
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 4.4.4.4 32
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r5
[r5]interface g0/0/0
[r5-GigabitEthernet0/0/0]ip address 123.1.1.3 24
Nov 23 2022 00:13:31-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r5-GigabitEthernet0/0/0]quit
[r5]interface g0/0/1
[r5-GigabitEthernet0/0/1]ip address 45.1.1.2 24
Nov 23 2022 00:13:50-08:00 r5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r5-GigabitEthernet0/0/1]quit
[r5]interface g0/0/2
[r5-GigabitEthernet0/0/2]ip address 56.1.1.1 24
[r5-GigabitEthernet0/0/2]
Nov 23 2022 00:14:06-08:00 r5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/2 has entered the UP state.
[r5-GigabitEthernet0/0/2]quit
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 5.5.5.5 32
<Huawei>
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r6
[r6]interface g0/0/0
[r6-GigabitEthernet0/0/0]ip address 123.1.1.4 24
Nov 23 2022 00:14:51-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r6-GigabitEthernet0/0/0]quit
[r6]interface g0/0/1
[r6-GigabitEthernet0/0/1]ip address 56.1.1.2 24
Nov 23 2022 00:15:12-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r6-GigabitEthernet0/0/1]quit
[r6]interface LoopBack 0
[r6-LoopBack0]ip address 6.6.6.6 32
宣告
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]network 0.0.0.0 255.255.255.255
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1-area-0.0.0.1]network 0.0.0.0 255.255.255.255
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]network 23.1.1.2 0.0.0.0
[r3-ospf-1-area-0.0.0.1]quit
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 123.1.1.1 0.0.0.0
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 123.1.1.2 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 45.1.1.1 0.0.0.0此处未宣告r4
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 123.1.1.3 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 45.1.1.2 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 56.1.1.1 0.0.0.0
[r5-ospf-1-area-0.0.0.0]quit
[r5-ospf-1]area 2
[r5-ospf-1-area-0.0.0.2]network 5.5.5.5 0.0.0.0
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 123.1.1.4 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 56.1.1.2 0.0.0.0
[r6-ospf-1-area-0.0.0.0]quit
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.2]network 6.6.6.6 0.0.0.0
1.改优先级
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ospf dr-priority 0
[r5]interface g0/0/0
[r5-GigabitEthernet0/0/0]ospf dr-priority 0
[r6]interface g0/0/0
[r6-GigabitEthernet0/0/0]ospf dr-priority 0
2.加快更新应做全网,此处只做r1r2之间
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ospf timer hello 5
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ospf timer hello 5
3.因r4未宣告而强制下放缺省路由使全网可通
[r4]ospf 1
[r4-ospf-1]default-route-advertise always
4.
[r1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[r1]ip pool 1
Info: It's successful to create an IP address pool.
[r1-ip-pool-1]network 192.168.1.0 mask 255.255.255.0
[r1-ip-pool-1]gateway-list 192.168.1.1
[r1-ip-pool-1]dns-list 8.8.8.8
[r1-ip-pool-1]quit
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]dhcp select global
[r1-GigabitEthernet0/0/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
[r1-ip-pool-2]quit
[r1]interface g0/0/2
[r1-GigabitEthernet0/0/2]dhcp select global
[r1-GigabitEthernet0/0/2]quit
- 区域铭文
[r1]ospf 1
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]authentication-mode simple cipher 123
[r2]ospf 1
[r2-ospf-1]area 1
[r2-ospf-1-area-0.0.0.1]authentication-mode simple cipher 123
[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]authentication-mode simple cipher 123
区域密文
[r4]ospf 1
[r4-ospf-1]area 2
[r4-ospf-1-area-0.0.0.2]authentication-mode simple cipher 123
[r4-ospf-1-area-0.0.0.2]authentication-mode md5
[r5]ospf 1
[r5-ospf-1]area 2
[r5-ospf-1-area-0.0.0.2]authentication-mode simple cipher 123
[r5-ospf-1-area-0.0.0.2]authentication-mode md5
[r6]ospf 1
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.2]authentication-mode simple cipher 123
[r6-ospf-1-area-0.0.0.2]authentication-mode md5