Solved

how to change my ip address in centos 5

Posted on 2008-11-02
4
8,263 Views
Last Modified: 2012-05-05
I need to change my ip address, DNS , gateway and subnet mask in my centos. How would I do it from command prompt.
Also what is broadcast ip?
thanks
0
Comment
Question by:syedasimmeesaq
4 Comments
 
LVL 5

Accepted Solution

by:
bswinnerton earned 500 total points
ID: 22862089
Give this a try:

http://www.linuxdynasty.org/configuring-ip-on-linux-from-the-command-line-redhatcentosfedora.html

And a broadcast IP is just an ip address with the last octet as 255.  For example 192.168.0.1 is your ip, your broadcast ip would be 192.168.0.255
0
 
LVL 8

Expert Comment

by:nahime
ID: 22862090
if your interface is eth0 you need to modify the file:
/etc/sysconfig/network-scripts/ifcfg-eth0

See this link for reference:
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-networkscripts.html
0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 22862129
use setup command to control the centos system setting
and selected Network Configuration
Gud luck
setup

(or) use

system-config-network if you are using GUI

(or) use

system-config-network-tui

Open in new window

0
 
LVL 12

Expert Comment

by:hfraser
ID: 22862173
The broadcast address has the last octet set to 255 only if your netmask is 255.255.255.0. This is usually the case for home users (usually a class C address), but often not the case in a larger network (such as a class B or a subset thereof).

If you understand bitmasks, logical AND, etc. you can calculate the broadcast address. It's not hard. But it's even easier to reference one of the websites on the Internet that'll do it for you such as:

http://www.subnetmask.info/
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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 find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

758 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

19 Experts available now in Live!

Get 1:1 Help Now