Open mblee1989 opened 5 years ago
2.配置OSPF路由协议 R1: router id 1.1.1.1 ospf area 0 network 10.0.12.1 0.0.0.0 network 10.0.13.1 0.0.0.0 network 1.1.1.1 0.0.0.0 network 11.11.11.11 0.0.0.0 q q ++++++++++++++++++++++++ R2: router id 2.2.2.2 ospf area 0 network 10.0.12.2 0.0.0.0 network 10.0.23.2 0.0.0.0 network 2.2.2.2 0.0.0.0 area 1 network 10.0.24.2 0.0.0.0 q q
+++++++++++++++++++++++ R3: router id 3.3.3.3 ospf area 0 network 10.0.13.3 0.0.0.0 network 10.0.23.3 0.0.0.0 network 3.3.3.3 0.0.0.0 area 2 network 10.0.35.3 0.0.0.0 q q ++++++++++++++++++++++++ R4: router id 4.4.4.4 ospf area 1 network 10.0.24.4 0.0.0.0 network 4.4.4.4 0.0.0.0 network 44.44.44.44 0.0.0.0 q q +++++++++++++++++++++++ R5: router id 5.5.5.5 ospf area 2 network 10.0.35.5 0.0.0.0 network 5.5.5.5 0.0.0.0 network 55.55.55.55 0.0.0.0 q q
R1、R2、R3: dis ospf peer brief
R1、R2、R3、R4、R5: dis ospf interface ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
R2>sy Enter system view, return user view with Ctrl+Z. [R2]int g0/0/0 [R2-GigabitEthernet0/0/0]ospf cost 2000 [R2-GigabitEthernet0/0/0]q [R2]dis ospf interface
OSPF Process 1 with Router ID 2.2.2.2
Interfaces
Area: 0.0.0.0 (MPLS TE not enabled) IP Address Type State Cost Pri DR BDR 2.2.2.2 P2P P-2-P 0 1 0.0.0.0 0.0.0.0 10.0.12.2 Broadcast BDR 2000 1 10.0.12.1 10.0.12.2 10.0.23.2 P2P P-2-P 1562 1 0.0.0.0 0.0.0.0
Area: 0.0.0.1 (MPLS TE not enabled) IP Address Type State Cost Pri DR BDR 10.0.24.2 Broadcast BDR 1 1 10.0.24.4 10.0.24.2
[R2]tracert 55.55.55.55
traceroute to 55.55.55.55(55.55.55.55), max hops: 30 ,packet length: 40,press CTRL_C to break
1 10.0.23.3 30 ms 50 ms 50 ms
2 10.0.35.5 60 ms 60 ms 60 ms
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[R2]ospf [R2-ospf-1]silent-int e0/0/1 [R2-ospf-1]q [R2]dis ospf peer brief
OSPF Process 1 with Router ID 2.2.2.2
Peer Statistic Information
Routing Tables: Public Destinations : 17 Routes : 17
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 OSPF 10 2000 D 10.0.12.1 GigabitEthernet
0/0/0 2.2.2.2/32 Direct 0 0 D 127.0.0.1 LoopBack0 3.3.3.3/32 OSPF 10 1562 D 10.0.23.3 Serial0/0/2 5.5.5.5/32 OSPF 10 1563 D 10.0.23.3 Serial0/0/2 10.0.12.0/24 Direct 0 0 D 10.0.12.2 GigabitEthernet 0/0/0 10.0.12.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0 10.0.13.0/24 OSPF 10 2001 D 10.0.12.1 GigabitEthernet 0/0/0 10.0.23.0/24 Direct 0 0 D 10.0.23.2 Serial0/0/2 10.0.23.2/32 Direct 0 0 D 127.0.0.1 Serial0/0/2 10.0.23.3/32 Direct 0 0 D 10.0.23.3 Serial0/0/2 10.0.24.0/24 Direct 0 0 D 10.0.24.2 Ethernet0/0/1 10.0.24.2/32 Direct 0 0 D 127.0.0.1 Ethernet0/0/1 10.0.35.0/24 OSPF 10 1563 D 10.0.23.3 Serial0/0/2 11.11.11.11/32 OSPF 10 2000 D 10.0.12.1 GigabitEthernet 0/0/0 55.55.55.55/32 OSPF 10 1563 D 10.0.23.3 Serial0/0/2 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[R2] User interface con0 is available ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]au
[R1-ospf-1-area-0.0.0.0]authentication-mode simple pla
[R1-ospf-1-area-0.0.0.0]authentication-mode simple plain H
[R1-ospf-1-area-0.0.0.0]authentication-mode simple plain Huawei
[R1-ospf-1-area-0.0.0.0]q
[R1-ospf-1]q
[R1]dis ospf peer brief
OSPF Process 1 with Router ID 1.1.1.1
Peer Statistic Information
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[R2]ospf 1 [R2-ospf-1]area 0 [R2-ospf-1-area-0.0.0.0]authentication-mode simple plain Huawei [R2-ospf-1-area-0.0.0.0]q [R2-ospf-1]q
[R3]ospf 1 [R3-ospf-1]area 0 [R3-ospf-1-area-0.0.0.0]authentication-mode simple plain Huawei [R3-ospf-1-area-0.0.0.0]q [R3-ospf-1]q
[R1]dis ospf peer brief
OSPF Process 1 with Router ID 1.1.1.1
Peer Statistic Information
[R1]
1.基本配置[] R1: sys undo info-cen enable sysname R1 int loop 0 ip add 1.1.1.1 32 int loop 1 ip add 11.11.11.11 24 int g0/0/1 ip add 10.0.12.1 24 int g0/0/2 ip add 10.0.13.1 24 q
R2: sys undo info-cen enable sysname R2 int loop 0 ip add 2.2.2.2 32 int g0/0/0 ip add 10.0.12.2 24 int s0/0/2 ip add 10.0.23.2 24 int e0/0/1 ip add 10.0.24.2 24 q
R3: sys undo info-cen enable sysname R3 int loop 0 ip add 3.3.3.3 32 int g0/0/0 ip add 10.0.13.3 24 int s0/0/2 ip add 10.0.23.3 24 q
R4: sys undo info-cen enable sysname R4 int loop 0 ip add 4.4.4.4 32 int loop 1 ip add 44.44.44.44 24 int e0/0/1 ip add 10.0.24.4 24 q
R5: sys undo info-cen enable sysname R5 int loop 0 ip add 5.5.5.5 32 int loop 1 ip add 55.55.55.55 24 int e0/0/1 ip add 10.0.35.5 24 q