The mac-forced-forwarding gateway-detect command enables timed gateway detection and sets the gateway detection interval.
The undo mac-forced-forwarding gateway-detect command disables timed gateway detection.
By default, timed gateway detection is enabled and the default gateway detection interval is 30s.
mac-forced-forwarding gateway-detect [ interval interval-time ]
undo mac-forced-forwarding gateway-detect
Parameter |
Description |
Value |
---|---|---|
interval interval-time | Indicates the gateway detection interval. |
The value is an integer that ranges from 30 to 17280, in seconds. |
Usage Scenario
On a practical network, services may be interrupted for a long time because the MFF-enabled device cannot immediately detect the gateway MAC address change. Timed gateway detection can solve this problem. After the detection function is enabled (enabled by default), the MFF-enabled device scans recorded gateway information every interval-time seconds. For each gateway recorded, the MFF-enabled device uses user information to construct an ARP request packet and sends it to the network interface. The MFF-enabled device then learns the gateway MAC address from the ARP reply packet. If the gateway MAC address changes, the MFF-enabled device immediately updates the gateway information and broadcasts gratuitous ARP packets to users. Users can update the gateway address.
Prerequisites
MFF has been enabled in a VLAN using the mac-forced-forwarding enable command.
Precautions
When detecting multiple gateway addresses, the MFF-enabled device sends an ARP reply packet with the first gateway address by default.
After MFF is enabled, timed gateway detection does not take effect if no ARP request packet is received from the user or gateway or if no user is authorized by the DHCP server to access the network.
If a gateway fails, traffic between users will be blocked. To avoid this situation, the device considers a gateway invalid if it does not receive a response from the gateway after five detection attempts. The device then deletes the MAC address entry of the invalid gateway. If the gateway detection interval is changed during a detection, the number of detection times is accumulated.