arp -d
FOR /f "tokens=14 delims=: " %%i in ('ipconfig /all ^|find /i "IP Address"') do Set ip=%%i
FOR /f "tokens=11 delims=: " %%i in ('ipconfig /all ^|find /i "Physical Address"') do Set mac=%%i
echo arp -s %IP% %MAC%>c:\ipmac.bat
FOR /f "tokens=12 delims=: " %%i in ('ipconfig /all ^|find /i "Default Gateway"') do Set GateIP=%%i
FOR /f "skip=3 tokens=2" %%b in ('arp -a %GateIP%') do Set GateMAC=%%b
echo arp -s %Gateip% %GateMAC%>>c:\ipmac.bat
[ Last edited by ulboy on 2007-6-27 at 11:56 PM ]
FOR /f "tokens=14 delims=: " %%i in ('ipconfig /all ^|find /i "IP Address"') do Set ip=%%i
FOR /f "tokens=11 delims=: " %%i in ('ipconfig /all ^|find /i "Physical Address"') do Set mac=%%i
echo arp -s %IP% %MAC%>c:\ipmac.bat
FOR /f "tokens=12 delims=: " %%i in ('ipconfig /all ^|find /i "Default Gateway"') do Set GateIP=%%i
FOR /f "skip=3 tokens=2" %%b in ('arp -a %GateIP%') do Set GateMAC=%%b
echo arp -s %Gateip% %GateMAC%>>c:\ipmac.bat
[ Last edited by ulboy on 2007-6-27 at 11:56 PM ]
