วันพฤหัสบดีที่ 27 มิถุนายน พ.ศ. 2556

Raspberry Pi setup Lan & WLan Interface

Standard


  1. วิธีการตั้งค่า interface ของ raspberry pi ให้แก้ไขที่ไฟล์ etc/network/interfaces
  2. $vi etc/network/interfaces
  3.  จากนั้นตั้งค่า ip ของแต่ละ interface โดยที่ชื่อ interface สามารถดูได้ด้วยคำสั่ง 
  4. $ifconfig -a
  5. เมื่อรู้ชื่อ interface ที่จะกำหนด ip แล้ว ก็นำชื่อนั้นมาใส่ที่  iface xxx
  6. iface eth0 inet static
    address 192.168.1.221
    netmask 255.255.255.0
    network 192.168.1.0
    gateway 192.168.1.1
  7.  wireless lan ก็สามารถกำหนดได้ การตั้งค่าก็จะเหมือนกับ lan แต่มีส่วนของ wpa-ssid คือชื่อ access-point ที่จะให้ตัว raspberry pi ไปเชื่อมต่อกับ wpa-psk คือ password ของ access-point
  8. iface wlan0 inet static
    address 192.168.1.222
    netmask 255.255.255.0
    network 192.168.1.0
    gateway 192.168.1.1
    wpa-ssid MIINIQ-WIFI
    wpa-psk my-wifi-password

0 ความคิดเห็น:

แสดงความคิดเห็น