LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 04-20-2005, 01:49 AM   #1
zvonSully
Member
 
Registered: Nov 2004
Location: Romania
Distribution: Debian maniak(apt-get upgrade)
Posts: 85

Rep: Reputation: 15
Question Network configuration files: where to write the static ip?


My internet provider gave me my static IP;netmask,gateway,dns1 and dns2 .
Before Ubuntu i had Debian and it asked me at instal for those,but ubuntu hasn't(it set my internet thro DHCP).I conected to internet by eth0 by a cable modem.

So i need the file(s) where to put those:

-IP
-netmask
-gateway
-DNS1
-DNS2
 
Old 04-20-2005, 02:35 AM   #2
Goala
Member
 
Registered: May 2004
Location: Merida (Spain)
Distribution: Debian
Posts: 89

Rep: Reputation: 15
Hi, supposing you have only one network card (eth0):

1) ifdown eth0

2) edit the /etc/network/interfaces file.
Code:
     iface eth0 inet static
             address your_static_ip
             netmask your_netmask
             gateway your_gateway_ip
3) DNS:

edit /etc/resolv.conf , add/insert these lines:
Code:
nameserver dns1_ip
nameserver dns2_ip
4) ifup eth0
 
Old 04-20-2005, 03:11 AM   #3
zvonSully
Member
 
Registered: Nov 2004
Location: Romania
Distribution: Debian maniak(apt-get upgrade)
Posts: 85

Original Poster
Rep: Reputation: 15
Not working ; I have ust one network card

these is what it says:
# ifup eth0
Don't seem to be have all the variables for eth0/inet.
Failed to bring up eth0.

I write here
the contents of /etc/network/interfaces:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
#auto lo
#iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
#mapping hotplug
# script grep
# map eth0

# The primary network interface
iface eth0 inet static
adress <here is the ip>
netmask 255.255.255.0
gateway <here is the gateway>

#auto eth0

the contents of /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 217.156.101.1
nameserver 217.156.101.10

Last edited by zvonSully; 04-20-2005 at 03:13 AM.
 
Old 04-20-2005, 03:23 AM   #4
Goala
Member
 
Registered: May 2004
Location: Merida (Spain)
Distribution: Debian
Posts: 89

Rep: Reputation: 15
I've seen (seeing the /etc/resolv.conf file) you have installed the "resolvconf" package. So, update your /etc/network/interfaces file this way, because resolvconf will overwrite your /etc/resolv.conf with the information you'll provide with the dns-nameservers section here:
Code:
     iface eth0 inet static
             address your_static_ip
             netmask your_netmask
             gateway your_gateway_ip
             dns-nameservers your_dns1_ip your_dns2_ip
in your /etc/network/interfaces you have the string "adress" and it should be "address", be aware of that!

Last edited by Goala; 04-20-2005 at 03:28 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any static ARP for static IP network? linux_lover2005 Linux - Networking 2 05-18-2005 12:01 PM
add a static route in Network init files Ghitza Linux - Networking 1 11-19-2004 05:26 AM
Where is Redhat's network configuration files? fossilet Linux - Networking 1 07-15-2004 03:44 AM
network configuration files in redhat czarherr Red Hat 5 04-29-2004 09:19 AM
Static IP configuration anorman Linux - Networking 2 08-25-2003 03:20 PM


All times are GMT -5. The time now is 05:53 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration