Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to fully configure OSPF

2025-04-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to fully configure OSPF", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to fully configure OSPF" this article.

This experiment can implement intra-region and inter-region configuration of OSPF, and publish OSPF in rip and rip in OSPF.

First of all, connect the physical equipment according to the diagram (completed in Xiaofan)

Configure ip without much explanation

OSPF simple configuration:

Open router rip on R1 and announce

Router (config) # router rip

Router (config-router) # net 10.0.0.0

To enable both router rip and OSPF on R2:

Router (config) # router rip

Router (config-router) # net 10.0.0.0

Router (config) # router ospf 1 (1 is the process number under which OSPF is running and can be specified at will)

Router (config-router) # net 20.0.0.0 0.255.255.255 area 0

(0.255.255.255 is the reverse subnet mask area 0 is the specified area code)

Open router ospf on R3:

Router (config) # router ospf 1

Router (config-router) # net 20.0.0.0 0.255.255.255 ar 0

Router (config-router) # net 30.0.0.0 0.255.255.255 ar 1

Declare two routes directly connected

It is also announced on R4:

Router (config) # router ospf 1

Router (config-router) # net 30.0.0.0 0.255.255.255 ar 1

At this point, the routing table on routers 1-4 is

R1:

C 10.0.0.0/8 is directly connected, Ethernet0/0

R2:

C 20.0.0.0/8 is directly connected, Ethernet0/1

C 10.0.0.0/8 is directly connected, Ethernet0/0

O IA 30.0.0.0/8 [110/20] via 20.0.0.2, 00:03:40, Ethernet0/1

R3:

C 20.0.0.0/8 is directly connected, Ethernet0/0

C 30.0.0.0/8 is directly connected, Ethernet0/1

R4:

O IA 20.0.0.0/8 [110/20] via 30.0.0.1, 00:02:51, Ethernet0/0

C 30.0.0.0/8 is directly connected, Ethernet0/0

Those routing tables that begin with O are learned through ospf.

OSPF route redistribution

At this point all routers in the ospf homemade system can communicate with each other (R2 R3 R4)

But it is not possible to communicate with a router running rip outside the homemade system.

This requires a release on R2 (ASBR homemade system Edge Router).

Specific process:

Step 1: publish ospf in rip

Router (config) # router rip

Router (config-router) # redistribute ospf 1 metric 2 (1 is the process number 2 is the specified rip hop count)

In this way, you can learn the route on ospf protocol on R2 through rip on R1.

Show ip route:

R 20.0.0.0/8 [120/2] via 10.0.0.2, 00:00:10, Ethernet0/0

C 10.0.0.0/8 is directly connected, Ethernet0/0

R 30.0.0.0/8 [120/2] via 10.0.0.2, 00:00:10, Ethernet0/0

Step 2: publish rip in ospf:

Router (config) # router os 1

Router (config-router) # redistribute rip subnets metric 10 (subnets is the mask carried when declaring, and 10 is the cost value in ospf that can be specified by yourself)

In this way, you will learn the information in rip routing on R3.

Show ip route:

C 20.0.0.0/8 is directly connected, Ethernet0/0

O E2 10.0.0.0/8 [110/10] via 20.0.0.1, 00:02:07, Ethernet0/0

C 30.0.0.0/8 is directly connected, Ethernet0/1

E2 here means that the distribution type distributed to ospf defaults to E2 (internal cost is not calculated)

You can use Metric-rype 1 to specify the type as E1

Thus redistributing rip in OSPF and redistributing OSPF in rip is complete.

Often also need to publish static routes, default routes, directly connected routes

Static route publishing "

Enter router ospf 1 on ASBR

Router (config-router) # redistribute static subnets

Directly connected

Router (config-router) # redistribute connected subnets

So you will see a route entry that starts with O E2 on R3.

Publish a default route:

Router (config) # router os 1

Router (config-router) # default-information originate

You will see entries starting with O*IA on R3.

Stub area & & complete stub area:

After the publication is complete (only rip is released here), you will see the routing table on R4:

These are all the contents of the article "how to fully configure OSPF". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report