1、两个局域网基于6to4tunnel可达
2、R1可以访问R3的环回
[R1]ripng 1
[R1]int lo0
[R1-LoopBack0]ripng 1 enable
[R1-LoopBack0]int l01
[R1-LoopBack1]ripng 1 enable
[R1-LoopBack1]int g0/0/0
[R1-GigabitEthernet0/0/0]ripng 1 enable
R2
[R2]ripng 1
[R2]int lo0
[R2-LoopBack0]ripng 1 enable
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ripng 1 enable
在R2上配置Tunnel隧道
[R2]int Tunnel 0/0/0
[R2-Tunnel0/0/0]ipv6 enable
[R2-Tunnel0/0/0]ipv6 address 2002:1701:0101:0003::1/64
[R2-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4
[R2-Tunnel0/0/0]source GigabitEthernet 0/0/1
为经过tunnel配置缺省路由
[R2]ipv6 route-static 2002:: 16 Tunnel 0/0/0
R2通过RIPng给R1发送缺省
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]ripng default-route only
在R1上汇总环节接口
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ripng summary-address 2002:1701:101:: 64
4.为R4,R5,R6,R7,R8配置IP V6的地址
R4
[R4]ipv6
[R4]int lo0
[R4-LoopBack0]ipv6 enable
[R4-LoopBack0]ipv6 address 2002:2201:0102:0000::1/64
[R4-LoopBack0]int g0/0/1
[R4-GigabitEthernet0/0/1]ipv6 enable
[R4-GigabitEthernet0/0/1]ipv6 address 2002:2201:0102:0001::1 64
R5
[R5]ipv6
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ipv6 enable
[R5-GigabitEthernet0/0/0]ipv6 address 2002:2201:0102:0001::2 64
[R5-GigabitEthernet0/0/0]int g0/0/1
[R5-GigabitEthernet0/0/1]ipv6 enable
[R5]int lo0
[R5-LoopBack0]ipv6 enable
[R5-LoopBack0]ipv6 address 2002:2201:0102:8000::1 64
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]ipv6 address 2002:2201:0102:8001::1 64
R6
[R6]ipv6
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ipv6 enable
[R6-GigabitEthernet0/0/0]ipv6 address 2002:2201:0102:8001::2 64
[R6-GigabitEthernet0/0/0]int lo0
[R6-LoopBack0]ipv6 enable
[R6-LoopBack0]ipv6 address 2002:2201:0102:8002::1 64
[R6-LoopBack0]int g0/0/1
[R6-GigabitEthernet0/0/1]ipv6 enable
[R6-GigabitEthernet0/0/1]ipv6 address 2002:2201:0102:8003::1 64
R7
[R7]ipv6
[R7]int g0/0/1
[R7-GigabitEthernet0/0/1]ipv6 enable
[R7-GigabitEthernet0/0/1]ipv6 address 2002:2201:0102:8003::2 64
[R7-GigabitEthernet0/0/1]int lo0
[R7-LoopBack0]ipv6 enable
[R7-LoopBack0]ipv6 address 2002:2201:0102:8004::1 64
[R7-LoopBack0]int g0/0/0
[R7-GigabitEthernet0/0/0]ipv6 enable
[R7-GigabitEthernet0/0/0]ipv6 address 2002:2201:0102:8005::1 64
[R8]ipv6
[R8]int g0/0/0
[R8-GigabitEthernet0/0/0]ipv6 enable
[R8-GigabitEthernet0/0/0]ipv6 address 2002:2201:0102:8005::2 64
[R8-GigabitEthernet0/0/0]int lo0
[R8]int lo0
[R8-LoopBack0]ipv6 enable
[R8-LoopBack0]ipv6 address 2002:2201:0102:8006::1 64
在R5,R6,R7,R8之间运行OSPFv3协议
[R5]ospfv3 1
[R5-ospfv3-1]router-id 5.5.5.5
[R5-ospfv3-1]int lo0
[R5-LoopBack0]ospfv3 1 area 0
[R5-LoopBack0]int g0/0/01
[R5-GigabitEthernet0/0/1]ospfv3 1 area 0
[R6]ospfv3 1
[R6-ospfv3-1]router-id 6.6.6.6
[R6-ospfv3-1]int lo0
[R6-LoopBack0]ospfv3 1 area 0
[R6-LoopBack0]int g0/0/0
[R6-GigabitEthernet0/0/0]ospfv3 1 area 0
[R6-GigabitEthernet0/0/0]int g0/0/1
[R6-GigabitEthernet0/0/1]ospfv3 1 area 0
[R7]ospfv3 1
[R7-ospfv3-1]router-id 7.7.7.7
[R7-ospfv3-1]int lo0
[R7-LoopBack0]ospfv3 1 area 0
[R7-LoopBack0]int g0/0/0
[R7-GigabitEthernet0/0/0]ospfv3 1 area 0
[R7-GigabitEthernet0/0/0]int g0/0/1
[R7-GigabitEthernet0/0/1]ospfv3 1 area 0
[R8]ospfv3 1
[R8-ospfv3-1]router-id 8.8.8.8
[R8-ospfv3-1]int lo0
[R8-LoopBack0]ospfv3 1 area 0
[R8-LoopBack0]int g0/0/0
[R8-GigabitEthernet0/0/0]ospfv3 1 area 0
R4 R5创建BGP
[R4]bgp 1
[R4-bgp]router-id 4.4.4.4
[R4-bgp]peer 2002:2201:102:1::2 as-number 2
[R4-bgp]ipv6-family
[R4-bgp-af-ipv6]peer 2002:2201:102:1::2 enable
[R5]bgp 64512
[R5-bgp]router-id 5.5.5.5
[R5-bgp]confederation id 2
[R5-bgp]peer 2002:2201:102:1::1 as-number 1
[R5-bgp]ipv6-family
[R5-bgp-af-ipv6]peer 2002:2201:102:1::1 enable
为R5 R6 R7 R8创建多宿主IPV6地址
[R5]int lo0
[R5-LoopBack0]ipv
[R5-LoopBack0]ipv6 add
[R5-LoopBack0]ipv6 address 5::5 64
[R6]int lo0
[R6-LoopBack0]ipv6 add
[R6-LoopBack0]ipv6 address 6::6 64
[R7]int lo0
[R7-LoopBack0]ipv6 add
[R7-LoopBack0]ipv6 address 7::7 64
[R8]int lo0
[R8-LoopBack0]ipv6 add
[R8-LoopBack0]ipv6 address 8::8 64
在R5 R6 R7 R8启用BGP
[R5]bgp 64512
[R5-bgp]peer 6::6 as-number 64512
[R5-bgp]peer 6::6 connect-interface LoopBack 0 5::5
[R5-bgp]ipv6-family
[R5-bgp-af-ipv6]peer 6::6 enable
[R6]bgp 64512
[R6-bgp]router-id 6.6.6.6
[R6-bgp]confederation id 2
[R6-bgp]peer 5::5 as-number 64512
[R6-bgp]peer 5::5 connect-interface LoopBack 0 6::6
[R6-bgp]ipv6-family
[R6-bgp-af-ipv6]peer 5::5 enable
[R6-bgp]peer 7::7 as-number 64512
[R6-bgp]peer 7::7 connect-interface LoopBack 0 6::6
[R6-bgp]ipv6-family
[R6-bgp-af-ipv6]peer 7::7 enable
[R7]bgp 64512
[R7-bgp]confederation id 2
[R7-bgp]confederation peer-as 64513
[R7-bgp]router-id 7.7.7.7
[R7-bgp]peer 6::6 as-number 64512
[R7-bgp]peer 6::6 connect-interface LoopBack 0 7::7
[R7-bgp]peer 8::8 as-number 64513
[R7-bgp]peer 8::8 connect-interface LoopBack 0 7::7
[R7-bgp]peer 8::8 ebgp-max-hop
[R7-bgp]ipv6-family
[R7-bgp-af-ipv6]peer 6::6 enable
[R7-bgp-af-ipv6]peer 8::8 enable
[R8]bgp 64513
[R8-bgp]confederation id 2
[R8-bgp]router-id 8.8.8.8
[R8-bgp]peer 7::7 as
[R8-bgp]confederation peer-as 64512
[R8-bgp]peer 7::7 as-number 64512
[R8-bgp]peer 7::7 connect-interface LoopBack 0 8::8
[R8-bgp]ipv6-family
[R8-bgp-af-ipv6]peer 7::7 enable
[R8-bgp]peer 7::7 ebgp-max-hop
汇总AS2的路由宣告发送给AS1
[R5]ipv6 route-static 2002:2201:0102:8000:: 49 NULL 0
[R5]bgp 64512
[R5-bgp]ipv6-family
[R5-bgp-af-ipv6]network 2002:2201:0102:8000:: 49
为R4配置出接口的tunnel,访问左边网络
[R4]int t
[R4]int Tunnel 0/0/0
[R4-Tunnel0/0/0]ipv6 enable
[R4-Tunnel0/0/0]ipv6 address 2002:2201:0102:0002::1/64
[R4-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4
[R4-Tunnel0/0/0]source GigabitEthernet 0/0/0
[R4]ipv6 route-static 2002:: 16 Tunnel 0/0/0
为AS2传递缺省
[R4]bgp 1
[R4-bgp]ipv6-family
[R4-bgp-af-ipv6]network 2002:: 16
修改下一跳
[R5-bgp]ipv6-family
[R5-bgp-af-ipv6]peer 6::6 next-hop-local
设置反射器,将R5为客户端,反射给R7
[R6]bgp 64512
[R6-bgp]ipv6-family
[R6-bgp-af-ipv6]peer 5::5 reflect-client