MAC Detection Configuration
show mac-scan config
Section titled “show mac-scan config”[Command] show mac-scan config
[Purpose] Display mac-scan configuration
[View] System view
[Use Cases]
sonic# show mac-scan configstatus:disabledperiod:10checkneigh:enabledremote:disabled+-------------+| INTERFACE |+=============+| Vlan200 |+-------------+mac-scan enable
Section titled “mac-scan enable”[Command] mac-scan enable no mac-scan enable
[Purpose] Enable MAC detection function
[View] System configuration view, VLAN view
[Notes] Enabling this feature allows sending ARP Request packets based on Snooping entries, User-bind entries, and ARP entries with corresponding IP addresses. This is often used for scenarios such as bringing dumb terminals or servers online. It helps proactively update the device’s MAC and ARP table entries.
[Use Cases]
sonic(config)# mac-scan enablemac-scan remote enable
Section titled “mac-scan remote enable”[Command] mac-scan remote enable no mac-scan remote enable
[Purpose] Enable MAC remote terminal detection function
[View] System configuration view
[Usage Scenario] By default, the detection process only operates on IP addresses in the Snooping table with the “Local” attribute. When remote devices update their table entries, the update information might not be transmitted to this device in a timely manner due to the large-scale network topology, resulting in potential loss of device traffic. Enabling this configuration can help expedite the onboarding process for terminals when they migrate to new devices.
[Use Cases]
sonic(config)# mac-scan remote enablemac-scan no-response delete
Section titled “mac-scan no-response delete”[Command] mac-scan no-response delete no mac-scan no-response delete
[Purpose] Enables the ability to delete Snooping entries based on the results of MAC probes
[View] System configuration view
[Usage Scenario] By default, the device only deletes the Snooping table entry when it receives a release message from the terminal. Enabling this feature allows the device to delete entries for which the type is “local” if it doesn’t receive a response after three detections.
[Use Cases]
sonic(config)# mac-scan no-response deletemac-scan period
Section titled “mac-scan period”[Command] mac-scan period period
[Purpose] Configure the interval for sending probe packets
[Parameter]
| Parameter | Description |
|---|---|
| period | Value range: 1, 1000, unit: ms, deault 10 |
[View] System configuration view
[Notes] The default time interval is: 10ms
[Use Cases]
sonic(config)# mac-scan period 1000mac-scan ip-ranges
Section titled “mac-scan ip-ranges”[Command] mac-scan ip-ranges string
[Purpose Configure terminal detection based on subnet
[Parameter]
| Parameter | Description |
|---|---|
| IP Range | For example: 80.0.0.1-90.0.0.2 |
| IP Range within Subnet | For example: 91.0.0.1/24-91.0.0.5/24 |
| IP Subnet | For example: 92.0.0.3/24 |
| Single IP | For example: 93.0.0.2 |
[View] VLAN view
[Notes] When this configuration coexists with the SNP table, scan the IPs one by one in intervals, with each SNP followed by an IP range from the subnet. If a new SNP table is generated, prioritize scanning the new SNP table entries
[Use Cases]
sonic(config)# vlan 20sonic(config-vlan-20)# mac-scan ip-ranges 10.1.1.2