1.掌握 OSPFv3 的配置方法redis
2.掌握在幀中繼環境下 OSPFv3 的配置方法數據庫
3.掌握 OSPFv3 NSSA 的配置方法網絡
4.學會查看 OSPFv3 數據庫oop
5.掌握外部路由彙總的配置學習
6.掌握區域間路由的彙總配置測試
7.掌握虛鏈路的配置spa
8.掌握往 OSPFv3 區域注入一條缺省路由的方法3d
9.掌握修改 OSPFv3 網絡類型的方法router
實驗拓撲圖blog
IPv4地址表
Device |
Interface |
IP Address |
R1 |
F 0/0 |
10.1.134.1 |
S 1/0 |
192.168.134.1 |
|
R3 |
S 1/0 |
192.168.134.3
|
R4 |
S 1/0 |
192.168.134.4 |
R5 |
F 0/0 |
10.1.134.5 |
S 1/0 |
13.1.134.5 |
|
R6 |
F 0/1 |
10.1.134.6 |
F 0/0 |
15.1.134.6 |
|
R8 |
F 0/0 |
15.1.134.8 |
S 1/0 |
13.1.134.8 |
1:開啓幀中繼交換功能
R2(config)#frame-relay switching
2:配置接口封裝
R2(config)#int s 1/2
R2(config-if)#no shutdown
R2(config-if)#clock rate 128000
R2(config-if)#encapsulation frame-relay
R2(config)#int s 1/0
R2(config-if)#no shutdown
R2(config-if)#clock rate 128000
R2(config-if)#encapsulation frame-relay
R2(config)#int s 1/1
R2(config-if)#no shutdown
R2(config-if)#clock rate 128000
R2(config-if)#encapsulation frame-relay
3:配置LMI類型
R2(config)#int s 1/2
R2(config-if)#frame-relay lmi-type cisco
R2(config-if)#frame-relay intf-type dce
R2(config)#int s 1/0
R2(config-if)#frame-relay lmi-type cisco
R2(config-if)#frame-relay intf-type dce
R2(config)#int s 1/1
R2(config-if)#frame-relay lmi-type cisco
R2(config-if)#frame-relay intf-type dce
4:配置幀中繼交換表
R2(config)#int s 1/2
R2(config-if)#frame-relay route 305 interface s 1/0 503
R2(config-if)#frame-relay route 306 interface s 1/1 603
R2(config)#int Serial 1/0
R2(config-if)#frame-relay route 503 interface Serial1/2 305
R2(config)#int Serial 1/1
R2(config-if)#frame-relay route 603 interface Serial1/2 306
檢查幀中繼交換機是否正常「show frame-relay route」
5:配置R一、R三、R4,互相ping通
R1(config)#int s 1/0
R1(config-if)#ip address 192.168.134.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#encapsulation frame-relay
R1(config-if)#frame-relay lmi-type cisco
R1(config-if)#no frame-relay inverse-arp
R1(config-if)#frame-relay map ip 192.168.134.3 305 broadcast
R1(config-if)#frame-relay map ip 192.168.134.4 306 broadcast
R3(config)#int s 1/0
R3(config-if)#ip address 192.168.134.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#encapsulation frame-relay
R3(config-if)#no frame-relay inverse-arp
R3(config-if)#frame-relay map ip 192.168.134.1 503 broadcast
R4(config)#int s 1/0
R4(config-if)#ip address 192.168.134.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#encapsulation frame-relay
R4(config-if)#no frame-relay inverse-arp
R4(config-if)#frame-relay map ip 192.168.134.1 603 broadcast
進行ping命令測試
從R1ping到R3與R4
R1#show frame-relay pvc發現已有兩條本地鏈接
6:開始配置ospf (R6、R1爲例,R5.R8同理)
先配置外部路由器ospf
R6(config)#router ospf 1
R6(config-router)#router-id 6.6.6.6
R6 (config-router)#area 1 nssa――配置區域 1 爲 NSSA 區域
R6(config)#interface loopback 0
R6(config-if)#ip add 6.6.6.6 255.255.255.255
R6(config)#int f 0/0
R6(config-if)#ip add 10.1.134.6 255.255.255.0
R6(config-if)#no shut
R6(config-if)#ip ospf 1 area 0
R6(config-if)#int f 0/1
R6(config-if)#ip add 11.1.134.6 255.255.255.0
R6(config-if)#no shut
R6(config-if)#ip ospf 1 area 1
R6(config)#router ospf 1
R6(config-router)#network 6.6.6.6 0.0.0.0 area 0
R6(config-router)#network 10.1.134.0 0.0.0.255 area 0
R6(config-router)#network 11.1.134.0 0.0.0.255 area 1
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config)#interface loopback 0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config)#int f 0/0
R1(config-if)#ip add 10.1.134.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#ip ospf 1 area 0
R1(config-if)#int s 1/0
R1(config-if)#ip ospf 1 area 0
R1(config)#router ospf 1
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#network 10.1.134.0 0.0.0.255 area 0
R1(config-router)#network 192.168.134.0 0.0.0.255 area 2
R1(config-router)#neighbor 192.168.134.3
R1(config-router)#neighbor 192.168.134.4
7:配置幀中繼中路由器的ospf (R3爲例,R4同理)
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
R3(config-router)#ex
R3(config)#int loopback 0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#ip ospf 1 area 2
R3(config-if)#int s 1/0
R3(config-if)# ip ospf 1 area 2
R3(config-if)# ip ospf priority 0
R3(config)#router ospf 1
R3(config-router)#network 3.3.3.3 0.0.0.0 area 2
R3(config-router)#network 192.168.134.0 0.0.0.255 area 2
已完成OSPFv2配置,在R1上查ospf鄰居關係
R1#show ipv6 ospf neighbor
測試路由通斷狀況
在R5上測試得出結果以下(從內部到外部皆ping通,實驗完成)
Ospfv3配置
拓撲圖
IPv6地址表
Device |
Interface |
IPv6 Address |
R1 |
F 0/0 |
2002:134::1/64 |
S 1/0 |
2001:134::1/64 |
|
Loopback 0 |
2011::1/128 |
|
R3 |
S 1/0 |
2001:134::3/64
|
Loopback 0 |
2033::1/128 |
|
R3 |
S 1/0 |
2001:134::3/64
|
Loopback 0 |
2044::1/128 |
|
R5 |
F 0/0 |
2002:134::5/64 |
S 1/0 |
2003:134::5/64: |
|
Loopback 0 |
2055::1/128 |
|
R6 |
F 0/1 |
2002:134::6/64 |
F0/0 |
2004:134::6/64 |
|
Loopback 0 |
2066::1/128 |
|
Loopback 1 |
2166::1/128 |
|
R8 |
S 1/0 |
2003:134::8/64 |
F0/0 |
2004:134::8/64 |
|
Loopback 0 |
2088::1/128 |
|
R7 |
F0/1 |
2005:134::7/64 |
Device |
Interface |
IPv6 Address |
R1 |
F 0/0 |
2002:134::1/64 |
S 1/0 |
2001:134::1/64 |
|
Loopback 0 |
2011::1/128 |
|
R3 |
S 1/0 |
2001:134::3/64
|
Loopback 0 |
2033::1/128 |
|
R3 |
S 1/0 |
2001:134::3/64
|
Loopback 0 |
2044::1/128 |
|
R5 |
F 0/0 |
2002:134::5/64 |
S 1/0 |
2003:134::5/64: |
|
Loopback 0 |
2055::1/128 |
|
R6 |
F 0/1 |
2002:134::6/64 |
F0/0 |
2004:134::6/64 |
|
Loopback 0 |
2066::1/128 |
|
Loopback 1 |
2166::1/128 |
|
R8 |
S 1/0 |
2003:134::8/64 |
F0/0 |
2004:134::8/64 |
|
Loopback 0 |
2088::1/128 |
|
R7 |
F0/1 |
2005:134::7/64 |
幀中繼R2配置與ospfv2相同。
1.完成接口 IPv6 地址的配置(包括迴環接口loopback 0)
R1(config)#ipv6 unicast-routing―――全局打開 IPv6 路由功能
R1config)#interface loopback 0
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address 2011::1/128―――配置 loopback0 接口地址
R1(config-if)#int f 0/0
R1(config-if)#ipv6 enable
R1(config-if)# ipv6 address 2002:134::1/64
R1(config-if)#no shut
R1(config-if)#int s 1/0
R1(config-if)#ipv6 enable
R1(config-if)# encapsulation frame-relay
R1(config-if)#no shut
R1(config-if)#ipv6 address 2001:134::1/64
R1(config-if)#frame-relay map ipv6 2001:134::3 305 broadcast
R1(config-if)#frame-relay map ipv6 2001:134::4 306 broadcast
R1(config-if)#frame-relay map ipv6 2001:134::1 306 broadcast
R1(config-if)#frame-relay map ipv6 FE80::C806:1CFF:FE48:8 306 broadcast
R1(config-if)#frame-relay map ipv6 FE80::C805:1CFF:FE48:8 305 broadcast
R3(config)#ipv6 unicast-routing
R3(config)#interface loopback 0
R3(config-if)#ipv6 address 2033::1/128
R3(config-if)#int s 1/0
R3(config-if)#ipv6 enable
R3(config-if)# encapsulation frame-relay
R3(config-if)#no shutdown
R3(config-if)#ipv6 address 2001:134::3/64
R3(config-if)#frame-relay map ipv6 2001:134::1 503 broadcast
R3(config-if)#frame-relay map ipv6 2001:134::4 503 broadcast
R3(config-if)#frame-relay map ipv6 2001:134::3 503 broadcast
R3(config-if)#frame-relay map ipv6 FE80::C806:1CFF:FE48:8 506 broadcast
R3(config-if)#frame-relay map ipv6 FE80::C803:1CFF:FE48:8 503 broadcast
R4(config)#ipv6 unicast-routing
R4(config)#interface loopback 0
R4(config-if)#ipv6 address 2044::1/128
R4(config-if)#int s 1/0
R4(config-if)#ipv6 enable
R4(config-if)# encapsulation frame-relay
R4(config-if)#no shutdown
R4(config-if)#ipv6 address 2001:134::4/64
R4(config-if)#frame-relay map ipv6 2001:134::1 603 broadcast
R4(config-if)#frame-relay map ipv6 2001:134::4 603 broadcast
R4(config-if)#frame-relay map ipv6 2001:134::3 603 broadcast
R4(config-if)#frame-relay map ipv6 FE80::C805:1CFF:FE48:8 605 broadcast
R4(config-if)#frame-relay map ipv6 FE80::C803:1CFF:FE48:8 603 broadcast
試R1上ping通 R3.R4
用show frame-relay pvc命令查看,幀中繼配置完成
2.完成 OSPFv3 的基本配置。區域 1 爲 NSSA 區域。(R6爲例,R5,R8同理)
R6(config)#ipv6 unicast-routing
R6(config)#ipv6 router ospf 1
R6(config-rtr)#router-id 6.6.6.6
R6(config-rtr)#area 1 nssa
R6(config-rtr)#int f 0/0
R6(config-if)#ipv6 enable
R6(config-if)# ipv6 ospf 1 area 0
R6(config-if)#no shutdown
R6(config-if)#int loopback 0
R6(config-if)#ipv6 enable
R6(config-if)#ipv6 address 2066::1/128
R6(config-if)# ipv6 ospf 1 area 0
R6(config-if)#int f 0/1
R6(config-if)#ipv6 enable
R6(config-if)# ipv6 ospf 1 area 1
R6(config-if)#no shutdown
R1(config)#ipv6 unicast-routing
R1(config)#ipv6 router ospf 1―――啓動 OSPFv3 進程
R1(config-rtr)#router-id 1.1.1.1
R1(config-rtr)#int f 0/0
R1(config-if)#ipv6 enable
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)#no shutdown
R1(config-if)#int loopback 0
R1(config-if)#ipv6 enable
R1(config-if)#ipv6 address 2011::1/128
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)#int s 1/0
R1(config-if)#ipv6 enable
R1(config-if)# ipv6 ospf 1 area 2
R1(config-if)#ipv6 ospf neighbor FE80::C805:1CFF:FE48:8
R1(config-if)#ipv6 ospf neighbor FE80::C806:1CFF:FE48:8
R3(config)#ipv6 router ospf 1
R3(config-rtr)#router-id 5.5.5.5
R3(config-rtr)#int loopback 0
R3(config-if)#ipv6 enable
R3(config-if)#ipv6 address 2033::1/128
R3(config-if)# ipv6 ospf 1 area 2
R3(config-if)#int s 1/0
R3(config-if)#ipv6 enable
R3(config-if)# ipv6 ospf 1 area 2
R3(config-if)# ipv6 ospf priority 0
R3(config-subif)# ipv6 address FE80::C805:1CFF:FE48:8 link-local
R4config)#ipv6 router ospf 1
R4config-rtr)#router-id 4.4.4.4
R4config-rtr)#int loopback 0
R4config-if)#ipv6 enable
R4(config-if)#ipv6 address 2044::1/128
R4(config-if)# ipv6 ospf 1 area 2
R4(config-if)#int s 1/0
R4(config-if)#ipv6 enable
R4(config-if)# ipv6 ospf 1 area 2
R4(config-if)# ipv6 ospf priority 0
R4(config-if)# ipv6 address FE80::C806:1CFF:FE48:8 link-local
3.檢查 OSPFv3 的鄰居關係
在 R31上檢查,能夠看到鄰居的 Router-ID 都是用 IPv4 的地址格式標識
R1#show ipv6 ospf neighbor
4.測試路由通斷狀況在R3測試。Ospfv3配置成功。
配置R7到R8 RIPng部分而且重分佈到ospfv3
R7(config)#ipv6 unicast-routing
R7(config)#ipv6 router rip 1
R7(config)#int f1/0
R7(config-if)#ipv6 enable
R7(config-if)#ipv6 address 2005:134::7/64
R7(config-if)#ipv6 rip 1 enable
R7(config-if)#no shutdown
R8:
R8(config)#ipv6 router rip 1
R8(config)#int fastEthernet 0/1
R8(config-if)#ipv6 enable
R8(config-if)#ipv6 address 2005:134::8/64
R8(config-if)#ipv6 rip 1 enable
R8(config-if)#no shutdown
R8(config-if)#exit
R8(config)#ipv6 router ospf 1
R8(config-rtr)#redistribute rip 1
R8(config-rtr)#redistribute connected
R8(config-rtr)#exit
R8(config)#ipv6 router rip 1
R8(config-rtr)#redistribute ospf 1
R8(config-rtr)#redistribute connected
查看R7路由表,ospfv3網段也在路由表中
並進行ping測試發現,只有area1區域內地址能ping通。
實驗總結
在本次實驗中,學習了路由器作幀中繼的配置知識和理論知識,因爲是第一次配置幀中繼,因此在配置的過程當中仍是略爲生疏。在一些文獻資料和同窗們的幫助下,最後仍是成功作通,可是還不夠精煉,仍然要多學習。本次實驗的重點在於OSPF和OSPFv3的配置和使用,在複習了OSPF後進行IPv4的實驗,仍是較爲輕鬆。固然對於OSPFv3,儘管指令和ospfv2有所不一樣,可是理論知識沒有太大變化,也是在屢次檢查和糾錯後作通。