ipv6环回地址是多少(ipv6环回地址配置)

ipv6环回地址是多少(ipv6环回地址配置)p style margin left 0 p p style margin left 0 strong NDP 隶属于 ipv6 strong p blockquote blockquote

大家好,我是讯享网,很高兴认识大家。




讯享网

 <p style="margin-left:0;"></p> <p style="margin-left:0;"><strong>NDP隶属于ipv6</strong></p> <blockquote> <p style="margin-left:0;">ICMPv6除了可以完成ICMPv4所有功能以外&#xff0c;多出一项功能为NDP。</p> <p style="margin-left:0;">Empty-----------incomplete---------------reachable</p> <p style="margin-left:0;">     |                                                               |</p> <p style="margin-left:0;">Probe------------delay----------------------------stale</p> </blockquote> <p style="margin-left:0;">开始是Empty没有发消息&#xff0c;发NS一瞬间为-incomplete&#xff0c;给响应了NA就是-reachable代表任何问题也没有&#xff0c;stale指邻接关系还有我不确定有没有问题&#xff0c;会发delay在这个状态会开启一个计时器如果结束范围内收到你的NA&#xff0c;回到reachable&#xff0c;如果没收到你的NA把状态变为probe我会在这个状态周期发NS等你回应NA&#xff0c;如果不回应回到Empty。Show ipv6 enable</p> <p style="margin-left:0;"></p> <h5 id="IPv6%E6%97%A0%E7%8A%B6%E6%80%81%E5%9C%B0%E5%9D%80%E8%87%AA%E5%8A%A8%E9%85%8D%E7%BD%AE%E7%9A%84%E7%BC%BA%E9%99%B7" style="margin-left:0px;">IPv6无状态地址自动配置的缺陷</h5> <blockquote> <ul><li style="margin-left:0px;">通过路由器间的RA来获得能上网的AGUA地址网关子网掩码---&#xff0c;无法得知DNS服务器&#xff0c;能给PC发的信息实在有限。</li><li style="margin-left:0px;">无状态地址自动配置完全依赖路由器&#xff0c;管理性弱。</li></ul> </blockquote> <p style="margin-left:0;"></p> <h5 id="DHCPv6%E6%8B%BF%E5%9C%B0%E5%9D%80%E6%9C%89%E4%B8%A4%E7%A7%8D%E6%8B%BF%E6%B3%95" style="margin-left:0px;">DHCPv6拿地址有两种拿法</h5> <blockquote> <ul><li style="margin-left:0px;">状态化DHCP的自动获悉&#xff0c;所有地址信息都找DHCPv6服务器。</li><li style="margin-left:0px;">无状态DHCP的自动获悉我只通过你获得DNS服务器域名等等。</li></ul> <p style="margin-left:0px;">网关必须得通过RA来获悉。</p> </blockquote> <p style="margin-left:0;"></p> <h5 id="ipv4%E4%B8%8Eipv6%E4%B8%ADDHCP%E5%8C%BA%E5%88%AB" style="margin-left:0px;">ipv4与ipv6中DHCP区别</h5> <blockquote> <ul><li style="margin-left:0px;"><strong>ipv4中&#xff1a;</strong>先弄服务器&#xff0c;然后pc开dhcp功能。</li><li style="margin-left:0px;"><strong>ipv6中&#xff1a;</strong>pc没有开启或不开启ipv6的选项&#xff0c;可以手工&#xff0c;也可以自动获悉&#xff0c;自动获悉靠RA拿&#xff0c;pc发的是RS。</li></ul> <p style="margin-left:0;">发RA是M和O位 。</p> <p style="margin-left:0;"></p> <p style="margin-left:0;"><strong>IPv6主要报文&#xff1a;</strong></p> <ul><li style="margin-left:0px;">Solicit客户端</li><li style="margin-left:0px;">Advertise服务器端</li><li style="margin-left:0px;">Request客户端</li><li style="margin-left:0px;">Reply服务器端</li></ul> <p style="margin-left:0;">IPv6通过DHCP拿地址可以就两步&#xff08;1&#xff09;和&#xff08;4&#xff09;。想获悉DHCPv6地址&#xff0c;接口必须有link-local地址。</p> <p style="margin-left:0;"></p> <p style="margin-left:0;">DHCPv6也可以做中继。</p> </blockquote> <p style="margin-left:0;"></p> <p style="margin-left:0;"><img alt="" height="284" src="https://i-blog.csdnimg.cn/blog_migrate/271c83d30fc2725b23b54df85e6df041.png" width="1027" /></p> <p style="margin-left:0;">R2和R4之间做DHCP&#xff0c;R2做DHCP服务器&#xff0c;R4通过DHCP去获悉地址信息。</p> <p style="margin-left:0;">R2想让他有发送RA的功能得启用ipv6功能&#xff1a;</p> <p style="margin-left:0;">R2&#xff1a;</p> <p style="margin-left:0;">R2&#xff08;config&#xff09;#ipv6 unicast-routing</p> <p style="margin-left:0;">R2进Ethernet0/0</p> <p style="margin-left:0;">R2&#xff08;config-if&#xff09;#ipv6 address 2001&#xff1a;1&#xff1a;1&#xff1a;24&#xff1a;&#xff1a;2/64</p> <p style="margin-left:0;">R2先把DHCP启起来&#xff1a;</p> <p style="margin-left:0;">R2&#xff08;config&#xff09;#service dhcp</p> <p style="margin-left:0;">R2&#xff08;config&#xff09;#ipv6 dhcp pool R2&#xff08;启地址池&#xff09;</p> <p style="margin-left:0;">R2&#xff08;config-dhcpv6&#xff09;#addess prefix  2001&#xff1a;1&#xff1a;1&#xff1a;24&#xff1a;&#xff1a;/64&#xff08;指定地址&#xff0c;设置前缀就行&#xff09;</p> <p style="margin-left:0;">R2&#xff08;config-dhcpv6&#xff09;#dns-server 2001&#xff1a;1&#xff1a;1&#xff1a;24&#xff1a;&#xff1a;2&#xff08;DNS服务器&#xff09;</p> <p style="margin-left:0;">R2&#xff08;config-dhcpv6&#xff09;#domain-name cisco.com&#xff08;域名&#xff09;</p> <p style="margin-left:0;">ipv6全局创建地址池还没完&#xff0c;你得接口调用地址池&#xff0c;进入发地址接口敲&#xff1a;ipv6 dhcp server R2</p> <p style="margin-left:0;">R2进入发地址接口Ethernet0/0</p> <p style="margin-left:0;">R2&#xff08;config-if&#xff09;#ipv6 dhcp server R2&#xff08;调用地址池&#xff09;</p> <p style="margin-left:0;">修改RA</p> <p style="margin-left:0;">R2&#xff08;config-if&#xff09;#ipv6 nd managed-config-flag&#xff08;这个是原本M位置0&#xff0c;现在置1了&#xff09;</p> <p style="margin-left:0;">拿地址一方&#xff1a;</p> <p style="margin-left:0;">R4&#xff1a;</p> <p style="margin-left:0;">进入接口Ethernet0/1</p> <p style="margin-left:0;">R4&#xff08;config-if&#xff09;#ipv6 enable&#xff08;必须有一个link-local地址&#xff09;</p> <p style="margin-left:0;">R4&#xff08;config-if&#xff09;#no shutdown</p> <p style="margin-left:0;">R4&#xff08;config-if&#xff09;#ipv6 address dhcp&#xff08;无状态地址自动配置直接4步交互&#xff0c;加enable是两步交互&#xff0c;两步安全性差&#xff09;</p> <p style="margin-left:0;">Show ipv6 interface brief</p> <p style="margin-left:0;">R4-------R2------------R1</p> <p style="margin-left:0;">R1为DHCP服务器R4为客户端&#xff0c;那么R2做中继敲&#xff1a;Ipv6 dhcp relay destination 跟服务器地址&#xff08;例2001&#xff1a;1&#xff1a;1&#xff1a;12&#xff1a;&#xff1a;1 可以跟接口 serial1/1可以通过这个接口发走&#xff0c;做中继你本身这个接口不能是dhcpserver&#xff09;</p> <p style="margin-left:0;"></p> <p style="margin-left:0;"><strong>分为IGP和EGP&#xff1a;</strong></p> <blockquote> <ul><li style="margin-left:0px;"><strong>IGP&#xff1a;</strong>RIPng<span style="color:#ff9900;"><strong>&#xff08;对应的RFC文档2080&#xff09;</strong></span>、OSPFv3<span style="color:#ff9900;"><strong>&#xff08;早先只支持ipv6&#xff0c;现在在Cisco既能ipv6又能ipv4&#xff09;&#xff08;OSPFv2和OSPFv3最大区别&#xff1a;在OSPFv2中靠一类和二类LSA来形成树形结构【包含拓扑信息和路由信息】OSPFv3设计的时候不再基于ip地址&#xff0c;画出的矢量图不在有ip地址&#xff0c;没办法计算ip路由&#xff0c;只能基于8类9类LSA计算link-local和AGUA路由&#xff09;&#xff08;对应的RFC文档2740&#xff09;、IS-IS&#xff08;最早属于OSI&#xff0c;现在在TCP/IP&#xff0c;在IPv6和IPv4中启用的是同一个is-is只能添加了TLV&#xff09;</strong></span></li><li style="margin-left:0px;"><strong>EGP&#xff1a;</strong>MP-BGP<span style="color:#ff9900;"><strong>&#xff08;RFC2545/2858&#xff0c;通过AFI</strong></span><span style="color:#a2e043;"><strong>【主地址簇的标识符】</strong></span><span style="color:#ff9900;"><strong>和一个SAFI</strong></span><span style="color:#a2e043;"><strong>【子地址簇的标识符】</strong></span><span style="color:#ff9900;"><strong>结合报文设计来支持ipv6&#xff09;</strong></span></li></ul> </blockquote> <p style="margin-left:0;">OSPFv2一个接口宣告进一个进程之后&#xff0c;如果这个时候路由器启用一个新的进程&#xff0c;新的进程的也宣告这个接口&#xff0c;这时新的进程也会通过这个接口不可能建立邻居&#xff0c;一个接口在OSPFv2中只能属于一个进程。</p> <p style="margin-left:0;">OSPFv3中有一个进程ID的概念&#xff0c;通过进程ID等于虚拟多个接口&#xff0c;就不用担心一个接口只能属于一个进程。</p> <p style="margin-left:0;"></p> <p style="margin-left:0;"><strong>OSPFv3中LSA&#xff1a;</strong></p> <p style="margin-left:0;"><img alt="" height="945" src="https://i-blog.csdnimg.cn/blog_migrate/dedca556cf34e4b9f87ab1f7ee4e2dd8.png" width="1200" /></p> <p style="margin-left:0;"></p> <p style="margin-left:0;">R2和R4之间&#xff1a;</p> <p style="margin-left:0;">R2去掉DHCPv6&#xff1a;</p> <p style="margin-left:0;">R2&#xff08;config&#xff09;#default interface Ethernet0/0</p> <p style="margin-left:0;">R4去掉DHCPv6&#xff1a;</p> <p style="margin-left:0;">R4&#xff08;config&#xff09;#default interface Ethernet0/1</p> <p style="margin-left:0;">R2&#xff1a;</p> <p style="margin-left:0;">进Ethernet0/0</p> <p style="margin-left:0;">R2&#xff08;config-if&#xff09;#ipv6 address 2001&#xff1a;1&#xff1a;1&#xff1a;24&#xff1a;&#xff1a;2/64</p> <p style="margin-left:0;">R4:</p> <p style="margin-left:0;">进入Ethernet0/1</p> <p style="margin-left:0;">R4&#xff08;config&#xff09;#ipv6 address 2001&#xff1a;1&#xff1a;1&#xff1a;24&#xff1a;&#xff1a;4/64</p> <p style="margin-left:0;">R4&#xff1a;ping 2001&#xff1a;1&#xff1a;1&#xff1a;24&#xff1a;&#xff1a;2</p> <p style="margin-left:0;">R4&#xff08;config&#xff09;#ipv6 unicast-routing</p> <p style="margin-left:0;">创建环回口&#xff1a;</p> <p style="margin-left:0;">R2:</p> <p style="margin-left:0;">进入loopback0&#xff1a;</p> <p style="margin-left:0;">R2&#xff08;config-if&#xff09;#ipv6  address 2&#xff1a;&#xff1a;2/128&#xff08;ipv6环回口掩码可以128位&#xff09;</p> <p style="margin-left:0;">R4&#xff1a;</p> <p style="margin-left:0;">进入loopback0&#xff1a;</p> <p style="margin-left:0;">R4&#xff08;config-if&#xff09;#ipv6 address 4&#xff1a;&#xff1a;4/128</p> <p style="margin-left:0;">Show ipv6 route</p> <p style="margin-left:0;">LC直连路由&#xff08;网络中只有这个路由&#xff0c;直接为128位就合并了&#xff09;</p> <p style="margin-left:0;">C直连路由&#xff08;接口所连接网络的直连路由&#xff09;</p> <p style="margin-left:0;">L直连路由&#xff08;在这个网络中我自身接口的主机路由&#xff09;</p> <p style="margin-left:0;">IPv6静态路由&#xff1a;</p> <p style="margin-left:0;">R4&#xff08;config&#xff09;#ipv6 route 2&#xff1a;&#xff1a;2/128&#xff08;前缀掩码&#xff09;Ethernet 0/1&#xff08;出接口&#xff09;写link-local地址&#xff08;下一跳写link-local地址&#xff09;</p> <p style="margin-left:0;">Show ipv6 route有了静态</p> <p style="margin-left:0;">清掉静态&#xff1a;R4&#xff1a;no</p> <p style="margin-left:0;">ipv6 route 2&#xff1a;&#xff1a;2/128&#xff08;前缀掩码&#xff09;Ethernet 0/1&#xff08;出接口&#xff09;写link-local地址&#xff08;下一跳写link-local地址&#xff09;</p> <p style="margin-left:0;">RIPng配置&#xff1a;</p> <p style="margin-left:0;">R4&#xff1a;</p> <p style="margin-left:0;">R4&#xff08;config&#xff09;#ipv6 router rip R4&#xff08;进程号&#xff0c;只具有本地意义&#xff09;</p> <p style="margin-left:0;">R4&#xff08;config-rtr&#xff09;#&#xff1f;</p> <p style="margin-left:0;">distance管理距离&#xff0c;默认120</p> <p style="margin-left:0;">distribute-list做路由过滤</p> <p style="margin-left:0;">maximum-paths指定最大负载均衡的路由条目数量</p> <p style="margin-left:0;">poison-reverse开启带有毒性逆转的水平分割</p> <p style="margin-left:0;">redistribution重分发</p> <p style="margin-left:0;">split-horizon正常水平分割</p> <p style="margin-left:0;">timers修改计时器</p> <p style="margin-left:0;">port修改端口号</p> <p style="margin-left:0;">RIPng基于UDP&#xff0c;IPv4中RIP的端口号为520&#xff0c;IPv6中RIPng的端口号为521。</p> <p style="margin-left:0;">Port 跟端口&#xff08;改这个直连的邻居之间都得改&#xff09; multicast-group 还跟组播地址</p> <p style="margin-left:0;">IPv6没有宣告语句&#xff0c;想宣告得进入接口&#xff0c;R4进入loop back 0和Ethernet 0/1&#xff0c;</p> <p style="margin-left:0;">R4&#xff08;config-if-range&#xff09;#ipv6 rip R4 enable&#xff08;把接口宣告进RIPng&#xff09;</p> <p style="margin-left:0;">R4&#xff08;config-if-range&#xff09;#ipv6 rip &#xff1f;</p> <p style="margin-left:0;">summary-address手工汇总</p> <p style="margin-left:0;">metric-offset偏移列表</p> <p style="margin-left:0;">default-information下方默认路由</p> <p style="margin-left:0;">R2&#xff1a;</p> <p style="margin-left:0;">进入loop back 0和Ethernet 0/0</p> <p style="margin-left:0;">R2&#xff08;config-if-range&#xff09;#ipv6 rip cisco enable</p> <p style="margin-left:0;">Show ipv6 route</p> <p style="margin-left:0;">RIP度量值还是使用“跳数”来计算</p> <p style="margin-left:0;">清掉RIP</p> <p style="margin-left:0;">R2&#xff08;config&#xff09;#no ipv6 router rip cisco</p> <p style="margin-left:0;">R4&#xff08;config&#xff09;#no ipv6 router rip R4</p> <p style="margin-left:0;">全局干掉RIP进程&#xff0c;默认接口也就干掉了&#xff01;</p> <p style="margin-left:0;"></p> <p style="margin-left:0;"><span style="color:#000000;">旧命令:</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#ipv6 router eigrp 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-rtr&#xff09;#eigrp router-id 4.4.4.4&#xff08;在ipv6中一定要设置路由器ID&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-rtr&#xff09;#no shutdown&#xff08;开启进程&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入接口宣告&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4进入loop back 0&#xff0c;Ethernet 0/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if&#xff09;#ipv6 eigrp 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">新式命令&#xff0c;及支持ipv4又支持ipv6&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router eigrp CCIE</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast autonomous-system 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#eigrp router-id 2.2.2.2</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#no shutdown</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;show ipv6 eigrp neighbors&#xff08;邻居已经建起来了&#xff0c;并且使用对端link-local地址做路由&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ipv6 route &#xff08;eigrp标识D&#xff0c;管理距离90&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">Ping 4&#xff1a;&#xff1a;4 source 2&#xff1a;&#xff1a;2</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#no router eigrp ccie</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;# no ipv6 eigrp 90</span></p> <p style="margin-left:0;"></p> <p style="margin-left:0;"><span style="color:#000000;">两种做法&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">老版命令&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#ipv6 router ospf 110 &#xff08;进程号只有本地意义&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-rtr&#xff09;#router-id 4.4.4.4 &#xff08;自动选也可以&#xff0c;但是选不到&#xff0c;因为路由器接口没有ip地址&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">宣告&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4进入 loop back 0&#xff0c;Ethernet 0/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if-range&#xff09;#ipv6 ospf 110 area 0&#xff08;接口级宣告&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2新型命令&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#router-id 2.2.2.2</span></p> <p style="margin-left:0;"><span style="color:#000000;">宣告&#xff1a;进入loopback 0 和 Ethernet 0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#ospfv3 110 ipv6 area 0</span></p> <p style="margin-left:0;"><span style="color:#000000;"> show ipv6 ospf neighbor 可以建立邻居&#xff0c;选DR和BDR</span></p> <p style="margin-left:0;"><span style="color:#000000;"> show ipv6 ospf neighbor detail可以看到邻居地址</span></p> <p style="margin-left:0;"><span style="color:#000000;"> show ipv6 ospf database看LSA </span></p> <p style="margin-left:0;"><span style="color:#000000;">宣告了每个接口都会划分一个接口ID。</span></p> <p style="margin-left:0;"><span style="color:#000000;">show ipv6 ospf database router看路由明细&#xff08;没有显示环回口信息&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">show ipv6 ospf database network</span></p> <p style="margin-left:0;"><span style="color:#000000;">show ipv6 ospf database link看8类LSA&#xff08;8类LSA结合1类2类LSA计算路由信息&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">show ipv6 ospf database prefix看9类LSA&#xff08;只通告了环回口的&#xff0c;没有通告物理接口&#xff0c;R4是DR&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">测试&#xff0c;接改点到点&#xff0c;让它没有</span><span style="color:#000000;">DR</span><span style="color:#000000;">&#xff1a;</span><span style="color:#ffc000;">-</span><span style="color:#e84c22;">--------------------------------------------------------------</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2进入Ethernet0/0&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#ipv6 ospf network point-to-point</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4进入Ethernet0/1&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if&#xff09;#ospfv3 network point-to-point</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2:Show ipv6 ospf database变点到点之后intra area变为4个</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ospfv3 database prefix</span></p> <p style="margin-left:0;"><span style="color:#000000;">Link LSA主要包含路由器之间链路的link-l ocal&#xff0c;附带可以包含AGUA地址。</span></p> <p style="margin-left:0;"><span style="color:#000000;">Intre area prefix包含这些接口的AGUA地址没有包含link-local地址。</span></p> <p style="margin-left:0;"><span style="color:#000000;">8类9类结合1类2类LSA能形成路由&#xff0c;只靠1类和2类LSA只能形成拓扑。</span></p> <p style="margin-left:0;"><span style="color:#000000;">OSPFv3针对ipv4实验&#xff1a;1&#xff1a;04&#xff1a;02</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4去掉&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#no ipv6 router ospf 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router-af&#xff09;#router-id 4.4.4.4</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4进入loop back0和Ethernet 0/1&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if-range&#xff09;#ospfv3 110 ipv6 area 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#ip address 2.2.2.2 255.255.255.255</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2进入Ethernet 0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#IP address 24.1.1.2 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if&#xff09;#ip address 4.4.4.4 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入Ethernet 0/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if&#xff09;#ip address 24.1.1.4 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">调整进程&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv4 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#router-id 2.2.2.2</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#address-family ipv4 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router-af&#xff09;#router-id 4.4.4.4</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback 0和Ethernet0/0&#xff08;接口既有&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if-range&#xff09;#ospfv3 110 ipv4 area 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback0和Ethernet 0/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if-range&#xff09;# ospfv3 110 ipv4 area 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">优化选DR和BDR&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2:进入0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#ip ospf network point-to-point</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;进入0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if&#xff09;#ip ospf network point-to-point</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2:</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ospfv3 neighbor基于ipv4和ipv6各一个邻居</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ospfv3 database基于ipv4和ipv6各一个邻居</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ospfv3 ipv4 database</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ospfv3 ipv4 database router一类只有拓扑信息</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ospfv3 ipv4 database link 8类 </span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#no router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#no router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">IS-IS的ipv6实验&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router isis</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#net 49.0001.0000.0000.0002.00</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#&#xff1f;</span></p> <p style="margin-left:0;"><span style="color:#000000;">默认为no multi-topology 就是ipv4和ipv6都有&#xff0c;不过有隐患。</span></p> <p style="margin-left:0;"><span style="color:#000000;">is-is宣告&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback 0 和 ethernet 0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if-range&#xff09;#ipv6 router isis</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#router isis</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#net 49.0001.0000.0000.0004.00</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback 0 和 ethernet 0/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if-range&#xff09;#ipv6 router isis</span></p> <p style="margin-left:0;"><span style="color:#000000;">is-is默认没有开启邻居建立的提示&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;show isis neighbor既有L1也有L2的邻居</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show clns neighbors</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show clns is-neighbors</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show isis database看数据库</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show isis database verbose看数据库详细信息</span></p> <p style="margin-left:0;"><span style="color:#000000;">IS-IS启用IPv4&#xff1a;双栈</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback 0 和 ethernet 0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if-range&#xff09;#ip router isis</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback 0 和 ethernet  0/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if-range&#xff09;#ip router isis</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;show isis database verbose 一个lsp中即携带ipv4信息&#xff0c;又携带ipv6信息。</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router isis</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#metric-style wide</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#multi-topology</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#router isis</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#metric-style wide</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router-af&#xff09;#multi-topology</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;show isis database verbose双栈</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ipv6 route在ipv4中路由标识是小l在ipv6中路由标识是大L。</span></p> <p style="margin-left:0;"><span style="color:#000000;">Ping 4&#xff1a;&#xff1a;4 source 2&#xff1a;&#xff1a;2</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2(config)#No router isis</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#NO router isis</span></p> <p style="margin-left:0;"></p> <p style="margin-left:0;"><strong><span style="color:#000000;">BGP</span><span style="color:#000000;">的</span><span style="color:#000000;">IPv6</span><span style="color:#000000;">&#xff1a;</span></strong></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router bgp 10</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#no auto-summary</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#no synchronization </span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#bgp router-id 2.2.2.2</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#no bgp default ipv4-unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#neighbor 2001&#xff1a;1&#xff1a;1&#xff1a;24&#xff1a;&#xff1a;4  remote-as 10</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#neighbor 2001&#xff1a;1&#xff1a;1&#xff1a;24&#xff1a;&#xff1a;4 activate &#xff08;激活邻居关系&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#network  2&#xff1a;&#xff1a;2/128&#xff08;通告路由&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#router bgp 10</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#no auto-summary</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#no synchronization </span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#bgp router-id 4.4.4.4</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#no bgp default ipv4-unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#neighbor 2001&#xff1a;1&#xff1a;1&#xff1a;24&#xff1a;&#xff1a;2  remote-as 10</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router-af&#xff09;#network 4&#xff1a;&#xff1a;4/128 </span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;show run|section bgp</span></p> <p style="margin-left:0;"><span style="color:#000000;">通过route-map让传递的下一跳强行修改才能让ipv6传ipv4地址</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;show bgp ipv6 unicast看ipv6单播</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show bgp ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ipv6 route</span></p> <p style="margin-left:0;"><span style="color:#000000;">Ping 4&#xff1a;&#xff1a;4 source 2&#xff1a;&#xff1a;2</span></p> <p style="margin-left:0;"></p> <h5 id="ipv6%E8%BF%81%E7%A7%BB%E8%BF%87%E7%A8%8B%EF%BC%8C%E6%89%8B%E6%AE%B5%EF%BC%9A" style="margin-left:0px;"><span style="color:#000000;">ipv6迁移过程&#xff0c;手段&#xff1a;</span></h5> <blockquote> <ul><li style="margin-left:0px;"><span style="color:#000000;">双栈&#xff08;土豪做法&#xff09;</span></li><li style="margin-left:0px;"><span style="color:#000000;">隧道</span></li><li style="margin-left:0px;"><span style="color:#000000;">地址转换&#xff08;一般不适用&#xff09;</span></li></ul> <p style="margin-left:0;"><span style="color:#000000;">tunnel跨越ipv4骨干把ipv6的孤岛连在一起&#xff0c;去掉外部ipv4报头&#xff0c;查看内部ipv6报头&#xff0c;查看ipv6路由&#xff0c;来做最终转发。</span></p> </blockquote> <p style="margin-left:0;"></p> <p style="margin-left:0;"><strong><span style="color:#000000;">tunnel分类&#xff1a;</span></strong></p> <blockquote> <ul><li style="margin-left:0px;"><span style="color:#000000;">overlay tunnel</span><span style="color:#ff9900;"><strong>&#xff08;也叫手工tunnel也叫静态tunnel&#xff09;</strong></span><span style="color:#000000;">&#xff0c;使用ipv4建立tunnel&#xff0c;建好后使用ipv6地址&#xff0c;在两个园区之间通过tunnel建立ipv6的IGP&#xff0c;让两个园区的路由可以互联互通&#xff0c;当发送流量时通过这个tunnel来封装&#xff0c;前面添加一个新的ipv4报头来欺骗ipv4骨干路由器&#xff0c;能够端到端的传输。</span></li><li style="margin-left:0px;"><span style="color:#000000;">手工tunnel最大特点&#xff1a;每建立一个tunnel需要手工去指定配置命令。</span><span style="color:#ff9900;"><strong>&#xff08;两个园区可方便&#xff0c;园区多了配置了就大不好管理&#xff09;</strong></span></li><li style="margin-left:0px;"><span style="color:#000000;">auto-tunnel自动隧道&#xff0c;需要依赖BGP&#xff0c;通过BGP来完成自动隧道的建立&#xff0c;建立完通过自动隧道不需要指定tunnel目的地&#xff0c;通过目的地址来帮助你自动完成tunnel建立。</span><span style="color:#ff9900;"><strong>&#xff08;自动tunnel并不是特别灵活&#xff0c;数据层面的建立需要控制层面的BGP&#xff0c;控制层面BGP邻居依旧是需要手工&#xff0c;配置上比手工tunnel少些&#xff0c;依旧不行&#xff09;</strong></span></li><li style="margin-left:0px;"><span style="color:#000000;">6-to-4 tunnel</span><span style="color:#000000;">&#xff0c;适合在路由器之间</span><span style="color:#ff9900;"><strong>&#xff08;园区边界路由器&#xff09;</strong></span><span style="color:#000000;">&#xff0c;每台路由器创建</span><span style="color:#000000;">tunnel</span><span style="color:#000000;">就行&#xff0c;并且每个边界写一条静态路由&#xff0c;就能获悉。两个园区在数据层面发送中路由器能根据你数据层面流量的目的地址来判断这个流量是去往那个目的园区&#xff0c;根据这个目的园区会自动把</span><span style="color:#000000;">tunnel</span><span style="color:#000000;">建立&#xff0c;让报文连通。</span><span style="color:#ff9900;"><strong>&#xff08;条件是你使用6-to-4 tunnel时ipv6地址必须符合一个规则&#xff0c;符合规则后每个园区收到访问的ipv6报文&#xff0c;会看报文能不能通过tunnel走基于从17到48位值来确定把流量发给哪个目的园区&#xff0c;建立tunnel。&#xff09;</strong></span><strong><span style="color:#fe2c24;">路由器和路由器之间建立</span></strong></li><li style="margin-left:0px;"><span style="color:#000000;">ISATAP tunnel</span><span style="color:#000000;">&#xff0c;一般建议</span><span style="color:#000000;">Windows</span><span style="color:#000000;">主机或Linux和路由器之间建立&#xff0c;也是一种动态</span><span style="color:#000000;">tunnel</span><span style="color:#000000;">&#xff0c;这种tunnel适合一台主机在ipv</span><span style="color:#000000;">4</span><span style="color:#000000;">环境和一台路由器有ipv</span><span style="color:#000000;">4</span><span style="color:#000000;">路由通信&#xff0c;这个时候可以基于</span><span style="color:#000000;">ipv4</span><span style="color:#000000;">的连通性&#xff0c;在主机和路由器之间建立</span><span style="color:#000000;">ISATAP</span><span style="color:#000000;">的隧道&#xff0c;当你建立好隧道&#xff0c;你可以通过该隧道访问这个路由器所连接的ipv</span><span style="color:#000000;">6</span><span style="color:#000000;">网络。</span><span style="color:#ff9900;"><strong>&#xff08;具体时PC产生的ipv6的连接&#xff0c;发送ipv6数据的时候前面通过ipv4来封装&#xff0c;ipv4封装后&#xff0c;数据能通过ipv4骨干到达路由器&#xff0c;路由器去掉ipv4报头&#xff0c;把报文发往ipv6网。&#xff09;</strong></span><span style="color:#fe2c24;">PC和路由器之间最低是windows7左右&#xff0c;有版本限制<strong>&#xff08;让一个处于双栈的pc成功访问路由器身后的ipv6网络&#xff09;</strong></span></li></ul> </blockquote> <h5 id="%E5%9B%9B%E7%A7%8Dtunnel%E7%9A%84%E9%83%A8%E7%BD%B2%E6%96%B9%E6%B3%95%EF%BC%9A" style="margin-left:0px;"><span style="color:#;">四种tunnel的部署方法&#xff1a;</span></h5> <p style="margin-left:0;"><span style="color:#;">R2&#xff08;边界&#xff09;、R3&#xff08;边界&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#;">R2和R4之间运行ipv6</span></p> <p style="margin-left:0;"><span style="color:#;">R3和R5之间运行ipv6</span></p> <p style="margin-left:0;"><span style="color:#;">通过在R2和R3之间建立一个tunnel来完成互联互通</span></p> <p style="margin-left:0;"><span style="color:#;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#;">R2#erase startup-config</span></p> <p style="margin-left:0;"><span style="color:#;">R2#reload</span></p> <p style="margin-left:0;"><span style="color:#;">No</span></p> <p style="margin-left:0;"><span style="color:#;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#;">R4#erase startup-config</span></p> <p style="margin-left:0;"><span style="color:#;">R4#reload</span></p> <p style="margin-left:0;"><span style="color:#;">No</span></p> <p style="margin-left:0;"><span style="color:#000000;">R1&#xff1a;进入loopback 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R1(config-if)#ip address 1.1.1.1 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入serial 1/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R1&#xff08;config-if&#xff09;#ip address 13.1.1.1 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入serial 1/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R1&#xff08;config-if&#xff09;#ip address 12.1.1.1 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入Ethernet 0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R1&#xff08;config-if&#xff09;#ip address 16.1.1.1 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#ip address 3.3.3.3 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入serial 1/0口</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#no shutdown 13.1.1.3 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R6&#xff1a;进入loopback 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R6&#xff08;config-if&#xff09;#ip address 6.6.6.6 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入Ethernet 0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R6&#xff08;config-if&#xff09;#ip address 16.1.1.6 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;进入loopback 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#ip address 2.2.2.2 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入serial 1/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#ip address 12.1.1.2 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">先得在R1、R2、R3、R5中运行IGP </span></p> <p style="margin-left:0;"><span style="color:#000000;">R1&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R1&#xff08;config&#xff09;#router eigrp 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R1&#xff08;config-router&#xff09;#no auto-summary</span></p> <p style="margin-left:0;"><span style="color:#000000;">R1&#xff08;config-router&#xff09;#network 0.0.0.0 255.255.255.255&#xff08;所有接口都宣告进来&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router eigrp 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#no auto-summary</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#network 2.2.2.2 0.0.0.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R1&#xff08;config-router&#xff09;#network 12.1.1.2 0.0.0.0 </span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#router eigrp 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#no auto-summary</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#network 3.3.3.3 0.0.0.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#network 13.1.1.3 0.0.0.0 </span></p> <p style="margin-left:0;"><span style="color:#000000;">R6&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R6&#xff08;config&#xff09;#router eigrp 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R6&#xff08;config-router&#xff09;#no auto-summary</span></p> <p style="margin-left:0;"><span style="color:#000000;">R6&#xff08;config-router&#xff09;#network 6.6.6.6 255.255.255.0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R6&#xff08;config-router&#xff09;#network 16.1.1.6 0.0.0.0 </span></p> <p style="margin-left:0;"><span style="color:#000000;">R1&#xff1a;show ip eigrp neighbor看邻居</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ip router eigrp看到环回口路由就基本ok了</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2和R4之间规划ipv6地址&#xff1a;2001&#xff1a;1&#xff1a;1&#xff1a;24</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3和R5之间规划ipv6地址&#xff1a;2001&#xff1a;1&#xff1a;1&#xff1a;35</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4和R5各自启一个loopback口&#xff0c;双方loopback互通&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2:进入Ethernet 0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;&#xff1a;ipv6 address 2001&#xff1a;1&#xff1a;1&#xff1a;24&#xff1a;&#xff1a;2/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;进入Ethernet 0/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#ipv6 address 2001&#xff1a;1&#xff1a;1&#xff1a;35&#xff1a;&#xff1a;3/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;进入loopback 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if&#xff09;#ipv6 address 4&#xff1a;&#xff1a;4/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入Ethernet 0/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if&#xff09;#ipv6 address 2001&#xff1a;1&#xff1a;1&#xff1a;24&#xff1a;&#xff1a;4/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff1a;进入loopback 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-if&#xff09;#ip address 5&#xff1a;&#xff1a;5/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入Ethernet 0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-if&#xff09;#ipv6 address 2001&#xff1a;1&#xff1a;1&#xff1a;35&#xff1a;&#xff1a;5/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">Overly tunnel在两个园区边界做&#xff0c;前提是这两个边界路由器是双栈路由器。</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#tunnel source 2.2.2.2&#xff08;指定的是当我通过tunnel给你转发数据的时候&#xff0c;我所添加的外层报头的源目IP地址是什么&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#tunnel destination 3.3.3.3</span></p> <p style="margin-left:0;"><span style="color:#000000;">当前tunnel模式不太对&#xff0c;当前是GRE tunnel &#xff0c;只能实现封装ipv4&#xff0c;如果要ipv4封装ipv6需要指定&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#tunnel mode ipv6ip&#xff08;告知tunnel把ipv4报头夹杂在ipv6的数据包之上&#xff0c;用ipv4封装ipv6&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#tunnel source 3.3.3.3</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#tunnel destination 2.2.2.2</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#tunnel mode ipv6ip</span></p> <p style="margin-left:0;"><span style="color:#000000;">现在R2和R3之间相当于连接了一根虚线&#xff0c;虚线启地址&#xff0c;通过tunnel连接在一起&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">tunnel线配置ipv6地址&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#ipv6 address 2001&#xff1a;1&#xff1a;1&#xff1a;23&#xff1a;&#xff1a;2/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#ipv6 address 2001&#xff1a;1&#xff1a;1&#xff1a;23&#xff1a;&#xff1a;3/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">运行IGP&#xff1a;ipv6的IGP</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#ipv6 unicast-routing</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router eigrp CCIE</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast autonomous-system 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#eigrp router-id 2.2.2.2</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#no shutdown</span></p> <p style="margin-left:0;"><span style="color:#000000;">不用network&#xff0c;它会自动把拥有ipv6接口宣告进去</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#ipv6 unicast-routing</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config&#xff09;#router eigrp CCIE</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router&#xff09;#address-family ipv6 unicast autonomous-system 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router-af&#xff09;#eigrp router-id 4.4.4.4</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-router-af&#xff09;#no shutdown</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;show ipv6 route可以看到R4的环回口路由</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3和R5之间运行OSPFv3</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#ipv6 unicast-routing</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router-af&#xff09;#router-id 3.3.3.3</span></p> <p style="margin-left:0;"><span style="color:#000000;">宣告&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入Ethernet 0/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#ospfv3 110 ipv6 area 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config&#xff09;#ipv6 unicast-routing</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loop back 0 接口类型改为p-to-p以64位掩码通告</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-if&#xff09;#ospfv3 network point-to-point</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config&#xff09;#router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-router-af&#xff09;#router-id 5.5.5.5</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback0 和Ethernet 0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-if-range&#xff09;#ospfv3 110 ipv6 area 0  </span></p> <p style="margin-left:0;"><span style="color:#000000;">等待选举DR和BDR</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2和R3也通过tunnel口来建立一个IGP邻居&#xff1a;用RIP</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#ipv6 unicast-routing</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#ipv6 router rip cisco&#xff08;什么也不用管&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入tunnel</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#ipv6 rip cisco enable</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#ipv6 unicast-routing</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#ipv6 router rip cisco&#xff08;什么也不用管&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入tunnel</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#ipv6 rip cisco enable</span></p> <p style="margin-left:0;"><span style="color:#000000;">双向重分发&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router eigrp CCIE</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6  unicast autonomous-system 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#topology base</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af-topology&#xff09;#redistribute rip cisco metric 10000 100 255 1 1500 include-connecteed&#xff08;带宽、延迟、可靠性、负载、MTU&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">反向重分发&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#ipv6 router rip cisco</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-rtr&#xff09;#redistribute eigrp 90 metric 3 include-connecteed</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#address-family ipv6  unicast </span></p> <p style="margin-left:0;"><span style="color:#000000;">ipv4重分发&#xff0c;宣告进该协议的直连路由、通过该协议学到的加入路由表的这些能重分发过去。</span></p> <p style="margin-left:0;"><span style="color:#000000;">ipv6重分发&#xff0c;把一个协议重分发入另一个协议&#xff0c;默认是不会带直连的&#xff0c;希望携带得加include-connecteed</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router-af&#xff09;#redistribute rip cisco include-connecteed </span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#ipv6 router rip cicso</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-rtr&#xff09;#redistribute ospf 110 metric 3 include-connecteed</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;show ipv6 route 有5的环回口</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4也能学到</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;show ipv6 route 通过EX学到</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;show ipv6 route 能学到4的环回口路由以及24网络</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff1a;show ipv6 rute 也能学到OE2 的4网络</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;ping 5&#xff1a;&#xff1a;5 source 4&#xff1a;&#xff1a;4 能通代表tunnel 就ok</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4pingR5封装的原始报文到达R2,R2查路由表发现要去往5&#xff1a;&#xff1a;5&#xff0c;这个路由告诉我要通过tunnel走&#xff0c;走的时候要增加一重封装&#xff08;根据tunnel source和tunnel destination来加&#xff09;&#xff0c;IPv4|GRE&#xff0c;别人只会关注外层报头&#xff0c;R1会认为这个报文去往R3&#xff0c;就会查单播路由表查ipv4路由发给R3&#xff0c;R3收到发现是发给自己&#xff0c;会去掉外层ipv4报头一看是一个GRE懂了&#xff0c;知道后面还有东西&#xff0c;去掉GRE一看看到IPv6报头最终目的地是5&#xff1a;&#xff1a;5会查找ospf路由做出正确的转发。</span></p> <p style="margin-left:0;"><span style="color:#000000;">缺点&#xff1a;配置量大。&#xff08;</span><span style="color:#e84c22;">只存在实验室环境</span><span style="color:#000000;">&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#no interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#no ipv6 router rip cisco</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#no interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#no ipv6 router rip cisco</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router eigrp CCIE</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast autonomous-system 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#topology base</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af-topology&#xff09;#no redistribute rip cisco</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router-af&#xff09;#no redistribute rip cisco</span></p> <p style="margin-left:0;"></p> <h6 id="AUTO-tunnel%E5%81%9A%E6%B3%95%EF%BC%9A" style="margin-left:0px;"><strong><span style="color:#000000;">AUTO-tunnel做法&#xff1a;</span></strong></h6> <p style="margin-left:0;"><span style="color:#000000;">做tunnel只需要指定tunnel source就ok&#xff0c;不用指定tunnel destination&#xff0c;tunnel destination由BGP进程决定&#xff0c;使用特殊地址&#xff0c;ipv4兼容性地址来完成邻居建立&#xff0c;进行邻居建立时tunnel能联动BGP&#xff0c;判断tunnel与谁进行邻居建立。</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#tunnel source 2.2.2.2 </span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#tunnel mode ipv6ip auto-tunnel</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#ipv6 address &#xff1a;&#xff1a;2.2.2.2/64</span></p> <p style="margin-left:0;"><span style="color:#000000;"> R2&#xff08;config-if&#xff09;#ipv6 enable</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#tunnel source 3.3.3.3</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#tunnel mode ipv6ip auto-tunnel</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#ipv6 enable</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router bgp 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#no synchronization</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#no auto-summary</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#bgp router-id 2.2.2.2</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#no bgp default ipv4-unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#neighbor &#xff1a;&#xff1a;3.3.3.3 remote-as 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#neighbor &#xff1a;&#xff1a;3.3.3.3 activate</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#router bgp 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#no auto-summary</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#no synchronization</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#bgp router-id 3.3.3.3</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#no bgp default ipv4-unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#neighbor  &#xff1a;&#xff1a;2.2.2.2 remote-as 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router-af&#xff09;#neighbor &#xff1a;&#xff1a;2.2.2.2  ativate</span></p> <p style="margin-left:0;"><span style="color:#000000;">邻居建立了&#xff0c;&#xff1a;&#xff1a;3.3.3.3对应的是ipv4兼容性&#xff0c;被请求地址&#xff0c;指这个地址为neighbor时就是传达给tunnel&#xff0c;告诉tunnel请你完成跟3.3.3.3的建立&#xff0c;建立完后&#xff1a;&#xff1a;3.3.3.3就是对端tunnel所虚拟出来的ipv6地址。</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;show bgp ipv6 unicast summary </span></p> <p style="margin-left:0;"><span style="color:#000000;">建立好tunnel重分发传路由&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;双向重分发</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router eigrp CCIE</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast autonomous-system 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#topology base</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af-topology&#xff09;#redistribute bgp 23 metric 10000 100 255 1 1500</span></p> <p style="margin-left:0;"><span style="color:#000000;">由于bgp没有直连路由所以无法加include-connecteed</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router bgp 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#redistribute eigrp 90 include-connected</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#router ospf v3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#address-family ipv6 unicast </span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router-af&#xff09;#redistribute bgp 23 </span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#router bgp 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#redistribute ospf 110 include-connected</span></p> <p style="margin-left:0;"><span style="color:#000000;">现在路由重分发不进来&#xff0c;原因是BGP的路由重分发进其它协议时默认只有EBGP的路由能进去IGBP进不去</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router bgp 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6  unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#bgp redistribute-internal&#xff08;得敲这个命令&#xff0c;允许把ibgp的路由重分发进其它协议&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;show ipv6 route</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff1a;show ipv6 route</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;ping  5&#xff1a;&#xff1a;5 source 4&#xff1a;&#xff1a;4 能通</span></p> <p style="margin-left:0;"><span style="color:#000000;">AUTO-tunnel优点&#xff1a;建立BGP邻居比建立tunnel简单&#xff0c;灵活度比overly-tunnel强一丢丢&#xff0c;地址消耗少一点。</span></p> <p style="margin-left:0;"><span style="color:#000000;">AUTO-tunnel缺点&#xff1a;1、场点大了配置量也就大了 2、场点多建好邻居后交互的路由条目数量也会越来越多。</span></p> <p style="margin-left:0;"></p> <h6 id="6-to4%20tunnel%EF%BC%9A" style="margin-left:0px;"><strong><span style="color:#000000;">6-to4 tunnel</span><span style="color:#000000;">&#xff1a;</span></strong></h6> <p style="margin-left:0;"><span style="color:#000000;">真正意义上实现自动tunnel&#xff0c;依赖地址设计来实现自动tunnel&#xff0c;</span><span style="color:#e84c22;">地址前十六位必须是</span><span style="color:#e84c22;">2002</span><span style="color:#e84c22;">开头</span><span style="color:#000000;">&#xff0c;接下来</span><span style="color:#000000;">32</span><span style="color:#000000;">位就是直接把你边界的tunnel</span><span style="color:#000000;"> source </span><span style="color:#000000;">的ip地址转换为“&#xff1a;”分十六进制填充到后</span><span style="color:#000000;">32</span><span style="color:#000000;">位&#xff0c;做完后&#xff0c;每个边界指一条静态</span><span style="color:#000000;">tunnel</span><span style="color:#000000;">出去就OK了&#xff0c;静态&#xff1a;</span><span style="color:#000000;">ipv6 route 2002</span><span style="color:#000000;">&#xff1a;&#xff1a;</span><span style="color:#000000;">/16 tunnel xx</span><span style="color:#000000;">。</span></p> <p style="margin-left:0;"><span style="color:#000000;">让路由器收到从内到外的ipv6报文&#xff0c;我不管你去哪个园区&#xff0c;反正你数据包的三层目的ip地址它的32位的值一定是你去往目的园区的tunnel source&#xff0c;只要用这样封装&#xff0c;那这个包就能到达目的地。</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;# no interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#no router bgp 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#no interface tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#no router bgp 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router eigrp CCIE</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast autonomous-system 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#topology base</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af-topology&#xff09;#no redistribute bgp 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router&#xff09;#address-family ipv6 unicast </span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-router-af&#xff09;#no redistribute bgp 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">auto-tunnel&#xff1a;得重新规划ipv6地址</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入ethernet 0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;# no ipv6 address&#xff08;在ipv4中可以写一个新的来覆盖&#xff0c;在ipv6中必须no&#xff0c;因为ipv6允许你一个接口有任意多个ip地址&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2的tunnel-source为2.2.2.2&#xff0c;内网的所以地址为&#xff1a;2002&#xff1a;202&#xff1a;202&#xff0c;R4使用4网络</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#ipv6 address 2002&#xff1a;202&#xff1a;202&#xff1a;24&#xff1a;&#xff1a;2/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">两端ipv6地址不在同一子网段也能建立邻居&#xff0c;验证了ipv6eigrp是基于链路建立邻居。</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入Ethernet 0/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if&#xff09;#no ipv6 address</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if&#xff09;#ipv6 address 2002&#xff1a;202&#xff1a;202&#xff1a;24&#xff1a;&#xff1a;4/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback 0口&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if&#xff09;#no ipv6 address</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff08;config-if&#xff09;#ipv6 address 2002&#xff1a;202&#xff1a;202&#xff1a;4&#xff1a;&#xff1a;4/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;show ipv6 route 这个时候R4的路由R2能收到</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入Ethernet 0/1</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#no ipv6 address </span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#ipv6 address 2002&#xff1a;303&#xff1a;303&#xff1a;35&#xff1a;&#xff1a;3/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#ospfv3 110  ipv6 area 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入Ethernet 0/0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-if&#xff09;#no ipv6  address </span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-if&#xff09;#ipv6 address 2002&#xff1a;303&#xff1a;303&#xff1a;35&#xff1a;&#xff1a;5/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-if&#xff09;#ospfv3 110 ipv6 area 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入loopback 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-if&#xff09;#no ipv6 address </span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-if&#xff09;#ipv6 address  2002&#xff1a;303&#xff1a;303&#xff1a;5&#xff1a;&#xff1a;5/64</span></p> <p style="margin-left:0;"><span style="color:#000000;">R5&#xff08;config-if&#xff09;#ospfv3 110 ipv6 area 0</span></p> <p style="margin-left:0;"><span style="color:#000000;">等待R5和R3建立邻居&#xff0c;R3&#xff1a;show ipv6 ospf neighbor</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ipv6 route</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#tunnel source 2.2.2.2</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#tunnel mode ipv6ip 6to4</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-if&#xff09;#ipv6 enable</span></p> <p style="margin-left:0;"><span style="color:#000000;">写静态&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#ipv6 route 2002&#xff1a;&#xff1a;/16 tunnel 23&#xff08;必须/16&#xff0c;不用写下一跳&#xff09;</span></p> <p style="margin-left:0;"><span style="color:#000000;">Show ipv6 route</span></p> <p style="margin-left:0;"><span style="color:#000000;">我有让R4也得有&#xff0c;重分发给R4</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config&#xff09;#router eigrp CCIE</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router&#xff09;#address-family ipv6 unicast autonomous-system 90</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af&#xff09;#topology base</span></p> <p style="margin-left:0;"><span style="color:#000000;">R2&#xff08;config-router-af-toplogy&#xff09;#redistribute static</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">进入tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#tunnel source 3.3.3.3</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#tunnel mode ipv6ip 6to4</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config-if&#xff09;#ipv6 enable</span></p> <p style="margin-left:0;"><span style="color:#000000;">写静态&#xff1a;</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#ipv6 route 2002&#xff1a;&#xff1a;/16 tunnel 23</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config&#xff09;#router ospfv3 110</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config0-router&#xff09;#address-family ipv6 unicast</span></p> <p style="margin-left:0;"><span style="color:#000000;">R3&#xff08;config0-router-af&#xff09;#redistribute static</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;show ipv6 route 多了一条2002&#xff1a;&#xff1a;/64的路由&#xff0c;这条路由可以访问其它园区了&#xff0c;R5也有</span></p> <p style="margin-left:0;"><span style="color:#000000;">R4&#xff1a;ping 2002&#xff1a;303&#xff1a;303&#xff1a;5&#xff1a;&#xff1a;5 source loopback 0可以通&#xff0c;我在ping 2002&#xff1a;303&#xff1a;303&#xff1a;5&#xff1a;&#xff1a;5时这个地址放在三层报头的目的ipv6字段&#xff0c;边界R2收到报文之后&#xff0c;查看303&#xff1a;303这个字段&#xff0c;提取出3.3.3.3&#xff0c;这个3.3.3.3就是对方的边界路由器的tunnel-source&#xff0c;我自动跟它完成tunnel建立&#xff0c;就可以把包发走。</span><span style="color:#ff9900;"><strong>&#xff08;自动完成tunnel建立就是把我的外层ipv4报头的目的地址确定&#xff0c;源地址2.2.2.2&#xff0c;目的地址3.3.3.3&#xff0c;目的地址设定为3.3.3.3肯定能发给R3&#xff0c;只要R3能收到解封装了&#xff0c;就能到达真正的目的地。&#xff09;</strong></span></p> <p style="margin-left:0;"><span style="color:#e84c22;">最后一个ISATAP tunnel没法演示&#xff0c;因为这个是pc到路由器建立tun nel。</span></p> 

讯享网
小讯
上一篇 2025-05-31 21:56
下一篇 2025-05-26 17:18

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/153606.html