Solved

how can I set a static ip address on centos

Posted on 2011-09-16
2
400 Views
Last Modified: 2012-05-12
i know i would have to edit a conf file or something , if i wanted to put a static ip . mask and gateway what file would i edit and what is the format ?
0
Comment
Question by:NAMEWITHELD12
2 Comments
 
LVL 21

Accepted Solution

by:
Papertrip earned 500 total points
ID: 36553048
[user@box ~]$ cd /etc/sysconfig/network-scripts/
[user@box network-scripts]$ cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=10.190.3.105
NETMASK=255.255.255.192
GATEWAY=10.190.3.111

Open in new window


You can put the gateway in there for a device specific gateway, or you can add that same line to /etc/sysconfig/network to make it the default gateway.

0
 
LVL 1

Author Closing Comment

by:NAMEWITHELD12
ID: 36553088
thAnks
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now