江西省建設(shè)工程協(xié)會(huì)網(wǎng)站查詢(xún)百度seo怎么收費(fèi)
?拓?fù)浣Y(jié)構(gòu):
要求:
1、兩個(gè)協(xié)議間進(jìn)行多點(diǎn)雙向重發(fā)布
2、R7的環(huán)回沒(méi)有宣告在OSPF協(xié)議中,而是在后期重發(fā)布進(jìn)入的
3、解決環(huán)路,所有路徑選擇最優(yōu),且存在備份
4、R2的環(huán)回要在RIP中宣告,R3的環(huán)回要在OSPF中宣告
?使用的設(shè)備:7臺(tái)路由器
解決網(wǎng)絡(luò)拓?fù)?#xff1a;
1、確定廣播域的個(gè)數(shù)
2、分配網(wǎng)段
3、配置IP地址 (優(yōu)先配置路由器)
確定廣播域的個(gè)數(shù)
根據(jù)拓?fù)浣Y(jié)構(gòu)圖以及要求可知,本拓?fù)浣Y(jié)構(gòu)一共擁有9個(gè)網(wǎng)段,包括4個(gè)給定網(wǎng)段,一個(gè)環(huán)回網(wǎng)段和四個(gè)內(nèi)網(wǎng)網(wǎng)段
分配網(wǎng)段
自主分配網(wǎng)段
接口網(wǎng)段 | 環(huán)回網(wǎng)段 |
10.1.1.0/30 | 10.1.1.128/25 |
20.1.1.0/30 | 20.1.1.128/25 |
30.1.1.0/30 | 30.1.1.128/25 |
40.1.1.0/30 | 40.1.1.128/25 |
50.1.1.0/30 | 50.1.1.128/25 |
60.1.1.0/30 | 60.1.1.128/25 |
70.1.1.0/30 | 70.1.1.128/25 |
配置路由器IP地址
?AR1:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r1
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]ip address 10.1.1.1 30
[r1-GigabitEthernet0/0/0]
May 13 2023 21:09:09-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]q
[r1]interface GigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ip address 20.1.1.1 30
May 13 2023 21:09:33-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]q
[r1]interface LoopBack 0
[r1-LoopBack0]ip address 10.1.1.129 25
[r1-LoopBack0]q
[r1]
AR2:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r2
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 10.1.1.2 30
[r2-GigabitEthernet0/0/0]
May 13 2023 21:14:37-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]q
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip address 30.1.1.1 30
May 13 2023 21:14:49-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r2-GigabitEthernet0/0/1]q
[r2]interface LoopBack 0
[r2-LoopBack0]ip address 20.1.1.129 25
[r2-LoopBack0]q
[r2]
AR3:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r3
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]ip address 20.1.1.2 30
[r3-GigabitEthernet0/0/0]
May 13 2023 21:16:22-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r3-GigabitEthernet0/0/0]q
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ip address 40.1.1.1 30
[r3-GigabitEthernet0/0/1]
May 13 2023 21:16:37-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r3-GigabitEthernet0/0/1]q
[r3]interface LoopBack 0
[r3-LoopBack0]ip address 30.1.1.129 25
[r3-LoopBack0]q
[r3]
AR4:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r4
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ip address 40.1.1.2 30
[r4-GigabitEthernet0/0/0]
May 13 2023 21:18:12-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r4-GigabitEthernet0/0/0]q
[r4]interface GigabitEthernet 0/0/1
[r4-GigabitEthernet0/0/1]ip address 30.1.1.2 30
May 13 2023 21:18:23-08:00 r4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r4-GigabitEthernet0/0/1]q
[r4]interface GigabitEthernet 0/0/2
[r4-GigabitEthernet0/0/2]ip address 50.1.1.1 30
May 13 2023 21:18:37-08:00 r4 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP on the interface GigabitEthernet0/0/2 has entered the UP state.
[r4-GigabitEthernet0/0/2]q
[r4]interface LoopBack 0
[r4-LoopBack0]ip address 40.1.1.129 25
[r4-LoopBack0]q
[r4]
AR5:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r5
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ip address 50.1.1.2 30
[r5-GigabitEthernet0/0/0]
May 13 2023 21:19:46-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r5-GigabitEthernet0/0/0]q
[r5]interface GigabitEthernet 0/0/1
[r5-GigabitEthernet0/0/1]ip address 60.1.1.1 30
May 13 2023 21:20:00-08:00 r5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r5-GigabitEthernet0/0/1]q
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 50.1.1.129 25
[r5-LoopBack0]q
[r5]
AR6:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r6
[r6]interface GigabitEthernet 0/0/0
[r6-GigabitEthernet0/0/0]ip address 60.1.1.2 30
[r6-GigabitEthernet0/0/0]
May 13 2023 21:21:05-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r6-GigabitEthernet0/0/0]q
[r6]interface GigabitEthernet 0/0/1
[r6-GigabitEthernet0/0/1]ip address 70.1.1.1 30
[r6-GigabitEthernet0/0/1]
May 13 2023 21:21:24-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state.
[r6-GigabitEthernet0/0/1]q
[r6]interface LoopBack 0
[r6-LoopBack0]ip address 60.1.1.129 25
[r6-LoopBack0]q
[r6]
AR7:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname r7
[r7]interface GigabitEthernet 0/0/0
[r7-GigabitEthernet0/0/0]ip address 70.1.1.2 30
May 13 2023 21:23:13-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[r7-GigabitEthernet0/0/0]q
[r7]interface LoopBack 0
[r7-LoopBack0]ip address 70.1.1.129 25
[r7-LoopBack0]q
[r7]
配置RIP動(dòng)態(tài)路由協(xié)議
AR1:
[r1]rip 1
[r1-rip-1]version 2
[r1-rip-1]network 10.0.0.0
[r1-rip-1]network 20.0.0.0
[r1-rip-1]q
[r1]
AR2:
[r2]rip 1
[r2-rip-1]version 2
[r2-rip-1]network 10.0.0.0
[r2-rip-1]network 20.0.0.0
[r2-rip-1]q
[r2]
AR3:
[r3]rip 1
[r3-rip-1]version 2
[r3-rip-1]network 20.0.0.0
[r3-rip-1]q
[r3]
配置OSPF動(dòng)態(tài)路由協(xié)議
AR2:
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 30.1.1.0 0.0.0.3
[r2-ospf-1-area-0.0.0.0]q
[r2-ospf-1]q
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456
[r2-GigabitEthernet0/0/1]q
[r2]
AR3:
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 30.1.1.128 0.0.0.127
[r3-ospf-1-area-0.0.0.0]network 40.1.1.0 0.0.0.3
[r3-ospf-1-area-0.0.0.0]q
[r3-ospf-1]q
[r3]interface GigabitEthernet 0/0/1
[r3-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456
[r3-GigabitEthernet0/0/1]q
[r3]
AR4:
[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 30.1.1.0 0.0.0.3
[r4-ospf-1-area-0.0.0.0]network 40.1.1.0 0.0.0.3
[r4-ospf-1-area-0.0.0.0]network 40.1.1.128 0.0.0.127
[r4-ospf-1-area-0.0.0.0]network 50.1.1.0 0.0.0.3
[r4-ospf-1-area-0.0.0.0]q
[r4-ospf-1]q
[r4]interface GigabitEthernet 0/0/0
[r4-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
[r4-GigabitEthernet0/0/0]q
[r4]interface GigabitEthernet 0/0/1
[r4-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456
[r4-GigabitEthernet0/0/1]q
[r4]interface GigabitEthernet 0/0/2
[r4-GigabitEthernet0/0/2]ospf authentication-mode md5 1 cipher 123456
[r4-GigabitEthernet0/0/2]q
[r4]
AR5:
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 50.1.1.0 0.0.0.3
[r5-ospf-1-area-0.0.0.0]network 50.1.1.128 0.0.0.127
[r5-ospf-1-area-0.0.0.0]network 60.1.1.0 0.0.0.3
[r5-ospf-1-area-0.0.0.0]q
[r5-ospf-1]q
[r5]interface GigabitEthernet 0/0/0
[r5-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
[r5-GigabitEthernet0/0/0]q
[r5]interface GigabitEthernet 0/0/1
[r5-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456
[r5-GigabitEthernet0/0/1]q
[r5]
AR6:
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 60.1.1.0 0.0.0.3
[r6-ospf-1-area-0.0.0.0]network 60.1.1.128 0.0.0.127
[r6-ospf-1-area-0.0.0.0]network 70.1.1.0 0.0.0.3
[r6-ospf-1-area-0.0.0.0]q
[r6-ospf-1]q
[r6]interface GigabitEthernet 0/0/0
[r6-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
[r6-GigabitEthernet0/0/0]q
[r6]interface GigabitEthernet 0/0/1
[r6-GigabitEthernet0/0/1]ospf authentication-mode md5 1 cipher 123456
[r6-GigabitEthernet0/0/1]q
[r6]
AR7:
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 70.1.1.0 0.0.0.3
[r7-ospf-1-area-0.0.0.0]q
[r7-ospf-1]q
[r7]interface GigabitEthernet 0/0/0
[r7-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456
[r7-GigabitEthernet0/0/0]q
[r7]
配置OSPF動(dòng)態(tài)路由協(xié)議,在接口配置認(rèn)證,保證更新安全
重發(fā)布
配置完RIP動(dòng)態(tài)路由協(xié)議與OSPF動(dòng)態(tài)路由協(xié)議之后,雙方協(xié)議并沒(méi)有對(duì)方的路由條目,所以要正常通信就要進(jìn)行雙向重發(fā)布操作
注:先在R7上重發(fā)布環(huán)回,然后在R2、R3上重發(fā)布
AR7:
[r7]ospf 1
[r7-ospf-1]import-route direct
[r7-ospf-1]q
[r7]
AR2:
[r2]rip 1
[r2-rip-1]import-route ospf 1
[r2-rip-1]q
[r2]ospf 1
[r2-ospf-1]import-route rip 1
[r2-ospf-1]q
[r2]
AR3:
[r3]rip 1
[r3-rip-1]import-route ospf 1
[r3-rip-1]q
[r3]ospf 1
[r3-ospf-1]import-route rip 1
[r3-ospf-1]q
[r3]
?環(huán)路
做完多點(diǎn)雙向重發(fā)布之后,要保證R2、R3?上路由表不發(fā)生變化,否則就會(huì)出現(xiàn)環(huán)路
?
R2的路由表上有一些問(wèn)題:R2去R3的環(huán)回有兩條路徑(1)走左邊RIP,路由條目掩碼是25位,(2)走右邊OSPF,路由條目掩碼是32位(華為模擬器認(rèn)為環(huán)回地址是32位掩碼)
修改方案:(1)把環(huán)回接口地址掩碼修改為32位(2)修改環(huán)回接口類(lèi)型
#第一種方案
[r3]interface LoopBack 0
[r3-LoopBack0]undo ip address 30.1.1.129 25
[r3-LoopBack0]ip address 30.1.1.129 32
[r3-LoopBack0]q
[r3]#第二種方案
[r3]interface LoopBack 0
[r3-LoopBack0]ospf network-type broadcast
[r3-LoopBack0]q
[r3]
修改成功,解決問(wèn)題。?
?
????????此時(shí)R3上的路由已經(jīng)出現(xiàn)問(wèn)題,R3認(rèn)為去R7的環(huán)回要走RIP,然后繞到R2(這里是因?yàn)镽7的環(huán)回是重發(fā)布進(jìn)OSPF的,起初R3加表的重發(fā)布的R7環(huán)回,優(yōu)先級(jí)為150,但是經(jīng)過(guò)R2重發(fā)布進(jìn)RIP,經(jīng)過(guò)R1通過(guò)RIP的學(xué)習(xí),然后再傳給R3,這條經(jīng)RIP學(xué)習(xí)到的路由,優(yōu)先級(jí)為100,經(jīng)過(guò)對(duì)比,R3就會(huì)將從RIP學(xué)到的R7環(huán)回加入路由表中,這樣就會(huì)導(dǎo)致選路不佳,并且有可能出現(xiàn)環(huán)路)
????????
可以用wireshark來(lái)抓包查看,這個(gè)ICMP(ping70.1.1.129)包在R1~R4之間傳遞,每次TTL值減4。此時(shí)已經(jīng)成功出現(xiàn)環(huán)路,但是由于timeout時(shí)間只有2s,并且有ttl值限制,并未顯現(xiàn)出來(lái)?
解決方案:路由策略修改優(yōu)先級(jí)
[r3]ip ip-prefix a permit 70.1.1.128 25[r3]route-policy q permit node 10
Info: New Sequence of this List.
[r3-route-policy]if-match ip-prefix a
[r3-route-policy]apply preference 151
[r3-route-policy]q[r3]rip 1
[r3-rip-1]preference route-policy q
[r3-rip-1]q
[r3]
最后是選路問(wèn)題
1、R1去R2(包括環(huán)回)可以走兩條路徑,但并沒(méi)有負(fù)載均衡
解決方案:在R2上做路由策略,修改開(kāi)銷(xiāo)值(開(kāi)銷(xiāo)值加2)
AR2:
[r2]ip ip-prefix qq permit 30.1.1.128 25
[r2]ip ip-prefix qq permit 40.1.1.0 30
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]rip metricout ip-prefix qq 2
[r2-GigabitEthernet0/0/0]q
[r2]
2、R1去R3(包括環(huán)回)也可以走兩條路徑,但并沒(méi)有負(fù)載均衡,
解決方案:在R2上做路由策略,修改開(kāi)銷(xiāo)值(開(kāi)銷(xiāo)值加2)
AR3:
[r3]ip ip-prefix qq permit 30.1.1.0 30
[r3]interface GigabitEthernet 0/0/0
[r3-GigabitEthernet0/0/0]rip metricout ip-prefix qq 2
[r3-GigabitEthernet0/0/0]q
[r3]
3、R4也是一樣,去R2(包括環(huán)回)可以走兩條路徑,但并沒(méi)有負(fù)載均衡
解決方案:在R2上做路由策略,修改類(lèi)型(重發(fā)布為類(lèi)型2,修改為類(lèi)型1)
AR2:
#匹配流量
[r2]ip ip-prefix qqq permit 10.1.1.0 30
[r2]ip ip-prefix qqq permit 20.1.1.128 25#配置策略
[r2]route-policy z permit node 10
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix z
[r2-route-policy]apply cost-type type-1
[r2-route-policy]q#做一個(gè)空表放過(guò)其他流量
[r2]route-policy z permit node 20
Info: New Sequence of this List.
[r2-route-policy]q#重發(fā)布時(shí)調(diào)用策略
[r2]ospf 1
[r2-ospf-1]import-route rip 1 route-policy z
[r2-ospf-1]q
[r2]
4、R4也是一樣,去R3(包括環(huán)回)可以走兩條路徑,但并沒(méi)有負(fù)載均衡
解決方案:在R2上做路由策略,修改類(lèi)型即可
AR3:
#捕捉流量
[r3]ip ip-prefix z permit 20.1.1.0 30#配置策略
[r3]route-policy z permit node 10
Info: New Sequence of this List.
[r3-route-policy]if-match ip-prefix z
[r3-route-policy]apply cost-type type-1
[r3-route-policy]q#建立空表放過(guò)流量
[r3]route-policy z permit node 20
Info: New Sequence of this List.
[r3-route-policy]q#調(diào)用策略
[r3]ospf 1
[r3-ospf-1]import-route rip 1 route-policy z
[r3-ospf-1]q
[r3]
R1和R7的環(huán)回可以正常通信 ,實(shí)驗(yàn)到此為止,環(huán)路和選路不佳解決,要求也是全部完成。