Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1/11
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
2/11
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
3/11
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
4/11
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.
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.
# 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 the LSU sending interval as 200 milliseconds and the maximum number
Hangzhou H3C Technologies Co., Ltd. 5/11
# 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
6/11
# 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
7/11
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
8/11
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
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
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
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
10/11
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.
11/11