centos assign ip address

I have a fresh install of cent os 7. How can I assign the IP address  to use dhcp? I don't even see an /etc directory when I do a ls command. Its all blank except anaconda-ks.cfg file.
Starquest321Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zephyr ICTCloud ArchitectCommented:
That's because you are in the root home folder ... type "cd /etc/sysconfig/network-scripts/" this will bring you in the network scripts folder.

Here you can perform your ls again and you will see the network-scripts.

then type "vi ifcfg-ens192" (if that is the name of your network adapter)
In this file you can adjust settings to DHCP.

These settings should be there for you if you want DHCP and your adapter automatically enabled during boot:

BOOTPROTO="dhcp"
ONBOOT="yes"
0
Zephyr ICTCloud ArchitectCommented:
btw ... You might get your nic to work if you perform following command:

"ifup ens192"

Might not be enabled during boot, see post above
0
Starquest321Author Commented:
Weird .. my default install is the file is called ifcfg-lo ... and I don't have the dhcp entries there. I just have a loopback address of 127.0.0.1
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Zephyr ICTCloud ArchitectCommented:
Is that the only network script you see? Can you give more detail about your computer/device? Is it a physical or virtual machine?
0
Zephyr ICTCloud ArchitectCommented:
Another tip I can give, you can normally use the tool "nmtui" to configure your network connections, might come in handy when you have a network connection. This is a command line "wizard" tool kind of thing ... If you don't feel comfortable using cli and text files ...
0
SandyCommented:
run below command and paste output pls

#dmesg | grep -i eth
#ifconfig -a

TY/SA
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Starquest321Author Commented:
Here are the results. I would appreciate any help. No matter which IP try it doesn't work. Is there some firewall that I need to enable?
network.jpg
0
Naranthiran DSystem AdministratorCommented:
Run the setup command -->Select Network configuration-->Select the device and  assign Ip address..

For more details go through the link..
http://computernetworkingnotes.com/network-administrations/basic-networking-commands.html
0
Starquest321Author Commented:
I am using the network manager TUI .. and I am able to ADD a device .. but the device NAME is BLANK.  Should I put eth0? Why isn't the NIC install standard?
0
Starquest321Author Commented:
Accepted the solution before completely working. . I thought I did. In fact I thought I had 192.168.0.137 as the IP address..but why don't I have eth0 as the internet card?

Also I installed apache successfully but cannot load. So I think it's the network.

I get a ping reply from 192.168.0.137...

What can be wrong?
0
Starquest321Author Commented:
0
Starquest321Author Commented:
0
Starquest321Author Commented:
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.