Professional Documents
Culture Documents
Configuration
www.huawei.com
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page1
OSPF Protocol Introduction
OSPF (open shortest path first) is an IGP (interior gateway protocol)
Link Frame
IP Packet OSPF Protocol
Layer Checksu
Header Packet
Header m
IP protocol value is 89
OSPF Protocol
OSPF Packet Types
Header
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page2
OSPF Basic Features
Supporting classless inter-domain routing (CIDR)
Loop-free
message
Supporting authentication
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page3
OSPF Multiple Areas
Area 1
Area 4
Area 0
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page4
Type of Router
BR
ABR
Area 0
Area 1
Area 2
OSPF
RIP
IR AS100 ASBR
AS200
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page5
OSPF Multiple Area Configuration
[RTB]router id 2.2.2.2
[RTB]ospf
[RTB-ospf-1]area 1
[RTB-ospf-1-area-0.0.0.1]network 2.2.2.2 0.0.0.0
[RTB-ospf-1-area-0.0.0.1]network 10.1.1.0 0.0.0.255
[RTB-ospf-1-area-0.0.0.1]quit
[RTB-ospf-1]area 0
[RTB-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[RTB-ospf-1-area-0.0.0.0]return
<RTB>
RTB RTC
Area 0
Loopback0 E0/1 E0/0 Loopback0
2.2.2.2/32 .1 10.1.2.0/24 .2 3.3.3.3/32
E0/0
.1 10.1.1.0/24 .2
E0/1
.1 10.1.3.0/24 .2
Area 1 Area 2
E0/0
E0/0
Loopback0 Loopback0
1.1.1.1/32 RTA RTD 4.4.4.4/32
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page6
OSPF Multiple Area Configuration
[RTC]router id 3.3.3.3
[RTC]ospf
[RTC-ospf-1]area 0
[RTC-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[RTC-ospf-1-area-0.0.0.0]quit
[RTC-ospf-1]area 2
[RTC-ospf-1-area-0.0.0.2]network 3.3.3.3 0.0.0.0
[RTC-ospf-1-area-0.0.0.2]network 10.1.3.0 0.0.0.255
[RTC-ospf-1-area-0.0.0.2]return
<RTC>
RTB Area 0 RTC
Loopback0 E0/1 E0/0 Loopback0
2.2.2.2/32 .1 10.1.2.0/24 .2 3.3.3.3/32
E0/0
.1 10.1.1.0/24 .2
E0/1
.1 10.1.3.0/24 .2
Area 1 E0/0 Area 2
E0/0
Loopback0 Loopback0
1.1.1.1/32 RTA RTD 4.4.4.4/32
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page7
OSPF Multiple Area Configuration
RTB Area 0 RTC
Loopback0 E0/1 E0/0 Loopback0
2.2.2.2/32 .1 10.1.2.0/24 .2 3.3.3.3/32
E0/0
.1 10.1.1.0/24 .2
E0/1
.1 10.1.3.0/24 .2
Area 1 Area 2
E0/0
E0/0
Loopback0 Loopback0
1.1.1.1/32 RTA RTD 4.4.4.4/32
[RTD]router id 4.4.4.4
[RTD]ospf
[RTD-ospf-1]area 2
[RTD-ospf-1-area-0.0.0.2]network 4.4.4.4 0.0.0.0
[RTD-ospf-1-area-0.0.0.2]network 10.1.3.0 0.0.0.255
[RTD-ospf-1-area-0.0.0.2]return
<RTD>
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page8
Display Neighbor Relationship
Router ID
Neighbors
Area 0.0.0.1 interface 10.1.1.2(Ethernet0/1)’s neighbor((s))
Router ID: 1.1.1.1 Address: 10.1.1.1 GR State: Normal
State: Full Mode:Nbr is Slave Priority: 1
DR: 10.1.1.1 BDR: 10.1.1.2
Dead timer due in 35 sec Neighbor
Neighbor is up for 00:00:27 information of area 0
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page9
Validating Routing Table
[RTD]display ip routing-table
Routing Table: public net
Destination/Mask Protocol Pre Cost Nexthop Interface
1.1.1.1/32 OSPF 10 4 10.1.3.1 Ethernet0/0
2.2.2.2/32 OSPF 10 3 10.1.3.1 Ethernet0/0
3.3.3.3/32 OSPF 10 2 10.1.3.1 Ethernet0/0
4.4.4.4/32 DIRECT 0 0 127.0.0.1 InLoopBack0
10.1.1.0/24 OSPF 10 3 10.1.3.1 Ethernet0/0
10.1.2.0/24 OSPF 10 2 10.1.3.1 Ethernet0/0
10.1.3.0/24 DIRECT 0 0 10.1.3.2 Ethernet0/0
10.1.3.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page10
Thank you
www.huawei.com