Edit

Description

คำสั่ง `ip addr` เอาไว้ดูข้อมูล Interface คำสั่ง `ifup <interface>` เอาไว้เปิดใช้ interface แก้ไขข้อมูล ip on-the-fly (ของจริงไม่ได้ใช้) `ip addr add <ip> dev <interface>` แก้ไขข้อมูล ip address จริงๆให้แก้ไขใน `/etc/network/interfaces` ตัวอย่างตั้งค่าแบบ DHCP ``` auto lo iface lo inet loopback # The primary network interface auto eth0 allow-hotplug eth0 iface eth0 inet dhcp ``` แก้ไขแล้ว จากนั้นสั่ง `systemctl restart networking` โดย auto คือการให้ up ตอนเริ่ม service ตัวอย่างตั้งค่าแบบ Static ``` auto lo iface lo inet loopback # The primary network interface auto eth0 allow-hotplug eth0 iface eth0 inet static address 192.168.1.110 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 192.168.1.5 ``` แก้ไขแล้ว จากนั้นสั่ง `systemctl restart networking`

Option