Configuration Guide
IP Service Configuration
MAC-Trigger Configuration
9 min
introduction introduction mac trigger is a feature that triggers the learning of hostroutes (32 bit host routes) based on the source mac address (smac) it works primarily in conjunction with dhcp snooping entries its purpose is to ensure timely updating of host routes when a user's ip address and gateway mac address remain unchanged after migration this guarantees the quality of the network during user migration when they send business traffic explanation of principles explanation of principles as depicted in the diagram, when a terminal migrates to a new device and sends its first packet, this packet might not be an arp/nd packet consequently, it cannot trigger the arp/nd learning process, leading to a delay in updating the host route this inconsistency in the data packet's round trip path hinders the terminal from accessing the network properly when the mac trigger feature is enabled, after a terminal user migrates to a new device, the device checks its local mac table if there is no entry in the local mac address table that matches the source mac address of the packet, the mac trigger learning is triggered this learning process is combined with the arp to host learning feature the newly learned arp/nd entries are converted into corresponding host routes these routes are then synchronized to other devices in the network environment via the bgp protocol this ensures that when a terminal user migrates without changes in their ip address and gateway mac address, the host routes are promptly updated this effective update safeguards the network quality during user migration for instance, when a user comes online on leafb, the device checks its local mac table if there is no entry that matches the source mac address of the packet, the mac trigger is triggered it learns both mac and arp/ndp entries this is often used in conjunction with cluster configuration the newly learned arp/ndp entries are transformed into host routes, which are synchronized to the spine devices through the bgp protocol this triggers the removal of entries on the source device, achieving fast migration effects mac trigger configuration mac trigger configuration operation command description enter the system configuration view configure terminal enter the vlan view vlan id enable mac trigger function mac trigger enable display and maintenance display and maintenance operation command description display the configuration of the mac trigger show vlan mac trigger \[vlan id id] configuration example configuration example network requirements network requirements users access network through aps, requirement terminal can come online quickly after migration from leaf a to leaf b procedure procedure leaf a configuration \# leaf a creates a bgp neighbor with spine sonic(config)# vlan 500 sonic(config)# interface ethernet 50 sonic(config if 50)# switchport access vlan 500 sonic(config)# interface vlan 500 sonic(config vlanif 500)# ip address 10 255 8 1/30 sonic(config vlanif 500)# exit sonic(config)# router bgp 65200 sonic(config router)# bgp router id 10 15 1 1 sonic(config router)# no bgp ebgp requires policy sonic(config router)# neighbor 10 255 8 2 remote as 65100 sonic(config router)# neighbor 10 255 8 2 bfd sonic(config router)# neighbor 10 255 8 2 description spinea \# leaf a configures the ap downlink port to configure the mac address of the vlan gateway where the user segment of the downlink port is located as a fixed mac address sonic(config)# vlan 800 sonic(config vlan 800)# mac address 00 01 01 01 08 00 sonic(config vlan 800)# exit sonic(config)# interface ethernet 1 sonic(config if 1)# switchport access vlan 800 sonic(config)# interface vlan 800 sonic(config vlanif 800)# ip address 192 168 52 1/24 sonic(config vlanif 800)# exit \# leaf a configures dhcp relay related functions sonic(config)# dhcp relay test v4 sonic(config dhcp relay test v4)# down link interface vlan 800 sonic(config dhcp relay test v4)# up link interface vlan500 sonic(config dhcp relay test v4)# server ip 150 1 0 1 sonic(config dhcp relay test v4)# loopback interface loopback 0 sonic(config dhcp relay test v4)# exit \# leaf a enables mac trigger sonic(config)# vlan 800 sonic(config vlan 800)# mac trigger enable leaf b and leaf a configurations are identical spine sonic(config)# router bgp 65100 sonic(config router)# bgp router id 10 15 1 3 sonic(config router)# no bgp ebgp requires policy sonic(config router)# neighbor 10 255 8 1 remote as 65200 sonic(config router)# neighbor 10 255 8 1 bfd sonic(config router)# neighbor 10 255 8 1 description leafa verify configuration verify configuration sonic# show vlan mac trigger + + + \| vlanid | status | +=========+==========+ \| 800 | enabled | + + + when a user migrates from leaf a to leaf b, leaf b can quickly learn the arp table entries
