差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
raspberry_pi:0020network [2017/07/06 06:14]
admin
raspberry_pi:0020network [2017/07/13 12:15] (現在)
admin
ライン 1: ライン 1:
 ====== ネットワーク設定 ====== ====== ネットワーク設定 ======
 +IP関連設定
  
 +=====DHCPで設定=====
  
-===== 固定アドレス ===== +  # vi /​etc/​dhcp/​dhclient.conf 
-アドレスを固定にする場合+  ---- 
 +  send dhcp-client-identifier ​hardware; ​ (こちらは必須・・・、かと思ったらなくても動いていそう)
  
   # vi /​etc/​dhcpcd.conf   # vi /​etc/​dhcpcd.conf
   ----   ----
-  interface eth0 +    send dhcp-client-identifier ​hardware; ​ (こちらは必須ではないみたい) 
-    static ip_address=192.168.1.7/​24 +    ​interface eth0 
-    ​static routers=192.168.1.1 +    ​interface wlan0
-    ​static domain_name_servers=192.168.1.1+
  
-(参考) http://​swiftlife.hatenablog.jp/​entry/​2016/​01/​10/​170249 +  ​# vi /etc/network/​interfaces
- +
-===== DNSサーバ指定 ===== +
-  ​# vi /etc/resolv.conf+
   ----   ----
-    ​nameserver 8.8.8.8 ​(DNSサーバIPアドレス+    ​iface eth0 inet manual 
-  # sudo /​etc/​init.d/​networking reload ​ (設定反映)+    # iface eth0 inet dhcp  ​(行をmanualにしないとDHCPでアドレス設定できない?​) 
 +     
 +    allow-hotplug wlan0 
 +    iface wlan0 inet manual 
 +    # iface wlan0 inet dhcp
  
-===== 無線LAN===== +  ​# sudo service dhcpcd reload
-  # wpa_passphrase BBUser870201 XXXXXXXXXXXXXXXXXXX +
-  ​# sudo vi /​etc/​wpa_supplicant/​wpa_supplicant.conf +
-  - +
-   ​network={ +
-        ssid="​BBUser870201"​ +
-        psk=xxxxxxxxxxx....................xxxxx +
-        proto=RSN +
-        key_mgmt=WPA-PSK +
-        pairwise=CCMP +
-        auth_alg=OPEN +
-   }+
  
-  # ifconfig wlan0 down +(参考) iface等の意味について説明あり 
-  # ifconfig wlan0 up + 
-  ifconfig wlan0+https://​www.debian.org/​doc/​manuals/​debian-reference/​ch05.ja.html#_the_basic_syntax_of_etc_network_interfaces 
 + 
 +===== 固定アドレスで設定 ===== 
 +アドレスを固定にする場合
  
   # vi /​etc/​network/​interfaces   # vi /​etc/​network/​interfaces
   ----   ----
-  ​# auto wlan0  <- 要否不明 +  ​iface wlan0 inet manual 
-  allow-hotplug ​wlan0 +  iface eth1 inet manual
-  iface wlan0 inet dhcp <​-manuaでないとアドレスを取れないかも +
-  wpa-conf /​etc/​wpa_supplicant/​wpa_supplicant.conf+
  
 +固定アドレスはdhcpcd.confで設定する。
 +(/​etc/​network/​interfacesではできなくなった)
   # vi /​etc/​dhcpcd.conf   # vi /​etc/​dhcpcd.conf
   ----   ----
 +  send dhcp-client-identifier = hardware; ​ (こちらは必須ではないみたい)
 +  interface eth0
 +  static ip_address=192.168.1.152/​24
 +  static routers=192.168.1.30
 +  static domain_name_servers=192.168.1.1
 +  ​
   interface wlan0   interface wlan0
-  static ip_address=192.168.1.62/24+  static ip_address=192.168.1.162/24
   static routers=192.168.1.1   static routers=192.168.1.1
   static domain_name_servers=192.168.1.1   static domain_name_servers=192.168.1.1
  
 +  # sudo service dhcpcd reload
  
-  # vi /etc/modprobe.d/8192cu.conf +(参考) https://hirooka.pro/?p=8526
-  ---- +
-  # Disable power saving +
-  options 8192cu rtw_power_mgnt=0 rtw_enusbss=1 rtw_ips_mode=1+
  
-=====DHCPから取得=====+----------------------------------------------------------------------- 
 +===== 無線LAN ​===== 
 +====パスフレーズ等の設定==== 
 +<​code>​ 
 +# cd /​etc/​wpa_supplicant 
 +#  iwlist wlan0 scan|grep ESSID 
 +# wpa_passphrase SSID password 
 +# sudo vi wpa_supplicant.conf 
 +network={ 
 +        ssid="​SSID"​ 
 +        psk=xxxxxxxxxxx....................xxxxx 
 +        proto=RSN 
 +        key_mgmt=WPA-PSK 
 +        pairwise=CCMP 
 +        auth_alg=OPEN 
 +}
  
-  ​# vi /etc/dhcp/dhclient.conf + # chmod 600 wpa_supplicant.conf 
-  ---+</​code>​ 
-  ​send dhcp-client-identifier=hardware; ​ (こちらは必須・スペースなし)+   
 +====interfaces設定==== 
 +<​code>​ 
 +# vi /etc/network/interfaces 
 +allow-hotplug wlan0 
 +iface wlan0 inet manual 
 +  ​wpa-conf /​etc/​wpa_supplicant/​wpa_supplicant.conf 
 +   
 +# ifconfig wlan0 down 
 +# ifconfig wlan0 up 
 +# ifconfig wlan0 
 +</​code>​
  
-  # vi /​etc/​dhcpcd.conf 
-  ---- 
-    send dhcp-client-identifier = hardware; ​ (こちらは必須ではないみたい) 
-    interface eth0 
-    #static ip_address=192.168.1.52/​24 
-    #static routers=192.168.1.1 
-    #static domain_name_servers=192.168.1.1 
-    ​ 
-    interface wlan0 
-    #static ip_address=192.168.1.62/​24 
-    #static routers=192.168.1.1 
-    #static domain_name_servers=192.168.1.1 
  
- +省電力設定の例 
-  # vi /etc/network/interfaces+  # vi /etc/modprobe.d/8192cu.conf
   ----   ----
-    ​#iface eth0 inet manual +  ​Disable power saving 
-    iface eth0 inet dhcp +  ​options 8192cu rtw_power_mgnt=0 rtw_enusbss=1 rtw_ips_mode=1 
-     +   
-    allow-hotplug wlan0 +===== DNSサーバ指定 ​===== 
-    #iface wlan0 inet manual +  # vi /etc/resolv.conf
-    iface wlan0 inet dhcp +
- +
-===== WLAN ===== +
-hostapdを使わないならこの設定 +
- +
-  # vi /etc/network/​infterfaces+
   ----   ----
-  auto wlan0 +    nameserver 8.8.8.8 (DNSサバのIPアドレス) 
-  allow-hotplug wlan0 +  # sudo /etc/init.d/networking reload ​ (設定反映)
-  iface wlan0 inet dhcp +
- ​ wpa-ssid [SSID] +
- ​ wpa-psk [PWD] +
- +
-※wpa_supplicant.confに書いても良い +
- +
-===== ネットワク見直し ===== +
-  # vi /etc/network/interfaces +
-  ---- +
-  # wlan0 +
-  iface wlan0 inet static +
-  address 192.168.20.1 +
-  netmask 255.255.255.0 +
-  gateway 192.168.20.1 +
-   +
-  # eth1 +
-  iface eth1 inet static +
-  address 192.168.21.1 +
-  netmask 255.255.255.0 +
-  gateway 192.168.21.1 +
  
raspberry_pi/0020network.1499321692.txt.gz · 最終更新: 2017/07/06 06:14 by admin
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0