GentooX86 Handbook_Ko_4-4
1.1. 소개 ¶현재 우리는 wireless-tools 나 wpa_supplicant로 무선설정을 지원합니다. 기역해야 할 중요한점은 인터페이스 기반이 아닌 전역 기반의 무선 네트워크를 위한 설정을 한다는 것입니다
wpa_supplicant가 최상의 선택이지만 이것은 모든 드라이버를 지원하지 않습니다. 지원되는 드라이버 목록을 보려면
![]() wireless-tools는 대부분의 모든 카드와 드라이버를 지원하지만 WPA로 연력하지 못하고 오직 액세스 포인트에만 연결할 수 잇습니다.
#red 경고!! 경고!! : linux-wlan-ng 드라이버는 현재 baselayout에서 지원하지 않습니다. 이 이유는 linux-wlan-ng 이 다른 모든 것과는 달리 완전히 다른 환경설정과 자체적인 설정수단이 들어있기 때문입니다. linux-wlan-ng개발자들이 wireless-tools로 설정 수단을 전환한다는 소문이 있기 때문에, 이것이 현실화되면 baselayout과 함께 linux-wlan-ng를 쓰게 될 것입니다.
1.2. WPA 요청 ¶![]() 예제 2-1 : wpa_supplicant 설치
# emerge net-wireless/wpa_supplicant 중요 : wpa_supplicant를 동작하게 하려면 커널에서 CONFIG_PACKET를 사용가능케 설정해야 합니다.
이제 /etc/conf.d/net 를 설정해야 하고, 그래서 wireless-tools를 통해 wpa_supplicant를 사용할 수 있게끔 해야 합니다 (만약 둘다 설치되었다면 wireless-tools 는 기본으로 설정됩니다).
예제 2-2 : wpa_supplicant를 위한 /etc/conf.d/net 환경설정
# Prefer wpa_supplicant over wireless-tools modules=( "wpa_supplicant" ) # It's important that we tell wpa_supplicant which driver we should # be using as it's not very good at guessing yet wpa_supplicant_eth0="-Dmadwifi" 유의사항 : host-ap드라이버를 사용하고 있다면 wpa_supplicant와 제대로 사용되게 하기 이전에 카드를 관리모드로 설정할 필요가 있을 것입니다. /etc/conf.d/net에 iwconfig_eth0="mode managed"를 사용하여 소기의 목적을 달성할 수 있습니다.
흠... 간단했습니다. 안그런가요? 그러나 우리는 아직, 연결하려 하는 액세스 포인트가 얼마나 안전한지에 대해 의존적인, 약간 더 신중을 요구하는 wpa_supplicant자체를 설정하는 일을 해야 합니다. 아래 예제는 wpa_supplicant와 딸려오는 /usr/share/doc/wpa_supplicant-<version>/wpa_supplicant.conf.gz로부터 취하여 단순화 한 예제입니다.
예제 2-3 : /etc/wpa_supplicant/wpa_supplicant.conf 예제
# The below line not be changed otherwise we refuse to work ctrl_interface=/var/run/wpa_supplicant # Ensure that only root can read the WPA configuration ctrl_interface_group=0 # Let wpa_supplicant take care of scanning and AP selection ap_scan=1 # Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers network={ ssid="simple" psk="very secret passphrase" # The higher the priority the sooner we are matched priority=5 } # Same as previous, but request SSID-specific scanning (for APs that reject # broadcast SSID) network={ ssid="second ssid" scan_ssid=1 psk="very secret passphrase" priority=2 } # Only WPA-PSK is used. Any valid cipher combination is accepted network={ ssid="example" proto=WPA key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP WEP104 WEP40 psk=06b4be19da289f475aa46a33cb793029d4ab3db7a23ee92382eb0106c72ac7bb priority=2 } # Plaintext connection (no WPA, no IEEE 802.1X) network={ ssid="plaintext-test" key_mgmt=NONE } # Shared WEP key connection (no WPA, no IEEE 802.1X) network={ ssid="static-wep-test" key_mgmt=NONE wep_key0="abcde" wep_key1=0102030405 wep_key2="1234567890123" wep_tx_keyidx=0 priority=5 } # Shared WEP key connection (no WPA, no IEEE 802.1X) using Shared Key # IEEE 802.11 authentication network={ ssid="static-wep-test2" key_mgmt=NONE wep_key0="abcde" wep_key1=0102030405 wep_key2="1234567890123" wep_tx_keyidx=0 priority=5 auth_alg=SHARED } # IBSS/ad-hoc network with WPA-None/TKIP network={ ssid="test adhoc" mode=1 proto=WPA key_mgmt=WPA-NONE pairwise=NONE group=TKIP psk="secret passphrase" } 1.3.1. 초기화 설정과 관리모드 ¶![]() 무선 도구 환경설정은 약간의 주요 변수에 의해 제어됩니다. 이 예제 환경설정 파일은 독자여러분이 필요로 하는 모든 것에 대해 기술되어 있을것입니다. 마음속에 지니고 있어야 할 점은 어떤 환경설정사항도 "강하게 비암호화된 액세스 포인트에 연결" 한다는 것을 의미하진 않습니다. 우린 항상 시도해볼 것이고 그 어떤 액세스포인트에 연결하게 될 것입니다.
예제 3-1 : wireless-tools 설치
# emerge net-wireless/wireless-tools 유의사항 : 비록 /etc/conf.d/wireless에 무선 설정을 지정할 수 있지만 이 안내문에서는 /etc/conf.d/net에 설정을 지정하도록 권장합니다.
중요 :
![]() 예제 3-2 : /etc/conf.d/net에서 iwconfig 설정
# Prefer iwconfig over wpa_supplicant modules=( "iwconfig" ) # Configure WEP keys for Access Points called ESSID1 and ESSID2 # You may configure up to 4 WEP keys, but only 1 can be active at # any time so we supply a default index of [1] to set key [1] and then # again afterwards to change the active key to [1] # We do this incase you define other ESSID's to use WEP keys other than 1 # # Prefixing the key with s: means it's an ASCII key, otherwise a HEX key # # enc open specified open security (most secure) # enc restricted specified restricted security (least secure) key_ESSID1="[1] s:yourkeyhere key [1] enc open" key_ESSID2="[1] aaaa-bbbb-cccc-dd key [1] enc restricted" # The below only work when we scan for available Access Points # Sometimes more than one Access Point is visible so we need to # define a preferred order to connect in preferred_aps=( "ESSID1" "ESSID2" ) 1.3.2. 액세스 포인트 선택을 잘 조정하기 ¶약간의 특별한 선택사항요소를 추가하여 액세스 포인트 설정알 잘 조정하게 할것이지만 일반적으로 요구되는 사항은 아닙니다.
지정된 액세스포인트로만 연결할것인지 아닌지에 대하여 독자여러분들은 결정할 수 있습니다. 기본적으로 모든 것들이 실패했고 비암호화된 액세스 포인트에 연결할 수 있다면 우린 그렇게 할 것입니다. 이는 associate_order 변수에 의해 제어될 것입니다. 여기 값들과 이것들이 어떻게 제어를 하는지에 대한 표가 있습니다.
마지막으로 우린 blacklist_aps와 unique_ap 선택을 합니다. blacklist_aps는 preferred_aps와 유사한 동작을 합니다. unique_ap는 yes아님 no값을 갖는데 이는 두번째 무선 인터페이스가 첫번째 인터페이스와 같은 액세스 포인트에 접속할 수 있느냐 아니냐를 의미합니다. 예제 3-3 : blacklist_ops 와 unique_ap 예제
# Sometimes you never want to connect to certain access points blacklist_aps=( "ESSID3" "ESSID4" ) # If you have more than one wireless card, you can say if you want # to allow each card to associate with the same Access Point or not # Values are "yes" and "no" # Default is "yes" unique_ap="yes" 1.3.3. Ad-Hoc 과 마스터 모드 ¶어떤 액세스포인트에 관리모드로 접속하는데 실패했을때 Ad-Hoc노드와 같이 설정하려 한다면 그렇게 할 수 있습니다.
예제 4-1 : Ad-Hoc 모드로의 폴백
adhoc_essid_eth0="This Adhoc Node" Ad-Hoc네트웍으로의 연결이나 마스터 모드로의 실행으로 하여금 액세스포인트가 되게 하는건 뭘까요? 여기에 바로 그걸 동작하게 하기 위한 환경설정 내용이 있습니다. 위에서 본바와 같이 WEP키를 정하는 것이 필요할 것입니다.
예제 4-2 : Ad-Hoc/Master 환경설정 견본
# Set the mode - can be managed (default), ad-hoc or master # Not all drivers support all modes mode_eth0="ad-hoc" # Set the ESSID of the interface # In managed mode, this forces the interface to try and connect to the # specified ESSID and nothing else essid_eth0="This Adhoc Node" # We use channel 3 if you don't specify one channel_eth0="9" 중요 : 아래는
![]() 1.3.4. 무선 도구 문제해결 ¶무선 환경을 동작하도록, 그리고 드라이버나 환경상의 실행 문제를 돕기 위해 사용할 수 있는 약간의 많은 변수들이 있습니다. 독자여러분들이 다루어볼 수 있는 것에 대한 표가 여기 있습니다.
1.4. ESSID별 네트워크 환경 설정 정의 ¶때로는 ESSID1에 연결할때는 고정 IP가 필요하고 ESSID2에 연결할때는 DHCP가 필요할 수 있습니다. 사실 대부분의 모듈 변수는 ESSID별로 정의될 수 있습니다. 여기 우리가 어떻게 하면 되는지에 대하여 적어보았습니다.
유의사항 : WPA Supplicant 이나 Wireless Tools을 사용중이라면 동작하는 것들입니다.
중요 :
![]() 예제 4-1 : ESSID별로 네트워크 설정 덮어쓰기
config_ESSID1=( "192.168.0.3/24 brd 192.168.0.255" ) routes_ESSID1=( "default via 192.168.0.1" ) config_ESSID2=( "dhcp" ) fallback_ESSID2=( "192.168.3.4/24" ) fallback_route_ESSID2=( "default via 192.168.3.1" ) # We can define nameservers and other things too # NOTE: DHCP will override these unless it's told not too dns_servers_ESSID1=( "192.168.0.1" "192.168.0.2" ) dns_domain_ESSID1="some.domain" dns_search_domains_ESSID1="search.this.domain search.that.domain" # You override by the MAC address of the Access Point # This handy if you goto different locations that have the same ESSID config_001122334455=( "dhcp" ) dhcpcd_001122334455="-t 10" dns_servers_001122334455=( "192.168.0.1" "192.168.0.2" ) |
You will soon meet a person who will play an important role in your life. |