精华内容
下载资源
问答
  • IPV6实验

    2021-01-05 13:36:43
    IPV6实验 一、实验要求 二、实验拓扑 三、实验步骤 四、实验检测

    IPV6实验

    一、实验要求

    在这里插入图片描述

    二、实验拓扑

    在这里插入图片描述

    三、实验步骤

    1、地址规划及相关配置配置

    R1的配置:
    [R1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
    [R1-LoopBack0]ip add 192.168.1.1 24
    [R1-LoopBack1]ip add 192.168.2.1 24
    [R1]rip 1
    [R1-rip-1]ver 2
    [R1-rip-1]network 192.168.1.0
    [R1-rip-1]network 192.168.2.0
    [R1-rip-1]network 12.0.0.0
    [R1-GigabitEthernet0/0/0]rip summary-address 192.168.0.0 255.255.252.0
    [R1]ipv6
    [R1-GigabitEthernet0/0/0]ipv6 enable
    [R1-GigabitEthernet0/0/0]ipv6 address 2002:1701:0102:2::2 64
    [R1-LoopBack0]ipv6 enable
    [R1-LoopBack0]ipv6 address 2002:1701:0102:3::1 64
    [R1-LoopBack1]ipv6 enable
    [R1-LoopBack1]ipv6 address 2002:1701:0102:4::1 64
    R2的配置:
    [R2-GigabitEthernet0/0/1]ip add 23.1.1.2 24
    [R2]ip route-static 0.0.0.0 0 23.1.1.3
    [R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
    [R2-LoopBack0]ip add 2.2.2.2 24
    [R2]rip 1
    [R2-rip-1]ver 2
    [R2-rip-1]network 12.0.0.0
    [R2-rip-1]network 2.0.0.0
    [R2]rip 1
    [R2-rip-1]ver 2
    [R2-rip-1]default-route originate
    [R2]acl 2000
    [R2-acl-basic-2000]rule 1 permit source any
    [R2-GigabitEthernet0/0/1]nat outbound 2000
    [R2]ipv6
    [R2-LoopBack0]ipv6 enable
    [R2-LoopBack0]ipv6 address 2002:1701:0102:1::1 64
    [R2-GigabitEthernet0/0/0]ipv6 enable
    [R2-GigabitEthernet0/0/0]ipv6 add 2002:1701:0102:2::1 64
    [R2-Tunnel0/0/0]ipv6 enable
    [R2-Tunnel0/0/0]ipv6 address 2002:1701:0102:5::1 64
    [R2-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4
    [R2-Tunnel0/0/0]source 23.1.1.2
    R3的配置:
    [R3-LoopBack0]ip add 3.3.3.3 24
    [R3-GigabitEthernet0/0/0]ip add 23.1.1.3 24
    [R3-GigabitEthernet0/0/1]ip add 34.1.1.3 24
    R4的配置:
    [R4-GigabitEthernet0/0/0]ip add 34.1.1.4 24
    [R4]ip route-static 0.0.0.0 0 34.1.1.3
    [R4]ipv6
    [R4-Tunnel0/0/0]ipv6 enable
    [R4-Tunnel0/0/0]ipv6 address 2002:2201:0104:1::1 64
    [R4-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4
    [R4-Tunnel0/0/0]source 34.1.1.4
    [R4-LoopBack0]ipv6 enable
    [R4-LoopBack0]ipv6 address 2002:2201:0104:2::1 64
    [R4-GigabitEthernet0/0/1]ipv6 enable
    [R4-GigabitEthernet0/0/1]ipv6 address 2002:2201:0104:3::1 64
    R5的配置:
    [R5]ipv6
    [R5-GigabitEthernet0/0/0]ipv6 enable
    [R5-GigabitEthernet0/0/0]ipv6 address 2002:2201:0104:3::2 64
    [R5-LoopBack0]ipv6 enable
    [R5-LoopBack0]ipv6 address 2002:2201:0104:8000::1 64
    [R5-GigabitEthernet0/0/1]ipv6 enable
    [R5-GigabitEthernet0/0/1]ipv6 address 2002:2201:0104:8001::1 64
    R6的配置:
    [R6]ipv6
    [R6-GigabitEthernet0/0/0]ipv6 enable
    [R6-GigabitEthernet0/0/0]ipv6 address 2002:2201:0104:8001::2 64
    [R6-LoopBack0]ipv6 enable
    [R6-LoopBack0]ipv6 address 2002:2201:0104:8002::1 64
    [R6-GigabitEthernet0/0/1]ipv6 enable
    [R6-GigabitEthernet0/0/1]ipv6 address 2002:2201:0104:8003::1 64
    R7的配置:
    [R7]ipv6
    [R7-GigabitEthernet0/0/0]ipv6 enable
    [R7-GigabitEthernet0/0/0]ipv6 address 2002:2201:0104:8003::2 64
    [R7-GigabitEthernet0/0/1]ipv6 enable
    [R7-GigabitEthernet0/0/1]ipv6 address 2002:2201:0104:8005::1 64
    [R7-LoopBack0]ipv6 enable
    [R7-LoopBack0]ipv6 address 2002:2201:0104:8004::1 64
    R8的配置:
    [R8]ipv6
    [R8-GigabitEthernet0/0/0]ipv6 enable
    [R8-GigabitEthernet0/0/0]ipv6 address 2002:2201:0104:8005::2 64
    [R8-LoopBack0]ipv6 enable
    [R8-LoopBack0]ipv6 address 2002:2201:0104:8006::1 64

    2、启用OSPFV3

    R5的配置:
    [R5]ospfv3 1
    [R5-ospfv3-1]router-id 5.5.5.5
    [R5-LoopBack0]ospfv3 1 a 0
    [R5-GigabitEthernet0/0/1]ospfv3 1 a 0
    R6的配置:
    [R6]ospfv3 1
    [R6-ospfv3-1]router-id 6.6.6.6
    [R6-LoopBack0]ospfv3 1 a 0
    [R6-GigabitEthernet0/0/0]ospfv3 1 a 0
    [R6-GigabitEthernet0/0/1]ospfv3 1 a 0
    R7的配置:
    [R7]ospfv3 1
    [R7-ospfv3-1]router-id 7.7.7.7
    [R7-LoopBack0]ospfv3 1 a 0
    [R7-GigabitEthernet0/0/0]ospfv3 1 a 0
    [R7-GigabitEthernet0/0/1]ospfv3 1 a 0
    R8的配置:
    [R8]ospfv3 1
    [R8-ospfv3-1]router-id 8.8.8.8
    [R8-LoopBack0]ospfv3 1 a 0
    [R8-GigabitEthernet0/0/0]ospfv3 1 a 0

    3、启用BGP

    R4的配置:
    [R4-LoopBack0]ipv6 enable
    [R4-LoopBack0]ipv6 address fec0::4 128
    [R4]bgp 1
    [R4-bgp]router-id 4.4.4.4
    [R4-bgp]peer fec0::5 as-number 2
    [R4-LoopBack0]ipv6 enable
    [R4-LoopBack0]ipv6 address fec0::4 128
    [R4-bgp]ipv6-family
    [R4-bgp-af-ipv6]peer fec0::5 enable
    [R4-bgp]peer fec0::5 connect-interface LoopBack 0 fec0::4
    [R4]ipv6 route-static fec0::5 128 2002:2201:104:3::2
    [R4-bgp]peer fec0::5 ebgp-max-hop 2
    R5的配置:
    [R5-LoopBack0]ipv6 enable
    [R5-LoopBack0]ipv6 address fec0::5 128
    [R5]ipv6 route-static fec0::4 128 2002:2201:104:3::1
    [R5]bgp 64512
    [R5-bgp]router-id 5.5.5.5
    [R5-bgp]confederation id 2
    [R5-bgp]peer fec0::4 as-number 1
    [R5-bgp]peer fec0::4 connect-interface LoopBack 0 fec0::5
    [R5-bgp]peer fec0::4 ebgp-max-hop 2
    [R5-bgp]peer fec0::6 as-number 64512
    [R5-bgp]peer fec0::6 connect-interface LoopBack 0 fec0::5
    [R5-bgp]ipv6-family
    [R5-bgp-af-ipv6]peer fec0::4 enable
    [R5-bgp-af-ipv6]peer fec0::6 enable
    R6的配置:
    [R6-LoopBack0]ipv6 enable
    [R6-LoopBack0]ipv6 address fec0::6 128
    [R6]bgp 64512
    [R6-bgp]router-id 6.6.6.6
    [R6-bgp]confederation id 2
    [R6-bgp]peer fec0::5 as-number 64512
    [R6-bgp]peer fec0::5 connect-interface LoopBack 0 fec0::6
    [R6-bgp]peer fec0::7 as-number 64512
    [R6-bgp]peer fec0::7 connect-interface LoopBack 0 fec0::6
    [R6-bgp]ipv6-family
    [R6-bgp-af-ipv6]peer fec0::5 enable
    [R6-bgp-af-ipv6]peer fec0::7 enable
    R7的配置:
    [R7-LoopBack0]ipv6 enable
    [R7-LoopBack0]ipv6 address fec0::7 128
    [R7]bgp 64512
    [R7-bgp]router-id 7.7.7.7
    [R7-bgp]confederation id 2
    [R7-bgp]confederation peer-as 64513
    [R7-bgp]peer fec0::6 as-number 64512
    [R7-bgp]peer fec0::6 connect-interface LoopBack 0 fec0::7
    [R7-bgp]peer fec0::8 as-number 64513
    [R7-bgp]peer fec0::8 connect-interface LoopBack 0 fec0::7
    [R7-bgp]peer fec0::8 ebgp-max-hop 2
    [R7-bgp]ipv6-family
    [R7-bgp-af-ipv6]peer fec0::6 enable
    [R7-bgp-af-ipv6]peer fec0::8 enable
    R8的配置:
    [R8-LoopBack0]ipv6 enable
    [R8-LoopBack0]ipv6 address fec0::8 128
    [R8]bgp 64513
    [R8-bgp]router-id 8.8.8.8
    [R8-bgp]confederation id 2
    [R8-bgp]confederation peer-as 64512
    [R8-bgp]peer fec0::7 as-number 64512
    [R8-bgp]peer fec0::7 connect-interface LoopBack 0 fec0::8
    [R8-bgp]peer fec0::7 ebgp-max-hop 2
    [R8-bgp]ipv6-family
    [R8-bgp-af-ipv6]peer fec0::7 enable

    4、进行宣告

    R5的配置:
    [R5]ipv6 route-static 2002:2201:0104:8000:: 49 NULL 0
    [R5]bgp 64512
    [R5-bgp]ipv6-family
    [R5-bgp-af-ipv6]network 2002:2201:0104:8000:: 49
    [R5]bgp 64512
    [R5-bgp]ipv6-family
    [R5-bgp-af-ipv6]peer fec0::6 next-hop-local
    R6的配置:
    [R6]bgp 64512
    [R6-bgp]ipv6
    [R6-bgp]ipv6-family
    [R6-bgp-af-ipv6]peer fec0::7 reflect-client

    5、ripng的配置

    R1的配置:
    [R1-LoopBack0]ripng 1 enable
    [R1-LoopBack1]ripng 1 enable
    [R1-GigabitEthernet0/0/0]ripng 1 enable
    R2的配置:
    [R2-GigabitEthernet0/0/0]ripng 1 enable
    [R2-LoopBack0]ripng 1 enable
    [R2-GigabitEthernet0/0/0]ripng default-route only

    四、实验检测

    R5上:
    在这里插入图片描述
    在这里插入图片描述

    R4上:
    在这里插入图片描述
    R8上:
    在这里插入图片描述
    R7上:
    在这里插入图片描述
    R1上:
    在这里插入图片描述

    展开全文
  • IPv6实验

    2021-05-23 11:34:31
    实验拓扑 图1-1 实验需求 在R1和PC3上开启IPv6链路本地地址自动生成,测试是否能够使用链路本地地址互通 为R1配置全球单播地址2001::1/64,使PC3能够自动生成与R1同一网段的IPv6地址 测试R1和PC3是否...

    实验拓扑

     

     

    图1-1

     

     

    实验需求

    1. 在R1和PC3上开启IPv6链路本地地址自动生成,测试是否能够使用链路本地地址互通
    2. 为R1配置全球单播地址2001::1/64,使PC3能够自动生成与R1同一网段的IPv6地址
    3. 测试R1和PC3是否能够使用全球单播地址互通

    实验解法

    1. 在R1和PC3上开启IPv6链路本地地址自动生成,测试是否能够使用链路本地地址互通

        分析:路由器需要手动开启链路本地地址自动生成,该功能PC默认会开启。但由于这里使用路由器来模拟PC3,所以PC上也需要开启

      步骤1:在R1的g0/0接口上开启IPv6链路本地地址自动生成

      [R1]interface g0/0
      [R1-GigabitEthernet0/0]ipv6 address auto 
      

      步骤2:在R1上查看g0/0接口的IPv6信息,发现已经生成了前缀为FE80的IPv6地址,该地址属于链路本地地址

      [R1]display ipv6 interface g0/0
      GigabitEthernet0/0 current state: UP
      Line protocol current state: UP
      IPv6 is enabled, link-local address is FE80::7C9F:E8FF:FE51:105
      No global unicast address configured
      ……
      

      步骤3:PC3上开启IPv6链路本地地址自动生成和查看地址命令和R1一致,此处省略

      步骤4:在PC3上Ping R1的IPv6链路本地地址,发现可以Ping通

        注意:在路由器上Ping ipv6链路本地地址,需要指定出接口

      [PC3]ping ipv6 -i g0/0 FE80::7C9F:E8FF:FE51:105
      Ping6(56 data bytes) FE80::824C:A1FF:FE05:305 --> FE80::7C9F:E8FF:FE51:105, press CTRL_C to break
      56 bytes from FE80::7C9F:E8FF:FE51:105, icmp_seq=0 hlim=64 time=160.000 ms
      56 bytes from FE80::7C9F:E8FF:FE51:105, icmp_seq=1 hlim=64 time=29.000 ms
      56 bytes from FE80::7C9F:E8FF:FE51:105, icmp_seq=2 hlim=64 time=80.000 ms
      56 bytes from FE80::7C9F:E8FF:FE51:105, icmp_seq=3 hlim=64 time=39.000 ms
      56 bytes from FE80::7C9F:E8FF:FE51:105, icmp_seq=4 hlim=64 time=20.000 ms
      
    2. 为R1配置全球单播地址2001::1/64,使PC3能够自动生成与R1同一网段的IPv6地址

        分析:IPv6全球单播地址的自动生成不需要依靠DHCP服务,只需要网段内的路由器具有全球单播地址,并且解除RA消息抑制即可

      步骤1:在R1的g0/0接口上配置IPv6全球单播地址2001::/64,并解除RA消息抑制

      [R1]interface g0/0
      [R1-GigabitEthernet0/0]ipv6 address 2001::1 64
      [R1-GigabitEthernet0/0]undo ipv6 nd ra halt
      

      步骤2:在PC3上查看结果

      [PC3]display ipv6 interface g0/0
      GigabitEthernet0/0 current state: UP
      Line protocol current state: UP
      IPv6 is enabled, link-local address is FE80::824C:A1FF:FE05:305
       Global unicast address(es):
        2001::824C:A1FF:FE05:305, subnet is 2001::/64 [AUTOCFG]
      

        分析:PC3上已经自动生成了2001::/64网段的IPv6全球单播地址,而且链路本地地址也继续存在,用于网段内部通讯
        

    3. 测试R1和PC3是否能够使用全球单播地址互通

      步骤1:在PC3上Ping R1的IPv6全球单播地址,发现可以Ping通

      [PC3]Ping ipv6 2001::1
      Ping6(56 data bytes) 2001::824C:A1FF:FE05:305 --> 2001::1, press CTRL_C to break
      56 bytes from 2001::1, icmp_seq=0 hlim=64 time=70.000 ms
      56 bytes from 2001::1, icmp_seq=1 hlim=64 time=14.000 ms
      56 bytes from 2001::1, icmp_seq=2 hlim=64 time=25.000 ms
      56 bytes from 2001::1, icmp_seq=3 hlim=64 time=17.000 ms
      56 bytes from 2001::1, icmp_seq=4 hlim=64 time=20.000 ms
    展开全文
  • IPv6 实验

    2020-07-29 01:41:02
    IPv6一、实验拓扑&实验要求二、实验过程1、 配置ipv4公网2、 配置ipv4私网3、ipv4网通4、r1 r2 上配置ipv6地址5、r1 r2 上配置ripng6、r4~r8 上配置ipv6地址7、r4~r8 启IGP8、r4~r8 启BGP 一、实验拓扑&实验...

    一、实验拓扑&实验要求

    在这里插入图片描述
    在这里插入图片描述

    二、实验过程

    1、 配置ipv4公网

    r2

    [r2]int g0/0/1
    [r2-GigabitEthernet0/0/1]ip add 23.1.1.1 24
    

    r3

    [r3]int g0/0/0
    [r3-GigabitEthernet0/0/0]ip add 23.1.1.2 24
    [r3-GigabitEthernet0/0/0]int lo0
    [r3-LoopBack0]ip add 3.3.3.3 24
    [r3-LoopBack0]int g0/0/1
    [r3-GigabitEthernet0/0/1]ip add 34.1.1.1 24
    

    r4

    [r4]int g0/0/0
    [r4-GigabitEthernet0/0/0]ip add 34.1.1.2 24
    

    2、 配置ipv4私网

    r1

    [r1]int lo0
    [r1-LoopBack0]ip add 192.168.1.1 25
    [r1-LoopBack0]int lo1
    [r1-LoopBack1]ip add 192.168.1.129 25
    [r1-LoopBack1]int g0/0/1
    [r1-GigabitEthernet0/0/1]ip add 192.168.0.1 30
    

    r2

    [r2]int g0/0/0
    [r2-GigabitEthernet0/0/0]ip add 192.168.0.2 30
    

    3、ipv4网通

    r4上配置缺省

    [r4]ip route-static 0.0.0.0 0 34.1.1.1
    

    r2上配置缺省

    [r2]ip route-static 0.0.0.0 0 23.1.1.2
    

    此时 r2 可以 ping 通 r4
    在这里插入图片描述
    r1上配置静态缺省

    [r1]ip route-static 0.0.0.0 0.0.0.0 192.168.0.2
    

    r2

    [r2]ip route-static 192.168.1.0 24 192.168.0.1
    [r2]acl 2000
    [r2-acl-basic-2000]rule permit source 192.168.0.0 0.0.255.255
    [r2-acl-basic-2000]int g0/0/1
    [r2-GigabitEthernet0/0/1]nat outbound 2000
    

    在这里插入图片描述

    4、r1 r2 上配置ipv6地址

    r2

    [r2]ipv6
    [r2]int lo0
    [r2-LoopBack0]ipv6 enable 
    [r2-LoopBack0]ipv6 add 2002:1701:0101:0000::1/64
    

    r1

    [r1]ipv6
    [r1]int g0/0/1
    [r1-GigabitEthernet0/0/1]ipv6 enable 
    [r1-GigabitEthernet0/0/1]ipv6 address 2002:1701:0101:0001::1/64
    

    r2

    [r2]int g0/0/0
    [r2-GigabitEthernet0/0/0]ipv6 enable 
    [r2-GigabitEthernet0/0/0]ipv6 add 2002:1701:0101:0001::2/64
    

    r1

    [r1]int lo0
    [r1-LoopBack0]ipv6 enable 
    [r1-LoopBack0]ipv6 address 2002:1701:0101:0002::1/65
    [r1-LoopBack0]int lo1
    [r1-LoopBack1]ipv6 enable 
    [r1-LoopBack1]ipv6 address 2002:1701:0101:0002:8000::1/65
    

    5、r1 r2 上配置ripng

    r1

    [r1]ripng 1
    [r1-ripng-1]q
    [r1]int lo0
    [r1-LoopBack0]ripng 1 enable 
    [r1-LoopBack0]int lo1
    [r1-LoopBack1]ripng 1 enable 
    [r1-LoopBack1]int g0/0/1
    [r1-GigabitEthernet0/0/1]ripng 1 enable 
    

    r2

    [r2]ripng 1
    [r2-ripng-1]q
    [r2]int lo0
    [r2-LoopBack0]ripng 1 enable 
    [r2-LoopBack0]int g0/0/0
    [r2-GigabitEthernet0/0/0]ripng 1 enable
    

    在这里插入图片描述
    在这里插入图片描述
    r1

    [r1]int g0/0/1
    [r1-GigabitEthernet0/0/1]ripng summary-address 2002:1701:0101:0002:: 64
    

    在这里插入图片描述
    r2 上做 tunnel

    [r2]int t0/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 23.1.1.1
    [r2-Tunnel0/0/0]q
    [r2]ipv6 route-static 2002:: 16 Tunnel 0/0/0
    

    r2向r1做缺省

    [r2]int g0/0/0
    [r2-GigabitEthernet0/0/0]ripng default-route only 
    

    在这里插入图片描述

    6、r4~r8 上配置ipv6地址

    r4

    [r4]ipv6 
    [r4]int lo0 
    [r4-LoopBack0]ipv6 enable 
    [r4-LoopBack0]ipv6 add 2002:2201:0102::1/64
    [r4-LoopBack0]int g0/0/1
    [r4-GigabitEthernet0/0/1]ipv6 enable 
    [r4-GigabitEthernet0/0/1]ipv6 add 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 add 2002:2201:0102:0001::2/64
    [r5]int lo0
    [r5-LoopBack0]ipv6 enable 
    [r5-LoopBack0]ipv6 add 2002:2201:0102:8000::1/64
    [r5-LoopBack0]int g0/0/1
    [r5-GigabitEthernet0/0/1]ipv6 enable 
    [r5-GigabitEthernet0/0/1]ipv6 add 2002:2201:0102:8001::1/64
    

    r6

    [r6]ipv6
    [r6]int g0/0/0
    [r6-GigabitEthernet0/0/0]ipv6 en 
    [r6-GigabitEthernet0/0/0]ipv6 enable 
    [r6-GigabitEthernet0/0/0]ipv6 add 2002:2201:0102:8001::2/64
    [r6-GigabitEthernet0/0/0]int lo0
    [r6-LoopBack0]ipv6 enable 
    [r6-LoopBack0]ipv6 add 2002:2201:0102:8002::1/64
    [r6-LoopBack0]int g0/0/1
    [r6-GigabitEthernet0/0/1]ipv6 enable
    [r6-GigabitEthernet0/0/1]ipv6 add 2002:2201:0102:8003::1/64
    
    

    r7

    [r7]ipv6
    [r7]int g0/0/0
    [r7-GigabitEthernet0/0/0]ipv6 enable 
    [r7-GigabitEthernet0/0/0]ipv6 add 2002:2201:0102:8003::2/64
    [r7-GigabitEthernet0/0/0]int lo0
    [r7-LoopBack0]ipv6 enable 
    [r7-LoopBack0]ipv6 add 2002:2201:0102:8004::1/64
    [r7-LoopBack0]int g0/0/1
    [r7-GigabitEthernet0/0/1]ipv6 enable
    [r7-GigabitEthernet0/0/1]ipv6 add 2002:2201:0102:8005::1/64
    

    r8

    [r8]ipv6
    [r8]int g0/0/0
    [r8-GigabitEthernet0/0/0]ipv6 enable 
    [r8-GigabitEthernet0/0/0]ipv6 add 2002:2201:0102:8005::2/64
    [r8-GigabitEthernet0/0/0]int lo0
    [r8-LoopBack0]ipv6 enable
    [r8-LoopBack0]ipv6 add 2002:2201:0102:8006::1/64
    

    7、r4~r8 启IGP

    r5

    [r5]ospfv3 
    [r5-ospfv3-1]router-id 5.5.5.5
    [r5-ospfv3-1]int g0/0/1
    [r5-GigabitEthernet0/0/1]ospfv3 1 area 0
    [r5-GigabitEthernet0/0/1]int lo0
    [r5-LoopBack0]ospfv3 1 area 0
    

    r6

    [r6]ospfv3 
    [r6-ospfv3-1]router-id 6.6.6.6
    [r6-ospfv3-1]int g0/0/0
    [r6-GigabitEthernet0/0/0]ospfv3 1 area 0
    [r6-GigabitEthernet0/0/0]int lo0
    [r6-LoopBack0]ospfv3 1 area 0
    [r6-LoopBack0]int g0/0/1
    [r6-GigabitEthernet0/0/1]ospfv3 1 area 0
    

    r7

    [r7]ospfv3
    [r7-ospfv3-1]router-id 7.7.7.7 
    [r7-ospfv3-1]int g0/0/0
    [r7-GigabitEthernet0/0/0]ospfv3 1 area 0
    [r7-GigabitEthernet0/0/0]int lo0
    [r7-LoopBack0]ospfv3 1 area 0
    [r7-LoopBack0]int g0/0/01
    [r7-GigabitEthernet0/0/1]ospfv3 1 area 0
    

    r8

    [r8]ospfv3
    [r8-ospfv3-1]ro 
    [r8-ospfv3-1]router-id 8.8.8.8
    [r8-ospfv3-1]int g0/0/0
    [r8-GigabitEthernet0/0/0]ospfv3 1 area 0
    [r8-GigabitEthernet0/0/0]int lo0
    [r8-LoopBack0]ospfv3 1 area 0
    

    在这里插入图片描述
    在这里插入图片描述

    8、r4~r8 启BGP

    在这里插入图片描述

    r4

    [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

    [r5]bgp 64512
    [r5-bgp]con 
    [r5-bgp]confederation id 2
    [r5-bgp]router-id 5.5.5.5
    [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]int lo0
    [r5-LoopBack0]ipv6 add 5::5/64
    

    r6

    [r6]int lo0
    [r6-LoopBack0]ipv6 add 6::6/64
    

    r7

    [r7]int lo0
    [r7-LoopBack0]ipv6 add 7::7/64
    

    r8

    [r8]int lo0
    [r8-LoopBack0]ipv6 add 8::8/64
    

    r5上进行建邻(已有r4)

    [r5]bgp 64512
    [r5-bgp]peer 6::6 as-number 64512
    [r5-bgp]peer 6::6 connect-interface lo0 5::5
    [r5-bgp]ipv6-family 
    [r5-bgp-af-ipv6]peer 6::6 enable 
    

    r6

    [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 lo0 6::6
    [r6-bgp]peer 7::7 as-number 64512 
    [r6-bgp]peer 7::7 connect-interface lo0 6::6
    [r6-bgp]ipv6-family  
    [r6-bgp-af-ipv6]peer 5::5 enable 
    [r6-bgp-af-ipv6]peer 7::7 enable
    

    r7

    [r7]bgp 64512
    [r7-bgp]router-id 7.7.7.7
    [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 lo0 7::7
    [r7-bgp]peer 8::8 as-number 64513
    [r7-bgp]peer 8::8 connect-interface lo0 7::7
    [r7-bgp]peer 8::8 ebgp-max-hop 2
    [r7-bgp]ipv6-family 
    [r7-bgp-af-ipv6]peer 6::6 enable 
    [r7-bgp-af-ipv6]peer 8::8 enable
    

    r8

    [r8]bgp 64513
    [r8-bgp]router-id 8.8.8.8
    [r8-bgp]confederation id 2
    [r8-bgp]confederation  peer-as 64512 
    [r8-bgp]peer 7::7 as-number 64512
    [r8-bgp]peer 7::7 connect-interface lo0 8::8
    [r8-bgp]peer 7::7 ebgp-max-hop 2
    [r8-bgp]ipv6-family 
    [r8-bgp-af-ipv6]peer 7::7 enable
    

    在这里插入图片描述
    在这里插入图片描述

    9、r4~r8路由配置

    r4

    [r4]int t0/0/0 
    [r4-Tunnel0/0/0]ipv6 enable 
    [r4-Tunnel0/0/0]ipv6 add 2002:2201:0102:2::1/64 
    [r4-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 6to4
    [r4-Tunnel0/0/0]source 34.1.1.2
    [r4]ipv6 route-static 2002:: 16 Tunnel 0/0/0
    

    r5上先配置空接口(防环)再进行汇总

    [r5]ipv6 route-static 2002:2201:0102:8000:: 49 NULL 0
    [r5-bgp]ipv6-family 
    [r5-bgp-af-ipv6]network 2002:2201:0102:8000:: 49
    

    在这里插入图片描述
    r4

    [r4]bgp 1 
    [r4-bgp]ipv6-family 
    [r4-bgp-af-ipv6]network 2002:: 16
    

    在这里插入图片描述
    在这里插入图片描述
    此时r6不优,需在r5上修改下一跳
    r5

    [r5-bgp]ipv6-family  
    [r5-bgp-af-ipv6]peer 6::6 next-hop-local 
    

    在这里插入图片描述
    r6指定r7为反射器客户端
    r6

    [r6-bgp-af-ipv6]peer 7::7 reflect-client 
    

    在这里插入图片描述

    展开全文
  • ipv6实验

    2021-05-27 18:06:45
    需求 1、两个局域网基于tunnel 6to4 可达 ...3、配置AR4 tunnel 0/0/0 基于ipv6,AS1、AS2基于ipv6开启BGP,AS2内网开启ospfv3 10 area 0单区域,两个小AS需要建立联邦,AS 64512内部需要反射器 4、各种环境

    需求

    1、两个局域网基于tunnel 6to4 可达

    2、AR1可以访问AR3的环回

    需求拓扑图

    在这里插入图片描述

    基本配置

    1、配置AR2、3、4的ipv4环境

    2、配置AR1、2的ipv4/v6环境,ipv4开启rip 1 ,ipv6 开启ripng 1,AR2上起tunnel 0/0/0 基于ipv6

    3、配置AR4 tunnel 0/0/0 基于ipv6,AS1、AS2基于ipv6开启BGP,AS2内网开启ospfv3 10 area 0单区域,两个小AS需要建立联邦,AS 64512内部需要反射器

    4、各种环境下需要配置的缺省路由

    AR1

    #ipv4环境配置省略
    #配置ipv6
    ipv6  #开启v6功能   需要在每个接口里开启
    ripng 1  #开启ripng功能  需要在每个接口里开启
    interface GigabitEthernet0/0/0 #进接口
     ipv6 enable  
     ipv6 address 2002:1701:102:2::2/64 
     ripng 1 enable  #在接口里开启ripng 1
    interface LoopBack0
     ipv6 enable  
     ipv6 address 2002:1701:102:3::1/64 
     ripng 1 enable
    interface LoopBack1
     ipv6 enable  
     ipv6 address 2002:1701:102:4::1/64 
     ripng 1 enable
    #配置v4  rip协议
    rip 1
     version 2
     network 192.168.1.0
     network 192.168.2.0
     network 12.0.0.0
    

    AR2

    #ipv4环境配置省略
    #配置ipv6  ripng协议
    ipv6  #开启v6功能
    ripng 1  #开启ripng功能
    interface GigabitEthernet0/0/1
     ipv6 enable   
     ipv6 address 2002:1701:102:2::1/64 
     ripng 1 enable   #在接口里开启ripng 1
     ripng default-route only  #下放缺省,用于提供上网
    interface LoopBack0
     ipv6 enable 
     ipv6 address 2002:1701:102:1::1/64 
     ripng 1 enable
    #配置tunnel 0/0/0 6to4协议
    interface Tunnel0/0/0
     ipv6 enable 
     ipv6 address 2002:1701:102:5::1/64 
     tunnel-protocol ipv6-ipv4 6to4
     source 23.1.1.2
    #配置V4 rip
    rip 1
     default-route originate #下放缺省,用于提供上网
     version 2
     network 12.0.0.0
     network 2.0.0.0
    #配置缺省
    ip route-static 0.0.0.0 0.0.0.0 23.1.1.3  #v4
    ipv6 route-static 2002:: 16 Tunnel 0/0/0   #v6
    

    AR4

    #ipv4环境配置省略
    #配置ipv6 
    ipv6  #开启v6功能
    interface GigabitEthernet0/0/0
     ipv6 enable 
     ipv6 address 2002:2201:104:45::1/64
    interface LoopBack0
     ipv6 enable 
     ipv6 address 2002:2201:104:4::1/64 
     ipv6 address FEC0::4/128  #建立这个site-local-本地站点地址,用于BGP的建邻  是个私有地址,可以放心使用
    interface Tunnel0/0/0  #在隧道里启用 6to4 协议
     ipv6 enable 
     ipv6 address 2002:2201:104:1::4/64 
     tunnel-protocol ipv6-ipv4 6to4
     source 34.1.1.4
    
    #配置一些必要缺省
    ip route-static 0.0.0.0 0.0.0.0 34.1.1.3 #v4缺省,用于转发未知流量
    ipv6 route-static 2002:: 16 Tunnel 0/0/0  #这样可以在BGP 中宣告
    ipv6 route-static FEC0::5 128 2002:2201:104:45::2   #使AR4能与AR5可达
    #配置BGP
    bgp 1
     router-id 4.4.4.4
     peer FEC0::5 as-number 2 
     peer FEC0::5 ebgp-max-hop 2 
     peer FEC0::5 connect-interface LoopBack0 FEC0::4
     ipv6-family 
      network 2002:: 16  #宣告汇总,用于接收从tunnel接口传过来的流量
      peer FEC0::5 enable #要进入ipv6-family开启功能
    

    AR5

    #配置ipv6和ospfv3
    ipv6  #开启,然后在接口上调用
    ospfv3 10  #开启 然后在接口上调用
     router-id 5.5.5.5
    interface GigabitEthernet0/0/0
     ipv6 enable  
     ipv6 address 2002:2201:104:8056::1/64 #AR5在as2中,所以以8000开始,这里便于配置5/6之间启用8056.
     ospfv3 10 area 0.0.0.0
    interface GigabitEthernet0/0/1
     ipv6 enable 
     ipv6 address 2002:2201:104:45::2/64 
     ospfv3 10 area 0.0.0.0
    interface LoopBack0
     ipv6 enable 
     ipv6 address FEC0::5/128 #用于BGP建邻
     ipv6 address 2002:2201:104:8005::1/64 
     ospfv3 10 area 0.0.0.0
     
    #配置缺省
    ipv6 route-static 2002:2201:104:8000:: 49 NULL0  #国人的优秀思想,先让防环路由加表,再宣告
    ipv6 route-static FEC0:: 16 NULL0 
    ipv6 route-static FEC0::4 128 2002:2201:104:45::1  #让4、5环回可达
    #配置BGP
    bgp 64512
     router-id 5.5.5.5
     confederation id 2   #声明最大的AS号,用于联邦
     peer FEC0::4 as-number 1 
     peer FEC0::4 ebgp-max-hop 2 
     peer FEC0::4 connect-interface LoopBack0 FEC0::5
     peer FEC0::6 as-number 64512 
     peer FEC0::6 connect-interface LoopBack0 FEC0::5
     
     ipv6-family #在BGP里进入ipv6-family
      network 2002:2201:104:8000:: 49  #宣告汇总
      network FEC0:: 16 #宣告环回
      peer FEC0::4 enable
      peer FEC0::6 enable
      peer FEC0::6 next-hop-local  #修改下一跳为本地
    

    AR6

    #配置ipv6和ospfv3
    ipv6  #开启,然后在接口上调用
    ospfv3 10  #开启 然后在接口上调用
     router-id 6.6.6.6
    interface GigabitEthernet0/0/0
     ipv6 enable  
     ipv6 address 2002:2201:104:8067::1/64 
     ospfv3 10 area 0.0.0.0
    interface GigabitEthernet0/0/1
     ipv6 enable  
     ipv6 address 2002:2201:104:8056::2/64 
     ospfv3 10 area 0.0.0.0
    interface LoopBack0
     ipv6 enable 
     ipv6 address FEC0::6/128 
     ipv6 address 2002:2201:104:8006::1/64 
     ospfv3 10 area 0.0.0.0
    #配置BGP
    bgp 64512
     router-id 6.6.6.6
     confederation id 2 #声明最大的AS号
     peer FEC0::5 as-number 64512 
     peer FEC0::5 connect-interface LoopBack0 FEC0::6
     peer FEC0::7 as-number 64512 
     peer FEC0::7 connect-interface LoopBack0 FEC0::6
     
     ipv6-family  #在BGP里进入ipv6-family
      peer FEC0::5 enable
      peer FEC0::5 reflect-client  #这里让AR6成为反射器,使AR5成为客户端,解决IBGP水平分割
      peer FEC0::7 enable
    
    

    AR7

    #配置ipv6和ospfv3
    ipv6  #开启,然后在接口上调用
    ospfv3 10  #开启 然后在接口上调用
     router-id 7.7.7.7
    interface GigabitEthernet0/0/0
     ipv6 enable  
     ipv6 address 2002:2201:104:8078::1/64 
     ospfv3 10 area 0.0.0.0
    interface GigabitEthernet0/0/1
     ipv6 enable  
     ipv6 address 2002:2201:104:8067::2/64 
     ospfv3 10 area 0.0.0.0
    interface LoopBack0
     ipv6 enable 
     ipv6 address FEC0::7/128 
     ipv6 address 2002:2201:104:8007::1/64 
     ospfv3 10 area 0.0.0.0
    #配置BGP
    bgp 64512
     router-id 7.7.7.7
     confederation id 2  #声明最大的AS号
     confederation peer-as 64513  #声明旁边的小AS号
     peer FEC0::6 as-number 64512 
     peer FEC0::6 connect-interface LoopBack0 FEC0::7
     peer FEC0::8 as-number 64513 
     peer FEC0::8 ebgp-max-hop 2 #两个小AS之间也要修改TTL
     peer FEC0::8 connect-interface LoopBack0 FEC0::7
    
     ipv6-family #在BGP里进入ipv6-family
      peer FEC0::6 enable
      peer FEC0::6 next-hop-local #修改下一跳
      peer FEC0::8 enable
     #配置缺省
     ipv6 route-static FEC0::8 128 2002:2201:104:8078::2  #使AR7,AR8环回可达
    

    AR8

    #配置ipv6和ospfv3
    ipv6  #开启,然后在接口上调用
    ospfv3 10  #开启 然后在接口上调用
     router-id 8.8.8.8
    interface GigabitEthernet0/0/1
     ipv6 enable  
     ipv6 address 2002:2201:104:8078::2/64 
     ospfv3 10 area 0.0.0.0
    interface LoopBack0
     ipv6 enable 
     ipv6 address FEC0::8/128 
     ipv6 address 2002:2201:104:8008::1/64 
     ospfv3 10 area 0.0.0.0
    #配置BGP
    bgp 64513
     router-id 8.8.8.8
     confederation id 2  #声明最大的AS号
     confederation peer-as 64512
     peer FEC0::7 as-number 64512 
     peer FEC0::7 ebgp-max-hop 2 
     peer FEC0::7 connect-interface LoopBack0 FEC0::8
    
     ipv6-family  #在BGP里进入ipv6-family 
      peer FEC0::7 enable
    #配置缺省
    ipv6 route-static FEC0::7 128 2002:2201:104:8078::1  #使AR7,AR8环回可达
    

    程序运行效果图

    在这里插入图片描述

    在这里插入图片描述

    总结

    整个实验环境相对复杂,基于v4与v6的共存期。许多配置都在v4的基础上,加上v6特性。v6的IP地址比较长,分配地址需要计算,但它有足够大的IP地址空间。在配置中我们可以看到一个接口上可以配置多个v6地址,v4地址的话会有覆盖效果。v6的协议配置也相对简单,大多都在接口外开启,在接口里调用。

    展开全文

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,126
精华内容 450
关键字:

ipv6实验