LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-16-2006, 07:06 PM   #1
TechMansoor
LQ Newbie
 
Registered: Dec 2006
Posts: 18

Rep: Reputation: 0
Ubuntu 6.06 Server(Assigning Static IP)


How do I assign a static ip address to my ubuntu server I"m setting up? I'm at the user as of now, and I can sudo to become the root. Can anyone help?
 
Old 12-16-2006, 07:17 PM   #2
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
FYI, sudo is a program that allows you to run specific programs as a non-privileged user. su is the program that will 'upgrade' you to privileged level access.

To answer your question, read the man page for ifconfig by typing 'man ifconfig'. It will give you the knowledge to set your ip statically, along with a lot of other useful things, so it would behoove you to read it.

There are also methods in which to set your static ip on bootup so you dont have to do it manually every time your system boots. These are referred to as "init scripts". I'm not sure which ubuntu uses. I'm confident you can figure it out and configure it.

Here's a hint. If there are rc scripts (ie, rc.inet1), it is probably a bsd style init. If there are run levels, ie, a folder with a bunch of numbers (1,2,4, etc) with your startup scripts in it, it is SysV style init.
 
Old 12-16-2006, 07:48 PM   #3
alphomega
LQ Newbie
 
Registered: Oct 2006
Location: southampton
Distribution: Fedora, CentOS
Posts: 17

Rep: Reputation: 0
Even easier, what network equipment are you using? Some routers will allow reserved ip addresses for mac addresses, therefore your ubuntu server will still use dhcp but will always get assigned the same ip address.
 
Old 12-16-2006, 08:40 PM   #4
TechMansoor
LQ Newbie
 
Registered: Dec 2006
Posts: 18

Original Poster
Rep: Reputation: 0
ifconfig worked..awesome..linux knowledge growing..but it is painful initially..trying to setup a mail server...and it is kicking my butt. thanks guys
 
Old 12-18-2006, 02:26 PM   #5
TechMansoor
LQ Newbie
 
Registered: Dec 2006
Posts: 18

Original Poster
Rep: Reputation: 0
I take it back. Ifconfig didn't install a static ip address.

i did ifconfig eth0 192.168.1.20.. after i rebooted it grabbed an ip address fro m my windows dhcp server's scope. Also, I put the lan ip info in the etc/interfaces file and it still didn't give me my static ip address, what am I doign wrong. It shouldnt be this hard!!!!!!!!
 
  


Reply



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
Cannot ping router after assigning static IP mickwombat Linux - Networking 5 06-11-2006 06:09 PM
Assigning Static IP Problem canuck_barlow Linux - Newbie 5 01-06-2006 02:54 PM
sles 9.2 dhcp server not assigning default gateway pat45 Linux - Networking 1 05-07-2005 05:51 AM
Assigning IP addresses to game server processes jader9920 Linux - Networking 3 12-28-2003 02:32 PM
assigning static ip vcheah Linux - Networking 5 12-25-2001 06:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:15 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration