331
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Enter IPv4 over IPv4 tunnel
interface view.
interface tunnel
number [
mode
ipv4-ipv4
]
N/A
3. Configure an IPv4 address
for the tunnel interface.
ip
address
ip-address { mask |
mask-length } [
sub
]
By default, no IPv4 address is
configured for the tunnel interface.
4. Configure a source address
or source interface for the
tunnel interface.
source
{ ipv4-address |
interface-type interface-number }
By default, no source address or
source interface is configured for
the tunnel interface.
If you specify a source address, it
is used as the source IP address
of tunneled packets.
If you specify a source interface,
the primary IP address of this
interface is used as the source IP
address of tunneled packets.
5. Configure a destination
address for the tunnel
interface.
destination
ipv4-address
By default, no destination address
is configured for the tunnel
interface.
The tunnel destination address
must be the IP address of the
receiving interface on the tunnel
peer. It is used as the destination
IP address of tunneled packets.
6. (Optional.) Set the DF bit for
tunneled packets.
tunnel dfbit enable
By default, the DF bit is not set for
tunneled packets.
Configuration example
Network requirements
As shown in Figure 129, the two subnets IPv4 group 1 and IPv4 group 2 use private IPv4 addresses.
Configure an IPv4 over IPv4 tunnel between Router A and Router B to make the two subnets
reachable to each other.
Figure 129 Network diagram
Configuration procedure
Make sure Router A and Router B can reach each other through IPv4.
• Configure Router A:
# Specify an IPv4 address for GigabitEthernet 2/0/1.
<RouterA> system-view
[RouterA] interface gigabitethernet 2/0/1