03-IPv6隧道命令
本章节下载: 03-IPv6隧道命令 (154.57 KB)
目 录
interface tunnel命令用来创建隧道并进入接口视图,如果指定的隧道已经存在,则直接进入隧道视图,不需要再创建隧道。
no interface命令用来删除已经存在的隧道接口。
【命令】
interface tunnel tunnel-id mode ipv6ip { manual | 6to4 | isatap }
no interface interface-name
【视图】
系统视图
【参数】
tunnel-id:隧道id,取值范围是0到1023。
manual:IPv6手动隧道。
6to4:6to4隧道。
isatap:ISATAP 隧道。
interface-name:接口名称。
【举例】
# 创建一个IPv6手动隧道。
host(config)#interface tunnel 0 mode ipv6ip manual
【相关命令】
· display tunnel ipv6ip
display tunnel命令用来查看指定的隧道的信息。
【命令】
display tunnel [ tunnel-id ]
【视图】
任意视图
【参数】
tunnel-id:隧道id,取舍范围为0~1023。
【举例】
# 查看tunnel0的隧道信息。
host#display tunnel 0
tunnel mode: manual(ipv6)
tunnel saddr: 192.168.1.134
tunnel daddr: 192.168.1.132
表1-1 display tunnel命令显示信息描述表
字段 |
描述 |
tunnel mode |
隧道的模式,可能是6to4、manual、isatap三种之一 |
tunnel saddr |
隧道的源地址 |
tunnel daddr |
隧道的目的地址 |
display tunnel ipv6ip命令用来查看所有IPv6隧道信息
【命令】
display tunnel ipv6ip
【视图】
任意视图
【举例】
# 查看所有IPv6隧道信息。
host# display tunnel ipv6ip
A:admin state;L:link state; U:up;D:down;
---------------------------------------------------------------------------
Interface Mode Source Destination A L
---------------------------------------------------------------------------
tunnel1 6to4 192.168.1.2 - U D
表1-2 display tunnel ipv6ip命令显示信息描述表
字段 |
描述 |
Interface |
隧道名称 |
Mode |
模式,有三种模式: · 6to4 · manual · isatap |
Source |
隧道的源地址或者源接口 |
Destination |
隧道的目的地址 |
A |
隧道的启用状态,D表示未启用,U表示已经启用 |
L |
隧道的连接状态,D表示未连接,U表示已经连接 |
tunnel destination命令用来配置隧道的目的地址。
tunnel destination命令用来删除隧道的目的地址。
【命令】
tunnel destination ip-address
no tunnel destination
【视图】
接口视图
【参数】
ip-address:隧道目的地址。封装报文时,该地址将作为IPv4报头的目的地址。
【使用指导】
只有IPv6手动隧道才能配置隧道目的地址。
【举例】
# 配置隧道的目的地址为192.168.3.2。
host# system-view
host(config)#interface tunnel 0 mode ipv6ip manual
host(config-tunnel0)#tunnel destination 192.168.3.2
【相关命令】
· tunnel source
· display tunnel ipv6ip
tunnel source 命令用来配置隧道的源地址或源接口。
no tunnel source命令用来删除隧道的源地址或源接口。
【命令】
tunnel source { ip-address | inteface-name }
no tunnel source
【视图】
接口视图
【参数说明】
ip-address:隧道源地址。封装报文时,该地址将作为IPv4报头的源地址。
interface-name:隧道源接口。封装报文时,将采用该接口的主IP地址作为IPv4报头的源地址。
【举例】
# 配置隧道的源地址为192.168.3.1。
host# system-view
host(config)#interface tunnel 0 mode ipv6ip manual
host(config-tunnel0)#tunnel source 192.168.3.1
【相关命令】
· tunnel destination
· display tunnel ipv6ip
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!