embeded/raspberry pi2020. 5. 13. 18:51

결론만 말하자면

dhcpcd 만으로는 무선 공유기 처럼 만드는건 실패.

dnsmasq가 있어야 한다.

 

+

테스트 해보니 dhcpcd 없이 hostapd + dnsmasq 만으로 ap가 만들어진다.

 

--

 

dhcpcd 패키지 설치해주고

아래의 설정내용을 넣어주면 끝.

 

$ sudo apt-cache search dhcpcd
dhcpcd - DHCP client for automatically configuring IPv4 networking
$ sudo vi /etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8

[링크 : https://wiki.archlinux.org/index.php/dhcpcd]

 

+

기본 설정시 DHCP 잡는 임의 영역 IP인 169.254.71.x로 잡히는데

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.71.187  netmask 255.255.0.0  broadcast 169.254.255.255

 

dhcpcd.conf의 static_ip_address를 169.254.71.0/24로 설정하니

아래와 같이 carrier lost 뜨면서 되지 않는다.

아마 DHCP 잡는 reserved ip 영역이라 그런게 아닐까 추측됨.

$ systemctl status dhcpcd
● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Wed 2020-05-13 18:23:15 KST; 5min ago
  Process: 1694 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SUCCESS)
 Main PID: 1696 (code=killed, signal=SEGV)

 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: carrier acquired
 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: IAID 76:90:50:d5
 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: adding address fe80::a73b:b28c:e97:7810
 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: using static address 169.254.71.187/24
 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: adding route to 169.254.71.0/24
 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: carrier lost
 5월 13 18:23:14 raspberrypi dhcpcd[1696]: wlan0: deleting address fe80::a73b:b28c:e97:7810
 5월 13 18:23:15 raspberrypi dhcpcd[1696]: wlan0: deleting route to 169.254.71.0/24
 5월 13 18:23:15 raspberrypi systemd[1]: dhcpcd.service: Main process exited, code=killed, status=11/SEGV
 5월 13 18:23:15 raspberrypi systemd[1]: dhcpcd.service: Failed with result 'signal'.

 

$ dmesg
[  542.390642] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  542.423897] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  542.451050] WARN::dwc_otg_hcd_urb_dequeue:639: Timed out waiting for FSM NP transfer to complete on 0
[  543.220943] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  543.922372] WARN::dwc_otg_hcd_urb_dequeue:639: Timed out waiting for FSM NP transfer to complete on 3

 

+

ip 주소를 가져오는 중에서 넘어가질 않네..

인증이 문제인가?

Posted by 구차니