IPv6命令行配置

IPv6基础配置命令

ipv6 neighbor ipv6-address mac-addressipv6
//使能设备转发IPv6单播报文,包括本地IPv6报文的发送与接收。
ipv6 address anycast
//用来配置IPv6任播地址。
ipv6 address auto global
//使能无状态自动生成IPv6全局地址功能。
ipv6 address auto link-local
//配置自动生成的链路本地地址。
ipv6 address link-local
//配置接口的链路本地地址
ipv6 address eui-64
//配置接口的EUI-64格式的全球单播地址

ipv6 enable
//接口上使能IPv6功能。
ipv6 icmp blackhole unreachable send
//使能在匹配IPv6黑洞路由后回应ICMP目的不可达报文的功能。
ipv6 icmp redirect send
//使能系统发送ICMPv6重定向报文功能。
ipv6 icmp port-unreachable send
//使能接口的ICMPv6端口不可达报文的发送功能。
ipv6 icmp hop-limit-exceeded send
//使能接口的ICMPv6跳数超大报文的发送功能。
ipv6 icmp receive
//使能系统接收ICMPv6报文功能。
//缺省情况下,系统接收ICMPv6报文的功能处于使能状态。
ipv6 icmp send
//使能系统发送ICMPv6报文功能。
ipv6 icmp too-big-rate-limit
//使能ICMPv6超大差错报文接收抑制功能。

ipv6 mtu
//置接口上发送IPv6报文的MTU。
//缺省情况下,接口的IPv6的MTU值为1500字节。
ipv6 nd autoconfig managed-address-flag
//设置RA报文中的有状态自动配置地址的标志位。
//缺省情况下,没有设置有状态自动配置地址的标志位。
/* 如果设置了该标志位,则主机通过有状态自动配置获得IPv6地址。
   如果清除了该标志位,则主机通过无状态自动配置获得IPv6地址,即通过RA报文向主机发布IPv6地址前缀信息自动生成IPv6地址。*/
ipv6 nd autoconfig other-flag
//设置RA报文中的有状态自动配置其他信息的标志位。
//缺省情况下,系统未设置有状态自动配置其他信息的标志位。
/* 
    如果设置了该标志位,则主机可通过有状态自动配置获得除IPv6地址外的其他配置信息,包括路由器生存时间、邻居可达时间、邻居的重传时间、链路的MTU信息。
    如果清除了该标志位,则主机进行无状态自动配置。即路由设备通过RA报文向主机发布除IPv6地址外的其他配置信息,包括路由器生存时间、邻居可达时间、邻居的重传时间、链路的MTU信息。
  */
ipv6 nd dad attempts
//配置系统进行重复地址检测DAD时发送邻居请求报文的次数。
//缺省情况下,系统进行重复地址检测时发送邻居请求报文的次数是1。
ipv6 nd hop-limit
//配置由设备初始发送的IPv6单播报文的跳数限制。
//缺省情况下,由路由设备初始发送的IPv6单播报文的跳数限制是64。
ipv6 nd learning strict
//配置IPv6 ND严格学习。
ipv6 nd neighbor-limit 1024
//配置接口上允许动态学习的邻居表项的最大个数。
ipv6 nd ns multicast-enable
//使能QinQ或Dot1q终结子接口发送NS组播报文的功能。
ipv6 nd ns retrans-timer
//设置系统发送邻居请求报文的时间间隔。
//缺省情况下,系统发送邻居请求报文的时间间隔是1000毫秒。
ipv6 nd nud reachable-time
//来配置IPv6邻居节点的可达时间。
//缺省情况下,IPv6邻居节点的可达时间为1200000毫秒。
ipv6 nd ra
//置RA(Router Advertisement)报文的发布时间间隔。
//缺省情况下,最大时间间隔是600秒,最小时间间隔是200秒。
ipv6 nd ra halt
//去使能系统发布RA报文功能。
//缺省情况下,系统发布RA报文功能处于未使能状态。
ipv6 nd ra hop-limit 64
//配置RA报文的跳数限制。
ipv6 nd ra preference medium {high | medium | low }
//配置RA报文中的默认路由器优先级信息。
ipv6 nd ra prefix
//配置RA报文中的前缀信息。
ipv6 nd ra route-information
//配置RA报文中的路由选项信息。
ipv6 nd ra router-lifetime
//配置RA报文的存活时间。
ipv6 nd stale-timeout 1200
 //配置邻居表项在STALE状态的老化时间。
  //缺省情况下,系统视图邻居表项STALE状态的老化时间是1200秒;
  //接口视图未配置邻居表项STALE状态的老化时间。
  ipv6 neighbor ipv6-address mac-address
  //配置静态邻居表项信息。
  ipv6 pathmtu
  //配置到指定IPv6目的地址的PMTU值。
  ipv6 pathmtu age
  //配置动态PMTU表项的老化时间。
  ipv6 soft-forward enhance enable
  //使能设备产生的IPv6控制报文的增强转发功能。
  dns relay ipv6 enable
  //开启IPv6 DNS Relay功能。
  dns server ipv6
  //配置实现动态域名解析的DNS服务器的IPv6地址。
  dns server ipv6 source-ip
  //配置本端作为DNS客户端与DNS服务端通信时的源IPv6地址。
  dns spoofing ipv6
  //使能IPv6 DNS Spoofing功能,并指定欺骗性应答的IPv6地址。
ipv6 host
//来配置IPv6静态域名解析表项。

IPv6综合实验

实验拓扑如下:

这里写图片描述

图:IPv6综合实验拓扑

实验要求:

IPv6网络如实验拓扑所示,请根据如下需求对网络进行部署:

  1. R1,R2和R3之间运行OSPFv3,区域ID为0,Router ID分别为10.1.1.1,10.2.2.2,10.3.3.3;
  2. R4,R5和R6之间运行ISIS IPv6区域ID为49.0001,并且都是Level-2级别路由器;
  3. R2和R4间的网络是一个纯IPv4网络,运行的是OSPFv2,区域ID为0,包含Loopback地址;
  4. R6,R7间的网络是纯IPv4网络,建立ISIS IPv4邻居,区域ID为49.0001;
  5. R1,R2和R3之间建立全互连IBGP4+ IPv6邻居关系,AS号为100,且R2向AS100通告默认路由;R4和R5建立IBGP4+ IPv6邻居关系,AS号为200;
  6. R2与R4间使用GRE手工隧道,隧道的地址为2001:db8:24::/64,R2和R4之间通过直连IPv6地址建立EBGP IPv6邻居关系;要求R2 将AS100中的2001:db8:100:00通告给AS200;
  7. 在R4和R5上要求将ISIS IPv6路由引入进BGP,保证AS100和AS200所有IPv6网段间的互通;
  8. R7的G0/0/1下用户连接到网络后有状态自动获取IPv6地址,DNS为R1。这里使用R8来模拟一台IPv6终端;
  9. R6和R7间使用6to4隧道,保证R7能Ping通AS200内的IPv6网络。

配置文件:

AR1:

<AR1>display current-configuration 
#
 sysname AR1
#
ipv6 
#
ospfv3 1
 router-id 10.1.1.1
#
interface GigabitEthernet0/0/0
 ipv6 enable 
 ipv6 address 2001:DB8:100::1/64 
 ospfv3 1 area 0.0.0.0
#
interface LoopBack0
 ip address 10.1.1.1 255.255.255.255 
 ospfv3 1 area 0.0.0.0
#
bgp 100
 router-id 10.1.1.1
 undo default ipv4-unicast
 peer 2001:DB8:100::2 as-number 100 
 peer 2001:DB8:100::3 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
 #
 ipv6-family unicast
  undo synchronization
  peer 2001:DB8:100::2 enable
  peer 2001:DB8:100::3 enable
#
return

AR2:

<AR2>dis current-configuration 
#
 sysname AR2
#
ipv6 
#
ospfv3 1
 router-id 10.3.3.3
#
interface GigabitEthernet0/0/0
 ipv6 enable 
 ipv6 address 2001:DB8:100::2/64 
 ospfv3 1 area 0.0.0.0
#
interface GigabitEthernet0/0/1
 ip address 192.168.24.2 255.255.255.0 
#
interface LoopBack0
 ip address 10.2.2.2 255.255.255.255 
 ospfv3 1 area 0.0.0.0
#
interface Tunnel0/0/0
 ipv6 enable 
 ipv6 address 2001:DB8:24::2/64 
 tunnel-protocol gre
 source 192.168.24.2
 destination 192.168.24.4
#
bgp 100
 router-id 10.2.2.2
 peer 2001:DB8:24::4 as-number 200 
 peer 2001:DB8:100::1 as-number 100 
 peer 2001:DB8:100::3 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
 #
 ipv6-family unicast
  undo synchronization
  network 2001:DB8:100:: 64 
  peer 2001:DB8:24::4 enable
  peer 2001:DB8:100::1 enable
  peer 2001:DB8:100::1 default-route-advertise
  peer 2001:DB8:100::3 enable
  peer 2001:DB8:100::3 default-route-advertise
#
ospf 1 router-id 10.2.2.2 
 area 0.0.0.0 
  network 10.2.2.2 0.0.0.0 
  network 192.168.24.0 0.0.0.255 
#
return

AR3:

<AR3>dis current-configuration 
#
 sysname AR3
#
ipv6 
#
ospfv3 1
 router-id 10.2.2.2
#
interface Serial4/0/0
 link-protocol ppp
 ip address 192.168.35.3 255.255.255.0 
#
interface GigabitEthernet0/0/0
 ipv6 enable 
 ipv6 address 2001:DB8:100::3/64 
 ospfv3 1 area 0.0.0.0
#
interface LoopBack0
 ip address 10.3.3.3 255.255.255.255 
 ospfv3 1 area 0.0.0.0
#
bgp 100
 router-id 10.3.3.3
 undo default ipv4-unicast
 peer 2001:DB8:100::1 as-number 100 
 peer 2001:DB8:100::2 as-number 100 
 #
 ipv4-family unicast
  undo synchronization
 #
 ipv6-family unicast
  undo synchronization
  peer 2001:DB8:100::1 enable
  peer 2001:DB8:100::2 enable
#
return

AR4:

<AR4>dis current-configuration 
#
 sysname AR4
#
ipv6 
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 49.0001.0000.0000.0004.00
 #
 ipv6 enable topology standard
 ipv6 default-route-advertise always 
 #
interface GigabitEthernet0/0/0
 ip address 192.168.24.4 255.255.255.0 
 isis enable 1
#
interface GigabitEthernet0/0/1
 ipv6 enable 
 ipv6 address 2002:A06:606:46::4/64 
 isis ipv6 enable 1
#
interface LoopBack0
 ip address 10.4.4.4 255.255.255.255 
#
interface Tunnel0/0/0
 ipv6 enable 
 ipv6 address 2001:DB8:24::4/64 
 tunnel-protocol gre
 source 192.168.24.4
 destination 192.168.24.2
#
bgp 200
 router-id 10.4.4.4
 undo default ipv4-unicast
 peer 2001:DB8:24::2 as-number 100 
 peer 2002:A06:606:56::5 as-number 200 
 #
 ipv4-family unicast
  undo synchronization
 #
 ipv6-family unicast
  undo synchronization
  import-route isis 1
  peer 2001:DB8:24::2 enable
  peer 2002:A06:606:56::5 enable
  peer 2002:A06:606:56::5 next-hop-local 
#
ospf 1 router-id 10.4.4.4 
 area 0.0.0.0 
  network 10.4.4.4 0.0.0.0 
  network 192.168.24.0 0.0.0.255 
#
return

AR5:

<AR5>dis current-configuration  
#
 sysname AR5
#
ipv6 
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 49.0001.0000.0000.0005.00
 #
 ipv6 enable topology standard
#
interface Serial4/0/0
 link-protocol ppp
 ip address 192.168.35.5 255.255.255.0 
#
interface Serial4/0/1
 link-protocol ppp
#
interface GigabitEthernet0/0/0
 ipv6 enable 
 ipv6 address 2002:A06:606:56::5/64 
 isis ipv6 enable 1
#
interface LoopBack0
 ip address 10.5.5.5 255.255.255.255 
 isis enable 1
#
bgp 200
 router-id 10.5.5.5
 undo default ipv4-unicast
 peer 2002:A06:606:46::4 as-number 200 
 #
 ipv4-family unicast
  undo synchronization
 #
 ipv6-family unicast
  undo synchronization
  import-route isis 1
  peer 2002:A06:606:46::4 enable
#
return

AR6:

<AR7>dis current-configuration  
#
 sysname AR7
#
ipv6 
#
dhcp enable
#
dhcpv6 pool pool
 address prefix 2002:A07:707::/64
 dns-server 2001:DB8:100::1
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 49.0001.0000.0000.0007.00
 #
 ipv6 enable topology standard
 #
interface GigabitEthernet0/0/0
 ip address 192.168.67.7 255.255.255.0 
 isis enable 1
#
interface GigabitEthernet0/0/1
 ipv6 enable 
 ipv6 address 2002:A07:707::7/64 
 undo ipv6 nd ra halt
 ipv6 nd autoconfig other-flag
 isis ipv6 enable 1
 dhcpv6 server pool
#
interface LoopBack0
 ip address 10.7.7.7 255.255.255.255 
 isis enable 1
#
interface Tunnel0/0/0
 ipv6 enable 
 ipv6 address 2002:A07:707:67::7/64 
 tunnel-protocol ipv6-ipv4 6to4
 source LoopBack0
#
ipv6 route-static :: 0 Tunnel0/0/0 
#
return

AR7:

<AR8>dis current-configuration 
#
 sysname AR8
#
ipv6 
#
dhcp enable
#
interface GigabitEthernet0/0/0
 ipv6 enable 
 ipv6 address auto link-local
 ipv6 address auto dhcp
 //配置通过dhcpv6获取IP地址
#
return

第1章 IPv6基础配置.............................................................................................................1-1 1.1 IPv6简介............................................................................................................................1-1 1.1.1 IPv6协议特点..........................................................................................................1-1 1.1.2 IPv6地址介绍..........................................................................................................1-3 1.1.3 IPv6邻居发现协议介绍...........................................................................................1-6 1.1.4 IPv6 PMTU发现.......................................................................................................1-8 1.1.5 IPv6 DNS简介.........................................................................................................1-9 1.1.6 协议规范..................................................................................................................1-9 1.2 配置IPv6基本功能...........................................................................................................1-10 1.2.1 使能IPv6功能........................................................................................................1-10 1.2.2 配置IPv6单播地址.................................................................................................1-10 1.3 配置IPv6邻居发现协议....................................................................................................1-12 1.3.1 配置静态邻居表项..................................................................................................1-12 1.3.2 配置接口上允许动态学习的邻居的最大个..........................................................1-12 1.3.3 配置RA消息的相关参.........................................................................................1-12 1.3.4 配置重复地址检测时发送邻居请求消息的次......................................................1-15 1.4 配置PMTU发现................................................................................................................1-15 1.4.1 配置指定地址的静态PMTU....................................................................................1-15 1.4.2 配置PMTU老化时间..............................................................................................1-15 1.5 配置TCP6.........................................................................................................................1-16 1.6 配置IPv6 FIB转发功能.....................................................................................................1-17 1.7 配置指定时间内发送ICMPv6差错报文的最大个..........................................................1-17 1.8 配置IPv6 DNS..................................................................................................................1-18 1.8.1 配置静态IPv6 DNS................................................................................................1-18 1.8.2 配置动态IPv6 DNS................................................................................................1-18 1.9 IPv6基础显示和维护........................................................................................................1-19 1.10 IPv6基础典型配置举例..................................................................................................1-20 第2章 IPv6应用配置.............................................................................................................2-1 2.1 IPv6应用简介.....................................................................................................................2-1 2.2 Ping IPv6操作....................................................................................................................2-1 2.3 Traceroute IPv6操作.........................................................................................................2-1 2.4 TFTP IPv6操作..................................................................................................................2-2 2.4.1 配置准备..................................................................................................................2-3 2.4.2 TFTP配置................................................................................................................2-3 H3C S3610&S5510 系列以太网交换机 操作手册 IPv6 配置 目 录 ii 2.5 Telnet IPv6操作.................................................................................................................2-4 2.5.1 配置准备..................................................................................................................2-4 2.5.2 建立IPv6 Telnet连接................................................................................................2-4 2.5.3 IPv6 Telnet显示.......................................................................................................2-4 2.6 IPv6应用典型配置举例......................................................................................................2-5 2.6.1 组网需求..................................................................................................................2-5 2.6.2 组网图......................................................................................................................2-5 2.6.3 配置步骤..................................................................................................................2-5 2.7 IPv6应用故障诊断与排除..................................................................................................2-7 2.7.1 无法Ping远端的目的地址.....................................................................................2-7 2.7.2 无法实现Traceroute................................................................................................2-7 2.7.3 无法实现TFTP.........................................................................................................2-7 2.7.4 无法实现Telnet........................................................................................................2-8 第3章 双协议栈配置..............................................................................................................3-1 3.1 过渡技术简介.....................................................................................................................3-1 3.2 双协议栈简介.....................................................................................................................3-1 3.3 配置双协议栈.....................................................................................................................3-2 3.3.1 配置设备运行时支持IPv4/IPv6双协议栈模式..........................................................3-2 3.3.2 配置双协议栈...........................................................................................................3-2 3.4 显示设备运行模式..............................................................................................................3-3 第4章 隧道技术配置..............................................................................................................4-1 4.1 隧道技术简介.....................................................................................................................4-1 4.1.1 IPv6 in iPv4隧道原理..............................................................................................4-1 4.1.2 配置隧道和自动隧道................................................................................................4-2 4.1.3 IPv6 in IPv4隧道模式..............................................................................................4-2 4.1.4 快速终结..................................................................................................................4-3 4.2 隧道技术配置任务简介.......................................................................................................4-4 4.3 配置手动隧道.....................................................................................................................4-4 4.3.1 配置准备..................................................................................................................4-4 4.3.2 配置手动隧道...........................................................................................................4-5 4.3.3 配置举例..................................................................................................................4-6 4.4 配置IPv4兼容IPv6自动隧道..............................................................................................4-8 4.4.1 配置准备..................................................................................................................4-8 4.4.2 配置IPv4兼容IPv6自动隧道...................................................................................4-8 4.4.3 配置举例..................................................................................................................4-9 4.5 配置6to4隧道..................................................................................................................4-12 4.5.1 配置准备................................................................................................................4-12 4.5.2 配置6to4隧道.......................................................................................................4-12 4.5.3 配置举例................................................................................................................4-13 H3C S3610&S5510 系列以太网交换机 操作手册 IPv6 配置 目 录 iii 4.6 配置ISATAP隧道..............................................................................................................4-16 4.6.1 配置准备................................................................................................................4-16 4.6.2 配置ISATAP隧道...................................................................................................4-16 4.6.3 配置举例................................................................................................................4-18 4.7 隧道技术显示...................................................................................................................4-20 4.8 常见错误配置举例............................................................................................................4-20
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值