In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
[purpose of the experiment]
Learn to configure OSPF single-area on the router.
[background description]
Suppose the campus network is connected to the campus network exit router through a layer 3 switch, and the router is connected to another one outside the campus.
The router is connected and is now properly configured to realize the communication between the internal host of the campus network and the external host of the campus network.
This lab takes two routers and one layer 3 switch as an example. There are VLAN10 and VLAN50 on S3550.
The VLAN10 is used to connect the RA,VLAN50 to the host of the campus network.
[demand Analysis]
It is necessary to configure OSPF routing protocol on routers and switches to make the whole network interconnected, so as to realize the sharing of information and
Pass.
[experimental equipment]
One layer 3 switch
2 routers
3 crossed lines or directly connected lines
[preliminary knowledge]
Basic router configuration knowledge, OSPF
[experimental principle]
OSPF (Open Shortest Path First, Open shortest path first) protocol is currently the most widely used in the network.
One of a wide range of routing protocols. It belongs to the interior gateway routing protocol and can adapt to the network environment of all sizes. It is a typical chain.
Path status (link-state) protocol.
By spreading the link state information of the device to the whole network, the OSPF routing protocol finally synchronizes each device in the network.
A network-wide link-state database (LSDB), and then the router uses the SPF algorithm to calculate the
Reach the shortest path of other networks, and finally form the routing information of the whole network.
OSPF is a classless routing protocol that supports VLSM (variable length subnet mask). OSPF is carried out in the form of multicast
Advertised by the link state.
In the network environment of large model, OSPF supports the division of areas and makes reasonable planning of the network. It is necessary to divide the area.
Area0 (backbone area) must be present. Other areas are directly connected to the backbone area, or connected through virtual links.
[experimental steps]
Step 1: configure IP addresses on routers and layer 3 switches
Switch#configure terminal
Switch (config) # hostname S3750
S3750 (config) # vlan 10
S3750 (config-vlan) # exit
S3750 (config) # vlan 50
S3750 (config-vlan) # exit
S3750 (config) # interface f0swap 1
S3750 (config-if) # switchport access vlan 10
S3750 (config-if) # exit
S3750 (config) # interface f0swap 2
S3750 (config-if) # switchport access vlan 50
S3750 (config-if) # exit
S3750 (config) # interface vlan 10
S3750 (config-if) # ip address 172.16.1.2 255.255.255.0
S3750 (config-if) # no shutdown
S3750 (config-if) # exit
S3750 (config) # interface vlan 50
S3750 (config-if) # ip address 172.16.5.1 255.255.255.0
S3750 (config-if) # no shutdown
S3750 (config-if) # exit
RouterA (config) # interface fastethernet 0amp 1
RouterA (config-if) # ip address 172.16.1.1 255.255.255.0
RouterA (config-if) # no shutdown
RouterA (config-if) # exit
RouterA (config) # interface fastethernet 0Universe 0
RouterA (config-if) # ip address 172.16.2.1 255.255.255.0
RouterB (config-if) # no shutdown
RouterB (config) # interface fastethernet 0amp 1
RouterB (config-if) # ip address 172.16.3.1 255.255.255.0
RouterB (config-if) # no shutdown
RouterB (config-if) # exit
RouterB (config) # interface fastethernet 0Universe 0
RouterB (config-if) # ip address 172.16.2.2 255.255.255.0
RouterB (config-if) # no shutdown
Step 2: configure the OSPF routing protocol
S3750 (config) # router ospf
S3750 (config-router) # network 172.16.5.0 0.0.0.255 area 0
S3750 (config-router) # network 172.16.1.0 0.0.255 area 0
S3750 (config-router) # end
RouterA (config) # router ospf
RouterA (config-router) # network 172.16.1.0 0.0.255 area 0
RouterA (config-router) # network 172.16.2.0 0.0.255 area 0
RouterA (config-router) # end
RouterB (config) # router ospf
RouterB (config-router) # network 172.16.2.0 0.0.255 area 0
RouterB (config-router) # network 172.16.3.0 0.0.255 area 0
RouterB (config-router) # end
Step 3: verify the test
S3750#show vlan
VLAN Name Status Ports
1 VLAN0001 STATIC Fa0/3, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13
Fa0/14 Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/22
Fa0/19, Fa0/20, Fa0/21
Fa0/23, Fa0/24, Gi0/25
Gi0/26, Gi0/27, Gi0/28
10 VLAN0010 STATIC Fa0/1
50 VLAN0050 STATIC Fa0/2
S3750#show ip interface brief
Interface IP-Address (Pri) OK? Status
VLAN 10 172.16.1.2/24 YES UP
VLAN 50 172.16.5.1/24 YES UP
RA#show ip interface brief
Interface IP-Address (Pri) OK? Status
FastEthernet 0/0 172.16.2.1/24 YES UP
FastEthernet 0/1 172.16.1.1/24 YES UP
RB#show ip interface brief
Interface IP-Address (Pri) OK? Status
FastEthernet 0/0 172.16.2.2/24 YES UP
FastEthernet 0/1 172.16.1.3/24 YES UP
Loopback 0 no address YES DOWN
S3750#show ip route
Codes: C-connected, S-static, R-RIP B-BGP
O-OSPF, IA-OSPF inter area
N1-OSPF NSSA external type 1, N2-OSPF NSSA external type 2
E1-OSPF external type 1, E2-OSPF external type 2
I-IS-IS, L1-IS-IS level-1, L2-IS-IS level-2, ia-IS-IS inter area
*-candidate default
Gateway of last resort is no set
C 172.16.1.0/24 is directly connected, VLAN 10
C 172.16.1.2/32 is local host.
O 172.16.2.0/24 [110/2] via 172.16.1.1, 00:14:09, VLAN 10
O 172.16.3.0/24 [110/3] via 172.16.1.1, 00:04:39, VLAN 10
C 172.16.5.0/24 is directly connected, VLAN 50
C 172.16.5.1/32 is local host.
RA#show ip route
Codes: C-connected, S-static, R-RIP B-BGP
O-OSPF, IA-OSPF inter area
N1-OSPF NSSA external type 1, N2-OSPF NSSA external type 2
E1-OSPF external type 1, E2-OSPF external type 2
I-IS-IS, L1-IS-IS level-1, L2-IS-IS level-2, ia-IS-IS inter area
*-candidate default
Gateway of last resort is no set
C 172.16.1.0/24 is directly connected, FastEthernet 0/1
C 172.16.1.1/32 is local host.
C 172.16.2.0/24 is directly connected, FastEthernet 0/0
C 172.16.2.1/32 is local host.
O 172.16.3.0/24 [110/2] via 172.16.2.2, 00:05:21, FastEthernet 0/0
O 172.16.5.0/24 [110/2] via 172.16.1.2, 00:14:51, FastEthernet 0/1
RB#show ip route
Codes: C-connected, S-static, R-RIP B-BGP
O-OSPF, IA-OSPF inter area
N1-OSPF NSSA external type 1, N2-OSPF NSSA external type 2
E1-OSPF external type 1, E2-OSPF external type 2
I-IS-IS, L1-IS-IS level-1, L2-IS-IS level-2, ia-IS-IS inter area
*-candidate default
Gateway of last resort is no set
O 172.16.1.0/24 [110/2] via 172.16.2.1, 00:05:58, FastEthernet 0/0
C 172.16.2.0/24 is directly connected, FastEthernet 0/0
C 172.16.2.2/32 is local host.
C 172.16.3.0/24 is directly connected, FastEthernet 0/1
C 172.16.3.1/32 is local host.
O 172.16.5.0/24 [110/3] via 172.16.2.1, 00:15:22, FastEthernet 0/0
RA#show ip ospf neighbor
OSPF process 1:
Neighbor ID Pri State Dead Time Address Interface
172.16.5.1 1 Full/DR 00:00:38 172.16.1.2 FastEthernet 0/1
172.16.2.2 1 Full/DR 00:00:36 172.16.2.2 FastEthernet 0/0
RA#show ip ospf interface fastEthernet 0/0
FastEthernet 0/0 is up, line protocol is up
Internet Address 172.16.2.1/24, Ifindex 1, Area 0.0.0.0, MTU 1500
Matching network config: 172.16.2.0/24
Process ID 1, Router ID 172.167.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 172.16.2.2, Interface Address 172.16.2.2
Backup Designated Router (ID) 172.167.1.1, Interface Address 172.16.2.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
Neighbor Count is 1, Adjacent neighbor count is 1
Crypt Sequence Number is 82589
Hello received 114 sent 115, DD received 4 sent 5
LS-Req received 1 sent 1, LS-Upd received 5 sent 9
LS-Ack received 6 sent 4, Discarded 0
[notes]
1. When declaring a directly connected network segment, be careful to write the anti-mask of the network segment.
2. When declaring a directly connected network segment, the area to which it belongs must be specified.
[reference configuration]
S3750#show running-config
Building configuration...
Current configuration: 1399 bytes
!
Version RGNOS 10.1.00 (4), Release (18443) (Tue Jul 17 19:51:54 CST 2007
-ubu6server)
Hostname S3750
!
Vlan 1
!
Vlan 10
!
Vlan 50
!
Interface FastEthernet 0/1
Switchport access vlan 10
!
Interface FastEthernet 0/2
Switchport access vlan 50
!
Interface FastEthernet 0/3
!
Interface FastEthernet 0/4
!
Interface FastEthernet 0/5
!
Interface FastEthernet 0/6
!
Interface FastEthernet 0/7
!
Interface FastEthernet 0/8
!
Interface FastEthernet 0/9
!
Interface FastEthernet 0/10
!
Interface FastEthernet 0/11
!
Interface FastEthernet 0/12
!
Interface FastEthernet 0/13
!
Interface FastEthernet 0/14
!
Interface FastEthernet 0/15
!
Interface FastEthernet 0/16
!
Interface FastEthernet 0/17
!
Interface FastEthernet 0/18
!
Interface FastEthernet 0/19
!
Interface FastEthernet 0/20
!
Interface FastEthernet 0/21
!
Interface FastEthernet 0/22
!
Interface FastEthernet 0/23
!
Interface FastEthernet 0/24
!
Interface GigabitEthernet 0/25
!
Interface GigabitEthernet 0/26
!
Interface GigabitEthernet 0/27
!
Interface GigabitEthernet 0/28
!
Interface VLAN 10
Ip address 172.16.1.2 255.255.255.0
!
Interface VLAN 50
Ip address 172.16.5.1 255.255.255.0
!
Router ospf 1
Network 172.16.1.0 0.0.0.255 area 0
Network 172.16.5.0 0.0.0.255 area 0
!
Line con 0
Line vty 0 4
Login
!
End
RB#show running-config
Building configuration...
Current configuration: 579 bytes
!
Version RGNOS 10.1.00 (4), Release (18443) (Tue Jul 17 20:50:30 CST 2007
-ubu1server)
Hostname RB
!
Interface FastEthernet 0/0
Ip address 172.16.2.2 255.255.255.0
Duplex auto
Speed auto
!
Interface FastEthernet 0/1
Ip address 172.16.3.1 255.255.255.0
Duplex auto
Speed auto
!
Interface Loopback 0
!
Router ospf 1
Network 172.16.2.0 0.0.0.255 area 0
Network 172.16.3.0 0.0.0.255 area 0
!
Line con 0
Line aux 0
Line vty 0 4
Login
!
End
RA#show running-config
Building configuration...
Current configuration: 554 bytes
!
Version RGNOS 10.1.00 (4), Release (18443) (Tue Jul 17 20:50:30 CST 2007
-ubu1server)
Hostname RA
!
Interface FastEthernet 0/0
Ip address 172.16.2.1 255.255.255.0
Duplex auto
Speed auto
!
Interface FastEthernet 0/1
Ip address 172.16.1.1 255.255.255.0
Duplex auto
Speed auto
!
Router ospf 1
Network 172.16.1.0 0.0.0.255 area 0
Network 172.16.2.0 0.0.0.255 area 0
!
Line con 0
Line aux 0
Line vty 0 4
Login
!
End
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.