導航:首頁 > 操作系統 > linux設置mac地址

linux設置mac地址

發布時間:2022-06-02 10:03:21

linux下怎麼綁定 網卡的 MAC地址即如何修改

長期更改即為綁定,真實mac是寫在網卡晶元里的,無法更改。

臨時更改
ifconfig eth0 down
ifconfig eth0 hw ether mac地址

ifconfig eth0 up

長期更改

/etc/sysconfig/network-scripts/ifcfg-eth0中加入下面一句話:
MACADDR=mac地址

② linux修改MAC地址文件是什麼

ifconfig

③ linux修改mac地址命令

1.臨時性的修改:

①依次輸入以下命令:

/sbin/ifconfig eth0 down/sbin/ifconfig eth0 hw ether 00:0C:29:36:97:20/sbin/ifconfig eth0 upservice network restart

2.永久性的修改:

方法①:

並把類似於1中的②腳本保存在/etc/rc.local中:這一步是起作用的關鍵步驟
腳本如下:

/sbin/ifconfig eth0 down/sbin/ifconfig eth0 hw ether 00:0C:29:36:97:20/sbin/ifconfig eth0 upservice network restart

方法②:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

添加

MACADDR=00:0C:29:36:97:20

④ 如何在linux中綁定一個ip地址192.168.0.49,mac地址00:00:39:b2:32:91

1、新建一個靜態的mac-->ip對應表文件:ip-mac,將要綁定的IP和MAC地下寫入此文件,格式為
ip
mac。
[root@ftpsvr
~]#
echo
'192.168.1.1
00:00:00:00:00:00
'
>
/etc/ip-mac
[root@ftpsvr
~]#
more
/etc/ip-mac
192.168.1.1
00:00:00:00:00:00
2、設置開機自動綁定
[root@ftpsvr
~]#
echo
'arp
-f
/etc/ip-mac
'
>>
/etc/rc.d/rc.local
3、手動執行一下綁定
[root@ftpsvr
~]#
arp
-f
/etc/ip-mac
4、確認綁定是否成功
[root@ftpsvr
~]#
arp

⑤ linux修改Mac地址

1、臨時性的修改:

依次輸入以下命令:

/sbin/ifconfig eth0 down

/sbin/ifconfig eth0 hw ether 00:0C:29:36:97:20

/sbin/ifconfig eth0 up

service network restart

2、永久性的修改:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

添加MACADDR=00:0C:29:36:97:20

注釋掉原來的HWADDR

:wq 保存退出。

有危害,如果永久激活步驟錯誤則會造成無法聯網的問題。

(5)linux設置mac地址擴展閱讀:

誤區

#ifconfig eth0 down /*禁掉eth0網卡,這里以eth0網卡為例*/

#ifconfig eth0 hw ether 00:AA:BB:CC:DD:EE/*修改eth0網卡的MAC地址*/

#ifconfig eth0 up /*重新啟動eth0網卡*/

然後重新啟動主機。

結論:按照這種方法修改MAC地址,重新啟動主機系統後,MAC地址會自動還原。

⑥ 怎樣修改linux mac地址

方法一:
1.關閉網卡設備
ifconfig eth0 down
2.修改MAC地址
ifconfig eth0 hw ether MAC地址

⑦ Linux中MAC地址問題

linux想修改系統中的MAC地址(例如改為0004a2d2e212),操作方法是:用#ifconfig
eth0
down
先把網卡禁用,否則會報告系統忙,無法更改;然後再用ifconfig
eth0
hw
ether
0004a2d2e212即可。
(此方法只適用即時的,重啟後會恢復為默認的網卡MAC地址)
如果你想永久修改系統中的MAC地址,即讓linux重啟後也是修改後的MAC地址,可以這樣操作:在/etc/rc.d/rc.local中加入以下三行(也可在/etc/init.d/network中添加以下三行)
ifconfig
eth0
down
ifconfig
eth0
hw
ether
0004a2d2e212
ifconfig
eth0
up
★、查看Linux中MAC地址是否改好
方法:可以這樣操作:重啟電腦,在終端下,輸入IPconfig/all命令,於是Physical
Address就會顯示一個地址,你檢查一下即可得知MAC是否修改成功了。

閱讀全文

與linux設置mac地址相關的資料

熱點內容
pythonshell清屏命令 瀏覽:276
檢測到加密狗注冊伺服器失敗 瀏覽:201
解壓後手機如何安裝 瀏覽:518
極客學院app為什麼下架 瀏覽:13
圖片批量壓縮綠色版 瀏覽:651
東北程序員帥哥 瀏覽:707
加密封條風噪小 瀏覽:974
安陽少兒編程市場 瀏覽:499
雲伺服器建設原理 瀏覽:259
javajunit4for 瀏覽:847
華為伺服器如何進陣列卡配置 瀏覽:435
apache伺服器ip地址訪問 瀏覽:719
如何買到安卓手機預裝軟體 瀏覽:537
冤罪百度雲不要壓縮 瀏覽:88
蘇州雲存儲伺服器 瀏覽:177
解壓收納原聲 瀏覽:387
java注冊驗證 瀏覽:377
火花app怎麼上推薦 瀏覽:981
什麼app能游戲投屏到電視上 瀏覽:456
伺服器託管到雲端是什麼意思 瀏覽:837