Configure OSPF in a single region

Source: Internet
Author: User

OSPF is a link-state technology, such as routing selection Information Protocol RIP. The OSPF protocol provides two functions for each routing algorithm: Path Selection and path switching.
OSPF is an Internal Gateway Protocol (IGP), that is, it publishes route information between routers in the same autonomous system. OSPF solves the following problems to solve the large-scale and scalable network needs that cannot be solved by RIP:

* Convergence Rate
* Support for variable-length mask VLSM)
OSPF and r12002 support VLSM, and RIP only supports FLSM with Fixed Length subnet mask)
* Network accessibility
When the RIP span reaches 16 hops, it is considered inaccessible. OSPF theoretically has no accessibility limit.
* Bandwidth usage
RIP broadcasts a complete route every 30 seconds. OSPF is updated only when the link changes.
* Path Selection Method

RIP selects the optimal path based on the number of hops, and OSPF uses a path cost value for the Cisco Router Based on the connection rate) as the basis for path selection.

OSPF and ri p, IGRP, and other overhead paths
OSPF information is contained in the IP packet and the Protocol Number 89 is used.
OSPF can run on broadcast or non-broadcast networks.
OSPF operation in broadcast-type multi-channel access Topology
Hello protocol is responsible for establishing and maintaining the Neighbor Relationship

Broadcast 224.0.0.5 through multiple IP addresses, also known as ALLSPFROUTER (all SPF routers) addresses. Hello packets are periodically sent from interfaces involved in OSPF.
The information contained in the Hello packet is as follows:

* Vroid ID

The 32-bit number uniquely identifies a vro in an autonomous system. By default, it selects the highest IP address on the active interface. This identifier is very important when establishing a neighbor relationship and directly running the s pf algorithm in the network to copy messages.

* HELLO interval and DOWN interval dead interval)

The HELLO interval specifies the interval (in seconds) for the route to send HELLO messages ). The determine interval of the DOWN machine is the time that the router waits for receiving messages from the neighbor before it deems that the neighboring router is invalid. The unit is second. The default interval is four times the interval of h ello.

* Neighbors

These are adjacent routers that have established two-way communication relationships.

* Region ID

To be able to communicate, the two routers must share a common network segment.

* Vro priority

The eight bits indicate the priority of the router when DR and BDR are selected.
IP addresses of lDR and BDR

* Authentication Password
* Not included in stb) region logo
Fields in OSPF headers:

* Version number: 1 byte)
* Type 1
HELLO
Link Status Request
Link Status update
Confirm link status
* Data Packet Length 2
* Vroid ID 4
* Region ID 4
* Checksum 2
* Authentication type 2
* Authentication 8
* Variable data
Vrodr DR and vrobbdr

In a multi-channel access environment such as an Ethernet segment, the router must select a DR and BDR to represent this network. When DR is running, BDR does not perform any DR function. However, it receives all the information, but does not process it. The task of forwarding and synchronization is completed by d r. BDR is responsible for DR only when DR fails,
Value of DR and BDR:

* Reducing route update data streams

DR and BDR act as centers for switching link status information on a given multi-channel access network. Each router must establish an adjacent relationship with DR and BDR. DR sends the link status information of each route to all other routers in the Multi-Channel Access Network. This diffusion process greatly reduces the data streams related to routers on network segments.

* Manage link status Synchronization

DR and BDR ensure that other routers on the network have the same link status information about the network.

The adjacent relationship exists between the router and Its DR and BDR. The adjacent router will have a database with synchronous link status

When DR and BDR are selected, the router will view the priority values of each other during the HELLO packet exchange process.
Determine DR and BDR according to the following conditions

* A router with the highest priority value becomes a DR
* A vro with a second highest priority value is called a BDR.
* A vro with a priority of 0 cannot be self-bound to DR or BDR. It is called Drother (non-DR)
* If a router with a higher priority is added to the network, the original DR and BDR will remain unchanged and will change only when the DR or BDR fails.
OSPF startup process:

1. exchange process)

When A router A is started, it is in the DOWN state. It sends HELLO packets to other routers running OSPF through its interfaces through 224.0.0.5, after receiving the HELLO package, other routers add it to their neighbor list. This is called "init", and then send a single-point transmission reply HELLO packet, it contains information about its own and other adjacent routers. After receiving this HELLO message, it adds adjacent relational databases to its own database, which is called the "two-way" State. In this case, two-way communication is established.
2. route discovery

After DR and BDR are selected, the vro is considered to be in the "quasi-start" State and is ready to find the link status information about the network, and the link status database that generates them. The process used to discover a network route is called the Exchange Protocol. It is executed to use the router to achieve the "FULL)" state of communication. The first step in this Protocol is to establish the relationship between DR and BDR and other routers. When the adjacent routers are in the "full" status, they do not repeat the Exchange Protocol unless the "full" status changes.
3. Select a route

When a router has a complete link status database, it is ready to create its route table so that it can forward data streams. The default overhead measurement on a cisco router is based on the bandwidth of the network medium. To calculate the minimum overhead for reaching the destination, the link-State routing selection protocol, such as osp f, uses the Dijkstra algorithm. A maximum of six overhead route entries, such as one, can be saved in the OSPF route table for load balancing, you can configure it through "maximum-paths.
If fapping is flipped on the link, the router will constantly calculate a new route table, which may make the router unable to converge. The router needs to wait for a certain period of time before calculating the route table where it is stored. The default value is 5 seconds. In the CISCO configuration command "timers spf-delay spy-holdtime", the minimum time between two consecutive SPF calculations is 10 seconds by default.
4. Maintain route information

In a link-State routing environment, it is important that the topology databases of all routers be synchronized. When the link status changes, the router notifies other routers in the network of this change through the diffusion process. The link status update package provides the diffusion l sa technology. Each LSA has its own aging timer, Which is carried in the LS lifetime domain. The default value is 30 minutes.
OSPF running in point-to-point topology
On a point-to-point network, the router detects its neighbors by forwarding the multicast addresses to multiple targets. You do not need to select an instance because the concept of DR and BDR does not exist at point-to-point. In the NBMA topology, the default o spf hello interval and down interval are 10 s and 40 s.
OSPF in non-broadcast Multi-Channel Access NBMA) topology.

An NBMA network is a network that supports more than two vrouters but does not have broadcast capabilities.

Frame Relay, ATM, and X.25 are both examples of NBMA networks.

In the NBMA topology, the default OSPF hello interval and down interval are 30 seconds and 120 seconds.

The following table lists the default OSPF hello interval and down interval in various topologies.
OSPF Hello interval Down machine determination Interval
Broadcast: 10 seconds, 40 seconds
Point-to-Point 10 seconds 40 seconds
NBMA30 seconds 120 seconds
OSPF operates in one of two formal modes in the NBMA topology:
* Non-broadcast Multi-Channel Access
* Point-to-point
When configuring a router in the NBMA topology, sub-interfaces are usually used.
You can use the following command to create a sub-interface:
Iterface serial number. subinterface-number {multpiont | point-to-point}
In a large network, point-to-point mode can reduce the number of PVCs required for full connectivity.
Point-to-point has the following attributes
* You do not need a fully interconnected network.
* No static neighbor configuration is required.
* Use an IP subnet
* Copy LSA data packets
OSPF summary on NBMA Topology

The expected topology of the pattern. The subnet address is adjacent to the RFC or Cisco definition.

NBMA full interconnection neighbors must belong to the same subnet number for manual election DR/BDRRFC
Broadcast full interconnection neighbors must belong to the same subnet number to automatically elect DR/BDRCisco
Point-to-Point mutual edge or star neighbor must belong to the same subnet number automatically, without DR/BDRRFC
Point-to-point non-broadcast part mutual edge or star neighbor must belong to the same subnet number. Manual configuration without DR/BDRCisco
Point-to-Point interconnection through sub-interfaces or sub-interfaces of star nodes belong to different subnets automatically, without DR/BDRCisco
Configure OSPF in a single region
To configure OSPF, follow these steps:
L use the global configuration command "router ospf process-id" to start the OSPF process on the route
Process-id is an internal number
L use the "network area" router configuration command to identify which IP addresses on the router are part of the OSPF network.
Network address wildcard area-id
To confirm the vro ID, enter the show ip ospf interface command.
Modify the router priority: router (config) # ip ospf priority number
Number is 1 ~ The number of 255. The default value is '1, 0 indicates that the data cannot be elected as DR or BDR.
To modify the link overhead, run the "ip ospf cost" command to overwrite the default overhead value assigned to an OSPF interface.
You can use "auto-cost refence-bandwidth" to control how OSPF calculates the interface default measurement overhead ".
In interface configuration mode, enter the "ip ospf network" command to specify the OSPF network mode configuration.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.