LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 08-29-2013, 12:29 PM   #1
nomee786
LQ Newbie
 
Registered: Mar 2013
Posts: 13

Rep: Reputation: Disabled
How to add IP address on Centos?


Can some one tell me how to add IP address on Linux Centos?

Thanks.
 
Old 08-29-2013, 02:44 PM   #2
ArcLinux
Member
 
Registered: Apr 2005
Location: Fargo, ND
Distribution: Slackware, CentOS
Posts: 87

Rep: Reputation: 20
Are you looking to add a virtual interface to an existing or additional nic card or are you looking to get your network setup initially?
 
Old 08-31-2013, 04:12 AM   #3
vipul_vaidya
LQ Newbie
 
Registered: Jul 2013
Location: India
Distribution: CentOS, RHEL
Posts: 13

Rep: Reputation: Disabled
There are couple of methods for assigning IP address
for newbies you should try
#system-config-network (On GUI)

OR


#system-config-network-tui (ON CLI)
 
Old 09-01-2013, 10:51 PM   #4
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
Quote:
Can some one tell me how to add IP address on Linux Centos?

By default it takes the IP from the ISP's DHCPas soon as you are connected to a network. if you want to assign an IP manually:

#system-config-network
firing this from command line will give you a GUI interface.

OR

Code:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
and make below changes:

DEVICE=eth0 
BOOTPROTO=none
ONBOOT=yes 
NETMASK=255.255.255.0 
IPADDR=x.x.x.x                        # mention your IP address here
save and quit
restart the network service.

Last edited by SAbhi; 09-01-2013 at 10:53 PM. Reason: IP ADDR field suggestion
 
Old 01-29-2016, 03:39 PM   #5
nomee786
LQ Newbie
 
Registered: Mar 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Linux Laptop connectivity with Cisco Layer 3 switch

I have built two laptop with CentOS and I have configured ip addres and gateway as well.
I have cisco layer 3 switch which I am using as gateway.

But when I ping laptop to cisco switch or laptop to laptop I got an error "Host is unreachable".

Please advise.

thanks.
 
Old 01-29-2016, 04:23 PM   #6
nomee786
LQ Newbie
 
Registered: Mar 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Linux Laptop connectivity with Cisco Layer 3 switch


I have built two laptop with CentOS and I have configured ip addres and gateway as well.
I have cisco layer 3 switch which I am using as gateway.

But when I ping laptop to cisco switch or laptop to laptop I got an error "Host is unreachable".

Please advise.

thanks.
 
Old 02-03-2016, 10:47 PM   #7
MrTux
Member
 
Registered: Dec 2015
Posts: 131

Rep: Reputation: Disabled
Quote:
Originally Posted by SAbhi View Post
By default it takes the IP from the ISP's DHCPas soon as you are connected to a network. if you want to assign an IP manually:

#system-config-network
firing this from command line will give you a GUI interface.

OR

Code:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
and make below changes:

DEVICE=eth0 
BOOTPROTO=none
ONBOOT=yes 
NETMASK=255.255.255.0 
IPADDR=x.x.x.x                        # mention your IP address here
save and quit
restart the network service.
You missed the gateway

GATEWAY=X.X.X.X
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to add ipv4 address shof Linux - Networking 2 10-04-2011 09:26 AM
how to add a new IP address ? marozsas Red Hat 5 09-16-2009 01:31 PM
How to automatically add an address to the address book in Thunderbird royeo Linux - Newbie 2 09-04-2006 03:51 PM
Add a new Ip address to the NIC hcclnoodles Linux - Networking 4 08-19-2004 10:43 AM
Add another IP address to an Interface hcclnoodles Linux - Software 1 08-19-2004 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration