Showing posts with label address. Show all posts
Showing posts with label address. Show all posts

27 June, 2009

Static IP or DHCP Configuration on Ubuntu / Debian

How to configure Ubuntu Linux with
static or dynamic (dhcp) IP
by morphus.dk

File: /etc/network/interfaces

Static IP example:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 208.88.34.106
netmask 255.255.255.248
broadcast 208.88.34.111
network 208.88.34.104
gateway 208.88.34.110

Dynamic IP (DHCP) example:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

auto eth2
iface eth2 inet dhcp

auto ath0
iface ath0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
Interfaces:
  • lo: Loopback interface (network within your system without slowing down for the real ethernet based network)
  • eth0: First ethernet interface card
  • wlan0: First wireless network interface

Also see "man interfaces"

22 February, 2008

Static (manual) IP set up on Linux in CLI (short version)

by Morten Holmensen

If you want to manual set up an IP address in Linux,
it could be one of ways to set this up.

open terminal window, probely you should be a root or "sudo" to do this,


Adding static IP and netmask
  • sudo ifconfig ethX 123.45.67.89 netmask 255.255.255.0
  • echo nameserver 123.45.67.89 >> /etc/resolv.conf


Adding Gateway
 
  • sudo route add default gw 172.16.236.0


----------------------------------->