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

OSPF single area configuration

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

In order to make up for the shortcomings of distance vector routing protocols, IEFI developed a link-state-based internal gateway protocol, OSPF.

Experimental environment: red, green and blue represent the office space of three different networks, which requires the use of OSPF protocol to achieve network interworking.

Pc1:172.16.1.1

Pc2:172.16.2.1

Pc3:172.16.3.1

R1:GE0/0/0 172.16.1.254 GE2/0/0 192.168.2.1 GE0/0/1 192.168.1.1

R2:GE0/0/0 172.16.2.254 GE0/0/1 192.168.2.3 GE2/0/0 192.168.2.3

R3:GE0/0/0 172.16.3.254 GE0/0/1 192.168.1.3 GE2/0/0 192.168.3.3

Configure PC ip addr

Configure the router

R1:

[R1] INT GigabitEthernet0/0/0 [R1-GigabitEthernet0/0/0] IP ADD 172.16.1.254 24May 21 2020 10:38:30-08:00 R1% IFNET/4/LINK_STATE (l) [0]: The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. [R1-GigabitEthernet0/0/0] INT G2 24May 0 [R1-GigabitEthernet2/0/0] IP ADD 192.168.2.1 24May 21 2020 10:38:48-08:00 R1% IFNET/4/LINK_STATE (l) [1]: The line protocol IP on the interface GigabitEthernet2/0/0 has entered the UP state. [R1-GigabitEthernet2/0/0] INT G0 IFNET/4/LINK_STATE 0 R1-GigabitEthernet2/0/0 1 [R1-GigabitEthernet0/0/1] IP ADD 192.168.1.1 24 [R1-GigabitEthernet0/0/1] May 21 2020 10:39:03-08:00 R1% IFNET/4/LINK_STATE (l) [2]: The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.

R2:

[R2] int g0 IFNET/4/LINK_STATE 0 int 1 [R2-GigabitEthernet0/0/1] ip add 192.168.2.2 24May 21 2020 10:40:28-08:00 R2% IFNET/4/LINK_STATE (l) [0]: The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state. [R2-GigabitEthernet0/0/1] int g2rampany 0 [R2-GigabitEthernet2/0/0] ip add 192.168.3.2 24May 21 2020 10:40:39-08:00 R2% IFNET/4/LINK_STATE (l) [1]: The line protocol IP on the interface GigabitEthernet2/0/0 has entered the UP state. [R2-GigabitEthernet2/0/0] int g0 24May 0 [R2-GigabitEthernet0/0/0] ip add 172.16.2.254 24May 21 2020 10:40:57-08:00 R2% IFNET/4/LINK_STATE (l) [2]: The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.

R3:

[R3] int GigabitEthernet0/0/0 [R3-GigabitEthernet0/0/0] ip add 172.16.3.254 24May 21 2020 10:42:11-08:00 R3% IFNET/4/LINK_STATE (l) [0]: The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. [R3-GigabitEthernet0/0/0] int g0 IFNET/4/LINK_STATE 0 R3-GigabitEthernet0/0/0 1 [R3-GigabitEthernet0/0/1] ip add 192.168.1.3 24May 21 2020 10:42:21-08:00 R3% IFNET/4/LINK_STATE (l) [1]: The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state. [R3-GigabitEthernet0/0/1] int G2 IFNET/4/LINK_STATE 0 [R3-GigabitEthernet2/0/0] ip add 192.168.3.3 24May 21 2020 10:42:51-08:00 R3% IFNET/4/LINK_STATE (l) [2]: The line protocol IP on the interface GigabitEthernet2/0/0 has entered the UP state. [R3-GigabitEthernet2/0/0] configure OSPF

R1:

[R1] OSPF 1 [R1-ospf-1] AREA 0 [R1-ospf-1-area-0.0.0.0] NETWORK 172.16.1.0 0.0.0.255 [R1-ospf-1-area-0.0.0.0] NETWORK 192.168.2.0 0.0.0.255 [R1-ospf-1-area-0.0.0.0] NETWORK 192.168.1.0 0.0.0.255

R2:

[R2] OSPF 1 [R2-ospf-1] AREA 0 [R2-ospf-1-area-0.0.0.0] NETWO [R2-ospf-1-area-0.0.0.0] network 172.16.2.0 0.0.0.255 [R2-ospf-1-area-0.0.0.0] NETWORK 192.168.2.0 0.0.0.255 [R2-ospf-1-area-0.0.0.0] NETWORK 192.168.3.0 0.0.0.255

R3:

[R3] OSPF 1 [R3-ospf-1] AREA 0 [R3-ospf-1-area-0.0.0.0] NETWORK 172.16.3.0 0.0.255 [R3-ospf-1-area-0.0.0.0] NETWORK 192.168.1.0 0.0.255 [R3-ospf-1-area-0.0.0.0] NETWORK 192.168.3.0 0.0.0.255 Test pc1 ping pc2,pc3

In this way, OSPF configuration is complete!

Original address: https://www.linuxprobe.com/ospf-ensp.html

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

Internet Technology

Wechat

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

12
Report