Professional Documents
Culture Documents
Contact
Forum
Ubuntu Hosting
RSS Feed
http://www.ubuntugeek.com/ubuntu-networking-c...
Popular Posts
Sitemap
Search
Privacy Policy
Ubuntu Geek
Ubuntu Linux Tutorials,Howtos,Tips & News | Xenial Xerus,Yakkety Yak
Sponsored Link
Categories
Backup
Free Books
General
Monitoring
Networking
News
Package Mgmt
Security
Server
Sponsored Link
Archives
Select Month
Ubuntu
Networking
Configuratio
n Using
Command
Line
RSS Feed
UbuntuGeek on Twitter
Posted on February 5,
2007 by ruchi
138 Comments
Sponsored Link
Support UbuntuGeek
Favourite Sites
Protocol/ Internet
Protocol (TCP/IP)
combination of three
Tuxmachines
Debian Admin
DebianHelp
protocols. This
combination consists
of the Internet
Protocol
(IP),Transport
Control Protocol
(TCP), and
Universal Datagram
Protocol (UDP).
By Default most of
1 of 22
Contact
Forum
http://www.ubuntugeek.com/ubuntu-networking-c...
the users
configure
Free Ubuntu
E-Books
Popular Posts
their network card
Feed
during the
Sitemap
Search
Ubuntu Hosting
About
RSS
Privacy Policy
Copyright 2016 Ubuntugeek - Ubuntu Linux Howtos and Tutorials All Rights Reserved.
installation of
Ubuntu. You can
2 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
3 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
e -use
DHCP
to find
our
addres
s
auto
eth0
iface
eth0
inet
dhcp
Configuring Static IP
address for your
network card
If you want to
configure Static IP
address you need to
edit the /etc/network
/interfaces and you
need to enter the
following lines
replace eth0 with
your network
interface card
sudo vi
/etc/net
work
/interfa
ces
Note :- Use vi editor
if you don't have
GUI installed
If you have GUI use
4 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
the following
command
gksudo
gedit
/etc/net
work
/interfa
ces
# The
primary
networ
k
interfac
e
auto
eth0
iface
eth0
inet
static
addres
s
192.16
8.3.90
gatewa
y
192.16
8.3.1
netmas
k
255.25
5.255.0
networ
k
192.16
8.3.0
5 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
broadc
ast
192.16
8.3.255
After entering all the
details you need to
restart networking
services using the
following command
sudo
/etc/init
.d
/networ
king
restart
Setting up Second
IP address or Virtual
IP address in
Ubuntu
If you are a server
system administrator
or normal user some
time you need to
assign a second
ipaddress to your
Ubuntu machine.For
this you need to edit
the /etc/network
/interfaces file and
you need to add the
following
syntax.Below one is
the only example
you need to chnage
according to your ip
address settings
6 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
sudo vi
/etc/net
work
/interfa
ces
Note :- Use vi editor
if you don't have
GUI installed
If you have GUI use
the following
command
gksudo
gedit
/etc/net
work
/interfa
ces
auto
eth0:1
iface
eth0:1
inet
static
addres
s
192.16
8.1.60
netmas
k
255.25
5.255.0
networ
k
x.x.x.x
broadc
ast
7 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
x.x.x.x
gatewa
y
x.x.x.x
You need to enter all
the details like
address,netmask,net
work,broadcast and
gateways values
after entering all the
values save this file
and you need to
restart networking
services in debian
using the following
command to take
effect of our new
ipaddress.
After entering all the
details you need to
restart networking
services using the
following command
sudo
/etc/init
.d
/networ
king
restart
Setting your ubuntu
stytem hostname
Setting up your
hostname upon a
ubuntu installation is
very straightforward.
8 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
http://www.ubuntugeek.com/ubuntu-networking-c...
10 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
gedit
/etc/res
olv.con
f
enter the following
details
search
test.co
m
names
erver
192.16
8.3.2
Sponsored Link
Tweet
Share
Share
Mail
Share
Share
Share
Related posts
Update IP
addresses at
dynamic DNS
services
Using ddclient
(17)
slurm
Realtime
network
interface
11 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
monitor (2)
Securing SSH
Using
Denyhosts
(10)
Mount
Network File
systems
(NFS,Samba)
in Ubuntu
(13)
Howto Install
Freecom
Musicpal in
Ubuntu Feisty
(3)
How to Setup
Transparent
Squid Proxy
Server in
Ubuntu (41)
How to Install
PPTP GUI
(To connect
windows
VPN) in
Ubuntu (10)
138 thoughts on
Ubuntu
Networking
Configuration
Using Command
Line
Older
Comments
12 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
ramakrishna on
January 10, 2012 at
9:27 am said:
mr amit first u can
disable firewall and
also disable ipv6
then after u can
access internet
Deepak on January
12, 2012 at 3:13 pm
said:
After restart all IP
setting are flushing.
Pls help me..
markpupugee on
February 4, 2012 at
3:10 am said:
how to configure
dual lan in UBUNTU
??
joies on March 4,
2012 at 8:37 am
said:
What is the
broadcast address
for?
dawe on March 5,
2012 at 5:48 pm
said:
it is an address,
13 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
Krahazik on May 7,
2012 at 7:46 pm
said:
Ok this is all well
and good but
completely useless
for my problem as
/etc/resolv.config is a
TEMPORARY file
and gets overwritten
each time the
computer is
rebooted. Having to
edit that file every
timeI boot the
machine up is
getting old fast. So
where do I go to
permanently add the
infor that I keep
adding to
/etc/resolve.config
using command
line?
mikecrosoft on May
22, 2012 at 10:44
pm said:
Change the file
access permissions
to only read for your
14 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
user.
15 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
http://manpages.ubu
ntu.com/manpages
/karmic
/man8/resolvconf.8.h
tml
I wish you luck in
trying to figure it out
!
tonymac on June 25,
2012 at 4:19 pm
said:
I have read the man
again. It seems to
me that there are
only two scenarios:
IP address obtained
from DHCP server,
or IP statically set.
For IP address
obtained from DHCP
server you must set
the DNS server
entries in the DHCP
server e.g. your
internet router.
DHCP will pass this
to your desktop pc,
which will tell
resolvconf to update
its information.
/etc/resolv.conf is
just a link to the
resolvconf
configuration : there
is no need to touch
it. Now you have
16 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
17 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
18 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
to credit this in my
previous post.
Randy L on
September 13, 2012
at 9:08 pm said:
Thanks for the post.
For some reason my
network was
configured to the
loopback device. My
ssh logins and other
network connection
are much faster now.
roc on November
10, 2012 at 7:38 am
said:
Hi,
I cant able to ping
google.com I had
given DNS but it is
not working. Help
me
Bill Ross on
February 13, 2013 at
11:14 pm said:
How do I change my
/etc/network/network
file to read-write? Im
not able to change it.
19 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
Thanks.
Im a newbe.
20 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
Adam on May 1,
2013 at 3:35 pm
said:
ifconfig is probably
what youre looking
for. Read the man
page if you need
more specifics than
what it gives you by
default.
Bruce on July 24,
2013 at 5:17 pm
said:
Bill, not sure if you
figured it out, but
you should be able
to do the following
command:
sudo chmod 644
/etc/network/network
HTH
Older
Comments
Leave a
comment
Your email address
will not be published.
Required fields are
marked *
Comment
21 of 22
http://www.ubuntugeek.com/ubuntu-networking-c...
Name *
Email *
Website
Post Comment
Ubuntu
Networking
Configuration
Using Graphical
Tool
Ubuntu Network
Troubleshooting
Tips
22 of 22