Ipv6实验

一、华为

思科与华为在接口启用ipv6

思科会自动产生local地址

华为不会自动产生local地址

以太网接口有mac地址,所以肯定是有eui64

serial接口是没有mac地址,他主要是使用ppp pppo的各种协议数据。但是可以使用背板的mac形成eui64,但是有很多serial接口使用一个背板接口mac产生的后64位的eui64是相同的,但是不会产生冲突,因为不同的接口用于不同的网络,链路的前缀是不相同的,所以eui64的前64位是不同的,所以后64位接口ID相同没有问题。

思科全局下不启用ipv6 unicast-rout,接口下启用ipv6可以使用,但是默认路由只能访问到互联路由器的ipv6地址,跨设备不能访问。

R2------------------------------R1

G0/0/1                         G0/0/0

R2:

ipv6  1.开启ipv6功能,可以配置ipv6地址。2.允许使用ipv6路由协议

interface gi 0/0/1

ipv6 enable  1.华为开启ipv6功能

1.思科表示开启ipv6功能

2.自动产生eui64地址

ipv6 address fe80::2 link-local   link-local没有掩码

display ipv6 inter gi 0/0/0

查看ipv6 mac

查看被请求节点组播地址FF02::1

FF02::2代表开启了动态路由选择功能

FF02::1如果没有开启动态路由选择功能,仅仅是普通路由器只能看到这个信息

R1:

ipv6

int g0/0/0

ipv6 enable

display ipv6 interface brief  看到FF:FE标识,那么就是EUI64获得的地址

show ipv6 interface brief

int g0/0/0

ip add fe80::1 link-local

R1:

ipv6

intr gi 0/0/0

ipv6 enable

ipv6 address auto link-local   link-local没有掩码

ping ipv6 fe80::2 -i gi 0/0/0

1.对ipv6做ping测试,由于所有的link-local都是fe80,所以使用结点ping ipv6要告诉路由器出接口,如果不指定出接口的话是不会知道要ping哪个link-local对象的。

2.link-local效率高,一般路由协议路由地址下一跳为link-local地址。AGUA可以用来做下一跳地址,但是会改变。AGUA下一跳效率低。

======================================================

二、思科

全局不开启ipv6功能,也可以在接口配置ipv6地址,但是这么使用路由器就是单纯的PC

不会有FF02::2的组播地址

不会有200s一次的RA给其他节点,对端节点不会动态的获得AGUA地址

R2------------------------------R1

E1/1                             E1/0

R1:

int e1/0

ipv6 enable

show ipv6 interface brief  看到FF:FE标识,那么就是EUI64获得的地址

int e1/0

ipv6 address autoconfig

作为SLAC客户端,设置为无状态自动获取IP地址,通过NDP的RA做地址通告

show ipv6 interface brief

int e1/0

ip add fe80::1 link-local

show ipv6 int e1/0

Ethernet1/0 is up, line protocol is up

IPv6 is enabled, link-local address is FE80::CE00:34FF:FE84:10

No Virtual link-local address(es):

No global unicast address is configured

Joined group address(es):

FF02::1

FF02::1:FF84:10

MTU is 1500 bytes

ICMP error messages limited to one every 100 milliseconds

ICMP redirects are enabled

ICMP unreachables are sent

ND DAD is enabled, number of DAD attempts: 1

ND reachable time is 30000 milliseconds

R1:

Ipv6 unicast-routing启用ipv6路由协议功能

show ipv6 int e1/0

看到

ff02::2

ND routr advretismnt通告

ND advertised retransmit interval is 0 milliseconds

ND router advertisements are sent every 200 seconds

ND router advertisements live for 1800 seconds

R1将ND通告给R2,令R2通过SLAAC的方式获取IPV6地址,这就要注意R1接口的RA要开启来,就是ipv6 unicast-routing开起来,动态路由选择功能开启来,接口才能发送RA报文。

--------思科接口默认开启RA

--------华为设备默认关闭RA通告,接口下使用undo ipv6 nd ra halt

为什么华为要关闭,当一条链路1.不需要nd ra获得agua地址,2.没有ipv6 dhcp也不需要开启这个功能。这可以节省资源,不影响接口带宽,保证安全性:被探测到网关信息,前缀信息。

思科关闭RA,使用ipv6 nd ra supprss

R1#ping FE80::CE01:34FF:FE84:11

Output Interface: ethernet1/0

======================================================================================

三、地址自动获取

华为:

R2------------------------------R1

G0/0/1                         G0/0/0

1.开启AGUA地址自动选举:

R2:

ipv6

interface gi 0/0/1

ipv6 enable

ipv6 address auto global

自动获取AGUA地址,如果是PC那么自动产生网关默认路由指向发送给你RA的路由器。

如果是一台路由器,收到别人发送的RA,那么通过EUI64形成AGUA,但是不会自动指默认路由。要想拿到指向网关的路由需要配置为:

ipv6 address auto global default

指向网关的路由,路由是通过AGUA报文拿到的,要开放使能AGUA功能

由于华为默认关闭AGUA,所以开启AGUA功能

R1:

ipv6

interface gi 0/0/0

undo ipv6 nd ra halt

R2:

dis ipv6 interface gi 0/0/1

global unicast address:

2001::12:2e0:5849

dis ipv6 route

Destination  : ::                             PrefixLength : 0

NextHop      : ::2001::12:2e0:5849                          Preference   : 0

Cost         : 0                               Protocol     : Direct

RelayNextHop : ::                              TunnelID     : 0x0

Interface    : InLoopBack0                     Flags        : D

2.多个网关优先级选取

interface gi 0/0/0

ipv6 nd ra preference high

思科:

R2------------------------------R1

E1/1                             E1/0

R2:

interface e1/1

no shutdown

ipv6 address autoconfig

自动获取AGUA地址,如果是PC那么自动产生网关默认路由指向发送给你RA的路由器。

如果是一台路由器,收到别人发送的RA,那么通过EUI64形成AGUA,但是不会自动指默认路由。要想拿到指向网关的路由需要配置为:ipv6 address autoconfig default

R1:

interface e1/0

no shutdown

ipv6 address autoconfig

ipv6 nd router-preference high

多个网关优先级选取,默认为high

路由器的常规操作

R2:

interface e1/1

no ipv6 address autoconfig

先清除再添加,不能覆盖

ipv6 address autoconfig default

show ipv6 interface brief

通过NDRP获得默认路由

show ipv6 route

hsrpv2或者vrrpv3优先级由于ipv6网关优先级 nd router-preference high

四、DHCP

1.由于AGUA只能使邻居获得一个AGUA地址和网关,默认路由,除此之外没有其他功能,所以使用dhcp补足

主要地址信息SLAAC:ip地址、掩码、网关

辅助地址信息:DNS服务器、域名

2.DHCP+DNP SLAAC称为有状态地址自动配置:

2.1.dhcpv6有状态地址自动配置:dhcpv6功能强,除了网关地址以外,所有其他信息都能拿到。

2.2.dhcpv6无状态地址自动配置:只能获得辅助地址信息,所有主要信息都是通过NDP获得。

3.DHCPv6必须配合NDP获得地址,没有NDP,DHCPv6无法正常使用。

R2--------------R1---------------R3 dhcp

G0/0/1     G0/0/0 0/0/1      G0/0/0

R1:

inter g0/0/1

ipv6 enable

ipv6 address 2001:0:0:13::1/64

R3:

inter g0/0/0

ipv6 enable

ipv6 address 2001:0:0:13::3/64

ipv6 route-static 2001:0:0::12:: 64 gi 0/0/0 R1-linklocal地址

dhcp enable

dhcpv6 pool deer

address prefix 2001:0:0:12::/64

dns-domain-name deer.net

dns-server 1::1

excluded-address 2001:0:0:12::1 to 2001:0:0:12::10

dhcp服务器注意剔除网关地址

inter g0/0/0

dhcp select global 使用ipv4的命令,ipv6中不需要

dhcpv6 server tigerlab

当我收到dhcp的solicy之后,使用地址池的地址做回应

R1:

inter g0/0/0

ipv6 enable

ipv6 address 2001:0:0:12::1/64

undo ipv6 nd ra halt

ipv6 nd autoconfig managed-address-flag

ipv6 nd autoconfig other-flag

对于客户端通过dhcp拿到地址信息,RA报文设置M位与N位的配置都为1,如果都是0 0告诉你通过NDP来拿地址,就是LAAC无状态地址配置。

dhcpv6 relay destination 2001:0:0:13::3

将对端发送的ipv6地址获取请求,将他转换为单播跨网段中继到服务器

R2:

interface gi 0/0/1

ipv6 address auto link-local

对于源地址客户端,要获得ipv6地址,必须有link-local地址,因为发送solicit报文必须要有link-local为源地址,没有link-local不能发送solict报文

interface gi 0/0/1

ipv6 address auto dhcp <rapid-commit>

正常情况下4步获得地址,但是网络中有且只有一台dhcp背景下要想2步获得ipv6地址,可以添加rapid-commit

inter gi 0/0/1

shutdown

undo ipv6 address auto dhcp

ipv6 address auto dhcp

出现地址冲突重新获取方法

自动获取的IPv6地址为128,需要额外手工指静态路由

思科DHCPv6

R2------------R1------------R3

E1/1      E1/0  E1/1      E1/0

R3:

ipv6 unicast-routing

inter e1/0

no shutdown

ipv6 address 2001:0:0:13::3/64

ipv6 route 2001:0:0:12::/64 ethernet e1/0 2001:0:0:13::1

ipv6 dhcp pool deer

address prefix 2001:0:0:12::/64

domain-name deer.net

inter ethernet 1/0

ipv6 dhcp server deer

ipv6 dhcp必须要接口绑定dhcp server,否则不会响应客户端请求

R1:

ipv6 unicast

inter e1/1

no shutdown

ipv6 address 2001:0:0:13::1/64

interface e1/0

ipv6 enable

ipv6 address 2001:0:0:12::1/64

ipv6 nd managed-config-flag

ipv6 nd other-config-flag

对客户端要使用dhcp获得主要,辅助信息。

ipv6 dhcp relay destination 2001:0:0:13::3  ipv6中继命令

ip help-address ipv4的中继命令

R2:

interface e1/1

ipv6 enable获得link-local地址,发送solicy报文请求dhcpv6

ipv6 address dhcp <rapid-commit>

show ipv6 interface brief

show ipv6 route

发现没有路由,是因为路由器(自尊心太强)通过LSAAC拿到AGUA地址,我也不会拿发送地址的互联节点当我的网关地址。如果是PC,自动拿对端地址当做网关。所以使用工具进行路由器的路由添加:

ipv6 nd autoconfig default route

shutdown

no shutdown

show ipv6 route

ping 2001:0:0:12::1

当主机B的地址为128掩码,A地址为64掩码,由于B地址没有cover到A地址,所以B不能ping通A

===========================================================

五、ipv6路由协议

ipv6静态路由,下一跳最好是使用link-local地址,效率更高

R2--------------R1---------------R3

G0/0/1     G0/0/0 0/0/1      G0/0/0

华为ripng

R1:

ipv6

inter g0/0/1

ipv6 enable

ipv6 address 2001:0:0:13::1/64

inter g0/0/0

ipv6 enable

ipv6 address 2001:0:0:12::1/64

R2:

ipv6

inter lo 0

ipv6 enable

ip address 2::2/128

inter g0/0/1

ipv6 enable

ipv6 address 2001:0:0:12::2/64

R3:

ipv6

inter lo 0

ipv6 enable

ipv6 address 3::3/128

inter g0/0/0

ipv6 enable

ipv6 address 2001:0:0:13::3/64

R1:

ping ipv6 2001:0:0:12::2

ping ipv6 2001:0:0:13::3

进程下:

filter-policy路由过滤发列=distribute list

import-route重发布

接口下:

ipv6路由宣告只能通过接口进行

ripng default-route originate 通告默认路由与明细

ripng default-route originate only 只有默认路由

对于互联网边界只通告默认路由,不发送明细

metricin偏移列表,对接收路由进行跳数增加,只改大

metricout,对发送的路由进行修改

poison-reverse毒性逆转,将目的网络路由设置为16跳。2代水平分割,1代水平分割只会不发送不会设置metric。

summary address路由汇总

管理距离涉及到高层协议比较preference。度量值,对路径进行比较 cost。

R1:

ripng 100

inter lo 0

ripng 100 enable

inter gi 0/0/0

ripng 100 enable

inter gi 0/0/1

ripng 100 enable

R2:

ripng 100

inter lo 0

ripng 100 enable

inter gi 0/0/1

ripng 100 enable

R3:

ripng

inter lo 0

ripng 100 enable

inter g0/0/0

ripng 100 enable

R2:

display ipv6 routing-table protocol ripng

ping ipv6 -a 2::2 1::1

ping ipv6 -a 2::2 3::3

思科ripng

R2------------R1------------R3

E1/1      E1/0  E1/1      E1/0

R1:

ipv6 unicast-routing

inter lo 0

ipv6 address 1::1/128

inter e1/1

ipv6 address 2001:0:0:13::1/64

no shut

inter e1/0

ipv6 address 2001:0:0:12::1/64

no shut

R2:

ipv6 unicast-routing

inter lo 0

ipv6 address 2::2/128

inter e1/1

ipv6 address 2001:0:0:12::2/64

R3:

ipv6 unicast-routing

inter lo 0

ipv6 address 3::3/128

inter e1/0

ipv6 address 2001:0:0:13::3/64

no shut

R1:

ping 2001:0:0:12::2

ping 2001:0:0:13::3

ripng默认组播地址发送为ff02::9 521端口

R2:

ipv6 router rip 100

inter range loopback 0 , ethernet 1/1

ipv6 rip 100 enable

ipv6 rip 100 参数

<default-information><metric-offset><summary-address>

R1:

ipv6 router rip 100

inter range loopback 0 , ethernet 1/0

ipv6 rip 100 enable

R2:

show ipv6 route

ping 3::3 source 2::2

思科eigrp:

1.进程下的路由宣告功能可能默认为关闭

2.default-metric seed-metric外部进入本地必须有度量值的重新计算

3.variance不等价负载均衡

4.eigrpv6 32度量值的空间范围是2的32次

接口下只能启用进程宣告路由,功能有限

新版升级为:eigrp 64位度量值的空间范围是2的64次,命名式eigrp

将开启了ipv6的接口进行邻居自动建立。

R2:

ipv6 router eigrp 90

eigrp router-id 2.2.2.2

no shutdown

inter range loopback 0 , ethernet 1/1

ipv6 eigrp 90

R1:

router eigrp cclj

address family ipv6 unicast autonomous system 90

eigrp router id 1.1.1.1

no shutdown

1.默认这里ipv6接口邻居自动建立,不建立的端口要进行关闭宣告:

passive interface e1/100

2.可以关闭默认宣告属性:af interface default

passive还原为常规模式

af-interface e1/1 <authen认证><bandwidth接口对eigrp带宽><bfd><shut><next-hop-self><passive>

R3:

rouer eigrp cclj

address family ipv6 unicast autonomous system 90

eigrp router id 3.3.3.3

show ipv6 route eigrp

show eigrp address-family ipv6 90 neighbors

show eigrp address-family ipv6 90 topology

默认64位eigrp的度量值巨大,可以改小基数,但是要全网修改

address family ipv6 unicast autonomous system 90

metric rib-scale 100 度量值除100

==========================================================

华为 ospf

1.ospfv3将ospfv2的工作架构进行修改,1类2类LSA只有拓扑信息,没有路由信息,加入8类 9类LSA,主要添加了link-local与AGUA路由信息。

2.v3进程只能支持ipv6进程

3.思科v3,一个进程可以支持v4,v6版本

R2:

ospfv3 10

router-id 2.2.2.2

area 0

interface lo 0

ospfv3 10 area 0

interface gi 0/0/0

ospfv3 10 area 0

ospfv3 <cost接口度量值><mtu-ignore><network-type><peer单播邻居>

first DBD选取主从,mtu开启一致性检测,同时两边mtu不一致,邻居不能建立,卡在exstart状态。

华为默认关闭mtu检测,思科默认开启mtu检测。

R1:

ospfv3 10

router-id 1.1.1.1

area 0

inter lo 0

ospfv3 10 area 0

inter g0/0/0

ospfv3 10 area 0

inter g0/0/1

ospfv3 10 area 0

R3:

ospfv3 10

router-id 3.3.3.3

area 0

inter lo 0

ospfv3 10 area 0

inter gi0/0/0

ospfv3 10 area 0

display ospfv3 peer

display ospfv3 lsdb

R1:

display ipv6 routing-table protocol ospfv3

ping ipv6 -a 1::1 3::3

思科 ospfv3

R2:

ipv6 router ospf 110

router-id 2.2.2.2

interface range lo 0 , eth 1/1

ipv6 ospf 110 area 0 老版本ospv3宣告,不支持ipv4

show ipv6 ospf database

R1:

router ospfv3 110    新版本ospfv3支持ipv4 ipv6

router-id 1.1.1.1

address-family ipv6 unicast

area 0

interface range lo 0 , eth 1/1

ospfv3 110 ipv6 area 0

也可以

ospfv3 110 ipv4 area 0

R3:

router ospfv3 110

router-id 3.3.3.3

address-family ipv6 uni  地址簇下优先级更高

show ospfv3 ipv6 neighbor

show ospfv3 ipv6 database

show ospfv3 ipv4 neighbor

R2:

show ipv6 route ospf

ping 3::3 source 2::2

============================================

IS-IS

华为:

R2:

isis 15

network-entity 49.0123.0000.0000.0002.00

log-peer-change topology

is-level level-2

cost-style wide

既支持ipv4 ipv6必须宽度量值

ipv6 enable topology <standard><compatible>

数据库用于ipv4还是ipv6,还是共享数据库。

standard表示使用独立的数据库,思科是single topology。multiple topology独立数据库。

compatible使用共享数据库:节省资源,但是必须在接口同时开启ipv4 ipv6,否则拓扑会有不一致隐患的问题。

默认是独立数据库,所有的设备模式必须都是一致的。

interface loop 0

isis ipv6 enable 15

inter gi 0/0/1

isis ipv6 enable 15

R1:

isis 15

network-entity 49.0123.0000.0000.0001.00

log-peer-change topology

is-level level-2

cost-style wide

ipv6 enable topology standard

inter lo 0

isis ipv6 enable 15

inter g0/0/0

isis ipv6 enable 15

inter g0/0/1

isis ipv6 enable 15

R3:

isis 15

network-entity 49.0123.0000.0000.0003.00

log-peer-change topology

is-level level-2

cost-style wide

ipv6 enable topology standard

inter lo 0

isis ipv6 enable 15

inter g0/0/0

isis ipv6 enable 15

R1:

display isis peer

display isis lsdb

思科:

R1:

ipv6 unicast-rout

inter lo 0

ipv6 address 1::1/128

inter e1/0

ipv6 add 2001:0:0:12::1/64

no shutdown

inter e1/1

ipv6 add 2001:0:0:13::1/64

no shutdown

R2:

ipv6 unicast-rout

inter lo 0

ipv6 address 2::2/128

inter e1/1

ipv6 add 2001:0:0:12::2/64

no shut

R3:

ipv6 uni

inter lo 0

ipv6 add 3::3/128

inter e1/0

ipv6 add 2001:0:0:13::3/64

no shut

R2:

router isis

net 49.0123.0000.0000.0002.00

log-adjacency all

is-type level-2

metric-style wide

address-family ipv6 unicast

multi-topology

独立使用数据库,默认是single topology

inter ran lo 0 , eth 1/1

ipv6 router isis

R1:

router isis

net 49.0123.0000.0000.0001.00

log-adjacen all

is-type level-2

metric-style wide

address-family ipv6 uni

multi-topolgy

inter range lo 0 , ethernet 1/0 - 1

ipv6 router isis

R3:

router isis

net 49.0123.0000.0000.0003.00

log-adjacency all

is-type level-2

metric-style wide

address-family ipv6 uni

multi-topology

inter ran lo 0 , eth 1/0

ipv6 router isis

R1:

路由信息显示与ipv6相同,因为他没变过

show isis neighbors

show isis ipv6 unicast

show clns neighbors

show isis database

ping 3::3 source 1::1

最新文章

  1. [转]JS中对象与字符串的互相转换
  2. 手工加载DLL
  3. 在线阅读android源代码
  4. linux下查找某文件关键字
  5. [转] - 如何用QTcpSocket传送图片
  6. PISCES P4-vSwitch 安装以及一次失败的测试
  7. poj1984 带权并查集
  8. php redis 分布式类
  9. DB2 递归查询
  10. 用继承实现XYPoint和Circle两个类
  11. 关于用 MySQL 存储 Emoji
  12. JMS and ActiveMQ first lesson(转)
  13. QQ互联第三方登陆 redirect uri is illegal(100010)
  14. curl错误码说明
  15. Flex和Servlet结合上传文件报错(一)
  16. 《HelloGitHub》第 31 期
  17. MongoDB集群管理常用命令
  18. Nmap UDP扫描缓慢问题探究(无结果)
  19. Hdoj 2563.统计问题 题解
  20. ubuntu之视频转换(Avconv的使用)

热门文章

  1. Wayland比X11慢的若干解决办法
  2. postgresql VACUUM 不会从表中删除死行的三个原因
  3. Verilog设计指定寄存器数组在综合时使用block memory资源
  4. 硬件监控:grafana+prometheus+node_exporter
  5. 访问不通github的解决办法
  6. Day 13 13.1 refer反爬
  7. Appium的触屏操作&amp;设备交互api
  8. 前端下载图片、pdf、excel、world文件;前端下载图片和pdf文件;前端a标签下载图片和pdf文件;下载文件名称不生效原因
  9. IT之软件公司组织架构
  10. HttpClient 提交 JSON数据