Для создания wifi подключения нужно (при наличии драйвера) набрать в коммандной строке service NetworkManager start Так же необходимо знать комманды диагностирования сети... В первом фрейме (клик по картинке) краткая инятрукция Centos во втором подробности от RedHat Д. Колесниченко (Linux на ноутбуке) сначала пишет об установке драйверов. Можно даже использовать драйверы Windows.
Но об этом мы здесь разговаривать не будем (хотя в меню есть полезные ссылки).
Я же не мог подключить wifi из-за того, что не смог найти System -> Preferences -> More Preferences -> Network connections
Но сначала я выполнил вот этот мануал.
First we are going to configure your CentOS system to automatically start the NetworkManager on startup. You can do this by running:
chkconfig NetworkManager on
service NetworkManager start
...текст полность приведен в предпоследнем комментарии
Еще нас будет интересовать файл /etc/network/interfaces Вот список полезных комманд (многие из них выполнены в комментриях)
uname -a - получить версию ядра,
lspci, lsubs, lshw - помогает идентифицировать ваше устройство, вывовдят список PCI-устройств, список USB-устройств, список оборудования компьютера.
lsmod - выводит список загруженных модулей (драйверов устройств),
iwlist scan - найти беспроводные сети,
iwconfig - информация о беспроводных интерфейсах,
iwevent - просмотр событий сети,
route - просмотр таблицы маршрутизации,
sudo /etc/init.d/networking restart - перезапуск сети,
dmesg | less - просмотр сообщения ядра,
sudo killall NetworkManager - остановить NetworkManager,
sudo /etc/init.d/dbus restart - перезапустить все сетевые демоны.
nm-tool - просмотр состояния соединений Network Manager и наличие wifi сетей
Главное отличие настройки wifi подключения в NetworkManager - это необходимость указывать не только ключ шифрования, но и мак-адрес (HW Address в Linux). В целом все оказалось довольно просто - посмотрел тип и ключ шифрования в настройках роутера (192.168.1.1), посмотрел HW Address при помощи команды nm-tool... и создал подключение
Другие посты по теме
Получить версию ядра при установке настоящих Linux модулей (драйверов) а не Windows драйверов (через ndiswrapper)
ОтветитьУдалить[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-308.24.1.el5.centos.plus #1 SMP Tue Dec 4 19:11:28 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
lspci, lsusb, lshw - помогает идентифицировать ваше устройство, вывовдят список PCI-усьройств, список USB-устройств, список оборудования компьютера.
ОтветитьУдалитьlsmod - выводит список загруженных модулей (драйверов устройств)
[root@localhost commons]# lspci
Удалить00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)
00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03)
00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
00:1d.3 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation 82801IBM/IEM (ICH9M/ICH9M-E) 4 port SATA Controller [AHCI mode] (rev 03)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)
03:00.0 Ethernet controller: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) (rev 01)
[root@localhost commons]# lsusb
УдалитьProtocol spec without prior Class and Subclass spec at line 4297
Bus 001 Device 007: ID 04f2:b070 Chicony Electronics Co., Ltd
Bus 001 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 006 Device 007: ID 04d9:a06b Holtek Semiconductor, Inc.
Bus 006 Device 001: ID 0000:0000
Bus 007 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 008 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
[root@localhost commons]# lsmod
ОтветитьУдалитьModule Size Used by
usbnet 51145 0
i915 58305 1
drm 115561 2 i915
autofs4 62153 3
hidp 83521 2
rfcomm 104681 0
l2cap 89537 10 hidp,rfcomm
bluetooth 118725 5 hidp,rfcomm,l2cap
lockd 101425 0
sunrpc 203145 2 lockd
ip_conntrack_netbios_ns 36033 0
ipt_REJECT 38849 1
xt_state 35265 2
ip_conntrack 91749 2 ip_conntrack_netbios_ns,xt_state
nfnetlink 40457 1 ip_conntrack
iptable_filter 36161 1
ip_tables 55457 1 iptable_filter
ip6t_REJECT 38721 1
xt_tcpudp 36289 10
ip6table_filter 36033 1
ip6_tables 50177 1 ip6table_filter
x_tables 50505 6 ipt_REJECT,xt_state,ip_tables,ip6t_REJECT,xt_tcpudp,ip6_tables
be2iscsi 94685 0
ib_iser 68161 0
rdma_cm 68689 1 ib_iser
ib_cm 72809 1 rdma_cm
iw_cm 43465 1 rdma_cm
ib_sa 74953 2 rdma_cm,ib_cm
ib_mad 70757 2 ib_cm,ib_sa
ib_core 104901 6 ib_iser,rdma_cm,ib_cm,iw_cm,ib_sa,ib_mad
ib_addr 41673 1 rdma_cm
iscsi_tcp 50893 0
bnx2i 81249 0
cnic 85481 1 bnx2i
uio 45777 1 cnic
cxgb3i 64849 0
libcxgbi 91597 1 cxgb3i
cxgb3 216241 1 cxgb3i
8021q 58449 1 cxgb3
libiscsi_tcp 53573 3 iscsi_tcp,cxgb3i,libcxgbi
libiscsi2 77765 7 be2iscsi,ib_iser,iscsi_tcp,bnx2i,cxgb3i,libcxgbi,libiscsi_tcp
scsi_transport_iscsi2 73945 8 be2iscsi,ib_iser,iscsi_tcp,bnx2i,libcxgbi,libiscsi2
scsi_transport_iscsi 35017 1 scsi_transport_iscsi2
cpufreq_ondemand 42449 1
acpi_cpufreq 47553 1
freq_table 38977 2 cpufreq_ondemand,acpi_cpufreq
mperf 35265 1 acpi_cpufreq
fuse 83057 2
dm_mirror 54865 0
dm_multipath 58969 0
scsi_dh 42561 1 dm_multipath
video 53197 0
backlight 39873 1 video
sbs 49921 0
power_meter 47053 0
hwmon 36553 1 power_meter
i2c_ec 38593 1 sbs
dell_wmi 37601 0
wmi 41985 1 dell_wmi
button 40545 0
battery 43849 0
asus_acpi 50917 0
acpi_memhotplug 40517 0
ac 38729 0
ipv6 437857 32 ip6t_REJECT,cnic
xfrm_nalgo 43333 1 ipv6
parport_pc 62953 0
lp 47121 0
parport 73165 2 parport_pc,lp
testmgr_cipher 35905 0
testmgr 90097 1 testmgr_cipher
aead 42049 1 testmgr
Удалитьcrypto_blkcipher 48321 1 testmgr
sr_mod 50661 0
crypto_algapi 54721 3 testmgr,aead,crypto_blkcipher
cdrom 68713 1 sr_mod
crypto_api 42945 5 xfrm_nalgo,testmgr,aead,crypto_blkcipher,crypto_algapi
joydev 43969 0
arc4 35009 2
snd_hda_intel 734345 1
sg 70649 0
snd_seq_dummy 37061 0
snd_seq_oss 65473 0
snd_seq_midi_event 41025 1 snd_seq_oss
snd_seq 87777 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device 41557 3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss 77377 0
snd_mixer_oss 49985 1 snd_pcm_oss
ath5k 163581 0
snd_pcm 116681 2 snd_hda_intel,snd_pcm_oss
mac80211 183105 1 ath5k
snd_timer 57161 2 snd_seq,snd_pcm
snd_page_alloc 44113 2 snd_hda_intel,snd_pcm
uvcvideo 87497 0
ath 43585 1 ath5k
snd_hwdep 43721 1 snd_hda_intel
i2c_i801 42561 0
r8169 76613 0
compat_ioctl32 41665 1 uvcvideo
snd 100201 11 snd_hda_intel,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_hwdep
i2c_core 57537 2 i2c_ec,i2c_i801
cfg80211 190217 3 ath5k,mac80211,ath
videodev 58689 1 uvcvideo
mii 38849 1 r8169
v4l1_compat 44613 2 uvcvideo,videodev
shpchp 70893 0
rfkill 51545 1 cfg80211
v4l2_common 57153 3 uvcvideo,compat_ioctl32,videodev
wireless_compat 34753 2 cfg80211,rfkill
soundcore 41825 1 snd
tpm_tis 48077 0
tpm 50273 1 tpm_tis
tpm_bios 40897 1 tpm
pcspkr 36289 0
serio_raw 40517 0
dm_raid45 99785 0
dm_message 36289 1 dm_raid45
dm_region_hash 46145 1 dm_raid45
dm_log 44993 3 dm_mirror,dm_raid45,dm_region_hash
dm_mod 102417 4 dm_mirror,dm_multipath,dm_raid45,dm_log
dm_mem_cache 38977 1 dm_raid45
ahci 73805 3
libata 208977 1 ahci
sd_mod 56513 4
scsi_mod 199641 12 be2iscsi,ib_iser,iscsi_tcp,bnx2i,libcxgbi,libiscsi2,scsi_transport_iscsi2,scsi_dh,sr_mod,sg,libata,sd_mod
ext3 169297 1
jbd 95025 1 ext3
uhci_hcd 57433 0
ohci_hcd 56181 0
ehci_hcd 66765 0
Этот комментарий был удален автором.
ОтветитьУдалитьИнформация обо всех беспроводных сетях
Удалить[root@localhost commons]# iwconfig
lo no wireless extensions.
eth1 no wireless extensions.
wlan0 IEEE 802.11bg ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
sit0 no wireless extensions.
[root@localhost ~]# iwlist scan
ОтветитьУдалитьlo Interface doesn't support scanning.
eth1 Interface doesn't support scanning.
wlan0 Scan completed :
Cell 01 - Address: C0:C1:C0:79:00:9A
Channel:2
Frequency:2.417 GHz (Channel 2)
Quality=27/70 Signal level=-83 dBm
Encryption key:on
ESSID:"Svinik"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=0000000352da115a
Extra: Last beacon: 1097ms ago
IE: Unknown: 00065376696E696B
IE: Unknown: 010882848B960C121824
IE: Unknown: 030102
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: Unknown: 2A0100
IE: Unknown: 32043048606C
IE: WPA Version 257
Group Cipher : Proprietary
Pairwise Ciphers (0) :
Authentication Suites (42023) : IE: WPA Version 4172
Group Cipher : Proprietary
Pairwise Ciphers (0) :
Authentication Suites (0) :
IE: Unknown: 2D1A4C101BFFFF000000000000000000000000000000000000000000
IE: WPA Version 2050
Group Cipher : Proprietary
Pairwise Ciphers (0) :
Authentication Suites (0) :
IE: Unknown: 3D1602080800000000000000000000000000000000000000
IE: Unknown: 4A0E14000A002C01C800140005001900
IE: Unknown: DD0900037F01010000FF7F
IE: Unknown: DD050050F20500
IE: WPA Version 18960
Group Cipher : Proprietary
Pairwise Ciphers (68) : IE: WPA Version 1
Group Cipher : Proprietary
Pairwise Ciphers (1) : TKIP
Cell 02 - Address: 14:D6:4D:9D:33:AB
УдалитьChannel:6
Frequency:2.437 GHz (Channel 6)
Quality=35/70 Signal level=-75 dBm
Encryption key:on
ESSID:"HomeSE"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Mode:Master
Extra:tsf=000000146f2bb18c
Extra: Last beacon: 646ms ago
IE: Unknown: 0006486F6D655345
IE: Unknown: 010882848B962430486C
IE: Unknown: 030106
IE: Unknown: 2A0100
IE: Unknown: 2F0100
IE: Unknown: 32040C121860
IE: Unknown: 2D1A6C181BFF00000000000000000000000000000000000000000000
IE: Unknown: 3D1606001100000000000000000000000000000000000000
IE: Unknown: 4A0E14000A002C01C800140005001900
IE: Unknown: 7F0101
IE: WPA Version 18960
Group Cipher : Proprietary
Pairwise Ciphers (68) : IE: WPA Version 61440
Group Cipher : TKIP
Pairwise Cipher : TKIP
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
IE: WPA Version 257
Group Cipher : Proprietary
Pairwise Ciphers (0) :
Authentication Suites (42023) : Cell 03 - Address: 00:25:12:87:2C:A0
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=55/70 Signal level=-55 dBm
Encryption key:on
ESSID:"My Place"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
УдалитьExtra:tsf=00000071799adc57
Extra: Last beacon: 835ms ago
IE: Unknown: 00084D7920506C616365
IE: Unknown: 010482848B96
IE: Unknown: 030106
IE: Unknown: 070A434E20010D14010D1400
IE: Unknown: 2A0100
IE: Unknown: 32080C1218243048606C
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
IE: WPA Version 257
Group Cipher : Proprietary
Pairwise Ciphers (0) :
Authentication Suites (42023) : Cell 04 - Address: 00:25:12:87:2C:A1
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=54/70 Signal level=-56 dBm
Encryption key:off
ESSID:"FON_COMSTAR"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=00000071799ae415
Extra: Last beacon: 833ms ago
IE: Unknown: 000B464F4E5F434F4D53544152
IE: Unknown: 010482848B96
IE: Unknown: 030106
IE: Unknown: 070A434E20010D14010D1400
IE: Unknown: 2A0100
IE: Unknown: 32080C1218243048606C
IE: WPA Version 257
Group Cipher : Proprietary
Pairwise Ciphers (0) :
Authentication Suites (42023) : Cell 05 - Address: CC:5D:4E:99:73:FE
Channel:5
Frequency:2.432 GHz (Channel 5)
Quality=28/70 Signal level=-82 dBm
Encryption key:on
ESSID:""
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 9 Mb/s
18 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 12 Mb/s; 24 Mb/s; 48 Mb/s
Mode:�(�
УдалитьExtra:tsf=0000047f2f7aa174
Extra: Last beacon: 773ms ago
IE: Unknown: 0000
IE: Unknown: 010882848B9692A4C8EC
IE: Unknown: 030105
IE: Unknown: 32048C98B0E0
IE: Unknown: 0706545720010D14
IE: Unknown: 33082001020304050607
IE: Unknown: 33082105060708090A0B
IE: WPA Version 18960
Group Cipher : Proprietary
Pairwise Ciphers (68) : IE: Unknown: 050400010000
IE: Unknown: 2A0104
IE: Unknown: 2D1AEE1117FFFF0000010000000000000000000000000C0000000000
IE: Unknown: 3D1605070100000000000000000000000000000000000000
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
IE: WPA Version 257
Group Cipher : Proprietary
Pairwise Ciphers (0) :
Authentication Suites (42023) : IE: Unknown: 0B05000017127A
IE: WPA Version 0
Group Cipher : TKIP
Pairwise Cipher : TKIP
Cell 06 - Address: 00:14:D1:65:F7:8B
Channel:9
Frequency:2.452 GHz (Channel 9)
Quality=16/70 Signal level=-94 dBm
Encryption key:on
ESSID:"Beeline163"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=00000078635c419b
Extra: Last beacon: 572ms ago
IE: Unknown: 000A4265656C696E65313633
IE: Unknown: 010882848B960C121824
IE: Unknown: 030109
IE: Unknown: 050400010000
IE: Unknown: 2A0104
IE: Unknown: 32043048606C
IE: WPA Version 18960
Group Cipher : Proprietary
Pairwise Ciphers (68) : IE: Unknown: DD050050F20500
Cell 07 - Address: 00:26:5A:50:C9:78
Channel:11
Frequency:2.462 GHz (Channel 11)
Quality=22/70 Signal level=-88 dBm
Encryption key:on
ESSID:"Privat_WLAN_MGTS"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Mode:Master
Extra:tsf=0000009fbbd8de01
Extra: Last beacon: 414ms ago
IE: Unknown: 00105072697661745F574C414E5F4D475453
IE: Unknown: 010882848B962430486C
IE: Unknown: 03010B
IE: Unknown: 2A0100
IE: Unknown: 2F0100
IE: Unknown: 32040C121860
IE: WPA Version 61440
Group Cipher : TKIP
Pairwise Cipher : TKIP
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
sit0 Interface doesn't support scanning.
Посмотр таблицы маршрутизации
ОтветитьУдалить[root@localhost ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
default Broadcom.Home 0.0.0.0 UG 0 0 0 eth1
root@localhost ~]# nm-tool
ОтветитьУдалитьNetworkManager Tool
State: connected
- Device: eth1 ----------------------------------------------------------------
Type: Wired
Driver: r8169
State: connected
Default: yes
HW Address: 00:1E:33:9C:7E:09
Capabilities:
Supported: yes
Carrier Detect: yes
Speed: 100 Mb/s
Wired Settings
IPv4 Settings:
Address: 192.168.1.2
Prefix: 24 (255.255.255.0)
Gateway: 192.168.1.1
DNS: 192.168.1.1
- Device: wlan0 ----------------------------------------------------------------
Type: 802.11 WiFi
Driver: ath5k
State: disconnected
Default: no
HW Address: 00:24:D2:0E:06:3F
Capabilities:
Supported: yes
Wireless Settings
WEP Encryption: yes
WPA Encryption: yes
WPA2 Encryption: yes
Wireless Access Points
My Place: Infra, 00:25:12:87:2C:A0, Freq 2437 MHz, Rate 54 Mb/s, Str ngth 74 WPA
HomeSE: Infra, 14:D6:4D:9D:33:AB, Freq 2437 MHz, Rate 48 Mb/s, Str ngth 52 WPA
Svinik: Infra, C0:C1:C0:79:00:9A, Freq 2417 MHz, Rate 54 Mb/s, Str ngth 42 WPA WPA2
FON_COMSTAR: Infra, 00:25:12:87:2C:A1, Freq 2437 MHz, Rate 54 Mb/s, Str ngth 75
Статья о том, как изменить HW Address (Mac-adress) http://mydebianblog.blogspot.ru/2007/02/blog-post_24.html
ОтветитьУдалитьИногда может потребоваться узнать или изменить MAC адрес сетевой карты в Linux, например, если он используется для авторизации доступа в интернет. Изменить MAC-адрес очень просто, для этого существуют специальные системные файлы, которые нужно немного подправить. Это довольно простая, хотя по первому разу не очевидная, процедура.
Временная смена MAC-адреса в Linux
Для этого набираем
sudo ifconfig eth0 hw ether xx:xx:xx:xx
при этом MAC-адрес изменится и будет оставаться таковым до перезагрузки. Если нужно сделать так, чтобы MAC-адрес был таким всегда, нужно приударить в соответствующий бубен системный конфиг.
Постоянный изменённый MAC-адрес в Linux
Для этого идём в /etc/network/if-pre-up.d/ и создаём там от рута файл, например имени pre-up.
Вот базовая статья для подключчения: http://wiki.centos.org/HowTos/Laptops/NetworkManager
ОтветитьУдалитьEnabling NetworkManager
Most laptops nowadays ship with Wireless inside, and even if it does not there are many options to add a Wireless device to your laptop.
NetworkManager [1,2] is a service that runs on your system that allows you to easily set up your network connection, and it is especially useful if you need to configure a wireless connection. Unfortunately, by default NetworkManager is disabled so we have to enable it.
Starting the NetworkManager service
First we are going to configure your CentOS system to automatically start the NetworkManager on startup. You can do this by running:
chkconfig NetworkManager on
Then we are going to start it so we can use it right away without needing to reboot:
service NetworkManager start
If you have done that in your graphical environment (Gnome), your Notification Area (usually in the Gnome panel on the top-right) will show a new icon. If you left-click on this icon, you will see a list of possible Wireless networks to connect to.
You may also want to disable the network and wpa_supplicant services at boot time, as NetworkManager will now handle these. For this, simply do:
chkconfig network off
chkconfig wpa_supplicant off
There is nothing more to it !
Useful hint: The request for the keyring password, when using NetworkManager, can be suppressed by using the pam_keyring package, as described in reference [2]. The pam_keyring package can be obtained from the RPMForge repository.
[1] http://www.redhat.com/magazine/003jan05/features/networkmanager/
[2] http://fedoraproject.org/wiki/Tools/NetworkManager (some gnome- and kde-specific info)
После подключения опять смотрим настройки:
ОтветитьУдалитьroot@localhost ~]# nm-tool
NetworkManager Tool
State: connected
- Device: eth1 ----------------------------------------------------------------
Type: Wired
Driver: r8169
State: connected
Default: yes
HW Address: 00:1E:33:9C:7E:09
Capabilities:
Supported: yes
Carrier Detect: yes
Speed: 100 Mb/s
Wired Settings
IPv4 Settings:
Address: 192.168.1.2
Prefix: 24 (255.255.255.0)
Gateway: 192.168.1.1
DNS: 192.168.1.1
- Device: wlan0 ----------------------------------------------------------------
Type: 802.11 WiFi
Driver: ath5k
State: connected
Default: no
HW Address: 00:24:D2:0E:06:3F
Capabilities:
Supported: yes
Speed: 1 Mb/s
Wireless Settings
WEP Encryption: yes
WPA Encryption: yes
WPA2 Encryption: yes
Wireless Access Points(* = Current AP)
My Place: Infra, 00:25:12:87:2C:A0, Freq 2437 MHz, Rate 54 Mb/s, Strength 75 WPA
*HomeSE: Infra, 14:D6:4D:9D:33:AB, Freq 2437 MHz, Rate 48 Mb/s, Strength 72 WPA
Svinik: Infra, C0:C1:C0:79:00:9A, Freq 2417 MHz, Rate 54 Mb/s, Strength 48 WPA WPA2
FON_COMSTAR: Infra, 00:25:12:87:2C:A1, Freq 2437 MHz, Rate 54 Mb/s, Strength 77
Privat_WLAN_MGTS:Infra, 00:26:5A:50:C9:78, Freq 2462 MHz, Rate 48 Mb/s, Strength 35 WPA
IPv4 Settings:
Address: 192.168.1.51
Prefix: 24 (255.255.255.0)
Gateway: 192.168.1.1
DNS: 192.168.1.1
etc/init.d/networkmanager
ОтветитьУдалить#!/bin/sh
#
# NetworkManager: NetworkManager daemon
#
# chkconfig: - 98 02
# description: This is a daemon for automatically switching network \
# connections to the best available connection.
#
# processname: NetworkManager
# pidfile: /var/run/NetworkManager/NetworkManager.pid
#
prefix=/usr
exec_prefix=/usr
sbindir=/usr/sbin
NETWORKMANAGER_BIN=${sbindir}/NetworkManager
# Sanity checks.
[ -x $NETWORKMANAGER_BIN ] || exit 1
# Source function library.
. /etc/rc.d/init.d/functions
# Source network configuration
. /etc/sysconfig/network
# so we can rearrange this easily
processname=NetworkManager
servicename=NetworkManager
pidfile=/var/run/NetworkManager/NetworkManager.pid
RETVAL=0
start()
{
echo -n $"Setting network parameters... "
sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
success
echo
echo -n $"Starting NetworkManager daemon: "
daemon --check $servicename $processname --pid-file=$pidfile --ppp-dns-workaround
RETVAL=$?
echo
if [ -n "${NETWORKWAIT}" ]; then
[ -z "${LINKDELAY}" ] && LINKDELAY=10
echo -n $"Waiting for network..."
nm-online -q --timeout=$LINKDELAY || nm-online -q -x --timeout=30
[ "$?" = "0" ] && success "network startup" || failure "network startup"
echo
[ -n "${NETWORKDELAY}" ] && /bin/sleep ${NETWORKDELAY}
fi
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename
}
stop()
{
echo -n $"Stopping NetworkManager daemon: "
killproc -p $pidfile $servicename
RETVAL=$?
echo
if [ $RETVAL -eq 0 ]; then
rm -f /var/lock/subsys/$servicename
rm -f $pidfile
fi
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status -p $pidfile $processname
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/$servicename ]; then
stop
start
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
;;
esac
exit $RETVAL