HEYBlog about Technology

京都の学生エンジニアのエンジニアブログ

Debianでネットワークの設定した

ネットワークの設定方法(Debian)

固定IPにする

emacs /etc/network/interfaces
auto lo
   iface lo inet loopback
   auto eth0
   iface eth0 inet static
     address 192.168.0.11
     netmask 255.255.255.0
     gateway 192.168.0.1

gatewayどうすればよいの?ってときは

/sbin/route

Gatewayの値を見れば良い

ネットワーク設定再起動

sudo /etc/init.d/networking restart

ifconfigでeth0が立ち上がってなかったら

ifup eth0

eth0がNo such device

ifconfig -a

でチェックする eth1が立ち上がっていることがあった。