Lab 1– Cấu hình OSPFv3 cho IPv6

Một phần của tài liệu Tổng quan về địa chỉ IPv6 và triển khai IPv6 trên cơ sở hạ tầng mạng IPv4 (Trang 74 - 80)

Mô hình Lab :

Hình 3.2 Mô hình Lab 1 – OSPFv3. Mục tiêu :

 Cấu hình địa chỉ IPv6 cho các interface

 Thay đổi địa link-local mặc định.

 Cấu hình địa chỉ kiểu EUI-64 cho interface.

 Cấu hình OSPFv3 đơn vùng.

Các bước thực hiện :

Bƣớc 1 : Cấu hình địa chỉ cho các interface loopback.

R1(config)# interface loopback0

R1(config-if)# ip address 10.1.1.1 255.255.255.0 R1(config-if)# ipv6 address FEC0::1:1/112

R2(config)# interface loopback0

R2(config-if)# ip address 10.1.2.1 255.255.255.0 R2(config-if)# ipv6 address FEC0::2:1/112

R3(config)# interface loopback0

R3(config-if)# ip address 10.1.3.1 255.255.255.0 R3(config-if)# ipv6 address FEC0::2:1/112

Bƣớc 2 : Cấu hình các địa chỉ IPv6 tĩnh.

R1(config)# interface serial 0/0

R1(config-if)# ipv6 address FEC0::12:1/112 R1(config-if)# clockrate 64000

R1(config-if)# no shutdown

R1(config-if)# interface serial 0/1

R1(config-if)# ipv6 address FEC0::13:1/112 R1(config-if)# clockrate 64000

R1(config-if)# no shutdown

R2(config)# interface serial 0/0

R2(config-if)# ipv6 address FEC0::12:2/112 R2(config-if)# no shutdown

R3(config)# interface serial 0/0

R3(config-if)# ipv6 address FEC0::13:3/112 R3(config-if)# clockrate 64000

R3(config-if)# no shutdown

Bƣớc 3 : Thay đổi địa chỉ link-local mặc định trên interface.

Địa chỉ link-local mặc định tự sinh ra trên tất cả interface nhằm duy trì kết nối với các thiết bị khác trên cùng link. Địa chỉ link-local đƣợc tạo nên từ 64 bit định danh interface và một prefix đƣợc quy định sẵn là FE80::/10. Sử dụng câu lệnh show ipv6

interface interface để xem địa chỉ link-local mặc định trên một interface.

R1#show ipv6 interface serial 0/0

Serial 0/0 is up, line protocol is up (adsbygoogle = window.adsbygoogle || []).push({});

IPv6 is enabled, link-local address is FE80::219:6FF:FE23:4380 No Virtual link-local address(es):

Global unicast address(es):

FEC0::12:1, subnet is FEC0::12:0/112 ………

R2#show ipv6 interface serial 0/0

Serial 0/0 is up, line protocol is up

IPv6 is enabled, link-local address is FE80::218:B9FF:FE92:28D8 Global unicast address(es):

FEC0::12:2, subnet is FEC0::12:0/112 ………

Sử dụng câu lệnh ipv6 address address link-local để thay đổi giá trị mặc định của địa chỉ link-local trên các interface.

R1(config)# interface serial 0/0

R1(config-if)# ipv6 address FE80::1 link-local R2(config)# interface serial 0/0

R2(config-if)# ipv6 address FE80::2 link-local

Kiểm tra lại địa chỉ link-local mới với câu lệnh show ipv6 interface và dùng lệnh ping để chắc rằng các địa chỉ link-local mới gán đã hoạt động.

R1#show ipv6 interface serial 0/0

Serial 0/0 is up, line protocol is up

IPv6 is enabled, link-local address is FE80::1 No Virtual link-local address(es):

Global unicast address(es):

FEC0::12:1, subnet is FEC0::12:0/112

R2#show ipv6 interface serial 0/0

Serial 0/0 is up, line protocol is up

IPv6 is enabled, link-local address is FE80::2 Global unicast address(es):

FEC0::12:2, subnet is FEC0::12:0/112

R1#ping FE80::2

Output Interface: Serial 0/0 Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to FE80::2, timeout is 2 seconds: Packet sent with a source address of FE80::1

!!!!!

R2#ping FE80::1

Output Interface: Serial 0/0 Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to FE80::1, timeout is 2 seconds: Packet sent with a source address of FE80::2

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/28 ms (adsbygoogle = window.adsbygoogle || []).push({});

Bƣớc 4 : Cấu hình địa chỉ IPv6 kiểu EUI-64.

R2(config)# interface fastethernet0/0

R2(config-if)# ipv6 address FEC0:23::/64 eui-64 R2(config-if)# no shutdown

R3(config)# interface fastethernet0/0

R3(config-if)# ipv6 address FEC0:23::/64 eui-64 R3(config-if)# no shutdown

Kiểm tra lại các địa chỉ ipv6 kiểu eui-64 vừa mới tạo.

R2#show ipv6 interface brief

FastEthernet0/0 [up/up] FE80::218:B9FF:FE92:28D8 FEC0:23::218:B9FF:FE92:28D8

FastEthernet0/1 [administratively down/down] Serial 0/0 [up/up]

FE80::2 FEC0::12:2

Serial 0/1 [administratively down/down] Loopback0 [up/up]

FE80::218:B9FF:FE92:28D8 FEC0::2:1

R3#show ipv6 interface brief

FastEthernet0/0 [up/up] FE80::218:B9FF:FECD:BEF0 FEC0:23::218:B9FF:FECD:BEF0

FastEthernet0/1 [administratively down/down] Serial 0/0 [up/up]

FE80::218:B9FF:FECD:BEF0 FEC0::13:3

Serial 0/1 [administratively down/down] Loopback0 [up/up]

FE80::218:B9FF:FECD:BEF0 FEC0::3:1

Bƣớc 5 : Bậc tính năng định tuyến IPv6 và CEF

Mặc định tính năng định tuyến cho IPv6 không đƣợc bật. Vì vậy ta phải bật chức năng đó lên để bắt đầu định tuyến OSPFv3. Ngoài ra có thể bậc thêm tính năng Cisco Express Forwarding (CEF) là một công nghệ đặc thù của Cisco nhằm chuyển mạch gói tin đi nhanh hơn.

R1(config)# ipv6 unicast-routing R1(config)# ipv6 cef

R2(config)# ipv6 unicast-routing R2(config)# ipv6 cef

R3(config)# ipv6 unicast-routing R3(config)# ipv6 cef

Bƣớc 6 : Cài đặt OSPFv3

R1(config)#interface loopback0 R1(config-if)#ipv6 ospf 1 area 0 R1(config-if)#interface serial 0/0 R1(config-if)#ipv6 ospf 1 area 0 R1(config-if)#interface serial 0/1 R1(config-if)#ipv6 ospf 1 area 0 R2(config)#interface loopback0 R2(config-if)#ipv6 ospf 1 area 0 R2(config-if)#interface serial 0/0 R2(config-if)#ipv6 ospf 1 area 0

R2(config-if)#interface fastethernet0/0 R2(config-if)#ipv6 ospf 1 area 0

R3(config)#interface loopback0 R3(config-if)#ipv6 ospf 1 area 0 R3(config-if)#interface serial 0/0 R3(config-if)#ipv6 ospf 1 area 0

R3(config-if)#interface fastethernet0/0 R3(config-if)#ipv6 ospf 1 area 0

Kiểm tra lại cấu hình OSPFv3

R1#show ipv6 ospf neighbor (adsbygoogle = window.adsbygoogle || []).push({});

Neighbor ID Pri State Dead Time Interface ID Interface 10.1.3.1 1 FULL/ - 00:00:39 6 Serial 0/1

10.1.2.1 1 FULL/ - 00:00:34 6 Serial 0/0

R2#show ipv6 ospf neighbor

Neighbor ID Pri State Dead Time Interface ID Interface 10.1.3.1 1 FULL/ - 00:00:39 4

FastEthernet0/0

10.1.1.1 1 FULL/ - 00:00:32 6 Serial 0/0

R3#show ipv6 ospf neighbor

Neighbor ID Pri State Dead Time Interface ID Interface 10.1.2.1 1 FULL/ - 00:00:39 4

FastEthernet0/0

10.1.1.1 1 FULL/ - 00:00:39 7 Serial 0/0

Một phần của tài liệu Tổng quan về địa chỉ IPv6 và triển khai IPv6 trên cơ sở hạ tầng mạng IPv4 (Trang 74 - 80)