Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how can I set a static ip address on centos

Posted on 2011-09-16
2
Medium Priority
?
435 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
Papertrip earned 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
If you’re involved with your company’s wide area network (WAN), you’ve probably heard about SD-WANs. They’re the “boy wonder” of networking, ostensibly allowing companies to replace expensive MPLS lines with low-cost Internet access. But, are they …
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

610 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