96
OSPF configuration examples
Basic OSPF configuration example
Network requirements
•
Enable OSPF on all routers, and split the AS into three areas.
•
Configure Router A and Router B as ABRs.
Figure 22
Network diagram
Configuration procedure
1.
Configure IP addresses for interfaces. (Details not shown.)
2.
Enable OSPF:
# Configure Router A.
<RouterA> system-view
[RouterA] router id 10.2.1.1
[RouterA] ospf
[RouterA-ospf-1] area 0
[RouterA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] area 1
[RouterA-ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.1] quit
[RouterA-ospf-1] quit
# Configure Router B.
<RouterB> system-view
[RouterB] router id 10.3.1.1
[RouterB] ospf
[RouterB-ospf-1] area 0
[RouterB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] area 2
[RouterB-ospf-1-area-0.0.0.2] network 10.3.1.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.2] quit
[RouterB-ospf-1] quit