ubuntu 9.04(jaunty jackalope) internet configuration for static ip

Tags:
Printer-friendly versionSend to friend

The following steps wouldn't require any configuration in Network Manager, it would be best to leave Network Manager unaltered, but i wouldn't recommend removing Network Manager as well.

1)Now in terminal issue the command

sudo gedit /etc/network/interfaces

clear anything pressent in gedit and replace it in the following manner

# The primary network interface
auto eth0
iface eth0 inet static
address 1.1.1.1
gateway 2.2.2.2
netmask 3.3.3.3

considering,
1.1.1.1 as your ip address,
2.2.2.2 as your default gatway,
and 3.3.3.3 as your netmask, change them to your real addresses

2)edit your /etc/resolv.conf to declare your dns servers
and give your nameservers
command

 sudo gedit /etc/resolv.conf

by declaring your nameservers like below

# Generated by NetworkManager
nameserver 208.67.222.222
nameserver 208.67.220.220

that will get your nameservers working (the two above nameservers, 208.67.220.220 & 208.67.222.222 are OpenDNS nameservers which work anywhere)

3)in terminal issue the following command
sudo gedit /etc/rc.conf

and enter the following
(NOTE THAT BY DEFAULT THIS GEDIT WILL HAVE NOTHING IN IT) after editing it should be like something below,

eth0="eth0 1.1.1.1 netmask 3.3.3.3 broadcast 121.247.75.255"
INTERFACES=(eth0)
gateway="default gw 2.2.2.2"
ROUTES=(gateway)

(considering 121.247.75.255 as your broadcast, change it if required.)

if you do not know your broadcast address, use this link http://www.tech-faq.com/calculate-broadcast-address.shtml

5) execute the command "ifup eth0" in the terminal (without quotes), to bring up the eth0 interface,

THEN issue in terminal

sudo /etc/init.d/networking restart

to check configuration settings, execute the command "ifconfig eth0" in the terminal (without quotes) to see the settings declared ,

it must look like something below;

usrname@usrname-desktop:~$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:14:2a:9b:e9:8a
inet addr:1.1.1.1 Bcast:121.247.75.255 Mask:3.3.3.3
inet6 addr: fe80::214:2aff:fe9b:e98a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18240 errors:0 dropped:0 overruns:0 frame:0
TX packets:15976 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25297219 (25.2 MB) TX bytes:1237120 (1.2 MB)
Interrupt:23 Base address:0xa800

6)HAVE YOUR FINGERS CROSSED AND SEE IF YOU CAN BROWSE,

if problem persists please mail adm...@itech7.com

NOTE; This is applicable to any ubuntu release(STATIC IP), and applicable to various other GNU's too.

Comments

Thank you. Most sites only

Thank you. Most sites only tell you to change the interfaces file. That alone did not work for me until I came across your instructions. Very helpful. Thanks again.

THANK YOU. Very nice

THANK YOU. Very nice instructions and it works! The ifup thing answers back something about "permission denied". Then I put sudo in front of the command and it said interface eth0 already configured. But I guess this is normal cos it works anyway. Thank you!!

Thank you for this info! I've

Thank you for this info! I've always used static ip in Ubuntu and since Ubuntu 9.04 I got some serious problems. Thanks.

absolutely brilliant

absolutely brilliant tutorial
thanks for you time writing this
got me online on my new linux pc in 15 minutes
great work

Syndicate content