interface tunnel
Syntax
interface tunnel mode {gre ipv4 | ip 6in4 | ip 6in6} interface tunnel no interface tunnel
Description
Creates or updates an IP tunnel. After you enter the command, the firmware switches to the configuration context for the tunnel.
If the specified tunnel exists, this command switches to the context for the tunnel.
By default, all tunnels are automatically assigned to the default VRF when they are created.
Theno
这个命令删除现有的IP隧道形式.
Command context
config
Parameters
-
mode {gre ipv4 | ip 6in4 | ip 6in6}
-
Creates an IP tunnel. Choose one of the following options:
gre ipv4
: Creates a GRE tunnel.ip 6in4
: Creates an IPv4 tunnel for IPv6 traffic.ip 6in6
: Creates an IPv6 tunnel for IPv6 traffic.
-
-
Specifies the number for a new tunnel. Range: 1 to 127. Numbering is shared between all tunnels, so the same tunnel number cannot be used for an IPv6 in IPv4 tunnel and a GRE tunnel.
-
-
Specifies the number for an existing IP tunnel. Range: 1 to 127.
Command context
config-gre-if
config-ip-if
Examples
Defines a new GRE tunnel with number27.
switch(config)#interface tunnel 33 mode gre ipv4switch(config-gre-if)#
Switches to the
config-gre-if
context for existing tunnel33.switch(config)#interface tunnel 33switch(config-gre-if)#
Deletes GRE tunnel33.
switch(config)#no interface tunnel 33
Defines a new IPv6 in IPv4 tunnel with number27.
switch(config)#interface tunnel 27 mode ip 6in4switch(config-ip-if)#
Switches to the
config-ip-if
context for existing tunnel27.switch(config)#interface tunnel 27switch(config-ip-if)#
DeletesIPv6 in IPv4 tunnel27.
switch(config)#no interface tunnel 27
Defines a new IPv6 in IPv6 tunnel with number8.
switch(config)#interface tunnel 8 mode ip 6in6switch(config-ip-if)#