ospf实验记录

要求:R1 ping 通 123.1.2.3

R1配置:

[Huawei]sysname R1
[R1]
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ospf enable 10 area 0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
[R1-GigabitEthernet0/0/0]q
[R1]
[R1]ospf 10
[R1-ospf-10]dis th
[V200R003C00]
#
ospf 10
#
return
[R1-ospf-10]
[R1-ospf-10]a 0
[R1-ospf-10-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R1-ospf-10-area-0.0.0.0]dis th
[V200R003C00]
#
 area 0.0.0.0
  network 192.168.1.0 0.0.0.255
#
return
[R1-ospf-10-area-0.0.0.0]q
[R1-ospf-10]
[R1-ospf-10]q
[R1]
[R1]dis ospf interface g0/0/0
OSPF Process 10 with Router ID 192.168.1.1
Interfaces
 Interface: 192.168.1.1 (GigabitEthernet0/0/0)
 Cost: 1       State: Waiting    Type: Broadcast    MTU: 1500
 Priority: 1
 Designated Router: 0.0.0.0
 Backup Designated Router: 0.0.0.0
 Timers: Hello 10 , Dead 40 , Poll  120 , Retransmit 5 , Transmit Delay 1
[R1]

R5配置(重点:要把环回口123.1.2.0网段宣告进区域0):
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ospf enable 50 area 0
[R5-GigabitEthernet0/0/0]ip address 45.1.1.5 24
[R5-GigabitEthernet0/0/0]dis th
[V200R003C00]
#
interface GigabitEthernet0/0/0
ip address 45.1.1.5 255.255.255.0
ospf enable 50 area 0.0.0.0
#
return
[R5-GigabitEthernet0/0/0]q
[R5]ospf 50
[R5-ospf-50]
[R5-ospf-50]dis th
[V200R003C00]
#
ospf 50
#
return
[R5-ospf-50]a 0
[R5-ospf-50-area-0.0.0.0]q
[R5-ospf-50]q
[R5]
[R5]dis ospf interface g0/0/0
OSPF Process 50 with Router ID 45.1.1.5
Interfaces
 Interface: 45.1.1.5 (GigabitEthernet0/0/0)
 Cost: 1       State: BDR       Type: Broadcast    MTU: 1500
 Priority: 1
 Designated Router: 45.1.1.4
 Backup Designated Router: 45.1.1.5
 Timers: Hello 10 , Dead 40 , Poll  120 , Retransmit 5 , Transmit Delay 1
[R5]
[R5]interface LoopBack 1
[R5-LoopBack1]ip address 123.1.2.3 24
[R5-LoopBack1]q
[R5]
[R5]ospf 50
[R5-ospf-50]a 0
[R5-ospf-50-area-0.0.0.0]network 123.1.2.0 0.0.0.255
[R5-ospf-50-area-0.0.0.0]dis th
[V200R003C00]
#
 area 0.0.0.0
  network 123.1.2.0 0.0.0.255
#
return
[R5-ospf-50-area-0.0.0.0]
分享到:

0 条评论

昵称

沙发空缺中,还不快抢~