- Table of Contents
-
- 04-Network Connectivity Command Reference
- 00-Preface
- 01-MAC address table commands
- 02-Ethernet link aggregation commands
- 03-Port isolation commands
- 04-VLAN commands
- 05-Loop detection commands
- 06-Spanning tree commands
- 07-LLDP commands
- 08-Layer 2 forwarding commands
- 09-PPP commands
- 10-ARP commands
- 11-IP addressing commands
- 12-DHCP commands
- 13-DHCPv6 commands
- 14-DNS commands
- 15-NAT commands
- 16-EoGRE commands
- 17-IP performance optimization commands
- 18-IPv6 basics commands
- 19-Basic IP routing commands
- 20-Static routing commands
- 21-IPv6 static routing commands
- 22-IGMP snooping commands
- 23-MLD snooping commands
- Related Documents
-
Title | Size | Download |
---|---|---|
16-EoGRE commands | 111.19 KB |
Contents
EoGRE commands
The following compatibility matrix shows the support of hardware platforms for EoGRE:
Hardware series |
Model |
EoGRE compatibility |
WA7200 series |
WA7220 WA7220-HI WA7220H WA7226-C WA7230 WA7230-LI |
No |
WA7300 series |
WA7320i WA7322H-HI WA7330X WA7338-HI |
No |
WA7500 series |
WA7538 WA7539 |
Yes |
WA7600 series |
WA7638 |
No |
destination
Use destination to specify the destination address for a tunnel interface.
Use undo destination to restore the default.
Syntax
destination ipv4-address
undo destination
Default
No tunnel destination address is configured.
Views
Tunnel interface view
Predefined user roles
network-admin
Parameters
ipv4-address: Specifies the tunnel destination IPv4 address.
Usage guidelines
The tunnel destination address must be the address of the receiving interface on the tunnel peer. It is used as the destination address of tunneled packets.
The destination address of the local tunnel interface must be the source address of the peer tunnel interface. The source address of the local tunnel interface must be the destination address of the peer tunnel interface.
Do not specify the same tunnel source and destination addresses for the tunnel interfaces on the same device.
Examples
# The interface on Sysname 1 uses IP address 193.101.1.1 and the interface on Sysname 2 uses IP address 192.100.1.1. Configure the source address 193.101.1.1 and destination address 192.100.1.1 for the tunnel interface on Sysname 1.
<Sysname1> system-view
[Sysname1] interface tunnel 1
[Sysname1-Tunnel1] source 193.101.1.1
[Sysname1-Tunnel1] destination 192.100.1.1
# Configure source address 192.100.1.1 and destination address 193.101.1.1 for the tunnel interface on Sysname 2.
<Sysname2> system-view
[Sysname2] interface tunnel 1
[Sysname2-Tunnel1] source 192.100.1.1
[Sysname2-Tunnel1] destination 193.101.1.1
display interface tunnel
interface tunnel
source
display interface tunnel
Use display interface tunnel to display tunnel interface information.
Syntax
display interface [ tunnel [ number ] ] [ brief [ description | down ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
tunnel [ number ]: Specifies a tunnel interface. The number argument specifies the tunnel interface number. The specified tunnel interface must have been created. If you do not specify the tunnel keyword, this command displays information about all interfaces on the device. If you specify the tunnel keyword without the number argument, this command displays information about all existing tunnel interfaces.
brief: Displays brief interface information. If you do not specify this keyword, the command displays detailed interface information.
description: Displays complete interface descriptions. If you do not specify this keyword, the command displays only the first 27 characters of interface descriptions.
down: Displays information about interfaces in the physical state of DOWN and the causes. If you do not specify this keyword, the command displays information about interfaces in all states.
Examples
# Display detailed information about Tunnel 1.
<Sysname> display interface tunnel 1
Tunnel1
Current state: UP
Line protocol state: UP
Description: Tunnel1 Interface
Bandwidth: 64kbps
Maximum transmission unit: 64000
Internet address: 10.1.2.1/24 (primary)
Tunnel source 1.1.1.1, destination 2.2.2.2
Tunnel TOS 0xC8, Tunnel TTL 255
Tunnel protocol/transport EoGRE/IP
Last clearing of counters: Never
Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
Input: 0 packets, 0 bytes, 0 drops
Output: 0 packets, 0 bytes, 0 drops
Table 1 Command output
Field |
Description |
Tunnel1 |
Information about the tunnel interface Tunnel 1. |
Current state |
Physical link state of the tunnel interface: · Administratively DOWN—The interface has been shut down by using the shutdown command. · DOWN—The interface is administratively up, but its physical state is down. · UP—The interface is both administratively and physically up. |
Line protocol state |
Data link layer state of the interface. The state is determined through automatic parameter negotiation at the data link layer. · UP—The data link layer protocol is up. · UP (spoofing)—The data link layer protocol is up, but the link is an on-demand link or does not exist. This attribute is typical of null interfaces and loopback interfaces. · DOWN—The data link layer protocol is down. |
Description |
Description of the tunnel interface. |
Bandwidth |
Expected bandwidth of the tunnel interface. |
Maximum transmission unit |
MTU of the tunnel interface. |
Internet protocol processing: Disabled |
The interface cannot process IP packets. |
Internet address |
IP address of the tunnel interface. Primary indicates that the IP address is the primary IP address of the interface. |
Tunnel source |
Source address of the tunnel. If a source interface is specified for the tunnel interface, this field also displays the source interface in parentheses. |
destination |
Destination address of the tunnel. |
Tunnel keepalive enabled, Period(50 s), Retries(3) |
EoGRE keepalive is enabled for tunnel interface state detection. In this example, the keepalive interval is 50 seconds, and the keepalive number is 3. |
Tunnel TOS |
ToS of tunneled packets. |
Tunnel TTL |
This field is not supported in the current software version. TTL of tunneled packets. |
Tunnel protocol/transport |
Tunnel mode and transport protocol: · EoGRE/IP—EoGRE tunnel mode. · UDP_EoGRE/IP—UDP-encapsulated EoGRE tunnel mode. |
Last clearing of counters |
Last time when counters were cleared. |
Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec |
Average input rate in the last 300 seconds. |
Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec |
Average output rate in the last 300 seconds. |
Input: 0 packets, 0 bytes, 0 drops |
Total input packets, total input bytes, and total input packets dropped. |
Output: 0 packets, 0 bytes, 0 drops |
Total output packets, total output bytes, and total output packets dropped. |
# Display brief information about Tunnel 1.
<Sysname> display interface tunnel 1 brief
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
Tun1 UP UP 1.1.1.1 Tunnel1
# Display brief information about Tunnel 1, including the complete interface description.
<Sysname> display interface tunnel 1 brief description
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
Tun1 UP UP 1.1.1.1 Tunnel1
# Display information about interfaces in DOWN state and the causes.
<Sysname> display interface tunnel brief down
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Interface Link Cause
Tun0 DOWN Not connected
Tun1 DOWN Not connected
Table 2 Command output
Field |
Description |
Interface |
Abbreviated interface name. |
Link |
Physical link state of the interface: · UP—The interface is physically up. · DOWN—The interface is physically down. · ADM—The interface has been shut down by using the shutdown command. To restore the physical state of the interface, use the undo shutdown command. · Stby—The interface is a backup interface in standby state. To see the primary interface, use the display interface-backup state command. |
Protocol |
Data link layer protocol state of the interface: · UP—The data link layer protocol of the interface is up. · DOWN—The data link layer protocol of the interface is down. · UP(s)—The data link layer protocol of the interface is up, but the link is an on-demand link or does not exist. The (s) attribute represents the spoofing flag. This value is typical of null interfaces and loopback interfaces. |
Primary IP |
Primary IP address of the interface. This field displays two hyphens (--) if the interface does not have an IP address. |
Description |
Description of the interface. |
Cause |
Cause for the physical link state of an interface to be DOWN: · Administratively—The interface has been manually shut down by using the shutdown command. To restore the physical state of the interface, use the undo shutdown command. · Not connected—The tunnel is not established. |
Related commands
destination
interface tunnel
source
interface tunnel
Use interface tunnel to create a tunnel interface, specify the tunnel mode, and enter tunnel interface view, or enter the view of an existing tunnel interface.
Use undo interface tunnel to delete a tunnel interface.
Syntax
interface tunnel number [ mode eogre ]
undo interface tunnel number
Default
No tunnel interfaces exist.
Views
System view
Predefined user roles
network-admin
Parameters
number: Specifies the number of the tunnel interface, in the range of 0 to 1023. The number of tunnel interfaces that can be created is restricted by the total number of interfaces and the memory.
mode eogre: Specifies the EoGRE tunnel mode.
Usage guidelines
To create a new tunnel interface, you must specify the tunnel mode in this command. To enter the view of an existing tunnel interface, you do not need to specify the tunnel mode.
A tunnel interface number is locally significant. The tunnel interfaces on the two ends of a tunnel can use the same or different interface numbers.
Examples
# Create EoGRE tunnel interface Tunnel 1 and enter tunnel interface view.
<Sysname> system-view
[Sysname] interface tunnel 1 mode eogre
[Sysname-Tunnel1]
Related commands
destination
display interface tunnel
source
eogre carry
Use eogre carry to configure EoGRE packets to carry GRE extended fields.
Use undo eogre carry to restore the default.
Syntax
eogre carry network-policy-id id-value mac-address { bridge | bssid }
undo eogre carry
Default
EoGRE packets do not carry GRE extended fields.
Views
EoGRE tunnel interface view
Predefined user roles
network-admin
Parameters
network-policy-id id-value: Specifies the Network Policy ID field value, in the range of 1 to 65535. This value is the policy ID used by the peer server to identify its access device.
mac-address bridge: Specifies the bridge MAC address of the local device as the value of the AP MAC field.
mac-address bssid: Specifies the BSSID of the local device as the value of the AP MAC field.
Usage guidelines
If the EoGRE packets sent by an EoGRE tunnel interface need to carry the GRE extended fields, execute this command to configure the fields as needed.
Examples
# In EoGRE tunnel interface view, configure EoGRE packets to carry the Network Policy ID and AP MAC fields. Set the Network Policy ID to 20 and the AP MAC field value as the local bridge MAC address.
<Sysname> system-view
[Sysname] interface tunnel 0 mode eogre
[Sysname-Tunnel0] eogre carry network-policy-id 20 mac-address bridge
eogre udp-port
Use eogre udp-port to configure the destination UDP port number of EoGRE packets.
Use undo eogre udp-port to restore the default.
Syntax
eogre udp-port port-number
undo eogre udp-port
Default
The destination UDP port number of EoGRE packets is 4754.
Views
EoGRE tunnel interface view
Predefined user roles
network-admin
Parameters
port-number: Sets the destination UDP port number of EoGRE packets, in the range of 1 to 65535. As a best practice, do not configure this port number as a known port number (1 to 1023).
Usage guidelines
Use this command to configure the destination UDP port number for outgoing EoGRE packets to be encapsulated by UDP on an EoGRE tunnel.
The UDP port number of EoGRE packets specified in this command cannot be a port number that has been used by other modules (such as VXLAN) or tunnels.
An EoGRE tunnel interface can configure only one destination UDP port number for EoGRE packets. On the same device, you can configure a maximum of 32 destination UDP port numbers for EoGRE packets in addition to the default one.
Examples
# On EoGRE tunnel interface 0, set the destination UDP port number of EoGRE packets to 4755.
<Sysname> system-view
[Sysname] interface tunnel 0 mode eogre
[Sysname-Tunnel0] eogre udp-port 4755
# In EoGRE template abc, set the destination UDP port number of EoGRE packets to 4755.
<Sysname> system-view
[Sysname] eogre template abc
[Sysname-eogre-template-abc] eogre udp-port 4755
keepalive
Use keepalive to enable EoGRE keepalive and set the keepalive interval and the keepalive number, and configure the keepalive mode.
Use undo keepalive to disable EoGRE keepalive.
Syntax
keepalive [ interval [ times ] ]*
undo keepalive
Default
EoGRE keepalive is disabled.
Views
Tunnel interface view
Predefined user roles
network-admin
Parameters
interval: Specifies the keepalive interval, in the range of 1 to 32767 seconds. The default value is 10.
times: Specifies the keepalive number, in the range of 1 to 255. The default value is 3.
Usage guidelines
This command enables the tunnel interface to send keepalive packets at the specified interval. If the device receives no response from the peer within the timeout time, it shuts down the local tunnel interface. The device brings the local tunnel interface up if it receives a keepalive acknowledgment packet from the peer. The timeout time is the result of multiplying the keepalive interval by the keepalive number.
The device always acknowledges the keepalive packets it receives whether or not keepalive is enabled.
Examples
# Enable EoGRE keepalive, set the keepalive interval to 20 seconds, and set the keepalive number to 5.
<Sysname> system-view
[Sysname] interface tunnel 2 mode eogre
[Sysname-Tunnel2] keepalive 20 5
map bridge
Use map bridge to map a Layer 2 VEB interface to an EoGRE tunnel interface or a Layer 3 physical interface.
Use undo map bridge to remove the mapping.
Syntax
map bridge { ve-bridge number | ve-bridge name }
undo map bridge
Default
No VEB interface is mapped to an EoGRE tunnel interface or a Layer 3 physical interface.
Views
EoGRE tunnel interface view
Layer 3 physical interface view
Predefined user roles
network-admin
Parameters
ve-bridge number: Specifies an existing Layer 2 VEB interface by its number.
ve-bridge name: Specifies an existing Layer 2 VEB interface by its name.
Usage guidelines
Before you use an EoGRE tunnel interface, you must execute this command to bind the EoGRE tunnel interface to a Layer 2 VEB interface.
Packets sent by the Layer 2 VEB interface are passed to the mapped EoGRE tunnel interface for encapsulation and forwarding.
To ensure successful mapping, a Layer 2 VEB interface mapped to an EoGRE tunnel interface cannot be bound to other services (such as ATM).
Examples
# Enter Layer 3 physical interface view and map Layer 2 VEB interface VE-Bridge 1/0/1 to the Layer 3 physical interface.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] map bridge ve-bridge 1/0/1
# Create EoGRE-mode tunnel interface Tunnel 0, enter tunnel interface view, and map VE-Bridge 1 to Tunnel 0.
<Sysname> system-view
[Sysname] interface tunnel 0 mode eogre
[Sysname-Tunnel0] map bridge ve-bridge 1
mtu
Use mtu to set the MTU on a tunnel interface.
Use undo mtu to restore the default.
Syntax
mtu size
undo mtu
Default
If the tunnel interface has never been up, the MTU of the tunnel interface is 64000 bytes.
If the tunnel interface is up, its MTU is identical to the outgoing interface's MTU minus the length of the tunnel headers. The outgoing interface is automatically obtained through routing table lookup based on the tunnel destination address.
Views
Tunnel interface view
Predefined user roles
network-admin
Parameters
size: Specifies the MTU in the range of 100 to 64000 bytes.
Usage guidelines
If you do not configure an MTU for a tunnel interface, the effective MTU depends on the tunnel interface status.
· If the tunnel interface is up, its MTU is identical to the outgoing interface's MTU minus the length of the tunnel headers.
· If the tunnel interface is down, the device does not calculate or update the MTU of the tunnel interface.
If you configure an MTU for a tunnel interface, the configured MTU applies regardless of the tunnel interface status (up/down) and the outgoing interface MTU.
To avoid fragmentation after tunnel encapsulation, set the tunnel interface MTU no greater than the value of the outgoing interface MTU minus the length of the tunnel headers.
Examples
# Set the MTU on Tunnel 1 to 10000 bytes.
<Sysname> system-view
[Sysname] interface tunnel 1
[Sysname-Tunnel1] mtu 1000
Related commands
display interface tunnel
source
Use source to specify the source address or source interface for a tunnel interface.
Use undo source to restore the default.
Syntax
source { ipv4-address | interface-type interface-number }
undo source
Default
No source address or source interface is specified for a tunnel interface.
Views
Tunnel interface view
Predefined user roles
network-admin
Parameters
ipv4-address: Specifies the tunnel source IPv4 address.
interface-type interface-number: Specifies the source interface by its type and number. The interface must be up and must have an IP address.
Usage guidelines
The specified source address or the address of the specified source interface is used as the source address of tunneled packets. To display the configured tunnel source address, use the display interface tunnel command.
Do not specify the same tunnel source and destination addresses for the tunnel interfaces on the same device.
The destination address of the local tunnel interface must be the source address of the peer tunnel interface. The source address of the local tunnel interface must be the destination address of the peer tunnel interface.
If you execute this command multiple times, the most recent configuration takes effect.
Examples
# Specify the source interface for Tunnel 1 as VLAN-interface 10.
<Sysname> system-view
[Sysname] interface tunnel 1
[Sysname-Tunnel1] source vlan-interface 10
# Specify the source address of Tunnel 1 as 192.100.1.1.
<Sysname> system-view
[Sysname] interface tunnel 1
[Sysname-Tunnel1] source 192.100.1.1
destination
display interface tunnel
interface tunnel
tunnel tos
Use tunnel tos to set the ToS of tunneled packets.
Use undo tunnel tos to restore the default.
Syntax
tunnel tos tos-value
undo tunnel tos
Default
The ToS of tunneled packets is the same as the ToS of the original packets.
Views
Tunnel interface view
Predefined user roles
network-admin
Parameters
tos-value: Specifies the ToS of tunneled packets, in the range of 0 to 255.
Usage guidelines
After you configure this command, all the tunneled packets of different services sent on the tunnel interface will use the same configured ToS. For more information about ToS, see QoS Configuration Guide.
Examples
# Set the ToS of tunneled packets to 20 on Tunnel 1.
<Sysname> system-view
[Sysname] interface tunnel 1
[Sysname-Tunnel1] tunnel tos 20
Related commands
display interface tunnel