博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

Linuxjiaq

注:本站内容大部分为转载,学习用途!
Google
搜索WWW 搜索http://linuxjiaq.cublog.cn
   linuxjiaq.cublog.cn
关于作者  
姓名:Linujiaq
职业:待业
年龄:23
位置:深圳
个性介绍:内外皆有
公司名称:待业.郁闷中...

我的分类  




ip-mac
@echo off
::读取本机Mac地址
if exist ipconfig.txt del ipconfig.txt
ipconfig /all >ipconfig.txt
if exist phyaddr.txt del phyaddr.txt
find "Physical Address" ipconfig.txt >phyaddr.txt
for /f "skip=2 tokens=12" %%M in (phyaddr.txt) do set Mac=%%M
::读取本机ip地址
if exist IPAddr.txt del IPaddr.txt
find "IP Address" ipconfig.txt >IPAddr.txt
for /f "skip=2 tokens=15" %%I in (IPAddr.txt) do set IP=%%I
::绑定本机IP地址和MAC地址
arp -d
arp -s %IP% %Mac%
arp -s [ip] [mac]
exit

 发表于: 2008-03-10,修改于: 2008-03-10 09:52 已浏览222次,有评论0条 推荐 投诉

  网友评论

  发表评论



Copyright © 2001-2006 ChinaUnix.net All Rights Reserved

感谢所有关心和支持过ChinaUnix的朋友们
页面生成时间:0.01079

京ICP证041476号