一、实验要求:
实验拓扑图:
二、实验要求分析:
1、左边区域配置IPV4和IPV6地址,IPV4启rip,IPV6启ripng协议。
2、中间区域配置IPV4地址,相当于ISP(运营商)。
3、右边区域配置IPV6地址,启用ospfv3协议。
4、R1可以访问R3的环回,R3上只需要做IP地址配置,两边区域通过6to4相互访问。
三、实验思路步骤:
1、配置ISP区域,并且在R2和R4上写一条静态缺省指向R3的环回
2、对左边区域进行IP地址配置:
v4地址为192.168.1.0/24 192.168.2.0/24(R1的环回) 192.168.3.0/24(R2的环回)
V6地址:2002:1701:0101::/64 2002:1701:0101:1::/64(R1环回) 2002:1701:0101:2::/64(R2环回)
IP地址配置完成后,在R1的g0/0/0口上将V4和V6的环回地址进行汇总,然后在R2上的RIP和RIPNG上发布一条缺省;
3、之后配置右边区域:
AS1:2002:2201:0102::/49
AS2: 2002:2201:0102:8000::/49
地址配置完成后,启用OSPFV3 协议,然后进行BGP邻居的配置,BGP配置完成后,将AS2内的路由汇总,然后发布到宣告到BGP 中;
4、最后是R2和R4上的6to4tunnel的配置,完成后,在分别在R2和R4上写一条指向2002::/16的静态,下一跳为tunnel,然后将其宣告或者重发布到对应的协议中
四、实验配置命令:
R1:
#[R1]
ipv6
interface GigabitEthernet0/0/0
ipv6 enable
ip address 192.168.1.1 24
rip summary-address 192.168.0.0 24
ipv6 address 2002:1701:101::1/64
ripng 1 enable
ripng summary-address 2002:1701:101:1:: 64
#
interface LoopBack1
ipv6 enable
ip address 192.168.2.1 255.255.255.128
ipv6 address 2002:1701:101:1::1/65
ripng 1 enable
#
interface LoopBack2
ipv6 enable
ip address 192.168.2.129 255.255.255.128
ipv6 address 2002:1701:101:1:8000::1/65
ripng 1 enable
#
rip 1
version 2
network 192.168.1.0
network 192.168.2.0
#
R2:
[R2]
ipv6
#
acl number 2000
rule 5 permit source 192.168.0.0 0.0.255.255
#
interface GigabitEthernet0/0/1
ipv6 enable
ip address 192.168.1.2 24
ipv6 address 2002:1701:101::2/64
ripng 1 enable
#
interface GigabitEthernet0/0/0
ip address 23.1.1.1 24
nat outbound 2000
#
interface LoopBack1
ipv6 enable
ip address 192.168.3.1 255.255.255.0
ipv6 address 2002:1701:101:2::1/64
ripng 1 enable
#
interface LoopBack2
#
interface Tunnel0/0/0
ipv6 enable
ipv6 address 2002:1701:101:4::1/64
tunnel-protocol ipv6-ipv4 6to4
source 23.1.1.1
#
rip 1
default-route originate
version 2
network 192.168.1.0
network 192.168.3.0
#
ripng 1
import-route static
#
ip route-static 0.0.0.0 0.0.0.0 23.1.1.2
#
ipv6 route-static 2002:: 16 Tunnel0/0/0
#
R3:
[R3]
#
interface GigabitEthernet0/0/1
ip address 23.1.1.2 24
#
interface GigabitEthernet0/0/0
ip address 34.1.1.1 24
#
interface LoopBack1
ip address 3.3.3.3 24
#
R4:
[R4]
#
interface GigabitEthernet0/0/1
ip address 34.1.1.2 24
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2002:2201:102:1::1/64
#
interface LoopBack1
ipv6 enable
ipv6 address 2002:2201:102:2::1/64
#
interface Tunnel0/0/0
ipv6 enable
ipv6 address 2002:2201:102:3::1/64
tunnel-protocol ipv6-ipv4 6to4
source 34.1.1.2
#
bgp 1
router-id 4.4.4.4
peer 2002:2201:102:1::2 as-number 2
#
ipv6-family
network 2002:: 16
peer 2002:2201:102:1::2 enable
#
ip route-static 0.0.0.0 0.0.0.0 34.1.1.1
#
ipv6 route-static 2002:: 16 Tunnel0/0/0
#
R5:
[R5]
#
ipv6
#
ospfv3 1
router-id 5.5.5.5
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2002:2201:102:1::2/64
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2002:2201:102:8000::1/64
#
interface LoopBack1
ipv6 enable
ipv6 address 2002:2201:102:8001::1/64
#
interface LoopBack1
ipv6 address 5::5/64
#
bgp 64512
router-id 5.5.5.5
confederation id 2
confederation peer-as 64513
peer 6::6 as-number 64512
peer 6::6 connect-interface LoopBack1 5::5
peer 2002:2201:102:1::1 as-number 1
#
ipv6-family
network 2002:2201:102:8000:: 49
peer 6::6 enable
peer 6::6 next-hop-local
peer 2002:2201:102:1::1 enable
#
ipv6 route-static 2002:2201:102:8000:: 49 NULL0
#
R6:
[R6]
ipv6
#
ospfv3
router-id 6.6.6.6
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2002:2201:102:8000::2/64
ospfv3 1 area 0.0.0.0
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2002:2201:102:8002::1/64
ospfv3 1 area 0.0.0.0
#
interface LoopBack1
ipv6 enable
ipv6 address 2002:2201:102:8003::1/64
ipv6 address 6::6/64
ospfv3 1 area 0.0.0.0
#
bgp 64512
router-id 6.6.6.6 confederation id 2
confederation peer-as 64513
peer 5::5 as-number 64512
peer 5::5 connect-interface LoopBack1 6::6
peer 7::7 as-number 64512
peer 7::7 connect-interface LoopBack1 6::6
#
ipv6-family
peer 5::5 enable
peer 7::7 enable
peer 7::7 reflect-client
#
R7 :
[R 7]
ipv6
#
ospfv3
router-id 7.7.7.7
#
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2002:2201:102:8002::2/64
ospfv3 1 area 0.0.0.0
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2002:2201:102:8004::1/64
ospfv3 1 area 0.0.0.0
#
interface LoopBack1
ipv6 enable
ipv6 address 2002:2201:102:8005::1/64
ipv6 address 7::7/64
ospfv3 1 area 0.0.0.0
#
bgp 64512
router-id 7.7.7.7
confederation id 2
confederation peer-as 64513
peer 6::6 as-number 64512
peer 6::6 connect-interface LoopBack1 7::7
peer 8::8 as-number 64513
peer 8::8 ebgp-max-hop 2
peer 8::8 connect-interface LoopBack1 7::7
#
ipv6-family unicast
peer 6::6 enable
peer 8::8 enable
#
R8:
[R8]
#
ipv6
#
ospfv3
router-id 8.8.8.8
#
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address 2002:2201:102:8004::2/64
ospfv3 1 area 0.0.0.0
#
interface LoopBack1
ipv6 enable
ipv6 address 2002:2201:102:8006::1/64
ipv6 address 8::8/64
ospfv3 1 area 0.0.0.0
#
bgp 64513
router-id 8.8.8.8
confederation id 2
confederation peer-as 64512
peer 7::7 as-number 64512
peer 7::7 ebgp-max-hop 2
peer 7::7 connect-interface LoopBack1 8::8
#
ipv6-family
peer 7::7 enable
#
五、测试
R1ping通R3的环回
两个局域网互通
实验成功!