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

x
?
Solved

How to set up a static IP in a CentOS Server 6.5

Posted on 2014-01-11
20
Medium Priority
?
1,981 Views
Last Modified: 2014-12-01
HI

I have a virtualized linux CentOS distro in virtualbox, by now I can see a dynamic IP associated to eth0 device on linux, so first of all, I tried to set up an static IP using system-config-network tool, but there isn't any device detected on the list, after that I went to the /etc/sysconfig/network-scripts path but there isn't any ifcfg-eth0 file, I wonder if all that is because the virtualization.

Regards.
0
Comment
Question by:dimensionav
[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
  • 10
  • 6
  • 3
  • +1
20 Comments
 
LVL 17

Expert Comment

by:lruiz52
ID: 39773897
Have you looked at the link below; show how to config centOS on virtual box.

http://extr3metech.wordpress.com/2013/05/23/configuring-network-in-centos-6-3-virtual-box-screenshots/
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39774136
Did you install the guest addition?

https://www.virtualbox.org/manual/ch04.html

Can you clarify the following statement? It is a bit confusing. Do you see any network device in the guest?

"I can see a dynamic IP associated to eth0 device on linux, so first of all, I tried to set up an static IP using system-config-network tool, but there isn't any device detected on the list"
0
 

Author Comment

by:dimensionav
ID: 39774224
This is what I mean with "I tried to set up an static IP using system-config-network tool, but there isn't any device detected on the list":

system-config-network tool
And this when I said that there isn't any file named ifcfg-eth0:

ifcfg-eth0
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 21

Expert Comment

by:Mazdajai
ID: 39774231
Did you install guest addition?
0
 

Author Comment

by:dimensionav
ID: 39774323
No I didn't but I think I should, right?
0
 

Author Comment

by:dimensionav
ID: 39775442
I have done this procedure: http://www.if-not-true-then-false.com/2010/install-virtualbox-guest-additions-on-fedora-centos-red-hat-rhel/ and now, Virtual Box Guess Additions are now installed but I am still uncapable of see any device using system-config-network tool or even manually, inside the directory /etc/sysconfig/network-scripts there isn't any ifcfg-eth0

Regards.
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39775587
Did you add a virtual network adapter to the guest and make sure it is connected?
What is the make and model of the hardware network adapter?
0
 

Author Comment

by:dimensionav
ID: 39775763
"Did you add a virtual network adapter to the guest and make sure it is connected? "
Do you mean this?:
network settings
And finally, by now the virtual machine is in a Dell Studio 1535 laptop with a WLAN 1397 Half MiniCard (4312bg).
0
 

Author Comment

by:dimensionav
ID: 39777708
What I did was to start the server in graphical mode (I didn't know this could be possible by using startx) and then stablished static IP for eth0 device.

By now, If I go to /etc/sysconfig/network-scripts there is a new file called ifcfg-Auto_eth0 which contains all the information related with the static IP previously configured.

Regards.
0
 
LVL 21

Accepted Solution

by:
Mazdajai earned 2000 total points
ID: 39777906
Did you add the virtual adapter after my posting? Is there a ifcfg-eth0 in /etc/sysconfig/network-scripts now?
0
 

Author Comment

by:dimensionav
ID: 39777969
Did you add the virtual adapter after my posting?
- No, It has been added since I installed the virtual OS for the very first time.

Is there a ifcfg-eth0 in /etc/sysconfig/network-scripts now?
- No, there is just a ifcfg-Auto_eth0 file.
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39780963
Are you using bridged networking? What version of guest addition you installed?

Have you try using a wired connection instead of wireless?
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39784911
#service NetworkManager stop
#chkconfig --list NetworkManager off
#cd /etc/sysconfig/network-scripts/
#mv ifcfg-Auto_eth0 ifcfg-eth0
#vi ifcfg-eth0
IPADDR=x.x.x.x
NETMASK=x.x.x.x
GATEWAY=x.x.x.x
onboot=yes
::wq

#ifup eth0
#ifconfig eth0

TY/SA
0
 

Author Comment

by:dimensionav
ID: 39800339
Are you using bridged networking?
YES

What version of guest addition you installed?
4.2.14

Have you try using a wired connection instead of wireless?
I just tried and there insn't any device yet.
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39802323
did you tried what i had mentioned ? TY/SA
0
 

Author Comment

by:dimensionav
ID: 39844172
Yes, and now after running system-config-network tool, I have two ethernet devices in the list, the Auto and the new eth0 created, but If I check the files in /etc/sysconfig/network-scripts there is only one file "ifcfg-eth0"

Regards.
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 39852025
Are you able to ping the guest from the desktop? What is the /etc/sysconfig/network-scripts/ifcfg-eth0 look like?
0
 
LVL 13

Expert Comment

by:Sandy
ID: 39852443
Configure the IP and paste output of #ifconfig eth0 and also try to ping outer network.

TY/SA
0
 

Author Comment

by:dimensionav
ID: 39926521
Are you able to ping the guest from the desktop? YES

What is the /etc/sysconfig/network-scripts/ifcfg-eth0 look like?:
network scripts
0
 

Author Closing Comment

by:dimensionav
ID: 40473821
Since there is no answer, this is the most close to a solution.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:
Suggested Courses

618 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