一、項目背景
Z學校下設計算機學院和音樂學院,其網絡均啟用IPV6協議承載數據。服務器搭建在異地,所在網絡啟用IPV6協議承載數據。Z學校網絡和服務器之間的網絡啟用IPV4協議承載數據。
Z學校不同學院PC終端之間有互訪需求,Z學校所有PC終端有訪問服務器需求。
二、網絡拓撲
(1)圖中音樂學院PC的IPV6地址設置為:2016:1:1::2/64,代表音樂學院的PC終端;
(2)圖中計算機學院PC的IPV6地址設置為:2011:1:1::2/64,代表計算機學院的PC終端;
(3)圖中服務器的IPV6地址設置為:5000::1/64
三、大作業要求
(1)按照拓撲圖,在GNS3平台上搭建網絡環境,並連接設備,對R1,R2,R3,R4進行網絡端口地址規划,並把結果填到下表中:
路由器 |
接口 |
接口地址 |
R1 |
Fa0/0 |
2013:1:1::2/64 |
R1 |
Fa0/1 |
2014:1:1::1/64 |
R1 |
Fa1/0 |
2011:1:1::1/64 |
R2 |
Fa0/0 |
2013:1:1::1/64 |
R2 |
Fa0/1 |
2012:1:1::2/64 |
R3 |
Fa0/1 |
2012:1:1::1/64 |
R3 |
Fa1/0 |
2016:1:1::1/64 |
R4 |
Fa0/0 |
5000::2/64 |
R4 |
Fa0/1 |
2014:1:1::2/64 |
(2)對R1,R2,R3路由器運行OSPFv3路由協議,實現音樂學院PC與計算機學院PC能互訪(即音樂學院PC能PING通計算機學院PC)。其中,R1和R2路由器共同組建計算機學院網絡,屬於area 0;R2和R3路由器共同組建音樂學院網絡,屬於area 1。(配置過程可參考PPT:IPV6 OSPFv3協議及配置)
(3)在路由器R1和R4之間運行RIPng路由協議,RIP進程名字為:name,並在其IPv4網絡中,應用6in4模式建立IPV6隧道。(配置過程可參考PPT:IPv4到IPv6的過渡技術)
(4)在路由器R1上,開啟路由重分布功能,完成OSPF路由與RIP路由條目的相互注入,配置指令如下:
R1(config)#ipv6 router rip name
R1(config-rtr)#redistribute ospf 1 metric 1
R1(config)#exit
R1(config)#ipv6 router ospf 1
R1(config-rtr)#redistribute rip name metric 1
R1(config-rtr)#exit
(5)上述配置完成后,音樂學院PC能PING通服務器地址,計算機學院PC能PING通服務器地址。
四、實現思想
關於OSPF的配置,首先是在全局配置模式下啟動OSPF進程,然后設置路由器的ID號,而每個OSPF路由器都必須有一個Router-id且在網絡中必須是唯一的,接着啟動相應接口的OSPF,再配置OSPF的接口屬性,最后配置OSPF協議屬性。
關於6in4隧道,6in4隧道是在兩個IPV6網絡之間,通過IPV4網絡建立一條永久鏈路,為隧道兩端的IPV6網絡提供穩定的連接。即在隧道接口上手動配置IPV6地址、隧道源IPV4地址和隧道目的IPV4地址,而隧道兩端的路由器或主機必須支持IPV4和IPV6協議棧。
五、過程記錄(可含設備配置過程代碼、測試截圖等)
1、網絡拓撲圖
因為電腦系統本身有點問題,導致GNS3軟件里的PC出現報錯用不了,所以使用三個路由器代替三個PC來使用。
2、配置路由器
(1)配置R3
R3(config)#ipv6 unicast-routing
R3(config)#ipv6 router ospf 1 //啟動OSPF路由進程1
R3(config-rtr)#router-id 1.1.1.1 //定義路由器ID為1.1.1.1
R3(config-rtr)#exit
R3(config)#interface fa1/0
R3(config-if)#ipv6 address 2016:1:1::1/64
R3(config-if)#ipv6 ospf 1 area 1 //在接口上啟用OSPF1,並聲明接口所在區域為area1
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fa0/1
R3(config-if)#ipv6 address 2012:1:1::1/64
R3(config-if)#ipv6 ospf 1 area 1
R3(config-if)#no shutdown
(2)配置R2
R2(config)#ipv6 unicast-routing
R2(config)#ipv6 router ospf 1
R2(config-rtr)#router-id 2.2.2.2 //定義路由器ID為2.2.2.2
R2(config-rtr)#exit
R2(config)#interface fa0/1
R2(config-if)#ipv6 address 2012:1:1::2/64
R2(config-if)#ipv6 ospf 1 area 1
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fa0/0
R2(config-if)#ipv6 address 2013:1:1::1/64
R2(config-if)#ipv6 ospf 1 area 0
R2(config-if)#no shutdown
(3)配置R1
R1(config)#ipv6 unicast-routing
R1(config)#ipv6 router ospf 1
R1(config-rtr)#router-id 3.3.3.3 //定義路由器ID為3.3.3.3
R1(config-rtr)#exit
R1(config)#interface fa0/0
R1(config-if)#ipv6 address 2013:1:1::2/64
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface fa1/0
R1(config-if)#ipv6 address 2011:1:1::1/64
R1(config-if)#ipv6 ospf 1 area 0
R1(config-if)#no shutdown
R1(config)#ipv6 unicast-routing
R1(config)#ipv6 router rip name
R1(config-router)#exit
R1(config)#interface fa0/1
R1(config)#no shutdown
R1(config-if)#ip address 2014:1:1::1/64
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 rip name enable
R1(config)#interface tunnel 11 //配置隧道接口
R1(config-if)#ipv6 rip name enable
R1(config-if)#ipv6 address 3000:1:1:1::12/64 //在R1的隧道接口上配置IPV6地址3000:1:1:1::12/64;
R1(config-if)#tunnel mode ipv6ip //配置隧道模式為6in4
R1(config-if)#tunnel source 31.1.1.1 //配置隧道源地址
R1(config-if)#tunnel destination 31.1.1.2 //配置隧道目的地址
R1(config-if)#exit
R1(config)#ipv6 router rip name
R1(config-rtr)#redistribute ospf 1 metric 1
R1(config)#exit
R1(config)#ipv6 router ospf 1
R1(config-rtr)#redistribute rip name metric 1
R1(config-rtr)#exit
(4)配置R4
R4(config)#ipv6 unicast-routing
R4(config)#ipv6 router rip name
R4(config-router)#exit
R4(config)#interface fa0/1
R4(config)#no shutdown
R4(config-if)#ip address 2014:1:1::2/64
R4(config-if)#exit
R4(config)#interface fa0/0
R4(config)#no shutdown
R4(config-if)#ipv6 enable
R4(config-if)#ipv6 address 5000::2/64
R4(config-if)#ipv6 rip name enable
R4(config-if)#exit
R4(config)#interface tunnel22
R4(config-if)#ipv6 rip name enable
R4(config-if)#ipv6 enable
R4(config-if)#ipv6 address 3000:1:1:1::128/64 // 在R1的隧道接口上配置IPV6地址3000:1:1:1::128/64;
R4(config-if)#tunnel mode ipv6ip
R4(config-if)#tunnel source 31.1.1.2 //配置隧道源地址
R4(config-if)#tunnel destination 31.1.1.1 //配置隧道目的地址
R4(config-if)#exit
3.配置PC
因為GNS3自帶的PC出現報錯,所以用路由器來代替GNS3原有的PC ,作為計算機PC。
(1)配置音樂學院R12
(2)配置計算機學院R8
(3)配置服務器R9
4.實驗調試
(1)查看R1的路由
(2)查看R2的路由
(3)查看R3的路由
(4)查看R4的路由
(5)音樂學院R12與計算機學院R8互訪
(6)音樂學院R12能PING通服務器地址R9
(7)計算機學院R8能PING通服務器地址R9