Configure Network Interface

I am very new to the Red Hat OS and need some help getting started.  I installed a copy of Red Hat 6.5 as a virtual machine.  It appears I need to register the server but in order to do that I need to get it on the network.  Can someone please guide me on how to configure the interface through the command line?  If I do an ifconfig, I only see the lo int and not eth0.  I tried to edit using /etc/sysconfig/network-scripts/ifcfg-eth0, but I only see an option to change the address and not the subnet, dns or gateway.  Ideally, I would like to use the DHCP server.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Kent WSr. Network / Systems AdminCommented:
First, back up your /etc/sysconfig/network-scripts/ifcfg-eth0
Next, edit it and place this, and JUST this in it, to use DHCP.


Open in new window

Optionally, you can place in the file, if needed -

For a static IP, you can use this -


Open in new window

Of course, replace the appropriate IP / NM with your own.
With both options, you can also use


..replace the MAC address above with whatever you need.

After saving the file, do a

service network restart (or however you prefer to restart networking) to make active.
NytroZAuthor Commented:
Like I said in the question, I do not see the option to set the subnet or gateway.  

Kent WSr. Network / Systems AdminCommented:
Just add a line -


with your actual Gateway IP.
Restart networking.

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
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

From novice to tech pro — start learning today.