1. 程式人生 > >配置IPV6網絡

配置IPV6網絡

ospf v3 vrrp ipv6

一、 實驗要求及思路:

1. 使用eNSP模擬器搭建試驗環境(拓撲如下),

2. 核心網配置ospf v3路由協議,R2R3配置VRRP ipv6

3. IP地址采用ipv6版本,PC機采用手動配置IPv6地址2001:DB8:C703:4416::4/64

4. 要求配置全網互通,VRRP實現冗余備份

二、 實驗拓撲:

技術分享圖片

三、 IP地址規劃:

R1

G0/0/0

12::1/64

G0/0/1

13:1/64

LO 0

11::1/64

R2

G0/0/0

23::2/64

G0/0/1

2001:DB8:C703:4416::2/64

G0/0/2

12::2/64

R3

G0/0/0

23::3/64

G0/0/1

2001:DB8:C703:4416::3/64

G0/0/2

13::3/64

四、 配置文件及步驟:

1. R1的配置

1) IP配置

<Huawei>sy

[Huawei]sysname R1

[R1]ipv6 //開啟路由器IPv6報文轉發功能

[R1]int g0/0/0

[R1-GigabitEthernet0/0/0]ipv6 enable //開啟路由器接口IPv6報文轉發功能

[R1-GigabitEthernet0/0/0]ipv6 address 12::1 64 //配置接口的全球單播ipv6地址

[R1-GigabitEthernet0/0/0]undo shut

[R1]int g0/0/1

[R1-GigabitEthernet0/0/1]ipv6 enable

[R1-GigabitEthernet0/0/1]ipv6 address 13::1 64

[R1-GigabitEthernet0/0/1]undo shut

[R1-GigabitEthernet0/0/1]int lo 0

[R1-LoopBack0]ipv6 enable

[R1-LoopBack0]ipv6 address 11::1 64

[R1-LoopBack0]display ipv6 int b

技術分享圖片

2) 路由配置

[R1]ospfv3 //啟動OSPFv3,進入OSPFv3視圖

[R1-ospfv3-1]router-id 1.1.1.1 //配置Router ID

[R1-ospfv3-1]q

[R1]int g0/0/0

[R1-GigabitEthernet0/0/0]ospfv3 1 area 0 //在接口上啟用

Ospfv3,並讓其屬於區域0

[R1-GigabitEthernet0/0/0]int g0/0/1

[R1-GigabitEthernet0/0/1]ospfv3 1 area 0

[R1-GigabitEthernet0/0/1]int lo 0

[R1-LoopBack0]ospfv3 1 area 0

[R1-LoopBack0]q

<R1>display ospfv3 peer

技術分享圖片

<R1>display ospfv3 routing

技術分享圖片

2. R2的配置

1) IP配置

<Huawei>sy

[Huawei]sysname R2

[R2]ipv6

[R2]int g0/0/2

[R2-GigabitEthernet0/0/2]ipv6 enable

[R2-GigabitEthernet0/0/2]ipv6 address 12::2 64

[R2-GigabitEthernet0/0/2]undo shut

[R2-GigabitEthernet0/0/2]int g0/0/0

[R2-GigabitEthernet0/0/0]ipv6 enable

[R2-GigabitEthernet0/0/0]ipv6 address 23::2 64

[R2-GigabitEthernet0/0/0]undo shut

[R2-GigabitEthernet0/0/0]int g0/0/1

[R2-GigabitEthernet0/0/1]ipv6 enable

[R2-GigabitEthernet0/0/1]ipv6 address fe80::2 link-local //手動配置接口的鏈路本地地址

[R2-GigabitEthernet0/0/1]undo shut

[R2-GigabitEthernet0/0/1]ipv6 addr 2001:DB8:C703:4416::2 64 //配置接口的全球單播ipv6地址

[R2-GigabitEthernet0/0/1]undo shut

[R2-GigabitEthernet0/0/1]undo ipv6 nd ra halt //開啟RA消息發布的功能,以便客戶機獲得路由設備的RA報文消息

[R2]display ipv6 int b

技術分享圖片

2) 路由配置

[R2]ospfv3

[R2-ospfv3-1]router-id 2.2.2.2

[R2-ospfv3-1]q

[R2]int g0/0/2

[R2-GigabitEthernet0/0/2]ospfv3 1 area 0

[R2-GigabitEthernet0/0/2]int g0/0/1

[R2-GigabitEthernet0/0/1]ospfv3 1 area 0

[R2-GigabitEthernet0/0/1]int g0/0/0

[R2-GigabitEthernet0/0/0]ospfv3 1 area 0

[R2-GigabitEthernet0/0/0]q

[R2]display ospfv3 peer

技術分享圖片

[R2]display ospfv3 routing

技術分享圖片

3) ipv6 vrrp

[R2]int g0/0/1

[R2-GigabitEthernet0/0/1]vrrp6 vrid 1 virtual-ip fe80::1 link-local //創建備份組,並配置虛擬ipv6地址(飄移地址)為鏈路本地地址

[R2-GigabitEthernet0/0/1]vrrp6 vrid 1 virtual-ip 2001:DB8:C703:4416::1 //創建備份組,並配置虛擬ipv6地址(飄移地址)為全球單播地址

[R2-GigabitEthernet0/0/1]vrrp6 vrid 1 priority 115 //設置優先級為115(默認是100,監聽的上行口每掛一個就減10,這裏要求當G0/0/2G0/0/0都掛了的時候才被BACKUP搶占),讓路由器R2成為master負責轉發數據流量

[R2-GigabitEthernet0/0/1]vrrp6 vrid 1 preempt-mode timer delay 0 //設置搶占時間為0,即立即搶占,默認就是0可不輸入這條命令

[R2-GigabitEthernet0/0/1] vrrp6 vrid 1 track int g0/0/2 //監聽上行口

[R2-GigabitEthernet0/0/1] vrrp6 vrid 1 track int g0/0/0 //監聽上行口

[R2]display vrrp6 b

技術分享圖片

3. R3的配置

1) IP配置

<Huawei>sy

[Huawei]sysname R3

[R3]ipv6

[R3]int g0/0/2

[R3-GigabitEthernet0/0/2]ipv6 enable

[R3-GigabitEthernet0/0/2]ipv6 address 13::3 64

[R3-GigabitEthernet0/0/2]undo shut

[R3-GigabitEthernet0/0/2]q

[R3]int g0/0/0

[R3-GigabitEthernet0/0/0]ipv6 enable

[R3-GigabitEthernet0/0/0]ipv6 address 23::3 64

[R3-GigabitEthernet0/0/0]undo shut

[R3]int g0/0/1

[R3-GigabitEthernet0/0/1]ipv6 enable

[R3-GigabitEthernet0/0/1]ipv6 address fe80::3 link-local

[R3-GigabitEthernet0/0/1]ipv6 addr 2001:DB8:C703:4416::3 64

[R3-GigabitEthernet0/0/1]undo shut

[R3-GigabitEthernet0/0/1]undo ipv6 nd ra halt

[R3]display ipv6 int b

技術分享圖片

2) 路由配置

[R3]ipv6

[R3]ospfv3

[R3-ospfv3-1]router

[R3-ospfv3-1]router-id 3.3.3.3

[R3-ospfv3-1]q

[R3]int g0/0/2

[R3-GigabitEthernet0/0/2]ospfv3 1 a

[R3-GigabitEthernet0/0/2]ospfv3 1 area 0

[R3-GigabitEthernet0/0/2]int g0/0/1

[R3-GigabitEthernet0/0/1]ospfv3 1 area 0

[R3-GigabitEthernet0/0/1]int g0/0/0

[R3-GigabitEthernet0/0/0]ospfv3 1 area 0

[R3-GigabitEthernet0/0/0]q

[R3]display ospfv3 peer

技術分享圖片

[R3]display ospfv3 routing

技術分享圖片

3) ipv6 vrrp

[R3]int g0/0/1

[R3-GigabitEthernet0/0/1]vrrp6 vrid 1 virtual-ip fe80::1 link-local

[R3-GigabitEthernet0/0/1]vrrp6 vrid 1 virtual-ip 2001:DB8:C703:4416::1

[R3-GigabitEthernet0/0/1]vrrp6 vrid 1 preempt-mode timer delay 0

[R3]display vrrp6 b

技術分享圖片

五、 結果驗證 :

技術分享圖片

Ping R1環回口的

技術分享圖片

跟蹤路由

技術分享圖片

R2g0/0/2g0/0/0shut,先查看vrrp6的狀態

技術分享圖片

技術分享圖片

再跟蹤到R1環回口111的路由

技術分享圖片

在實驗過程中曾出現master路由器R2在上行 down且優先級比R3小的時候, vrrp狀態依然是master,同時R3也是master,這就有了2master,

原因可能是:一是延遲,二是模擬器問題


配置IPV6網絡