Configure IPIP Tunnel
Configuration Condition
Before configuring the IPIP tunnel, first complete the following tasks:
- Configure the interface IP address, enabling that the adjacent nodes on the network layer are reachable.
- Create the tunnel interface and configure the basic parameters. For details, refer to the Tunnel Interface Configuration Manual.
- Configure any unicast routing protocol, enabling the routing to the both ends of the tunnel is reachable.
Configure IPIP Tunnel
Table 10-2 Configure the IPIP tunnel
Step
|
Command
|
Description
|
Enter the global configuration mode
|
configure terminal
|
-
|
Enter the tunnel interface configuration mode
|
interface tunnel tunnel-number
|
-
|
Configure the tunnel interface IP address
|
ip address ip-address { mask | mask-length }
|
Mandatory
By default, the IP address on the tunnel interface is not configured.
|
Configure the tunnel interface mode as IPv4 over IPv4 |
tunnel mode ipip |
Mandatory
By default, the tunnel interface mode is GRE over IPv4.
|
Configure the source IP address or the interface name for the tunnel interface |
tunnel source { ip-address | interface-name }
|
Mandatory
By default, the source IP address and the interface name are not configured for the tunnel interface.
|
Configure the destination IP address or the host name for the tunnel interface |
tunnel destination { ip-address | hostname }
|
Mandatory
By default, the destination IP address and the host name are not configured for the tunnel interface.
|
-
The tunnel interface address needs to be configured with IPv4 address, and the protocol can only be IPv4 protocol.
- The start and end of the tunnel must be configured with the source IP address and the destination IP address. The IP address at the start and end of the tunnel are complementary source IP address and destination IP address for each other.
- When configuring the tunnel source IP address, the source IP address of the tunnel adopts the master IP address of the source IP address if the interface mode is used.
- The start and end of the tunnel must be configured with the same tunnel mode. Otherwise, the tunnel transmission fails.
- Two or more tunnels with the same tunnel mode, source IP address, and destination IP address cannot be configured on the same device.