Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Newbie > setting static ip
 Linux Newbie   If you're new to the wonderful world of Linux, start here!

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 01-30-2003   #1 (permalink)
Linux Engineer
 
Join Date: Nov 2002
Location: Queens, NY
Posts: 1,319
Send a message via AIM to bpark
setting static ip

I need help setting up a static ip for my linux workstation. I have all the necessary information to set it up but I'm having trouble with some other things.

1. I'll need to stop dhcp(client) from running when the machine starts up. How can I disable dhcp? I'm under the impression that some file will contain this info.

2. It's been brought to my attention that the following files are manipulated when we deal with networking: /etc/network/interface, /etc/resolve.conf, and /etc/hostname.
I am aware of what to edit in /etc/network/interface and /etc/hostname but I'm not sure what /etc/resolve.conf does. Can anyone tell me what the purpose of this file is?
__________________
The best things in life are free.
bpark is offline  

Reply With Quote
Old 01-30-2003   #2 (permalink)
Linux Engineer
 
Join Date: Jan 2003
Location: Lebanon, pa
Posts: 994
What distro do you have?
/etc/resolv.conf - your name servers go in there
/etc/hostname - hostname for your box

As for the network config files, they varie from distro to distro.
genlee is offline   Reply With Quote
Old 01-30-2003   #3 (permalink)
Linux Engineer
 
Join Date: Nov 2002
Location: Queens, NY
Posts: 1,319
Send a message via AIM to bpark
debian

Genlee,

I'm using debian linux. I know how to configure that /etc/network/interface because I read up on it but I wasn't sure about the other two files. It looks something like this
Code:
 
     # An example static IP setup: (broadcast and gateway are optional)
     #
     auto eth0
     iface eth0 inet static
          address 192.168.0.42
          network 192.168.0.0
          netmask 255.255.255.0
          broadcast 192.168.0.255
          gateway 192.168.0.1
1. What exactly is a name server? I've had dhcp configure everything from installation so I don't know what that is. Also, I'm very new to networking so I don't have much idea about what this is.
2. As for /etc/hostname, it's just the name of the workstation. That was pretty simple to figure out.
3. Do you know how I can stop the dhcp(client) from starting at boot time? As I mentioned before, I'm sure that every distro uses a file to have the programs when it first boots.
__________________
The best things in life are free.
bpark is offline   Reply With Quote
Old 01-30-2003   #4 (permalink)
Linux User
 
Join Date: Jul 2002
Location: Daytona Beach, FL
Posts: 487
Send a message via AIM to majorwoo
1 - a nameserver is a machine that snswers DNS requests, or translates www.google.com to 216.239.35.100 (google's IP address)

2 - yup

3 -if dhcp is starting on boot you must have a network device set to use dhcp, check your

/etc/sysconfig/network-scripts/ifcfg-eth0 (and maybe eth1, eth2 depending on how many NIC's you have)

(i am not certain debian uses those same filenames, but if not, man ifconfig should help
__________________
majorwoo

Quiet brain, or I\'ll stab you with a Q-tip.
majorwoo is offline   Reply With Quote
Old 01-30-2003   #5 (permalink)
Linux Engineer
 
Join Date: Nov 2002
Location: Queens, NY
Posts: 1,319
Send a message via AIM to bpark
fixed

Majorwoo,

Well, thanks for your help. When I edited /etc/network/interfaces, debian actually checks that file everytime it reboots or shutdown. Therefore on the next boot, it'll know to either launch dhcp or to NOT launch it. For some reason, I always thought that there was file that specified which programs to execute upon start of the machine.
I still have a question regarding the nameserver. Do I have to have one? I'm running this machine at home for my own sake and if anything, I'd broadcast this to the network at home not to the internet. I'm thinking I can leave this alone since I don't have any servers at home or for the internet. Out of curiosity, can I run my own nameserver for the network?
By the way, what distro are you running? The example you provided didn't work at all since I don't have that directory.
__________________
The best things in life are free.
bpark is offline   Reply With Quote
Old 01-30-2003   #6 (permalink)
Linux Engineer
 
Join Date: Jan 2003
Location: Lebanon, pa
Posts: 994
I would advise you to setup a name server setup because being able to resolve hostnames does come in handle all the time You can run your own one. apt-get bind should install it for you. Then just
echo "nameserver 127.0.0.1" > /etc/resolv.conf
The config files that majorwoo said to change are for redhat and not debian so you won't have them anywhere.
genlee is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
difference between static route with 2 NIC and setting up BRIDGE lcguy Linux Networking 0 05-14-2007 03:33 PM
Setting Up a static IP Address bigb89 Redhat / Fedora Linux Help 1 03-14-2007 11:36 AM
Linksys WUSB11 on SUSE Linux Magefire Linux Networking 18 10-06-2006 02:09 PM
Drivers? roughneck8 SuSE Linux Help 8 06-10-2006 12:03 AM
fluxbox neanderthal // anarchism Debian Linux Help 24 07-25-2005 01:09 PM

Free Magazines
Free Network Mapping Tool for Microsoft® Office Visio® Professional 2007 Users
Don't map your network by hand – let LANsurveyor Express for Microsoft Visio Professional 2007 automatically create network diagrams for you.
subscribe
Free eBook:"Vulnerability Management for Dummies"
Get all the Facts and See How to Implement a Successful Vulnerability Management Program.
subscribe
Google vs The World: The Battle of the Message Security Vendors
With such a powerful name behind it, Google Message Security stands out in a sea of products that do exactly the same thing - or so they say.
subscribe

Safe, Secure Backup


All times are GMT. The time now is 09:57 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2