Sei sulla pagina 1di 11

OSPF Hub-And-Spoke configuration Examples

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 LSA LSDB OSPF Link State Advertisement Link State Database Open Shortest Path First Full spelling

Hangzhou H3C Technologies Co., Ltd.

1/11

OSPF Hub-And-Spoke configuration Examples

Table of Contents
1 Feature Overview ........................................................................................................................... 3 2 Configuration Example ................................................................................................................... 3 2.1 Network Requirements ........................................................................................................ 3 2.2 Configuration Considerations .............................................................................................. 4 2.3 Configuration Procedures .................................................................................................... 5 2.3.1 Configuration on the Hub Device .............................................................................. 5 2.3.2 Configuration on the Spoke Device........................................................................... 8 2.3.3 Verification................................................................................................................. 9 3 References ................................................................................................................................... 10 3.1 Protocols and Standards ................................................................................................... 10 3.2 Related Documentation ..................................................................................................... 10

Hangzhou H3C Technologies Co., Ltd.

2/11

OSPF Hub-And-Spoke configuration Examples

1 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.

2 Configuration Example
2.1 Network Requirements
As shown in Figure 1

Hangzhou H3C Technologies Co., Ltd.

3/11

OSPF Hub-And-Spoke configuration Examples

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. The spoke devices access the file server through the hub device.

Device Router A

Interface Eth1/1 Eth1/2 Eth1/3 Eth1/4 Eth1/5

IP address 10.1.1.1/24 10.1.2.1/24 10.1.3.1/24 10.1.4.1/24 20.1.1.1/24

Device Router B Router C Router D Router E Server

Interface Eth1/1 Eth1/1 Eth1/1 Eth1/1

IP address 10.1.1.2/24 10.1.2.2/24 10.1.3.2/24 10.1.4.2/24 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.

Hangzhou H3C Technologies Co., Ltd.

4/11

OSPF Hub-And-Spoke configuration Examples

Configure OSPF to give priority to receiving and processing hello packets. Configure the LSU sending interval, and the maximum LSU packets that can be sent at one time for interfaces, to ensure smooth packet transmission. Configure the maximum, minimum and incremental intervals of LSA generation to control LSA generation. 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
Hangzhou H3C Technologies Co., Ltd. 5/11

OSPF Hub-And-Spoke configuration Examples

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

Hangzhou H3C Technologies Co., Ltd.

6/11

OSPF Hub-And-Spoke configuration Examples

# 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

Hangzhou H3C Technologies Co., Ltd.

7/11

OSPF Hub-And-Spoke configuration Examples

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 #

Hangzhou H3C Technologies Co., Ltd.

8/11

OSPF Hub-And-Spoke configuration Examples

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.
OSPF Process 1 with Router ID 1.1.1.1 Neighbor Statistics

<RouterA> display ospf peer statistics

Area ID 0.0.0.1 Total

Down Attempt Init 2-Way ExStart Exchange Loading Full Total 0 0 0 0 0 0 0 0 0 0 0 0 0 0 500 500 500 500

The output information shows that Router A has 500 neighbors (in Full state). 2) Display neighbor information on Router B.
9/11

Hangzhou H3C Technologies Co., Ltd.

OSPF Hub-And-Spoke configuration Examples

<RouterB> display ospf peer

OSPF Process 1 with Router ID 2.2.2.2 Neighbor Brief Information

Area: 0.0.0.1 Router ID 1.1.1.1 Address 10.1.1.1 Pri Dead-Time Interface 1 35 Eth1/1 State 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 Destination/Mask 10.1.1.0/24 10.1.1.2/32 20.1.1.0/24 127.0.0.0/8 127.0.0.1/32 Proto Pre Routes : 5 Cost 0 0 2 0 0 NextHop 10.1.1.2 127.0.0.1 10.1.1.1 127.0.0.1 127.0.0.1 Interface Eth1/1 InLoop0 Eth1/1 InLoop0 InLoop0

Direct 0 Direct 0 OSPF 10

Direct 0 Direct 0

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.

3 References
3.1 Protocols and Standards
RFC 2328: OSPF Version 2 RFC 4222: Prioritized Treatment of Specific OSPF Version 2 Packets and Congestion Avoidance

3.2 Related Documentation


OSPF Hub-And-Spoke Technology White Paper

Hangzhou H3C Technologies Co., Ltd.

10/11

OSPF Hub-And-Spoke configuration Examples

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.

Hangzhou H3C Technologies Co., Ltd.

11/11

Potrebbero piacerti anche