ubuntu14.04 wlan0启动脚本位置,如何修改wlan0 Mac地址

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
roydonghao
帖子: 5
注册时间: 2012-05-17 11:34
送出感谢: 0
接收感谢: 0

ubuntu14.04 wlan0启动脚本位置,如何修改wlan0 Mac地址

#1

帖子 roydonghao » 2017-09-12 16:21

请问Ubuntu14.04 WLAN0 启动过程在哪里?如何修改WLAN0 Mac地址,临时和永久的方法,谢谢
poloshiao
论坛版主
帖子: 18008
注册时间: 2009-08-04 16:33
送出感谢: 21 次
接收感谢: 1914 次

Re: ubuntu14.04 wlan0启动脚本位置,如何修改wlan0 Mac地址

#2

帖子 poloshiao » 2017-09-12 16:52

把下面指令 複製 貼進終端機 執行
1. sudo lshw -numeric -class network
2. sudo ifconfig -a
把結果全部直接 選取/複製/貼上來
roydonghao
帖子: 5
注册时间: 2012-05-17 11:34
送出感谢: 0
接收感谢: 0

Re: ubuntu14.04 wlan0启动脚本位置,如何修改wlan0 Mac地址

#3

帖子 roydonghao » 2017-09-12 21:05

roy@roy:~$ sudo lshw -numeric -class network
[sudo] password for roy:
*-network
description: Wireless interface
product: Intel Corporation [8086:3166]
vendor: Intel Corporation [8086]
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 99
serial: 00:db:df:39:8b:7d
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=4.4.0-89-generic firmware=16.242414.0 ip=192.168.133.113 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
resources: irq:319 memory:d2100000-d2101fff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10EC:8168]
vendor: Realtek Semiconductor Co., Ltd. [10EC]
physical id: 0
bus info: pci@0000:03:00.0
logical name: eth0
version: 15
serial: 54:ee:75:94:d5:7a
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.217 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:125 ioport:c000(size=256) memory:d2004000-d2004fff memory:d2000000-d2003fff
roy@roy:~$ sudo ifconfig -a
eth0 Link encap:Ethernet HWaddr 54:ee:75:94:d5:7a
inet addr:192.168.1.217 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::56ec:75ff:fe94:d579/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:259367 errors:0 dropped:0 overruns:0 frame:0
TX packets:139473 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:282881244 (282.8 MB) TX bytes:11836813 (11.8 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2222 errors:0 dropped:0 overruns:0 frame:0
TX packets:2222 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:329298 (329.2 KB) TX bytes:329298 (329.2 KB)

wlan0 Link encap:Ethernet HWaddr 00:db:df:39:8b:7d
inet addr:192.168.133.113 Bcast:192.168.135.255 Mask:255.255.252.0
inet6 addr: fe80::2db:dfff:fe39:8b7c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:176636 errors:0 dropped:0 overruns:0 frame:0
TX packets:2024 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:30281586 (30.2 MB) TX bytes:352655 (352.6 KB)
roydonghao
帖子: 5
注册时间: 2012-05-17 11:34
送出感谢: 0
接收感谢: 0

Re: ubuntu14.04 wlan0启动脚本位置,如何修改wlan0 Mac地址

#4

帖子 roydonghao » 2017-09-12 21:05

roy@roy:~$ sudo lshw -numeric -class network
[sudo] password for roy:
*-network
description: Wireless interface
product: Intel Corporation [8086:3166]
vendor: Intel Corporation [8086]
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 99
serial: 00:db:df:39:8b:7d
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=4.4.0-89-generic firmware=16.242414.0 ip=192.168.133.113 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
resources: irq:319 memory:d2100000-d2101fff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10EC:8168]
vendor: Realtek Semiconductor Co., Ltd. [10EC]
physical id: 0
bus info: pci@0000:03:00.0
logical name: eth0
version: 15
serial: 54:ee:75:94:d5:7a
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.217 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:125 ioport:c000(size=256) memory:d2004000-d2004fff memory:d2000000-d2003fff
roy@roy:~$ sudo ifconfig -a
eth0 Link encap:Ethernet HWaddr 54:ee:75:94:d5:7a
inet addr:192.168.1.217 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::56ec:75ff:fe94:d579/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:259367 errors:0 dropped:0 overruns:0 frame:0
TX packets:139473 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:282881244 (282.8 MB) TX bytes:11836813 (11.8 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2222 errors:0 dropped:0 overruns:0 frame:0
TX packets:2222 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:329298 (329.2 KB) TX bytes:329298 (329.2 KB)

wlan0 Link encap:Ethernet HWaddr 00:db:df:39:8b:7d
inet addr:192.168.133.113 Bcast:192.168.135.255 Mask:255.255.252.0
inet6 addr: fe80::2db:dfff:fe39:8b7c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:176636 errors:0 dropped:0 overruns:0 frame:0
TX packets:2024 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:30281586 (30.2 MB) TX bytes:352655 (352.6 KB)
roydonghao
帖子: 5
注册时间: 2012-05-17 11:34
送出感谢: 0
接收感谢: 0

Re: ubuntu14.04 wlan0启动脚本位置,如何修改wlan0 Mac地址

#5

帖子 roydonghao » 2017-09-12 21:06

roy@roy:~$ sudo lshw -numeric -class network
[sudo] password for roy:
*-network
description: Wireless interface
product: Intel Corporation [8086:3166]
vendor: Intel Corporation [8086]
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 99
serial: 00:db:df:39:8b:7d
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=iwlwifi driverversion=4.4.0-89-generic firmware=16.242414.0 ip=192.168.133.113 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
resources: irq:319 memory:d2100000-d2101fff
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10EC:8168]
vendor: Realtek Semiconductor Co., Ltd. [10EC]
physical id: 0
bus info: pci@0000:03:00.0
logical name: eth0
version: 15
serial: 54:ee:75:94:d5:7a
size: 100Mbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.217 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
resources: irq:125 ioport:c000(size=256) memory:d2004000-d2004fff memory:d2000000-d2003fff
roy@roy:~$ sudo ifconfig -a
eth0 Link encap:Ethernet HWaddr 54:ee:75:94:d5:7a
inet addr:192.168.1.217 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::56ec:75ff:fe94:d579/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:259367 errors:0 dropped:0 overruns:0 frame:0
TX packets:139473 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:282881244 (282.8 MB) TX bytes:11836813 (11.8 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2222 errors:0 dropped:0 overruns:0 frame:0
TX packets:2222 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:329298 (329.2 KB) TX bytes:329298 (329.2 KB)

wlan0 Link encap:Ethernet HWaddr 00:db:df:39:8b:7d
inet addr:192.168.133.113 Bcast:192.168.135.255 Mask:255.255.252.0
inet6 addr: fe80::2db:dfff:fe39:8b7c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:176636 errors:0 dropped:0 overruns:0 frame:0
TX packets:2024 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:30281586 (30.2 MB) TX bytes:352655 (352.6 KB)
poloshiao
论坛版主
帖子: 18008
注册时间: 2009-08-04 16:33
送出感谢: 21 次
接收感谢: 1914 次

Re: ubuntu14.04 wlan0启动脚本位置,如何修改wlan0 Mac地址

#6

帖子 poloshiao » 2017-09-13 10:30

sudo ifconfig -a
wlan0 Link encap:Ethernet HWaddr 00:db:df:39:8b:7d

如果無線網卡硬件/軟件固體驅動都正常啟動 網路有關程式會將開機掃描到的 MAC (00:db:df:39:8b:7d) 寫進 /etc/udev/rules.d/70-persistent-net.rules 的 ATTR{address}=="00:db:df:39:8b:7d" 欄位 並且依序給予 NAME="wlanx", x=0,1,2,... 無線網卡界面

意思是 根據 無線網卡硬件/軟件固體 提供的 MAC

新手 不建議去修改 無線網卡硬件/軟件固體 提供的 MAC (雖然 能夠修改)
roydonghao
帖子: 5
注册时间: 2012-05-17 11:34
送出感谢: 0
接收感谢: 0

Re: ubuntu14.04 wlan0启动脚本位置,如何修改wlan0 Mac地址

#7

帖子 roydonghao » 2017-09-13 11:31

poloshiao 写了:
sudo ifconfig -a
wlan0 Link encap:Ethernet HWaddr 00:db:df:39:8b:7d

如果無線網卡硬件/軟件固體驅動都正常啟動 網路有關程式會將開機掃描到的 MAC (00:db:df:39:8b:7d) 寫進 /etc/udev/rules.d/70-persistent-net.rules 的 ATTR{address}=="00:db:df:39:8b:7d" 欄位 並且依序給予 NAME="wlanx", x=0,1,2,... 無線網卡界面

意思是 根據 無線網卡硬件/軟件固體 提供的 MAC

新手 不建議去修改 無線網卡硬件/軟件固體 提供的 MAC (雖然 能夠修改)

非常感谢
回复

回到 “网卡问题以及网络和拨号”