【发布时间】:2013-05-26 20:32:52
【问题描述】:
嘿,伙计们,我需要知道如何更改我电脑的 MAC 地址,我知道这与注册表有关,我不喜欢深入研究,原因是,如果出现问题搞砸了。我没有任何启动代码可以继续。对不起。
【问题讨论】:
标签: batch-file registry mac-address windows-xp-sp3
嘿,伙计们,我需要知道如何更改我电脑的 MAC 地址,我知道这与注册表有关,我不喜欢深入研究,原因是,如果出现问题搞砸了。我没有任何启动代码可以继续。对不起。
【问题讨论】:
标签: batch-file registry mac-address windows-xp-sp3
见
netsh interface ipv4 set address /?
这应该做你想做的。
编辑:我在几年前编写了这个程序。 使用你需要的任何东西。 请注意,您可能必须使“LAN-Verbindung”适应您的适配器名称(使用“ipconfig”查找) 也很抱歉德语“how-to”,我不知道这些菜单是如何用英文命名的。 - 但也许,您不需要 DHCP 服务器。
@echo off
if "%1"=="home" goto home
if "%1"=="office" goto office
if "%1"=="dhcp" goto dhcp
if "%1"=="server" goto server
goto help
REM set ip-address to parameter
netsh interface ip set address "LAN-Verbindung" static %1 255.255.255.0
goto ende
:dhcp rem work as DHCP-Client
netsh interface ip set address "LAN-Verbindung" dhcp
goto ende
:server rem work as DHCP-Server
netsh interface ip set address "LAN-Verbindung" static 192.168.0.1 255.255.255.0 192.168.0.1 1
goto ende
:home rem fixed Address at home
netsh interface ip set address "LAN-Verbindung" static 192.168.178.30 255.255.255.0 192.168.178.1 1
goto ende
:office rem fixed Address at office
netsh interface ip set address "LAN-Verbindung" static 192.168.0.5 255.255.255.0
goto ende
:help
echo.
echo Syntax: ip [parameter]
echo Parameter:
echo home set a fixed IP (predefined)
echo work set a fixed IP (predefined)
echo server set a fixed IP (predefined) and works as DHCP-Server
echo dhcp works as DHCP-Client
echo [IP-Adresse] set a fixed IP (defined by parameter
echo Examples:
echo ip 192.168.1.44 sets IP to 192.168.1.44
echo ip server sets IP to 192.168.0.1 and starts DHCP-Server
echo ip home sets IP to a fixed (predefined) IP
echo ip dhcp fetches an IP from DHCP-Server
echo ATTENTION: to work as DHCP-Server, the "Gemeinsame Nutzung der
echo Internetverbindung" aktiviert werden (has to be done only one time).
echo Netzwerkverbindungen "Eigenschaften"
echo LAN-Verbindung "Eigenschaften"
echo "Erweitert" "Anderen Benutzern im Netzwerk gestatten..." aktivieren
echo HINT: This Batch-file needs Administrator-rights
echo.
REM the IP-Range for den DHCP-Server can be determined to a smaller range.
REM Info see: http://support.microsoft.com/?kbid=230248
goto ende2
:ende
ipconfig
:ende2
echo.
【讨论】:
在我自己的 PC 上,我有一个 Realtek PCIe 卡,我可以通过这种方式指定一个硬件 (MAC) 地址。
这里是 Superuser.com 线程的链接,带有屏幕截图: Advanced parameters for realtek pci-e gbe family network card
您也可以研究MAC Spoofing 了解更多信息。
【讨论】: