interfaces 固定IPネットワーク 設定

インターフェースeth0を編集

 root@moco:~# vi /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
 
auto eth0
iface eth0 inet static
address 192.168.0.5
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
dns-nameservers 192.168.0.1

ethtool_opts="wol g"          // wakeonlan の設定
~
-----------------------------------------
 
確認
root@moco:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:19:21:64:8f:6c
          inet addr:192.168.0.5  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::219:21ff:fe64:8f6c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:203 errors:0 dropped:0 overruns:0 frame:0
          TX packets:245 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19399 (19.3 KB)  TX bytes:36509 (36.5 KB)
 
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:153 errors:0 dropped:0 overruns:0 frame:0
          TX packets:153 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:27992 (27.9 KB)  TX bytes:27992 (27.9 KB)
 
*******************************************************************************
投票数:1 平均点:10.00

 
Back to Top