Difference between revisions of "Set up networking"

From Linuxintro
imported>ThorstenStaerk
(New page: = Gateway = route add default gw 192.168.0.1 = Name Server = Enter it into /etc/resolv.conf)
 
imported>ThorstenStaerk
Line 1: Line 1:
 +
= IP address =
 +
To read and set your IP address one time use the command
 +
ifconfig
 +
To set your IP address so it survives a reboot [[find out your distribution]] and proceed accordingly
 +
 +
== Debian based distributions ==
 +
Configure your IP address in /etc/networking/interfaces like this:
 +
iface eth0 inet static
 +
address 192.168.0.42
 +
netmask 255.255.255.0
 +
gateway 192.168.0.1
 +
 
= Gateway =
 
= Gateway =
 
  route add default gw 192.168.0.1
 
  route add default gw 192.168.0.1

Revision as of 08:07, 15 July 2012

IP address

To read and set your IP address one time use the command

ifconfig

To set your IP address so it survives a reboot find out your distribution and proceed accordingly

Debian based distributions

Configure your IP address in /etc/networking/interfaces like this: iface eth0 inet static

address 192.168.0.42
netmask 255.255.255.0
gateway 192.168.0.1

Gateway

route add default gw 192.168.0.1

Name Server

Enter it into /etc/resolv.conf