ip address

Syntax

ip address/没有ip address/

描述

Sets the local IP address of a GRE tunnel. This address identifies the tunnel interface for routing. It must be on the same subnet as the tunnel address assigned on the remote device.

The没有form of this command deletes the local IP address assigned to a GRE tunnel.

Command context

config-gre-if

Parameters

Specifies the tunnel IP address in IPv4 format (x.x.x.x), wherexis a decimal number from 0 to 255. You can remove leading zeros. For example, the address192.169.005.100becomes192.168.5.100.

指定了怒mber of bits in the address mask in CIDR format (x), wherexis a decimal number from 0 to 32.

Authority

Administrators or local user group members with execution rights for this command.

Examples

Defines the local IP address10.10.10.1for GRE tunnel33.

switch(config)#interface tunnel 33 mode gre ipv4switch(config-gre-if)#ip address 10.10.10.1/24

Deletes the local IP address10.10.10.1GRE隧道33。

switch(config)#interface tunnel 33switch(config-gre-if)#没有ip address 10.10.10.1/24