1.首先分析目前所需要的網段:直鏈6個+環回8個=14個,即2^4,骨干鏈路有兩個IP地址,所以最小網路位可以是30位
2.分配環回電路的網關(因為是環回電路沒有主機,可以用30位的網路位):
r1---192.168.1.0/31---192.168.1.4/31
r2---192.168.1.8/31---192.168.1.12/31
r3---192.168.1.16/31---192.168.1.20/31
r4---192.168.1.32/31---192.168.1.36/31
3.分配骨干電路網關(因為骨干電路ip不涉及匯總,所以我就一個一個往前推)
r1,r2之間---192.168.1.44/30
r1,r3之間---192.168.1.28/30
r2,r4之間---192.168.1.48/30
r3,r4之間---192.168.1.52/30
r4,r5之間千兆路由---192.168.1.56/30
r4,r5之間百兆路由---192.168.1.60/30
在ENSP中標記好如下圖

4.接下來開始配介面IP
[R1-GigabitEthernet0/0/0]ip address 192.168.1.45 30
Dec 4 2021 18:25:12-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/1]ip address 192.168.1.29 30
Dec 4 2021 18:25:27-08:00 R1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state. ---r1兩個介面的IP
[r2-GigabitEthernet0/0/0]ip address 192.168.1.6 30
Dec 3 2021 17:50:36-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/1]ip address 192.168.1.49 30
Dec 4 2021 18:28:14-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兩個介面的IP
[r3-GigabitEthernet0/0/1]ip address 192.168.1.53 30
Dec 4 2021 18:28:48-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/0]ip address 192.168.1.30 30
Dec 4 2021 18:28:34-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兩個介面的IP
[r4-GigabitEthernet0/0/0]ip address 192.168.1.54 30
Dec 4 2021 18:29:13-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/1]ip address 192.168.1.50 30
Dec 4 2021 18:29:34-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/2]ip address 192.168.1.57 30
Dec 4 2021 18:29:46-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-GigabitEthernet4/0/0]ip address 192.168.1.61 30
Dec 4 2021 18:30:09-08:00 r4 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP
on the interface GigabitEthernet4/0/0 has entered the UP state. ---r4四個介面的IP
[r5-GigabitEthernet0/0/0]ip address 192.168.1.58 30
Dec 4 2021 18:30:48-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/1]ip address 192.168.1.62 30
Dec 4 2021 18:31: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兩個介面的IP
5.開始給r1,r2,r3,r4加環回路由
[R1-LoopBack0]ip address 192.168.1.1 30
[R1-LoopBack1]ip address 192.168.1.5 30 ---r1環回路由
[r2-LoopBack0]ip address 192.168.1.9 30
[r2-LoopBack1]ip address 192.168.1.13 31---r2環回路由
[r3-LoopBack0]ip address 192.168.1.17 30
[r3-LoopBack1]ip address 192.168.1.21 30---r3環回路由
[r4-LoopBack0]ip address 192.168.1.33 30
[r4-LoopBack1]ip address 192.168.1.37 30---r4環回路由
[r5-LoopBack0]ip address 5.5.5.1 24 ---r5環回路由
6.寫靜態路由條目(下一跳)
[R1]ip route-static 192.168.1.48 30 192.168.1.46
[R1]ip route-static 192.168.1.52 30 192.168.1.30
[R1]ip route-static 192.168.1.56 30 192.168.1.46
[R1]ip route-static 192.168.1.60 30 192.168.1.30---r1下一跳
[r2]ip route-static 192.168.1.28 30 192.168.1.45
[r2]ip route-static 192.168.1.52 30 192.168.1.50
[r2]ip route-static 192.168.1.56 30 192.168.1.50
[r2]ip route-static 192.168.1.60 30 192.168.1.50---r2下一跳
[r3]ip route-static 192.168.1.44 30 192.168.1.29
[r3]ip route-static 192.168.1.48 30 192.168.1.54
[r3]ip route-static 192.168.1.60 30 192.168.1.54
[r3]ip route-static 192.168.1.56 30 192.168.1.54---r3下一跳
[r4]ip route-static 192.168.1.44 30 192.168.1.49
[r4]ip route-static 192.168.1.28 30 192.168.1.53
[r4]ip route-static 0.0.0.0 0 192.168.1.58
[r4]ip route-static 0.0.0.0 0 192.168.1.62 preference 61---r4下一跳以及到r5的預設路由
[r5]ip route-static 192.168.1.48 30 192.168.1.57
[r5]ip route-static 192.168.1.52 30 192.168.1.61
[r5]ip route-static 192.168.1.28 30 192.168.1.61
[r5]ip route-static 192.168.1.44 30 192.168.1.57---r5下一跳
7.給所有路由器上的環回介面配置空介面防止路由黑洞(匯總)
[R1]ip route-static 192.168.1.0 29 NULL 0 ---r1空介面
[r2]ip route-static 192.168.1.8 29 NULL 0 ---r2空介面
[r3]ip route-static 192.168.1.16 29 NULL 0 ---r3空介面
[r4]ip route-static 192.168.1.32 29 NULL 0 ---r4空介面
8.配置可以到達每一個路由器上環回地址的路由條目(匯總)
[R1]ip route-static 192.168.1.8 29 192.168.1.46
[R1]ip route-static 192.168.1.16 29 192.168.1.30
[R1]ip route-static 192.168.1.32 29 192.168.1.46 ---r1到環回路由的路由匯總
[r2]ip route-static 192.168.1.0 29 192.168.1.45
[r2]ip route-static 192.168.1.32 29 192.168.1.50
[r2]ip route-static 192.168.1.16 29 192.168.1.45 ---r2到環回路由的路由匯總
[r3]ip route-static 192.168.1.0 29 192.168.1.29
[r3]ip route-static 192.168.1.32 29 192.168.1.54
[r3]ip route-static 192.168.1.8 29 192.168.1.29 ---r3到環回路由的路由匯總
[r4]ip route-static 192.168.1.16 29 192.168.1.53
[r4]ip route-static 192.168.1.8 29 192.168.1.49
[r4]ip route-static 192.168.1.0 29 192.168.1.49 ---r4到環回路由的路由匯總
[r5]ip route-static 192.168.1.32 29 192.168.1.57
[r5]ip route-static 192.168.1.8 29 192.168.1.57
[r5]ip route-static 192.168.1.16 29 192.168.1.57
[r5]ip route-static 192.168.1.0 29 192.168.1.57 ---r5到環回路由的路由匯總
9.r1,r2,r3,r4配置到5.5.5.0/24的預設路由
[R1]ip route-static 0.0.0.0 0 192.168.1.58
[r2]ip route-static 0.0.0.0 0 192.168.1.58
[r3]ip route-static 0.0.0.0 0 192.168.1.58
為什么r4沒有配呢,因為r4在最開始通5.5.5.0的時候已經配過預設了
測驗:
[R1]ping 5.5.5.1
PING 5.5.5.1: 56 data bytes, press CTRL_C to break
Reply from 5.5.5.1: bytes=56 Sequence=1 ttl=253 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=2 ttl=253 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=3 ttl=253 time=40 ms
Reply from 5.5.5.1: bytes=56 Sequence=4 ttl=253 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=5 ttl=253 time=30 ms
[r2]ping 5.5.5.1
PING 5.5.5.1: 56 data bytes, press CTRL_C to break
Reply from 5.5.5.1: bytes=56 Sequence=1 ttl=254 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=2 ttl=254 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=3 ttl=254 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=4 ttl=254 time=20 ms
Reply from 5.5.5.1: bytes=56 Sequence=5 ttl=254 time=30 ms
[r3]ping 5.5.5.1
PING 5.5.5.1: 56 data bytes, press CTRL_C to break
Reply from 5.5.5.1: bytes=56 Sequence=1 ttl=254 time=50 ms
Reply from 5.5.5.1: bytes=56 Sequence=2 ttl=254 time=20 ms
Reply from 5.5.5.1: bytes=56 Sequence=3 ttl=254 time=20 ms
Reply from 5.5.5.1: bytes=56 Sequence=4 ttl=254 time=10 ms
Reply from 5.5.5.1: bytes=56 Sequence=5 ttl=254 time=30 ms
<r4>ping 5.5.5.1
PING 5.5.5.1: 56 data bytes, press CTRL_C to break
Reply from 5.5.5.1: bytes=56 Sequence=1 ttl=255 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=3 ttl=255 time=10 ms
Reply from 5.5.5.1: bytes=56 Sequence=4 ttl=255 time=30 ms
Reply from 5.5.5.1: bytes=56 Sequence=5 ttl=255 time=20 ms
配置基本到這里就結束了,這里每一個數值都是經過我用了三天時間精準計算的,比如為什么骨干電路的網路位要是30位(一開始就解釋過了),至于環回路由可能有人會有疑問為什么我不用29或者28的網路位,首先是因為環回路由只需要一個主機位,那么最小的網路位就是30,然后我又在30里面選出來了兩兩一組能匯總成29位網路位的網段,所以大家能看到我的每一個路由器上的兩個30位環回介面能匯總成一個29位的網段
測驗環節就不截圖了哈,至于在哪里測驗我會在下面詳細去寫
1.每一個下一跳(例如r1到1.48,1.52,1.56,1.60網段)
2.一定一定要測驗r4能不能ping通5.5.5.1(很關鍵,作為新手的我開始沒測驗,后面出錯了找不出問題)
3.配置完到每一個環回的預設路由的時候測驗看能不能ping通
4.r1到r3全部ping一下5.5.5.1,如果能通那么就意味這個實驗就圓滿結束了
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/374677.html
標籤:其他
上一篇:哈工大計網復習(一)緒論
