OSPF Basic Configuration

Source: Internet
Author: User

Experimental OSPF Basic Configuration
"Experiment Name"
OSPF single area basic configuration.
"Experimental Purpose"
Master the OSPF single area configured on the router.
"Background description"
Suppose the campus network is connected to the campus network egress router via 1 three-layer switches, the router and the other 1 outside the campus
Router connection, now do the appropriate configuration, to achieve campus network internal host and campus network external host communication.
This experiment takes two routers and 1 three-layer switches as an example. The S3550 are divided into VLAN10 and VLAN50,
Where VLAN10 is used to connect ra,vlan50 for connecting to the campus network host.
"Demand Analysis"
It is necessary to configure the OSPF routing protocol on routers and switches, so that the network can be interconnected, so as to realize the sharing of information and
Passed.
"Experimental Topology"
Fig. 8-1 Experimental topological diagram
"Experimental Equipment"
Three-layer Switch 1 units
Router 2 units
Crossover line or straight wire 3 strips
"Pre-knowledge"
Router basic configuration knowledge, OSPF
"Experimental principle"
OSPF (Open Shortest Path first, open Shortest Path Priority) protocol, is currently the most widely used network
One of the broad routing protocols. belong to the internal Gateway routing protocol, can adapt to various scales of network environment, is a typical chain
The road State (link-state) protocol.
The OSPF routing protocol spreads the link state information of the device to the whole network, so that each device in the net synchronizes a
A database (LSDB) with a full network link state, then the router uses an SPF algorithm that takes its own root and calculates the
The shortest path to other networks, eventually forming the entire network by information.
OSPF belongs to the class-free routing protocol, which supports VLSM (variable eldest subnet mask). OSPF is done in the form of multicast
The notification of the link state.
In the large model network environment, OSPF supports the division of the region, and the network is rationally planned. When dividing a region, you must
AREA0 (backbone area) must exist. Other areas and backbone areas are directly connected or connected by virtual links.
"Experimental Steps"
First step: Configure IP addresses on routers and layer three 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 F0/1
S3750 (config-if) #switchport Access VLAN 10
S3750 (config-if) #exit
S3750 (config) #interface F0/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 0/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 0/0
RouterA (config-if) # IP address 172.16.2.1 255.255.255.0
Routerb (config-if) # no shutdown
Routerb (config) # interface fastethernet 0/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 0/0
Routerb (config-if) # IP address 172.16.2.2 255.255.255.0
Routerb (config-if) # no shutdown
Step Two: 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.0.255 area 0
S3750 (Config-router) #end
RouterA (config) # router OSPF
RouterA (config-router) #network 172.16.1.0 0.0.0.255 area 0
RouterA (config-router) #network 172.16.2.0 0.0.0.255 area 0
RouterA (Config-router) #end
Routerb (config) #router OSPF
Routerb (config-router) #network 172.16.2.0 0.0.0.255 area 0
Routerb (config-router) #network 172.16.3.0 0.0.0.255 area 0
Routerb (Config-router) #end
Step three: 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
Ten VLAN0010 STATIC FA0/1
VLAN0050 STATIC FA0/2
S3750#show IP Interface Brief
Interface ip-address (Pri) OK? Status
VLAN Ten 172.16.1.2/24 YES up
VLAN 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 are 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 ten, Dead, Wait, retransmit 5
Hello due in 00:00:05
Neighbor count is 1, adjacent Neighbor count is 1
Crypt Sequence number is 82589
Hello received sent, 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
"Precautions"
1, in the Declaration of direct connection to the network segment, pay attention to write the network segment of the anti-mask code.
2. When declaring a direct connected network segment, you must specify the area to which you belong.
"Reference Configuration"
S3750#show Running-config
Building configuration ...
Current configuration:1399 bytes
!
Version Rgnos 10.1.00 (4), Release (18443) (Tue Jul 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 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 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

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8B/8D/wKiom1hQ6y3CwrzVAACmWXfXpmc773.png-wh_500x0-wm_3 -wmp_4-s_4016946151.png "style=" Float:none; "title=" capture. PNG "alt=" Wkiom1hq6y3cwrzvaacmwxfxpmc773.png-wh_50 "/>

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8B/8A/wKioL1hQ6y7yRyrpAAAEuYqDiPM950.png-wh_500x0-wm_3 -wmp_4-s_3651020779.png "style=" Float:none; "title=" Vbs%hnw$lf3_{96cq5 ' X3ka.png "alt=" Wkiol1hq6y7yryrpaaaeuyqdipm950.png-wh_50 "/>

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8B/8D/wKiom1hQ6y6TpeIVAAAJwPK-tNQ524.png-wh_500x0-wm_3 -wmp_4-s_856411123.png "style=" Float:none; "title=" MK 36U (47_89x$506u}ey8i.png "alt=" Wkiom1hq6y6tpeivaaajwpk-tnq524.png-wh_50 "/>

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8B/8A/wKioL1hQ6y7g20g_AAAGIi4dviI571.png-wh_500x0-wm_3 -wmp_4-s_589367891.png "style=" Float:none; "title=" Eq66$n%9bmn4[84l~u42e76.png "alt=" WKioL1hQ6y7g20g_ Aaagii4dvii571.png-wh_50 "/>


This article from the "12035317" blog, reproduced please contact the author!

OSPF Basic 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.