OSPF Hub-And-Spoke Configuration Examples

Keywords: OSPF, Hub-And-Spoke

Abstract: Hub-And-Spoke networking is a typical flat networking scheme. H3C optimizes OSPF to provide a better support for Hub-And-Spoke networking. This document describes how to configure an OSPF Hub-And-Spoke network.

Acronyms:

Acronym

Full spelling

LSA

Link State Advertisement

LSDB

Link State Database

OSPF

Open Shortest Path First

Table of Contents

Feature Overview

The Hub-And-Spoke network is a typical flat networking scheme, in which a hub device connects with many spoke devices.

In a typical OSPF Hub-And-Spoke network, the hub device and spoke devices reside in the same area and the hub device keeps an OSPF neighbor relationship with each spoke device. If the hub device has a large number of OSPF neighbors, the maintenance and establishment of neighborships will consume too many system resources, which may cause neighbor timeouts and slow convergence, and affect the normal operation of other services.

By optimizing OSPF, the above problems can be largely mitigated.

Configuration Example

2.1  Network Requirements

As shown in Figure 1

l              In the Hub-And-Spoke network, there are 500 spoke devices. The hub device (Router A) exchanges routing information with the spoke devices by using OSPF. They are in the same OSPF area.

l              The spoke devices access the file server through the hub device.

Device

Interface

IP address

Device

Interface

IP address

Router A

Eth1/1

10.1.1.1/24

Router B

Eth1/1

10.1.1.2/24

 

Eth1/2

10.1.2.1/24

Router C

Eth1/1

10.1.2.2/24

 

Eth1/3

10.1.3.1/24

Router D

Eth1/1

10.1.3.2/24

 

Eth1/4

10.1.4.1/24

Router E

Eth1/1

10.1.4.2/24

 

Eth1/5

20.1.1.1/24

Server

 

20.1.1.2/24

Figure 1  Network diagram for OSPF support in a Hub-And-Spoke network

2.2  Configuration Considerations

1)            Configure basic OSPF functions on the hub and spoke devices and enable the hub device to advertise the network address of Server to the spoke devices.
2)            Configure OSPF on the hub device as follows to optimize the Hub-And-Spoke network.

l              Configure OSPF to give priority to receiving and processing hello packets.

l              Configure the LSU sending interval, and the maximum LSU packets that can be sent at one time for interfaces, to ensure smooth packet transmission.

l              Configure the maximum, minimum and incremental intervals of LSA generation to control LSA generation.

l              Configure the maximum, minimum and incremental intervals of SPF calculation to control SPF calculation.

2.3  Configuration Procedures

 

&  Note:

The following configurations are made on devices that are using the default settings and verified in a lab environment. When using the following configurations on your devices in a live network, make sure they do not conflict with your current configurations to prevent potential negative impact on your network.

This document does not correspond to specific software and hardware versions.

 

2.3.1  Configuration on the Hub Device

I. Configuration steps

Enable OSPF, configure the router ID, and enter OSPF view.

<RouterA> system-view

[RouterA] ospf 1 router-id 1.1.1.1

# Inject networks in OSPF area 1 to enable OSPF on the interfaces attached to the networks.

[RouterA-ospf-1] area 1

[RouterA-ospf-1-area-0.0.0.1] network 10.0.0.0 0.255.255.255

[RouterA-ospf-1-area-0.0.0.1] network 20.1.1.0 0.0.0.255

[RouterA-ospf-1-area-0.0.0.1] quit

# Configure OSPF to give priority to receiving and processing hello packets.

[RouterA] ospf packet-process prioritized-treatment

# Configure the LSU sending interval as 200 milliseconds and the maximum number of LSU packets that can be sent at one time as 10 for interfaces.

[RouterA] ospf 1 router-id 1.1.1.1

[RouterA-ospf-1] transmit-pacing interval 200 count 10

# Configure the maximum LSA generation interval as 60 seconds, minimum LSA generation interval as 1000 milliseconds and incremental interval as 1000 milliseconds.

[RouterA-ospf-1] lsa-generation-interval 60 1000 1000

# Configure the maximum SPF calculation interval as 60 seconds, minimum SPF calculation interval as 1000 milliseconds and incremental interval as 1000 milliseconds.

[RouterA-ospf-1] spf-schedule-interval 60 1000 1000

II. Configuration file

<RouterA> display current-configuration

#

 version 5.20, Beta 1501L02, Standard

#

 sysname RouterA

#

 configure-user count 50

#

 info-center logfile size-quota 0

#

 domain default enable system

#

 telnet server enable

#

radius scheme system

 server-type extended

 primary authentication 127.0.0.1 1645

 primary accounting 127.0.0.1 1646

 user-name-format without-domain

#

domain system

 access-limit disable

 state active

 idle-cut disable

 self-service-url disable

#

interface Aux0

 async mode flow

 link-protocol ppp

#

interface Ethernet1/1

 port link-mode route

 ip address 10.1.1.1 255.255.255.0

#

interface Ethernet1/2

 port link-mode route

 ip address 10.1.2.1 255.255.255.0

#

interface Ethernet1/3

 port link-mode route

 ip address 10.1.3.1 255.255.255.0

#

interface Ethernet1/4

 port link-mode route

 ip address 10.1.4.1 255.255.255.0

#

interface Ethernet1/5

 port link-mode route

 ip address 20.1.1.1 255.255.255.0

#

#...(Other interface configurations are similar and omitted here.)

#

ospf packet-process prioritized-treatment

#

ospf 1 router-id 1.1.1.1

spf-schedule-interval 60 1000 1000

 lsa-generation-interval 60 1000 1000

 transmit-pacing interval 200 count 10

 area 0.0.0.1

  network 10.0.0.0 0.255.255.255

  network 20.1.1.0 0.0.0.255

#

user-interface con 0

user-interface aux 0

 authentication-mode none

 user privilege level 3

user-interface vty 0 4

 authentication-mode none

 user privilege level 3

#

2.3.2  Configuration on the Spoke Device

The configurations on the spoke devices are similar. This section shows the configurations made on Router B.

I. Configuration steps

Enable OSPF, configure the router ID, and enter OSPF view.

<RouterB> system-view

[RouterB] ospf 1 router-id 2.2.2.2

# Specify interface Ethernet1/1 whose IP address falls into 10.0.0.0/24 to run OSPF, and specify the interface to belong to area 1.

[RouterB-ospf-1] area 1

[RouterB-ospf-1-area-0.0.0.1] network 10.0.0.0 0.255.255.255

II. Configuration file

<RouterB> display current-configuration

#

 version 5.20, Beta 1501L02, Standard

#

 sysname RouterB

#

 configure-user count 50

#

 info-center logfile size-quota 0

#

 domain default enable system

#

 telnet server enable

#

radius scheme system

 server-type extended

 primary authentication 127.0.0.1 1645

 primary accounting 127.0.0.1 1646

 user-name-format without-domain

#

domain system

 access-limit disable

 state active

 idle-cut disable

 self-service-url disable

#

interface Aux0

 async mode flow

 link-protocol ppp

#

interface Ethernet1/1

 port link-mode route

 ip address 10.1.1.2 255.255.255.0

#

ospf 1 router-id 2.2.2.2

 area 0.0.0.1

  network 10.0.0.0 0.255.255.255

#

user-interface con 0

user-interface aux 0

 authentication-mode none

 user privilege level 3

user-interface vty 0 4

 authentication-mode none

 user privilege level 3

#

2.3.3  Verification

After network convergence, verify the configuration results as follows.

1)            Display OSPF neighbor statistics on Router A.

<RouterA> display ospf peer statistics

          OSPF Process 1 with Router ID 1.1.1.1

                    Neighbor Statistics

 

  Area ID      Down Attempt Init 2-Way ExStart Exchange Loading Full Total

  0.0.0.1      0    0       0    0     0       0        0       500  500

  Total        0    0       0    0     0       0        0       500  500

The output information shows that Router A has 500 neighbors (in Full state).

2)            Display neighbor information on Router B.

<RouterB> display ospf peer

 

                   OSPF Process 1 with Router ID 2.2.2.2

                        Neighbor Brief Information

 

 Area: 0.0.0.1

 Router ID       Address         Pri Dead-Time Interface       State

 1.1.1.1         10.1.1.1        1   35        Eth1/1          Full/BDR

The output information shows that the neighbor of Router B is Router A.

3)            Display the routing table of Router B.

<RouterB> display ip routing-table

Routing Tables: Public

         Destinations : 5        Routes : 5

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

10.1.1.0/24         Direct 0    0            10.1.1.2        Eth1/1

10.1.1.2/32         Direct 0    0            127.0.0.1       InLoop0

20.1.1.0/24         OSPF   10   2            10.1.1.1        Eth1/1

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

The output information shows that Router B can access the file server through the next hop Router A.

4)            The neighbor and routing information of other spoke devices are similar to those of Router B and thus are not verified here.

References

3.1  Protocols and Standards

l              RFC 2328: OSPF Version 2

l              RFC 4222: Prioritized Treatment of Specific OSPF Version 2 Packets and Congestion Avoidance

3.2  Related Documentation

OSPF Hub-And-Spoke Technology White Paper

Copyright ©2009 Hangzhou H3C Technologies Co., Ltd. All rights reserved.

No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of Hangzhou H3C Technologies Co., Ltd.

The information in this document is subject to change without notice.