windows
(Network) How to overcome SET failover
아이셩짱셩
2025. 7. 7. 15:49
728x90
VM1 is unaware of SET or NIC failover on the Hyper-V host. Therefore, you cannot automatically detect SET failover from within the VM without external assistance.
You can simulate or force outbound traffic from VM1 under certain conditions to help refresh MAC learning on the new switch port.
🔸 1. Send Periodic Gratuitous ARPs (GARP) or ARP Replies from VM1
Gratuitous ARP is a common way to update switches and neighbor MAC tables.
- VM1 can periodically send GARP — announcing its IP/MAC.
- This forces the switch (Switch B) to update the MAC table.
- It also helps the sender’s switch learn the new path.
PowerShell inside VM (Windows):
while ($true) {
Start-Sleep -Seconds 10
arp -s 3.3.3.3 00-11-22-33-44-55
ping -n 1 3.3.3.3 > $null
}
You can write a small agent inside the VM to detect outbound failures (e.g., ping timeout) and then trigger ARP or broadcast.
🔸 2. Use a Host-Level Script to Inject ARP / GARP
The host knows when the SET team reassigns NICs.
- You can write a PowerShell script on the host to monitor NIC failover (via Get-NetAdapter, Get-NetLbfoTeamMember, or Get-NetLbfoTeam) and then:
- Send a GARP or broadcast on behalf of VM1.
- Use tools like Send-NetNeighborAdvertisement (not native but can be scripted via raw socket or third-party tools).
🔸 3. Leverage Hyper-V Extensible Switch Notifications (Advanced)
In theory:
- You can write an Extensible Switch Extension that tracks port/NIC transitions.
- It can trigger an outbound packet injection from the host layer into VM1’s stream.
- This is complex and rarely justified unless you’re developing a network driver or advanced monitoring tool.
🔸 4. Use VM Heartbeats and External Orchestrator
If you have a monitoring or SDN system:
- Detect if VM1’s MAC is missing from the wrong switch.
- Trigger VM1 (via agent or script) to send outbound traffic.
🔸 5. Dynamic Load Balancing (Instead of Hyper-V Port)
As mentioned before:
- Hyper-V Port mode sticks a VM to one NIC until failover.
- Dynamic mode recalculates NIC mappings more frequently.
- May trigger more natural MAC movement and avoid long silent periods after failover.
Set-VMSwitchTeam -Name "vSwitch1" -LoadBalancingAlgorithm Dynamic
728x90