天天看點

配置IPV6隧道,IPV6 unnumbered

配置IPV6隧道,IPV6 unnumbered

需要的位址和連接配接方式如圖所示,R1和R2之間的IPV4位址分别為10.1.1.1和20.1.1.1

配置tunnel0:

配置IPV6隧道,IPV6 unnumbered

R2上的配置:

配置IPV6隧道,IPV6 unnumbered

檢視接口位址配置和tunnel狀态:

配置IPV6隧道,IPV6 unnumbered
配置IPV6隧道,IPV6 unnumbered

驗證底層IPV4連通性和tunnel的連通性

配置IPV6隧道,IPV6 unnumbered
配置IPV6隧道,IPV6 unnumbered

去掉指向對端的loopback的靜态路由,R1,R2之間運作OSPF,檢視OSPF鄰居狀态,路由條目,兩端loopback是否互通:

配置IPV6隧道,IPV6 unnumbered
配置IPV6隧道,IPV6 unnumbered

附上R1,R2的配置:

R1#show running-config 

Building configuration...

Current configuration : 1069 bytes

!

! Last configuration change at 16:19:44 CST Mon Jun 21 2021

version 15.2

service timestamps debug datetime msec

service timestamps log datetime msec

hostname R1

boot-start-marker

boot-end-marker

no aaa new-model

clock timezone CST 8 0

ip cef

ipv6 unicast-routing

ipv6 cef

multilink bundle-name authenticated

interface Loopback0

 no ip address

 ipv6 address 2011:1:1:11::1/64

 ipv6 ospf 1 area 0

interface Tunnel0

 ipv6 address 2012:1:1:11::1/64

 ipv6 enable

 tunnel source Ethernet0/0

 tunnel mode ipv6ip

 tunnel destination 20.1.1.1

!         

interface Ethernet0/0

 ip address 10.1.1.1 255.255.255.0

interface Ethernet0/1

 shutdown

interface Ethernet0/2

interface Ethernet0/3

ip forward-protocol nd

no ip http server

ip route 20.1.1.0 255.255.255.0 10.1.1.2

ipv6 router ospf 1

control-plane

line con 0

 logging synchronous

line aux 0

line vty 0 4

 login

end

R2#show running-config 

! Last configuration change at 16:20:27 CST Mon Jun 21 2021

hostname R2

 ipv6 address 2022:2:2:22::2/64

 ipv6 address 2012:1:1:11::2/64

 tunnel destination 10.1.1.1

 ip address 20.1.1.1 255.255.255.0

ip route 10.1.1.0 255.255.255.0 20.1.1.2

R2#         

......................................................................................................

分割線:

建立IPV6隧道采用unnumbered的方式:

首先看下思科官方文檔關于unnumbered的解釋: To enable IPv6 processing on an interface without assigning an explicit IPv6 address to the interface, use the ipv6 unnumbered command in interface configuration mode. To disable IPv6 on an unnumbered interface, use the no form of this command. 

也就是采用unnumbered 後,無需在tunnel兩端使用固定的IPV6位址來建立

下面為配置方式和檢查指令:

配置IPV6隧道,IPV6 unnumbered

分别在R1 R2上no掉靜态IP,然後啟用unnumbered到E0/0

配置IPV6隧道,IPV6 unnumbered
配置IPV6隧道,IPV6 unnumbered

繼續閱讀