ipv6地址概述——配置ipv6

237 阅读2分钟

开启掘金成长之旅!这是我参与「掘金日新计划 · 12 月更文挑战」的第26天,点击查看活动详情

43ca22bb0aa71c5710fb025b30c30a4.jpg

右边的云是xp

配置命令: 1.配置ip地址

在R1上:

conf t ipv6 unicast-routing int f0/0 ipv6 add 2000::1/64 no sh int f1/0 ipv6 add 2001::1/64 no sh

show ipv6 int br

在R2上:

ipv6 unicast-routing int f0/0 ipv6 add 2001::2/64 no sh int f1/0 ipv6 add 2002::2/64 no sh

在R3上:

ipv6 unicast-routing int f0/0 ipv6 add 2002::1/64 no sh int f1/0 ipv6 add 2003::1/64 no sh

2.启用rip

在R1上:

ipv6 router rip test int f0/0 ipv6 rip test enable int f1/0 ipv6 rip test enable

在R2上:

ipv6 router rip cisco int f0/0 ipv6 rip cisco enable int f1/0 ipv6 rip cisco enable

在R3上:

ipv6 router rip huawei int f0/0 ipv6 rip huawei enable int f1/0 ipv6 rip huawei enable show ipv6 route

3.测试连通性

在c1上ping c2

c1和c2可以桥接windows和linux。 例如: ping 2000::20c:29ff:fe02:7740,ip地址可以利用ipconfig或者ifconfig(linux)查看到。

4.配置ospf

在r1、r2、r3上分别执行:no ipv6 router rip test,去掉rip。

在r1上:

int lo 0 ip add 1.1.1.1 255.255.255.255 int f0/0 ipv6 ospf 1 area 0 int f1/0 ipv6 ospf 1 area 0

在R2上:

int lo 0 ip add 2.2.2.2 255.255.255.255

int f0/0 ipv6 ospf 1 area 0 int f1/0 ipv6 ospf 1 area 0

在R3上:

int lo 0 ip add 3.3.3.3 255.255.255.255 int f0/0 ipv6 ospf 1 area 0 int f1/0 ipv6 ospf 1 area 0

show ipv6 route

5.测试连通性

在c1上ping c2

例如: ping 2000::20c:29ff:fe02:7740,ip地址可以利用ipconfig或者ifconfig(linux)查看到。

IPv6的优势就在于它大大地扩展了地址的可用空间,IPv6地址有128位长。如果地球表面(含陆地和水面)都覆盖着计算机,那么IPv6允许每平方米拥有7*10^23个IP地址;如果地址分配的速率是每微秒100万个,那么需要10^19年才能将所有的地址分配完毕。