windows下很好解决,去设备管理器里改下网卡的mac地址就行了
linux下怎么办,目标是希望开机就能获取ip
如果路由那边是动态分配ip的,linux下在/etc/rc.local,这个文件是linux系统启动过程中最后运行的脚本,在其中加上
ifconfig eth0 down#假设是eth0,如果不是就是eth?
ifconfig eth0 hw ether "xx:xx:xx:xx:xx" #主机的mac地址
ifconfig eth0 up
dhclient eth0