The mac-forced-forwarding static-gateway command configures a static gateway IP address in a VLAN.
The undo mac-forced-forwarding static-gateway command cancels the configuration.
By default, no static gateway IP address is configured in a VLAN.
mac-forced-forwarding static-gateway ip-address &<1-16>
undo mac-forced-forwarding static-gateway { ip-address | all }
Parameter | Description | Value |
---|---|---|
ip-address | Specifies the static gateway IP address in a VLAN. A maximum of 16 static gateway IP addresses in a VLAN can be specified in this command. | The value is in dotted decimal notation. NOTE:
This IP address must be a class A, B, or C address. If the IP address is a class A address, it cannot be in the format 0.x.x.x. |
all | Deletes all static gateway IP addresses in the VLAN. | - |
Usage Scenario
The static gateway is applicable when users are configured with static IP addresses. These users cannot dynamically obtain gateway information through DHCP packets. In this case, configure a static gateway address for each VLAN. After you run the mac-forced-forwarding static-gateway command, the users who are not authorized by the DHCP server can use the static gateway address to access the network. The users who are authorized by the DHCP server can still access the original gateway.
Prerequisites
Global MFF has been enabled using the mac-forced-forwarding enable command.
Precautions
If a static gateway IP address is changed, users will fail to access the network. The MAC address in the ARP table on the client belongs to the old gateway. After a new gateway is configured, the ARP entry on client is not updated immediately (that is, the MAC address in ARP table is not updated to the new gateway's MAC address). Therefore, the user cannot access the network.