You are on page 1of 12

OSPF Initial

Configuration

www.huawei.com

Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved.


Contents
1. OSPF Features and Configuration

Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page1
OSPF Protocol Introduction
OSPF (open shortest path first) is an IGP (interior gateway protocol)

routing protocol and it is based on link state algorithm.

OSPF runs on IP layer directly and the value of IP protocol field is 89

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)

Dividing the whole routing domain into different areas

Loop-free

Fast route update and convergence

Using IP multicast address to send and receive protocol

message

Supporting ECMP (equal cost multi-path)

Supporting authentication

Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page3
OSPF Multiple Areas

Area 1
Area 4
Area 0

Area 0 is backbone area,


all the ABRs have one
interface belongs to Area
0 at least.
Area 2
Area 3

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

[RTB]display ospf peer

OSPF Process 1 with Router ID 2.2.2.2


Neighbors
(s)
Area 0.0.0.0 interface 10.1.2.1(Ethernet0/1)’s neighbor( )
Router ID: 3.3.3.3 Address: 10.1.2.2 GR State: Normal
State: Full Mode:Nbr is Master Priority: 1
DR: 10.1.2.1 BDR: 10.1.2.2
Dead timer due in 33 sec Neighbor information of
Neighbor is up for 00:00:17 area 0

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

You might also like