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
undo gateway subnet ipv4-address wildcard-mask
Default
No subnet is assigned to a VSI.
Views
VSI view
Predefined user roles
network-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.
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 subnets to a VSI. Make sure these subnets are on the same network as one of the IP addresses on the gateway interface.
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 the VSI vxlan.
<Sysname> system-view [Sysname] vsi vxlan [Sysname-vsi-vxlan] gateway subnet 100.0.10.0 0.0.0.255