27
<Sysname> system-view
[Sysname] interface vsi-interface 100
[Sysname-Vsi-interface100] distributed-gateway local
gateway subnet
Use
gateway subnet
to assign a subnet to a VSI.
Use
undo gateway subnet
to remove a subnet from a VSI.
Syntax
gateway subnet
{
ipv4-address wildcard-mask
|
ipv6-address
prefix-length
}
undo gateway subnet
{
ipv4-address wildcard-mask
|
ipv6-address
prefix-length
}
Default
No subnet is assigned to a VSI.
Views
VSI view
Predefined user roles
network-admin
context-admin
Parameters
ipv4-address
: Specifies an IPv4 subnet address in dotted-decimal notation.
wildcard-mask
: Specifies a wildcard mask in dotted decimal notation. In contrast to a network
mask, the 0 bits in a wildcard mask represent "do care" bits, and the 1 bits represent "don't care" bits.
If the "do care" bits in a packet's IP address are identical to the "do care" bits in the specified subnet
address, the packet is assigned to the VSI. All "don't care" bits are ignored. The 0s and 1s in a
wildcard mask can be noncontiguous. For example, 0.255.0.255 is a valid wildcard mask.
ipv6-address prefix-length
: Specifies an IPv6 subnet address and the address prefix
length in the range of 1 to 128.
Usage guidelines
You must configure this command on VSIs that share a gateway interface. This command enables
the VSI interface to identify the VSI of a packet.
You can assign a maximum of eight IPv4 and IPv6 subnets to a VSI.
You must specify a gateway interface for a VSI before you can assign subnets to the VSI. If you
remove the gateway interface from the VSI, the VSI's subnet settings are automatically deleted.
For VSIs that share a gateway interface, the subnets must be unique.
Examples
# Assign subnet 100.0.10.0/24 to VSI
vxlan
.
<Sysname> system-view
[Sysname] vsi vxlan
[Sysname-vsi-vxlan] gateway subnet 100.0.10.0 0.0.0.255