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
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page2
OSPF Packet Types
OSPF Protocol
Header
Frame
Checksu
m
OSPF Protocol
Packet
IP Packet
Header
Link
Layer
Header
IP protocol value is 89
OSPF Basic Features
Supporting classless inter-domain routing (CIDR)
Dividing the whole routing domain into different areas
Loop-free
Fast route update and convergence
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page3
Fast route update and convergence
Using IP multicast address to send and receive protocol
message
Supporting ECMP (equal cost multi-path)
Supporting authentication
OSPF Multiple Areas
Area 0
Area 1
Area 4
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page4
Area 2
Area 3
Area 0 is backbone area,
all the ABRs have one
interface belongs to Area
0 at least.
Type of Router
ABR
BR
Area 0
Area 1
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page5
IR ASBR
Area 1
Area 2
AS100
AS200
OSPF
RIP
OSPF Multiple Area Configuration
Area 0
RTC
RTB
[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>
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page6
Area 0
Area 1 Area 2
RTA
Loopback0
RTC
RTD
2.2.2.2/32
Loopback0
1.1.1.1/32
RTB
E0/0
10.1.1.0/24
E0/0
.2
.1
Loopback0
3.3.3.3/32
Loopback0
4.4.4.4/32
E0/1
10.1.2.0/24
.1 .2
E0/0
E0/1
E0/0
10.1.3.0/24
.1
.2
OSPF Multiple Area Configuration
Area 0 RTC
RTB
[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>
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page7
Area 0
Area 1 Area 2
RTA
Loopback0
RTC
RTD
2.2.2.2/32
Loopback0
1.1.1.1/32
RTB
E0/0
10.1.1.0/24
E0/0
.2
.1
Loopback0
3.3.3.3/32
Loopback0
4.4.4.4/32
E0/1
10.1.2.0/24
.1 .2
E0/0
E0/1
E0/0
10.1.3.0/24
.1
.2
OSPF Multiple Area Configuration
Area 0
Area 1 Area 2
Loopback0
RTC
2.2.2.2/32
RTB
10.1.1.0/24
E0/0
.2
Loopback0
3.3.3.3/32
E0/1
10.1.2.0/24
.1 .2
E0/0
E0/1
10.1.3.0/24
.1
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page8
RTA RTD
Loopback0
1.1.1.1/32
E0/0
10.1.1.0/24
.1
Loopback0
4.4.4.4/32
E0/0
10.1.3.0/24
.2
[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>
Display Neighbor Relationship
[RTB]display ospf peer
OSPF Process 1 with Router ID 2.2.2.2
Neighbors
Area 0.0.0.0 interface 10.1.2.1(Ethernet0/1)’s neighbor(
(
(
(s)
)
)
)
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
Router ID
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page9
DR: 10.1.2.1 BDR: 10.1.2.2
Dead timer due in 33 sec
Neighbor is up for 00:00:17
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 is up for 00:00:27
Neighbor information of
area 0
Neighbor
information of area 0
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
Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page10
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
Thank you
www.huawei.com
www.huawei.com

ospf initial configuration

  • 1.
    OSPF Initial Configuration www.huawei.com Copyright ©2009 Huawei Technologies Co., Ltd. All rights reserved.
  • 2.
    Contents 1. OSPF Featuresand Configuration Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page1
  • 3.
    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 Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page2 OSPF Packet Types OSPF Protocol Header Frame Checksu m OSPF Protocol Packet IP Packet Header Link Layer Header IP protocol value is 89
  • 4.
    OSPF Basic Features Supportingclassless inter-domain routing (CIDR) Dividing the whole routing domain into different areas Loop-free Fast route update and convergence Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page3 Fast route update and convergence Using IP multicast address to send and receive protocol message Supporting ECMP (equal cost multi-path) Supporting authentication
  • 5.
    OSPF Multiple Areas Area0 Area 1 Area 4 Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page4 Area 2 Area 3 Area 0 is backbone area, all the ABRs have one interface belongs to Area 0 at least.
  • 6.
    Type of Router ABR BR Area0 Area 1 Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page5 IR ASBR Area 1 Area 2 AS100 AS200 OSPF RIP
  • 7.
    OSPF Multiple AreaConfiguration Area 0 RTC RTB [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> Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page6 Area 0 Area 1 Area 2 RTA Loopback0 RTC RTD 2.2.2.2/32 Loopback0 1.1.1.1/32 RTB E0/0 10.1.1.0/24 E0/0 .2 .1 Loopback0 3.3.3.3/32 Loopback0 4.4.4.4/32 E0/1 10.1.2.0/24 .1 .2 E0/0 E0/1 E0/0 10.1.3.0/24 .1 .2
  • 8.
    OSPF Multiple AreaConfiguration Area 0 RTC RTB [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> Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page7 Area 0 Area 1 Area 2 RTA Loopback0 RTC RTD 2.2.2.2/32 Loopback0 1.1.1.1/32 RTB E0/0 10.1.1.0/24 E0/0 .2 .1 Loopback0 3.3.3.3/32 Loopback0 4.4.4.4/32 E0/1 10.1.2.0/24 .1 .2 E0/0 E0/1 E0/0 10.1.3.0/24 .1 .2
  • 9.
    OSPF Multiple AreaConfiguration Area 0 Area 1 Area 2 Loopback0 RTC 2.2.2.2/32 RTB 10.1.1.0/24 E0/0 .2 Loopback0 3.3.3.3/32 E0/1 10.1.2.0/24 .1 .2 E0/0 E0/1 10.1.3.0/24 .1 Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page8 RTA RTD Loopback0 1.1.1.1/32 E0/0 10.1.1.0/24 .1 Loopback0 4.4.4.4/32 E0/0 10.1.3.0/24 .2 [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>
  • 10.
    Display Neighbor Relationship [RTB]displayospf peer OSPF Process 1 with Router ID 2.2.2.2 Neighbors Area 0.0.0.0 interface 10.1.2.1(Ethernet0/1)’s neighbor( ( ( (s) ) ) ) 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 Router ID Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page9 DR: 10.1.2.1 BDR: 10.1.2.2 Dead timer due in 33 sec Neighbor is up for 00:00:17 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 is up for 00:00:27 Neighbor information of area 0 Neighbor information of area 0
  • 11.
    Validating Routing Table [RTD]displayip 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 Copyright © 2009 Huawei Technologies Co., Ltd. All rights reserved. Page10 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
  • 12.