Cisco routers basic networking application with three-layer switch OSPF

Source: Internet
Author: User

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/89/CC/wKioL1gdRUfAQOUJAABrH4nJ2qU055.png-wh_500x0-wm_3 -wmp_4-s_651571346.png "title=" OSPF Networking topology Map "alt=" wkiol1gdrufaqoujaabrh4nj2qu055.png-wh_50 "/>

OSPF Networking Basic configuration:

1. Three-layer switch

Switch>enable

Switch#configure Terminal

Enter configuration commands, one per line. End withcntl/z.

Switch (config) #vlan// creating VLANs

Switch (Config-vlan) #interface VLAN// creating VLAN Virtual interfaces

%link-5-changed:interface Vlan10, CHANGED state-to-up

Switch (config-if) #ip address 192.168.10.254255.255.255.0// Set VLAN Virtual interface address

Switch (config-if) #interface FA0/1

Switch (config-if) #switchport access VLAN// set interface VLAN ID

%lineproto-5-updown:line protocol on INTERFACEVLAN10, changed

Switch (config-if) #interface fa0/24// Enter interface configuration mode

Router (config-if) #no shutdown// Enable/Open Interface

Switch (config-if) #no switchport // switch mode to route mode

Switch (config-if) #ip address 192.168.20.1255.255.255.0// set the interface IP address

Switch (config-if) #exit

Switch (config) #ip routing// Enable routing features

Switch (config) #router OSPF 1 // creating an OSPF process 1

Switch (Config-router) #network192.168.20.0 0.0.0.255 Area 1 // set subnet number and zone ID

Switch (config-router) #redistribute connected// Publish direct links to Lsdb

Switch (Config-router) #exit

Switch (config) #exit

switch#write// Save the current configuration to the system configuration file so that the next time you start using

2. Router R0

Router>enable

Router#configure Terminal

Enter configuration commands, one per line. End withcntl/z.

Router (config) #hostname R1// Modify Device Name

R1 (config) #interface fastethernet 0/0// Enter interface configuration mode

R1 (config-if) #ip address 192.168.20.2 255.255.255.0// set the interface IP address

R1 (config-if) #no shutdown// Enable/Open Interface

R1 (config-if) #interface fastethernet 0/1

R1 (config-if) #ip address 192.168.30.1 255.255.255.0

R1 (config-if) #no shutdown

R1 (config-if) #exit

R1 (config) # router OSPF 1// creating an OSPF process 1

R1 (config-router) #network 192.168. 0 0.0.0.255area 1 // set subnet number and zone ID

R1 (config-router) #network 192.168. 0 0.0.0.255area 0 // set subnet number and zone ID

R1 (Config-router) #exit

Router (config) #exit

Router#write

3. Router R1

Router>enable

Router#configure Terminal

Enter configuration commands, one per line. End withcntl/z.

Router (config) #hostname R1

R1 (config) #interface fastethernet 0/0

R1 (config-if) #ip address 192.168.30.2 255.255.255.0

R1 (config-if) #no shutdown

R1 (config-if) #interface fastethernet 0/1

R1 (config-if) #ip address 192.168.40.1 255.255.255.0

R1 (config-if) #no shutdown

R1 (config-if) #exit

R1 (config) #router OSPF 1

R1 (config-router) #network 192.168.30.0 0.0.0.255area 0

R1 (config-router) #network 192.168.40.0 0.0.0.255area 2

R1 (Config-router) #exit

R1 (config) #exit

R1#write

4. Router R2

Router>enable

Router#confiure Terminal

Enter configuration commands, one per line. End withcntl/z.

Router (config) #hostname R2

R2 (config) #interface fastethernet 0/0

R2 (config-if) #ip address 192.168.40.2 255.255.255.0

R2 (config-if) #no shutdown

R2 (config-if) #interface fastethernet 0/1

R2 (config-if) #ip address 192.168.50.254 255.255.255.0

R2 (config-if) #no shutdown

R2 (config-if) #exit

R2 (config) #router OSPF 1

R2 (config-router) #network 192.168.40.0 0.0.0.255area 2

R2 (config-router) #network 192.168.50.0 0.0.0.255area 2

R2 (Config-router) #exit

R2 (config) #exit

R2#write

View OSPF Routing table:

1. Three-layer switch

Switch#show IP route

CODES:C-connected, s-static, I-igrp, R-rip, M-mobile, B-BGP

D-EIGRP, Ex-eigrp External, O-OSPF, IA-OSPF Inter area

N1-OSPF NSSA External Type 1, N2-OSPF nssaexternal type 2

E1-OSPF external Type 1, E2-OSPF external type 2,E-EGP

I-is-is, L1-is-is level-1, L2-is-is level-2, ia-is-is Inter area

*-Candidate default, U-per-user static route, O-ODR

P-periodic downloaded static route

Gateway of last resort are not set

C 192.168.10.0/24 is directly connected, VLAN10

C 192.168.20.0/24 is directly connected,fastethernet0/24

O IA 192.168.30.0/24 [110/2] via 192.168.20.2,00:07:08, fastethernet0/24

O IA 192.168.40.0/24 [110/3] via 192.168.20.2,00:05:31, fastethernet0/24

OIA 192.168.50.0/24 [110/4] via 192.168.20.2, 00:03:34, fastethernet0/24

2. Router R2

R2#show IP route

CODES:C-connected, s-static, I-igrp, R-rip, M-mobile, B-BGP

D-EIGRP, Ex-eigrp External, O-OSPF, IA-OSPF Inter area

N1-OSPF NSSA External Type 1, N2-OSPF NSSA Externaltype 2

E1-OSPF external Type 1, E2-OSPF external type 2, E-EGP

I-is-is, L1-is-is level-1, L2-is-is level-2, ia-is-is Inter area

*-Candidate default, U-per-user static route, O-ODR

P-periodic downloaded static route

Gateway of last resort are not set

O E2 192.168.10.0/24 [110/20] via 192.168.40.1,00:00:39, fastethernet0/0

O IA 192.168.20.0/24 [110/3] via 192.168.40.1,00:03:57, fastethernet0/0

O ia192.168.30.0/24 [110/2] via 192.168.40.1, 00:03:57, fastethernet0/0

C 192.168.40.0/24 is directly connected, fastethernet0/0

C 192.168.50.0/24 is directlyconnected, FASTETHERNET0/1

Network Connectivity Testing:

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/89/CC/wKioL1gdStqguHLKAAApOZqHrgs301.png-wh_500x0-wm_3 -wmp_4-s_408391535.png "title=" network connectivity test "alt=" Wkiol1gdstqguhlkaaapozqhrgs301.png-wh_50 "/>

This article is from the "small Li Fei Knife" blog, please make sure to keep this source http://wxjsr.blog.51cto.com/92602/1869713

Cisco routers basic networking application with three-layer switch OSPF

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.