OSPF Stub region configuration instance

Source: Internet
Author: User

1. Topology

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/1609241228-0.png "title =" OSPF Tollary stubary ).png "alt =" 141818241.png"/>

Procedure

1. Configure the interface IP address according to the Topology

2. Enable the OSPF protocol

Declare the network and region

Configure the region type

3. view the OSPF Database

4. view the route table

Resolve the configuration command, please wait for the blogger to add)

R1 #

R1 # config terminal

R1 (config) # interface ran f0/0, f0/1

R1 (config-if) # no shut

R1 (config-if) # interface f0/0

R1 (config-if) # ip address 192.168.0.1 255.255.255.0

R1 (config) # interface f0/1

R1 (config-if) # no shut

R1 (config-if) # ip add 172.20.0.1 255.255.0.0

R1 (config-if) # exit


R1 (config) # router ospf 1

R1 (config-router )#?

R1 (config-router) # network 192.168.0.0 0.0.255 area 0

R1 (config-router) # network 172.255.0.0 0.0.255.255 area 2

R1 (config-router) # exit

R1 (config) # end


R1 # copy runn start



R1 # show ip ospf database


OSPF Router with ID (192.168.0.1) (Process ID 1)


Router Link States (Area 0)


Link id adv Router Age Seq # Checksum Link count

192.168.0.1 192.168.0.1 1584 0x80000006 0xF38E 1

192.168.0.2 192.168.0.2 1455 0x80000005 0xF38C 1


Net Link States (Area 0)


Link id adv Router Age Seq # Checksum

192.168.0.2 192.168.0.2 1455 0x80000002 0x9CEF


Summary Net Link States (Area 0)


Link id adv Router Age Seq # Checksum

172.16.0.0 192.168.0.2 715 0x80000004 0xEF21

172.17.0.0 192.168.0.2 715 0x80000002 0xF11F

172.255.0.0 192.168.0.1 1575 0x80000001 0xCB45


Router Link States (Area 2)


Link id adv Router Age Seq # Checksum Link count

192.168.0.1 192.168.0.1 1584 0x80000001 0x8912 1


Summary Net Link States (Area 2)


Link id adv Router Age Seq # Checksum

172.16.0.0 192.168.0.1 1595 0x80000001 0x60E

172.17.0.0 192.168.0.1 1595 0x80000001 0x40E

192.168.0.0 192.168.0.1 1595 0x80000001 0xCF98

R1 #


R2 # config

R2 (config) # interface ran f0/0, f0/1

R2 (config-if) # no shut

R2 (config-if) # interface f0/0

R2 (config-if) # ip address 192.168.0.2 255.255.255.0

R2 (config-if) # interface f0/1

R2 (config-if) # ip address 172.16.0.1 255.255.0.0


R2 (config-if) # ip ospf?

R2 (config-if) # ip ospf network?

Broadcast Specify OSPF broadcast multi-access network

Non-broadcast Specify ospf nbma network

Point-to-multipoint Specify OSPF point-to-multipoint network

Point-to-point Specify OSPF point-to-point network

R2 (config-if) # exit


R2 (config) # router ospf 3

R2 (config-router) # network 192.168.0.0 0.0.255 area 0

R2 (config-router) # network 172.16.0.0 0.0.255.255 area 1


R2 (config) # router ospf 3

R2 (config-router )#?

Router configuration commands:

Area OSPF area parameters

R2 (config-router) # area?

<0-4294967295> OSPF area ID as a decimal value

A. B .C.D OSPF area ID in IP address format


R2 (config-router) # area 1?

Authentication Enable authentication

Default-cost Set the summary default-cost of a NSSA/stub area

Nssa Specify a NSSA area

Range Summarize routes matching address/mask (border routers only)

Stub Specify a stub area

Virtual-link Define a virtual link and its parameters


R2 (config-router) # area 1 stub?

No-summary Do not send summary LSA into stub area

<Cr>


R2 (config-router) # area 1 stub no-summary

R2 (config-router) # end

R2 # copy runn start


R2 # show ip ospf database


OSPF Router with ID (192.168.0.2) (Process ID 3)


Router Link States (Area 0)


Link id adv Router Age Seq # Checksum Link count

192.168.0.1 192.168.0.1 363 0x80000007 0xF18F 1

192.168.0.2 192.168.0.2 63 0x80000006 0xF18D 1


Net Link States (Area 0)


Link id adv Router Age Seq # Checksum

192.168.0.2 192.168.0.2 63 0x80000003 0x9AF0


Summary Net Link States (Area 0)


Link id adv Router Age Seq # Checksum

172.16.0.0 192.168.0.2 1323 0x80000004 0xEF21

172.17.0.0 192.168.0.2 1323 0x80000002 0xF11F

172.20.0.0 192.168.0.1 363 0x80000002 0xC946


Router Link States (Area 1)


Link id adv Router Age Seq # Checksum Link count

172.17.0.1 172.17.0.1 1309 0x80000004 0xEB7D 2

192.168.0.2 192.168.0.2 1333 0x80000004 0xA638 1


Net Link States (Area 1)


Link id adv Router Age Seq # Checksum

172.16.0.1 192.168.0.2 1333 0x80000002 0xF8EE


Summary Net Link States (Area 1)


Link id adv Router Age Seq # Checksum

0.0.0.0 192.168.0.2 1820 0x80000002 0x973A



R3 # config

R3 (config) # inter ran f0/0, f0/1

R3 (config-if) # no shut


R3 (config-if) # interface f0/0

R3 (config-if) # ip address 172.16.0.2 255.255.255.0.0

R3 (config-if) # interface f0/1

R3 (config-if) # ip address 172.17.0.1 255.255.255.0.0

R3 (config-if) # exit


R3 (config) # router ospf 1

R3 (config-router) # network 172.16.0.0 0.0.255.255 area 1

R3 (config-router) # network 172.17.0.0 0.0.255.255 area 1


R3 (config-router) # area 1 stub no-summary

R3 (config-router) # end

R3 # copy runn start



R3 # show ip ospf database


OSPF Router with ID (172.17.0.1) (Process ID 1)


Router Link States (Area 1)


Link id adv Router Age Seq # Checksum Link count

172.17.0.1 172.17.0.1 32 0x80000003 0xED7C 2

192.168.0.2 192.168.0.2 33 0x80000003 0xA837 1


Net Link States (Area 1)


Link id adv Router Age Seq # Checksum

172.16.0.1 192.168.0.2 33 0x80000001 0 xFAED


Summary Net Link States (Area 1)


Link id adv Router Age Seq # Checksum

0.0.0.0 192.168.0.2 457 0x80000001 0x9939


R3 # show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 172.16.0.2 YES manual up

FastEthernet0/1 172.17.0.1 YES manual up

R3 # show ip ospf database


OSPF Router with ID (172.17.0.1) (Process ID 1)


Router Link States (Area 1)


Link id adv Router Age Seq # Checksum Link count

172.17.0.1 172.17.0.1 855 0x80000004 0xEB7D 2

192.168.0.2 192.168.0.2 871 0x80000004 0xA638 1


Net Link States (Area 1)


Link id adv Router Age Seq # Checksum

172.16.0.1 192.168.0.2 871 0x80000002 0xF8EE


Summary Net Link States (Area 1)


Link id adv Router Age Seq # Checksum

0.0.0.0 192.168.0.2 1358 0x80000002 0x973A

R3 #


View route table

R1 # show ip route

Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGP

D-OSPF, EX-VPN external, 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, E-EGP

I-IS, L1-IS level-1, L2-IS level-2, ia-IS inter area

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

P-periodic downloaded static route


Gateway of last resort is not set


O ia 172.17.0.0/16 [110/3] via 192.168.0.2, 00:30:36, FastEthernet0/0

O ia 172.16.0.0/16 [110/2] via 192.168.0.2, 00:30:36, FastEthernet0/0

C 172.255.0.0/16 is directly connected, FastEthernet0/1

C 192.168.0.0/24 is directly connected, FastEthernet0/0



R2 # show ip route

Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGP

D-OSPF, EX-VPN external, 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, E-EGP

I-IS, L1-IS level-1, L2-IS level-2, ia-IS inter area

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

P-periodic downloaded static route


Gateway of last resort is not set


O 172.17.0.0/16 [110/2] via 172.16.0.2, 00:47:34, FastEthernet0/1

C 172.16.0.0/16 is directly connected, FastEthernet0/1

O ia 172.255.0.0/16 [110/2] via 192.168.0.1, 00:30:55, FastEthernet0/0

C 192.168.0.0/24 is directly connected, FastEthernet0/0


R3 # show ip route

Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGP

D-OSPF, EX-VPN external, 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, E-EGP

I-IS, L1-IS level-1, L2-IS level-2, ia-IS inter area

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

P-periodic downloaded static route


Gateway of last resort is 172.16.0.1 to network 0.0.0.0


C 172.17.0.0/16 is directly connected, FastEthernet0/1

C 172.16.0.0/16 is directly connected, FastEthernet0/0

O * IA 0.0.0.0/0 [110/2] via 172.16.0.1, 00:47:55, FastEthernet0/0

R3 #



This article is from the "Huiliang blog" blog, please be sure to keep this source http://lddxfs.blog.51cto.com/4151130/1320848

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.