LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 02-04-2005, 02:55 PM   #1
louisb
Member
 
Registered: Aug 2003
Posts: 132

Rep: Reputation: 15
How do I assign a static IP to eth0


I want to assign a static IP address to eth0? I'm using Red Hat Enterprise Linux 3 AS.
 
Old 02-04-2005, 04:08 PM   #2
Calestar
LQ Newbie
 
Registered: Dec 2004
Location: Sorel-Tracy, Quebec,Canada
Distribution: Fedora
Posts: 8

Rep: Reputation: 0
You should be able to do it by changing the file /etc/sysconfig/networking/devices/ifcfg-eth0

mine looks like this :

DEVICE=eth0
BOOTPROTO=none
HWADDR=[Your mac address]
ONBOOT=yes
TYPE=Ethernet
IPADDR=192.168.0.10
NETMASK=255.255.255.0
NETWORK=192.168.0.0
USERCTL=no
PEERDNS=no
GATEWAY=192.168.0.1

You'll juste need to restart the "network" service after that
 
Old 02-04-2005, 08:19 PM   #3
JoannesX
Member
 
Registered: Dec 2004
Location: Brazil
Distribution: Slackware
Posts: 99

Rep: Reputation: 15
you could also get a more "grafical" interface to configure the static IP of your eth0 :
LINUXCONF it's a great program that allows you to adjust MANY settings concerning servers, clients, administration of your system and many other things.

take a look at your rpms. .. it's built in dialog boxes...
 
Old 02-19-2005, 03:35 PM   #4
robertbain
LQ Newbie
 
Registered: Feb 2005
Posts: 2

Rep: Reputation: 0
MULTIPLE STATIC IPS!

I want to be able to install multiple static ips.

I have the range 214.242.152.2 - 214.242.152.14.

How do I go about doing that? Using Fedora Core 1.
 
Old 02-19-2005, 08:10 PM   #5
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: fedora, slackware, suse
Posts: 447

Rep: Reputation: 31
You will need to set up aliases. The way I understand it, the "main" ip goes in

/etc/sysconfig/networking/devices/ifcfg-eth0

A secondary ip would go in /etc/sysconfig/networking/devices/ifcfg-eth0.0

etc....

A howto for manual configuration can be found here: http://www.tldp.org/HOWTO/IP-Alias/
 
  


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
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 10:51 AM
Manually configuring DHCP for static IP -- cannot assign IP tristanlee85 Linux - Networking 3 10-16-2005 01:34 AM
assign static ip allelopath Linux - Software 1 04-27-2005 07:04 PM
assign static IP to the server ashley75 Linux - General 2 03-10-2005 03:47 PM
Can't assign a static IPv6 address guzo Linux - Networking 0 02-11-2005 06:22 AM


All times are GMT -5. The time now is 03:29 PM.

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