topo图
路由器均使用ipv6的地址
AR1使用默认路由到达ISP,在ospf上使用路由下发功能,把ISP的静态路由下发给内部网络
ISP使用7条静态路由,到达内部网络
AR1、AR2、AR3、AR4之间使用ospfv3进行通信
但是我配了下面的代码无法通信,连ospf的路由也没有,好了我知道了,有延迟,过了几个小时打开就好了
ISP
sy
sys ISP
ipv6 //开启ipv6的功能
int s1/0/0
ipv6 enable //启用端口ipv6
ipv6 address 2037::2 64
ipv6 address auto link-local //自动生成的链路本地地址
q
ipv6 route-static 35:: 64 2037::1 //配置到达内部网络的7条路由,好像可以路由聚合
ipv6 route-static 36:: 64 2037::1
ipv6 route-static 47:: 64 2037::1
ipv6 route-static 24:: 64 2037::1
ipv6 route-static 25:: 64 2037::1
ipv6 route-static 26:: 64 2037::1
ipv6 route-static 27:: 64 2037::1
R1
sy
sys R1
ipv6
int s1/0/0
ipv6 enable
ipv6 address 2037::1 64
ipv6 address auto link-local //好像不配这个两个路由器也能通信,不知道怎么回事
int g0/0/0
ipv6 enable
ipv6 address 35::1 64
ipv6 address auto link-local
int g0/0/1
ipv6 enable
ipv6 address 36::1 64
ipv6 address auto link-local
int lo1
ipv6 enable
ipv6 add 24::1 64
ipv6 address auto link-local
q
ospfv3 1 //开启ospf路由
router-id 1.1.1.1 //要配router-id,ipv6不能从环回地址来获取id,因为环回是32位,ipv6是64位
q
int g0/0/0
ospfv3 1 area 0
int g0/0/1
ospfv3 1 area 1
int lo0
ospfv3 1 area 0
ospfv3 1
default-route-advertise //配置默认路由下发,使其他ospf设备可以通过R1的默认路由来访问ISP
q
ipv6 route-static :: 0 s1/0/0
q
R2
sy
sys R2
ipv6
int g0/0/0
ipv6 enable
ipv6 address 36::2 64
ipv6 address auto link-local
int g0/0/1
ipv6 enable
ipv6 address 47::1 64
ipv6 address auto link-local
int lo1
ipv6 enable
ipv6 add 25::1 64
ipv6 address auto link-local
q
ospfv3 1
router-id 2.2.2.2
q
int g0/0/0
ospfv3 1 area 0
int g0/0/1
ospfv3 1 area 2
int lo0
ospfv3 1 area 0
q
R3
sy
sys R3
ipv6
int g0/0/1
ipv6 enable
ipv6 address 36::2 64
ipv6 address auto link-local
int lo1
ipv6 enable
ipv6 add 26::1 64
ipv6 address auto link-local
q
ospfv3 1
router-id 3.3.3.3
q
int g0/0/1
ospfv3 1 area 1
int lo0
ospfv3 1 area 1
q
R4
sy
sys R4
ipv6
int g0/0/1
ipv6 enable
ipv6 address 47::2 64
int lo1
ipv6 enable
ipv6 add 27::1 64
q
ospfv3 1
router-id 4.4.4.4
q
int g0/0/1
ospfv3 1 area 2
int lo0
ospfv3 1 area 2
q