LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How do I assign a static IP to eth0 (https://www.linuxquestions.org/questions/linux-networking-3/how-do-i-assign-a-static-ip-to-eth0-286288/)

louisb 02-04-2005 02:55 PM

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.

Calestar 02-04-2005 04:08 PM

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

JoannesX 02-04-2005 08:19 PM

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...

robertbain 02-19-2005 03:35 PM

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.

fsbooks 02-19-2005 08:10 PM

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/


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