如何配置華為OSPF多區(qū)域認(rèn)證
如何配置華為OSPF多區(qū)域認(rèn)證
華為的產(chǎn)品主要涉及通信網(wǎng)絡(luò)中的交換網(wǎng)絡(luò)、傳輸網(wǎng)絡(luò)、無(wú)線及有線固定接入網(wǎng)絡(luò)和數(shù)據(jù)通信網(wǎng)絡(luò)及無(wú)線終端產(chǎn)品,其出產(chǎn)的路由器功能強(qiáng)大,那么你知道如何配置華為動(dòng)態(tài)路由RIP嗎?下面是學(xué)習(xí)啦小編整理的一些關(guān)于如何配置華為動(dòng)態(tài)路由RIP的相關(guān)資料,供你參考。
什么是OSPF?
OSPF(Open Shortest Path First開(kāi)放式最短路徑優(yōu)先)是一個(gè)內(nèi)部網(wǎng)關(guān)協(xié)議(Interior Gateway Protocol,簡(jiǎn)稱(chēng)IGP),用于在單一自治系統(tǒng)(autonomous system,AS)內(nèi)決策路由。是對(duì)鏈路狀態(tài)路由協(xié)議的一種實(shí)現(xiàn),隸屬內(nèi)部網(wǎng)關(guān)協(xié)議(IGP),故運(yùn)作于自治系統(tǒng)內(nèi)部。著名的迪克斯加算法(Dijkstra)被用來(lái)計(jì)算最短路徑樹(shù)。OSPF分為OSPFv2和OSPFv3兩個(gè)版本,其中OSPFv2用在IPv4網(wǎng)絡(luò),OSPFv3用在IPv6網(wǎng)絡(luò)。OSPFv2是由RFC 2328定義的,OSPFv3是由RFC 5340定義的。與RIP相比,OSPF是鏈路狀態(tài)協(xié)議,而RIP是距離矢量協(xié)議。
IETF為了滿足建造越來(lái)越大基于IP網(wǎng)絡(luò)的需要,形成了一個(gè)工作組,專(zhuān)門(mén)用于開(kāi)發(fā)開(kāi)放式的鏈路狀態(tài)路由協(xié)議,以便用在大型、異構(gòu)的I P網(wǎng)絡(luò)中。新的路由協(xié)議已經(jīng)取得一些成功的一系列私人的、和生產(chǎn)商相關(guān)的、最短路徑優(yōu)先(SPF )路由協(xié)議為基礎(chǔ), 在市場(chǎng)上廣泛使用。包括OSPF在內(nèi),所有的S P F路由協(xié)議基于一個(gè)數(shù)學(xué)算法—Dijkstra算法。這個(gè)算法能使路由選擇基于鏈路狀態(tài),而不是距離向量。OSPF由IETF在20世紀(jì)80年代末期開(kāi)發(fā),OSPF是SPF類(lèi)路由協(xié)議中的開(kāi)放式版本。最初的OSPF規(guī)范體如今RFC1131中。這個(gè)第1版( OSPF版本1 )很快被進(jìn)行了重大改進(jìn)的版本所代替,這個(gè)新版本體如今RFC1247文檔中。RFC 1247OSPF稱(chēng)為OSPF版本2是為了明確指出其在穩(wěn)定性和功能性方面的實(shí)質(zhì)性改進(jìn)。這個(gè)OSPF版本有許多更新文檔,每一個(gè)更新都是對(duì)開(kāi)放標(biāo)準(zhǔn)的精心改進(jìn)。接下來(lái)的一些規(guī)范出如今RFC 1583、2178和2328中。OSPF版本2的最新版體如今RFC 2328中。最新版只會(huì)和由RFC 2138、1583和1247所規(guī)范的版本進(jìn)行互操作。
配置華為OSPF多區(qū)域認(rèn)證的案例
此實(shí)驗(yàn)主要實(shí)現(xiàn)以下目的:
1、了解OSPF多區(qū)域設(shè)計(jì)的優(yōu)點(diǎn)。
2、理解OSPF多區(qū)域路由信息的交換方式。
3、掌握OSPF多區(qū)域配置命令。
4、掌握OSPF的認(rèn)證配置方法。
5、掌握OSPF鄰居無(wú)法建立的故障排除方法。
拓?fù)鋱D
你是公司的網(wǎng)絡(luò)管理員?,F(xiàn)在公司的網(wǎng)絡(luò)準(zhǔn)備OSPF協(xié)議來(lái)進(jìn)行路由信息的傳遞。為應(yīng)對(duì)網(wǎng)絡(luò)規(guī)模日益增大的問(wèn)題,你決定使用OSPF的多區(qū)域模式來(lái)規(guī)劃網(wǎng)絡(luò)。此外為保證信息安全,你采用了OSPF的認(rèn)證。在配置過(guò)程中你也了解了OSPF中各種了性LSA的作用。
學(xué)習(xí)任務(wù)
配置華為OSPF多區(qū)域認(rèn)證步驟一.基本配置
[Huawei]sysnameR1
[R1]interfaces1/0/0
[R1-Serial1/0/0]ipadd 10.0.12.1 24
[R1-Serial1/0/0]descthis port connect to R2-S1/0/0
[R1-Serial1/0/0]interfacegi0/0/0
[R1-GigabitEthernet0/0/0]ipadd 10.0.13.1 24
[R1-GigabitEthernet0/0/0]
Jun 292014 16:29:10-05:13 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP o
n theinterface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]descthis port connect to R3-Gi0/0/0
[R1-GigabitEthernet0/0/0]interfaceloopback0
[R1-LoopBack0]ipadd 10.0.1.1 24
[R1-LoopBack0]q
其它路由器參照R1的配置進(jìn)行配置。
配置華為OSPF多區(qū)域認(rèn)證步驟二.OSPF多區(qū)域配置
R1為ABR,10.0.12.0/24網(wǎng)段屬于區(qū)域0,10.0.13.0/24與10.0.1.0/24網(wǎng)段屬于區(qū)域1.
[R1]ospf1 router-id 10.0.1.1
[R1-ospf-1]area0
[R1-ospf-1-area-0.0.0.0]network10.0.12.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]q
[R1-ospf-1]area1
[R1-ospf-1-area-0.0.0.1]network10.0.13.0 0.0.0.255
[R1-ospf-1-area-0.0.0.1]network10.0.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.1]
R2為骨干區(qū)域普通內(nèi)部路由器,屬于區(qū)域0.
[R2]ospf1 router-id 10.0.2.2
[R2-ospf-1]area0
[R2-ospf-1-area-0.0.0.0]network10.0.12.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network10.0.2.0 0.0.0.255
R3為ASBR,10.0.13.0/24和10.0.3.0/24兩個(gè)網(wǎng)段屬于區(qū)域1,172.64.0.0/24網(wǎng)段不屬于ospf路由域,不通告進(jìn)OSPF進(jìn)程。
[R3]ospf1 router-id 10.0.3.3
[R3-ospf-1]area1
[R3-ospf-1-area-0.0.0.1]network10.0.3.0 0.0.0.255
[R3-ospf-1-area-0.0.0.1]network10.0.13.0 0.0.0.255
配置華為OSPF多區(qū)域認(rèn)證步驟三.OSPF路由驗(yàn)證
查看R1、R2、R3的路由表,確認(rèn)各路由器已學(xué)習(xí)到如下紅色突出顯示部分路由條目。
[R1]disip routing-table protocol ospf
RouteFlags: R - relay, D - download to fib
------------------------------------------------------------------------------
Publicrouting table : OSPF
Destinations : 2 Routes : 2
OSPFrouting table status :
Destinations : 2 Routes : 2
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.2.2/32 OSPF 10 48 D 10.0.12.2 Serial1/0/0
10.0.3.3/32 OSPF 10 1 D 10.0.13.3 GigabitEthernet0/0/0
OSPFrouting table status :
Destinations : 0 Routes : 0
[R2]disip routing-table protocol ospf
RouteFlags: R - relay, D - download to fib
------------------------------------------------------------------------------
Publicrouting table : OSPF
Destinations : 3 Routes : 3
OSPFrouting table status :
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.1/32 OSPF 10 48 D 10.0.12.1 Serial1/0/0
10.0.3.3/32 OSPF 10 49 D 10.0.12.1 Serial1/0/0
10.0.13.0/24 OSPF 10 49 D 10.0.12.1 Serial1/0/0
OSPFrouting table status :
Destinations : 0 Routes : 0
[R3]disip routing-table protocol ospf
RouteFlags: R - relay, D - download to fib
------------------------------------------------------------------------------
Publicrouting table : OSPF
Destinations : 3 Routes : 3
OSPFrouting table status :
Destinations : 3 Routes : 3
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.1/32 OSPF 10 1 D 10.0.13.1 GigabitEthernet/0/0
10.0.2.2/32 OSPF 10 49 D 10.0.13.1 GigabitEthernet0/0/0
10.0.12.0/24 OSPF 10 49 D 10.0.13.1 GigabitEthernet0/0/0
OSPFrouting table status :
Destinations : 0 Routes : 0
[R3]ping10.0.1.1
PING 10.0.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.1.1: bytes=56 Sequence=1ttl=255 time=20 ms
Reply from 10.0.1.1: bytes=56 Sequence=2ttl=255 time=10 ms
Reply from 10.0.1.1: bytes=56 Sequence=3ttl=255 time=10 ms
Reply from 10.0.1.1: bytes=56 Sequence=4ttl=255 time=10 ms
Reply from 10.0.1.1: bytes=56 Sequence=5ttl=255 time=10 ms
--- 10.0.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/12/20 ms
[R3]ping10.0.2.2
PING 10.0.2.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.2.2: bytes=56 Sequence=1ttl=254 time=30 ms
Reply from 10.0.2.2: bytes=56 Sequence=2ttl=254 time=20 ms
Reply from 10.0.2.2: bytes=56 Sequence=3ttl=254 time=20 ms
Reply from 10.0.2.2: bytes=56 Sequence=4ttl=254 time=10 ms
Reply from 10.0.2.2: bytes=56 Sequence=5ttl=254 time=20 ms
--- 10.0.2.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
查看OSPF鄰居狀態(tài)
[R1]displayospf peer brief
OSPF Process 1 with Router ID 10.0.1.1
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
0.0.0.0 Serial1/0/0 10.0.2.2 Full
0.0.0.1 GigabitEthernet0/0/0 10.0.3.3 Full
----------------------------------------------------------------------------
[R1]
[R2]displayospf peer brief
OSPF Process 1 with Router ID 10.0.2.2
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
0.0.0.0 Serial1/0/0 10.0.1.1 Full
----------------------------------------------------------------------------
[R2]
[R3]disospf peer brief
OSPF Process 1 with Router ID 10.0.3.3
Peer Statistic Information
----------------------------------------------------------------------------
Area Id Interface Neighbor id State
0.0.0.1 GigabitEthernet0/0/0 10.0.1.1 Full
----------------------------------------------------------------------------
[R3]
確認(rèn)以上個(gè)路由器ospf進(jìn)程和Router ID正確,且鄰居關(guān)系全部達(dá)到full狀態(tài)。
配置華為OSPF多區(qū)域認(rèn)證步驟四.OSPF外部路由引入及驗(yàn)證
在R3上使inport-router命令引入直連外部路由。
[R3]ospf1
[R3-ospf-1]import-routedirect
查看R1和R2的路由表,確認(rèn)已學(xué)到引入的路由10.0.3.0/24和172.64.0.0/24.
[R1]disip routing-table protocol ospf
RouteFlags: R - relay, D - download to fib
------------------------------------------------------------------------------
Publicrouting table : OSPF
Destinations : 4 Routes : 4
OSPFrouting table status :
Destinations : 4 Routes : 4
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.2.2/32 OSPF 10 48 D 10.0.12.2 Serial1/0/0
10.0.3.0/24 O_ASE 150 1 D 10.0.13.3 GigabitEthernet0/0/0
10.0.3.3/32 OSPF 10 1 D 10.0.13.3 GigabitEthernet0/0/0
172.64.0.0/24 O_ASE 150 1 D 10.0.13.3 GigabitEthernet0/0/0
OSPFrouting table status :
Destinations : 0 Routes : 0
[R2]disip routing-table protocol ospf
RouteFlags: R - relay, D - download to fib
------------------------------------------------------------------------------
Publicrouting table : OSPF
Destinations : 5 Routes : 5
OSPFrouting table status :
Destinations : 5 Routes : 5
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.1.1/32 OSPF 10 48 D 10.0.12.1 Serial1/0/0
10.0.3.0/24 O_ASE 150 1 D 10.0.12.1 Serial1/0/0
10.0.3.3/32 OSPF 10 49 D 10.0.12.1 Serial1/0/0
10.0.13.0/24 OSPF 10 49 D 10.0.12.1 Serial1/0/0
172.64.0.0/24 O_ASE 150 1 D 10.0.12.1 Serial1/0/0
OSPFrouting table status :
Destinations : 0 Routes : 0
以上紅色部分顯示為引入的外部路由。Proto字段為O_ASE表示OSPF外部路由。
使用帶源參數(shù)的ping命令測(cè)試網(wǎng)絡(luò)的連通性。
[R2]ping-a 10.0.2.2 10.0.3.3
PING 10.0.3.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.3.3: bytes=56 Sequence=1ttl=254 time=30 ms
Reply from 10.0.3.3: bytes=56 Sequence=2ttl=254 time=20 ms
Reply from 10.0.3.3: bytes=56 Sequence=3ttl=254 time=20 ms
Reply from 10.0.3.3: bytes=56 Sequence=4ttl=254 time=20 ms
Reply from 10.0.3.3: bytes=56 Sequence=5ttl=254 time=30 ms
--- 10.0.3.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/24/30 ms
[R2]ping -a 10.0.2.2 172.64.0.1
PING 172.64.0.1: 56 data bytes, press CTRL_C to break
Reply from 172.64.0.1:bytes=56 Sequence=1 ttl=254 time=20 ms
Reply from 172.64.0.1:bytes=56 Sequence=2 ttl=254 time=20 ms
Reply from 172.64.0.1:bytes=56 Sequence=3 ttl=254 time=10 ms
Reply from 172.64.0.1:bytes=56 Sequence=4 ttl=254 time=10 ms
Reply from 172.64.0.1:bytes=56 Sequence=5 ttl=254 time=20 ms
--- 172.64.0.1 pingstatistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max =10/16/20 ms