您的位置:首页 > 其它

17 - 06 - 06 IPv6 over IPv4配置

2017-06-06 20:05 253 查看
----------------------网络拓扑--------------------------



-

R1 ============================================================

conf t

ipv6 unicast-routing

int e1/0

ip add 192.168.12.1 255.255.255.0
NO SHUT

int loop0

ipv6 add 2011::1/64
NO SHUT
exit

router ospf 1

router-id 1.1.1.1

network 192.168.12.0 0.0.0.255 area 0

int e1/0

ip ospf 1 area 0

int tunnel 0

tunnel mode ipv6ip

ipv6 add 2011::0/64

tunnel source e1/0

tunnel destination 192.168.23.3

//ip route 0.0.0.0 0.0.0.0 12.1.1.2

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

解释 : 

int tunnel 0  : 

  创建了一个隧道接口 ,

tunnel source & tunnel destination

  source是本路由器的出口IP或者接口名称 ,

destination是目标路由器的接口IP ,为了使隧道能正常工作 ,source 与 destination 之间一定能用IPv4 ping 通.这也是能够

收到加了IPv4包头的数据包的基础 .

tunnel mode ipv6ip

是说隧道的模式是 IPv6-over-IPv4 ,也就是把IPv6的包封装在IPv4的包中 .

tunnel下的 ipv6 address

 给隧道端口配置一个IPv6的地址 . 这里并没有用到, 因为我们使用了环回接口的IPv6的地址来做了连通性测试 .

R2 ============================================================

conf t

int e1/0

ip add 192.168.12.2 255.255.255.0
NO shut

int e1/1 

ip add 192.168.23.2 255.255.255.0
NO SHUT

router ospf 1

router-id 2.2.2.2 

network 192.168.12.0 0.0.0.255 area 0

network 192.168.23.0 0.0.0.255 area 0

int e1/0

ip ospf 1 area 0

int e1/1

ip ospf 1 area
4000
0

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

R2 配置基础路由协议 ,

R3 ============================================================

conf t

ipv6 unicast-routing

int e1/0

ip add 192.168.23.3 255.255.255.0
NO SHUT

int loop0

ipv6 add 2033::3/64
NO SHUT
exit

router ospf 1

router-id 3.3.3.3

network 192.168.23.0 0.0.0.255 area 0

int e1/0

ip ospf 1 area 0

int tunnel 0

tunnel mode ipv6ip

ipv6 add 2033::0/64

tunnel source e1/0

tunnel destination 192.168.12.1

//ip route 0.0.0.0 0.0.0.0 12.1.1.2

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

注意 R3上的tunnel source 和 tunnel destination 和R1是正好相反的.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: