- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- static ip address
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2002 06:03 AM
10-17-2002 06:03 AM
static ip address
i have a linux box RH 8.0 that was configured as dhcp client. Now I have been assiged a static ip and i want to configure it, but i'm getting some trouble.
What i did till now is:
- modified /etc/hosts
new ip psycho.idi.it localhost
127.0.0.1 localhost
- modified /etc/sysconfig/network:
NETWORKING=yes
HOSTNAME=psycho.idi.it
DOMAINNAME=idi.it
GATEWAY=ip gateway
The resolv.conf was generated by /sbin/dhclient-script. I modified it with the new settings.
I was looking at /etc/netmasks to configure Subnetmask but it seems not existing. I don't know if linux uses some other file.
Then i issued ifconfig eth0 ipaddress netmask netmaskaddr
and rebooted the ws.
But when it get up it didn't have my new ip but one assigned by dhcp. Also /etc/resolv.conf had been overwritten. I'm looking at some service that disables dhcp but without success.
Can someone help me?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2002 11:34 AM
10-17-2002 11:34 AM
Re: static ip address
I have not used RH 8.0, but the following was valid on RH 7.x.
There is one more file you need to edit. /etc/sysconfig/network-scripts/ifcfg-eth0
Should look something like the following:
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.0.2
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
ONBOOT=yes
BTW, there is a ifcfg-eth[n] file for each network adapter in the system. So if you have more than one nic you would have a ifcfg-eth0, ifcfg-eth1, etc.
--
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2002 07:46 PM
10-17-2002 07:46 PM
Re: static ip address
You need to modify /etc/sysconfig/network-scripts/ifcfg-eth0.
This file is used when system startup the network. My advice is, you should create this file by some application such as linuxconf, redhat-config-network, webmin....
Because, script read the lines in the file. If you put "ONBOOT=yes"
it may work. But if you put "ONBOOT=Yes" or "ONBOOT=y", I don't know.
If you want to know the rule,see /usr/share/doc/initscripts-ver/sysconfig.txt before you start to edit.
Good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2002 06:09 AM
11-15-2002 06:09 AM
Re: static ip address
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2002 11:14 AM
12-11-2002 11:14 AM
Re: static ip address
why edit half a dozen files when you just have to go into a GUI and change a few small things. I know ... i know... GUI you say? yes... i said it. I do a lot of command line work... but i'm lazy and if there's an easier way... i'll take it