IPv6命令行配置

匿名 (未验证) 提交于 2019-12-03 00:21:02
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网络如实验拓扑所示,请根据如下需求对网络进行部署:

  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

文章来源: IPv6命令行配置
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!