In case you want to set static IP, example
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 203.237.53.112
netmask 255.255.255.0
gateway 203.237.53.254
in command line, it has the same effect of
$ sudo ifconfig eth0 203.237.53.112/24
$ sudo route add default gw 203.237.53.254
In case you want to set DHCP
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
in command line, it has the same effect as follows
$ sudo dhclient eth0
No comments:
Post a Comment