拓扑图&IP划分如下:
以R1为例,R2、R9&R10同理
interface GigabitEthernet 0/0/0
ip address 12.1.1.1 24
interface LoopBack 0
ip address 1.1.1.1 32
R2,写入下一跳
ip route-static 0.0.0.0 0 29.1.1.2
限制流量
acl 2000
rule permit source any
int g 0/0/1
nat outbound 2000
R10,写入下一跳
ip route-static 0.0.0.0 0 91.1.1.1
以R1为例,R2同理
ospf 1 router-id 1.1.1.1
area 0
network 0.0.0.0 255.255.255.255
测试
以R1为例,R2~R8、R10&R11同理
interface GigabitEthernet 0/0/0
ipv6 enable
ipv6 address 2002:1d01:0101::1/64
interface LoopBack 0
ipv6 enable
ipv6 address 2002:1d01:0101:1::1/64
R2
interface tunnel 0/0/0
tunnel-protocol ipv6-ipv4 6to4
source GigabitEthernet 0/0/1
ipv6 enable
ipv6 address 2002:1d01:0101:3::1/64
写入下一跳,R1同理
ipv6 route-static :: 0 Tunnel 0/0/0
以R10为例,R11同理
interface LoopBack 0
ripng 1 enable
quit
interface GigabitEthernet 0/0/1
ripng 1 enable
R10
interface Tunnel 0/0/0
tunnel-protocol ipv6-ipv4 6to4
source GigabitEthernet 0/0/0
ipv6 enable
ipv6 address 2002:5b01:0102:3::1/64
quit
ipv6 route-static :: 0 Tunnel 0/0/0
interface GigabitEthernet 0/0/1
ripng default-route originate
测试
R1pingR11
R2pingR10
以R3为例,R4~R6同理
ospfv3 1
router-id 3.3.3.3
quit
interface GigabitEthernet 0/0/1
ospfv3 1 area 0
interface LoopBack 0
ospfv3 1 area 0
以R7为例,R8同理
ripng 2
interface GigabitEthernet 0/0/1
ripng 2 enable
interface LoopBack 0
ripng 2 enable
以R3为例,R4~R同理
bgp 64511
confederation id 100
router-id 3.3.3.3
peer 4::4 as-number 64511
peer 4::4 connect-interface LoopBack 0
ipv6-family
peer 4::4 enable
R6
R7
R7
R2、R3&R7写入下一跳