I.Cài đặt IPv6 cho window
1. Trên window:
Ipv6 được hổ trợ trên win XP hay win 2003 , nhưng phần lớn các máy tính hiệnn nay đều dc hổ trợ ipv6.
Để cài IPv6 trên Win, ta sử dụng lệnh:
# netsh interface ipv6 install hay :# ipv6 install
Để cấu hình địa chỉ IPv6 trên một interface:
netsh interface ipv6 add address InterfaceNameOrIndex IPv6Address [[type=]unicast|anycast] [[validlifetime=]Minutes|infinite] [[preferredlifetime=]Minutes|infinite] [[store=]active|persistent]
(Mặc định lọai địa chỉ này là unicast)
Trên mỗi interface của host sẽ có một index, để xem những index này, ta sử dụng lệnh:
# ipv6 if hay # netsh interface ipv6 show interface
Để thay đổi một địa chỉ của một interface ta sử dụng lệnh:
# netsh interface ipv6 set address
Để xóa một địa chỉ, ta sử dụng lệnh:
# netsh interface ipv6 set address
2. Trên Route:
Trên router cisco ta cấu hình ipv6 bằng các lệnh sau:
Router(config)#ipv6 enable
Router(config)#ipv6 unicast-routing /*cho phép router hoạt động định tuyến với IPv6*/
Router(config)#interface fa0/0
Router(config-if)#ipv6 enable /* cho phép ipv6 hoạt động trên fa0/0 */
Router(config-if)#ipv6 address 2001::1/64 /* gán ipv6 address cho fa0/0 */
Hoặc Router(config-if)#ipv6 address 2001::1/64 eui-64
II.OSPFv3
Ø Khởi động định tuyến OSPFv3 cho IPv6 trên các interfaces
Router(config)#interface type number
Router(config-if)#ipv6 ospf process-id area area-id
Ø Điều chỉnh Area Range trên Ipv6
Router(config)#ipv6 route ospf process-id
Router(config)#area area-id range {ipv6-prefix/prefix-lenghth} [advertise | not-advertise] [Cost cost]
Ø Cấu hình IPSec OSPFv3
Router(config-if)#ipv6 ospf authentication ipsec spi spi md5 [key-encryption-type] key | null
Ø Cấu hình chứng thực OSPFv3
Router(config)#ipv6 route ospf process-id
Router(config)#area area-id authentication ipsec spi spi md5 [key-encryption-type] key
Lab OSPFv3:
R0
Code:
ipv6 unicast-routing interface Loopback0 no ip address ipv6 address 2001:0:0:20::/64 eui-64 ! interface Loopback1 no ip address ipv6 address 2001:0:0:1::/64 eui-64 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2002::1/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! interface FastEthernet0/1 no ip address duplex auto speed auto ipv6 address 2003::6/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! ! ip http server no ip http secure-server ! ipv6 router ospf 1 router-id 10.10.10.10 log-adjacency-changes
R1
Code:
ipv6 unicast-routing interface Loopback0 no ip address ipv6 address 2001:0:0:2::/64 eui-64 ! interface Loopback1 no ip address ipv6 address 2001:0:0:21::/64 eui-64 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2002::2/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! interface FastEthernet0/1 no ip address duplex auto speed auto ipv6 address 2004::3/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! ! ip http server no ip http secure-server ! ipv6 router ospf 1 router-id 1.1.1.1 log-adjacency-changes
R2
Code:
ipv6 unicast-routing interface Loopback1 no ip address ipv6 address 2001:0:0:22::/64 eui-64 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2004::4/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! interface FastEthernet0/1 no ip address duplex auto speed auto ipv6 address 2003::5/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! interface Serial0/1/0 no ip address shutdown clock rate 2000000 ! interface Serial0/2/0 no ip address shutdown clock rate 2000000 ! ! ! no ip http server no ip http secure-server ! ipv6 router ospf 1 router-id 20.20.20.20 log-adjacency-changes
On R0:
R0(config)# do show ipv6 route
IPv6 Routing Table - 11 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C 2001:0:0:1::/64 [0/0]
via ::, Loopback1
L 2001::1:215:63FF:FE22:D27A/128 [0/0]
via ::, Loopback1
C 2001:0:0:20::/64 [0/0]
via ::, Loopback0
L 2001::20:215:63FF:FE22:D27A/128 [0/0]
via ::, Loopback0
C 2002::/64 [0/0]
via ::, FastEthernet0/0
L 2002::1/128 [0/0]
via ::, FastEthernet0/0
C 2003::/64 [0/0]
via ::, FastEthernet0/1
L 2003::6/128 [0/0]
via ::, FastEthernet0/1
O 2004::/64 [110/2]
--More-- via FE80::213:C4FF:FE6E:B7D4, FastEthernet0/0
via FE80::217:E0FF:FE62:DFFB, FastEthernet0/1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
R0(config)#do show ipv6 int br
FastEthernet0/0 [up/up]
FE80::215:63FF:FE22:D27A
2002::1
FastEthernet0/1 [up/up]
FE80::215:63FF
On R1:
r1#show ipv6 rote ute
IPv6 Routing Table - 11 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C 2001:0:0:2::/64 [0/0]
via ::, Loopback0
L 2001::2:213:C4FF:FE6E:B7D4/128 [0/0]
via ::, Loopback0
C 2001:0:0:21::/64 [0/0]
via ::, Loopback1
L 2001::21:213:C4FF:FE6E:B7D4/128 [0/0]
via ::, Loopback1
C 2002::/64 [0/0]
via ::, FastEthernet0/0
L 2002::2/128 [0/0]
via ::, FastEthernet0/0
O 2003::/64 [110/2]
via FE80::215:63FF:FE22:D27A, FastEthernet0/0
via FE80::217:E0FF:FE62:DFFA, FastEthernet0/1
C 2004::/64 [0/0]
via ::, FastEthernet0/1
--More-- L 2004::3/128 [0/0]
--More-- via ::, FastEthernet0/1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
r1#show ipv6 int b
FastEthernet0/0 [up/up]
FE80::213:C4FF:FE6E:B7D4
2002::2
FastEthernet0/1 [up/up]
FE80::213:C4FF:FE6E:B7D5
On R2:
r2#show ipv6 route
IPv6 Routing Table - 9 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C 2001:0:0:22::/64 [0/0]
via ::, Loopback1
L 2001::22:217:E0FF:FE62:DFFA/128 [0/0]
via ::, Loopback1
O 2002::/64 [110/2]
via FE80::213:C4FF:FE6E:B7D5, FastEthernet0/0
via FE80::215:63FF:FE22:D27B, FastEthernet0/1
C 2003::/64 [0/0]
via ::, FastEthernet0/1
L 2003::5/128 [0/0]
via ::, FastEthernet0/1
C 2004::/64 [0/0]
via ::, FastEthernet0/0
L 2004::4/128 [0/0]
via ::, FastEthernet0/0
L FE80::/10 [0/0]
via ::, Null0
--More-- L FF00::/8 [0/0]
via ::, Null0
r2#show ipv6 int b
FastEthernet0/0 [up/up]
FE80::217:E0FF:FE62:DFFA
2004::4
FastEthernet0/1 [up/up]
FE80::217:E0FF:FE62:DFFB
2003::5
1. Trên window:
Ipv6 được hổ trợ trên win XP hay win 2003 , nhưng phần lớn các máy tính hiệnn nay đều dc hổ trợ ipv6.
Để cài IPv6 trên Win, ta sử dụng lệnh:
# netsh interface ipv6 install hay :# ipv6 install
Để cấu hình địa chỉ IPv6 trên một interface:
netsh interface ipv6 add address InterfaceNameOrIndex IPv6Address [[type=]unicast|anycast] [[validlifetime=]Minutes|infinite] [[preferredlifetime=]Minutes|infinite] [[store=]active|persistent]
(Mặc định lọai địa chỉ này là unicast)
Trên mỗi interface của host sẽ có một index, để xem những index này, ta sử dụng lệnh:
# ipv6 if hay # netsh interface ipv6 show interface
Để thay đổi một địa chỉ của một interface ta sử dụng lệnh:
# netsh interface ipv6 set address
Để xóa một địa chỉ, ta sử dụng lệnh:
# netsh interface ipv6 set address
2. Trên Route:
Trên router cisco ta cấu hình ipv6 bằng các lệnh sau:
Router(config)#ipv6 enable
Router(config)#ipv6 unicast-routing /*cho phép router hoạt động định tuyến với IPv6*/
Router(config)#interface fa0/0
Router(config-if)#ipv6 enable /* cho phép ipv6 hoạt động trên fa0/0 */
Router(config-if)#ipv6 address 2001::1/64 /* gán ipv6 address cho fa0/0 */
Hoặc Router(config-if)#ipv6 address 2001::1/64 eui-64
II.OSPFv3
Ø Khởi động định tuyến OSPFv3 cho IPv6 trên các interfaces
Router(config)#interface type number
Router(config-if)#ipv6 ospf process-id area area-id
Ø Điều chỉnh Area Range trên Ipv6
Router(config)#ipv6 route ospf process-id
Router(config)#area area-id range {ipv6-prefix/prefix-lenghth} [advertise | not-advertise] [Cost cost]
Ø Cấu hình IPSec OSPFv3
Router(config-if)#ipv6 ospf authentication ipsec spi spi md5 [key-encryption-type] key | null
Ø Cấu hình chứng thực OSPFv3
Router(config)#ipv6 route ospf process-id
Router(config)#area area-id authentication ipsec spi spi md5 [key-encryption-type] key
Lab OSPFv3:
R0
Code:
ipv6 unicast-routing interface Loopback0 no ip address ipv6 address 2001:0:0:20::/64 eui-64 ! interface Loopback1 no ip address ipv6 address 2001:0:0:1::/64 eui-64 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2002::1/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! interface FastEthernet0/1 no ip address duplex auto speed auto ipv6 address 2003::6/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! ! ip http server no ip http secure-server ! ipv6 router ospf 1 router-id 10.10.10.10 log-adjacency-changes
R1
Code:
ipv6 unicast-routing interface Loopback0 no ip address ipv6 address 2001:0:0:2::/64 eui-64 ! interface Loopback1 no ip address ipv6 address 2001:0:0:21::/64 eui-64 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2002::2/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! interface FastEthernet0/1 no ip address duplex auto speed auto ipv6 address 2004::3/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! ! ip http server no ip http secure-server ! ipv6 router ospf 1 router-id 1.1.1.1 log-adjacency-changes
R2
Code:
ipv6 unicast-routing interface Loopback1 no ip address ipv6 address 2001:0:0:22::/64 eui-64 ! interface FastEthernet0/0 no ip address duplex auto speed auto ipv6 address 2004::4/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! interface FastEthernet0/1 no ip address duplex auto speed auto ipv6 address 2003::5/64 ipv6 ospf network broadcast ipv6 ospf 1 area 0 ! interface Serial0/1/0 no ip address shutdown clock rate 2000000 ! interface Serial0/2/0 no ip address shutdown clock rate 2000000 ! ! ! no ip http server no ip http secure-server ! ipv6 router ospf 1 router-id 20.20.20.20 log-adjacency-changes
On R0:
R0(config)# do show ipv6 route
IPv6 Routing Table - 11 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C 2001:0:0:1::/64 [0/0]
via ::, Loopback1
L 2001::1:215:63FF:FE22:D27A/128 [0/0]
via ::, Loopback1
C 2001:0:0:20::/64 [0/0]
via ::, Loopback0
L 2001::20:215:63FF:FE22:D27A/128 [0/0]
via ::, Loopback0
C 2002::/64 [0/0]
via ::, FastEthernet0/0
L 2002::1/128 [0/0]
via ::, FastEthernet0/0
C 2003::/64 [0/0]
via ::, FastEthernet0/1
L 2003::6/128 [0/0]
via ::, FastEthernet0/1
O 2004::/64 [110/2]
--More-- via FE80::213:C4FF:FE6E:B7D4, FastEthernet0/0
via FE80::217:E0FF:FE62:DFFB, FastEthernet0/1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
R0(config)#do show ipv6 int br
FastEthernet0/0 [up/up]
FE80::215:63FF:FE22:D27A
2002::1
FastEthernet0/1 [up/up]
FE80::215:63FF
On R1:
r1#show ipv6 rote ute
IPv6 Routing Table - 11 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C 2001:0:0:2::/64 [0/0]
via ::, Loopback0
L 2001::2:213:C4FF:FE6E:B7D4/128 [0/0]
via ::, Loopback0
C 2001:0:0:21::/64 [0/0]
via ::, Loopback1
L 2001::21:213:C4FF:FE6E:B7D4/128 [0/0]
via ::, Loopback1
C 2002::/64 [0/0]
via ::, FastEthernet0/0
L 2002::2/128 [0/0]
via ::, FastEthernet0/0
O 2003::/64 [110/2]
via FE80::215:63FF:FE22:D27A, FastEthernet0/0
via FE80::217:E0FF:FE62:DFFA, FastEthernet0/1
C 2004::/64 [0/0]
via ::, FastEthernet0/1
--More-- L 2004::3/128 [0/0]
--More-- via ::, FastEthernet0/1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
r1#show ipv6 int b
FastEthernet0/0 [up/up]
FE80::213:C4FF:FE6E:B7D4
2002::2
FastEthernet0/1 [up/up]
FE80::213:C4FF:FE6E:B7D5
On R2:
r2#show ipv6 route
IPv6 Routing Table - 9 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C 2001:0:0:22::/64 [0/0]
via ::, Loopback1
L 2001::22:217:E0FF:FE62:DFFA/128 [0/0]
via ::, Loopback1
O 2002::/64 [110/2]
via FE80::213:C4FF:FE6E:B7D5, FastEthernet0/0
via FE80::215:63FF:FE22:D27B, FastEthernet0/1
C 2003::/64 [0/0]
via ::, FastEthernet0/1
L 2003::5/128 [0/0]
via ::, FastEthernet0/1
C 2004::/64 [0/0]
via ::, FastEthernet0/0
L 2004::4/128 [0/0]
via ::, FastEthernet0/0
L FE80::/10 [0/0]
via ::, Null0
--More-- L FF00::/8 [0/0]
via ::, Null0
r2#show ipv6 int b
FastEthernet0/0 [up/up]
FE80::217:E0FF:FE62:DFFA
2004::4
FastEthernet0/1 [up/up]
FE80::217:E0FF:FE62:DFFB
2003::5