[SOLVED] OEL5.4 OS, eth0 has private IP, eth0:0 has routable IP, internet access don't work
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Did you set the nameserver in /etc/resolv.conf ?
Can you ping the default gateway?
Usually, firefox should find its way out through the default gateway by itself.
Thanks for your quick reply. Below please see some notes:
1- Yes, I have /etc/resolv.conf pointing to correct name servers.
2- Yes, I'm able to ping the default gateway.
3- Just an added note: eth0:0 shows up under "ifconfig -a" command with correct parameters. I can ping eth0:0 using its IP. But, when I bring up "system-config-network", it doesn't have an entry for eth0:0.
4- The server was originally set up with private IP as its main IP. Do I need to change server's IP to this new rout-able one?
[QUOTE=matpe;3983880]I did try to set up a network config almost exactly as you have. This is what I did:
[CODE]# ifconfig eth0 10.0.0.1/24
# ifconfig eth0:0 18.104.22.168/24
# route add default gw 22.214.171.124
# route -n
matpe - Thanks so much for your useful post, but that only works dynamically. The real problem is that after a reboot it doesn't work anymore. Below please find how I've set up my network related files:
1- /etc/sysconfig/network ==> I populated "GATEWAY=" field with the gateway of my public address.
2- /etc/sysconfig/network-scripts/ifcfg-eth0 ==> I populated this file with my private IP information.
3- /etc/sysconfig/network-scripts/ifcfg-eth0:0 ==> I populated this file with my public IP information.
After a reboot I don't have internet access, when I issue ifconfig command don't see an entry for eth0:0, and my eth0 has the public IP assigned to it (although the file ifcfg-eth0 has my private IP info).
All, what am I doing wrong? How should these files be set up for everything to be configured right after a reboot?
This was a "user error". When configuring /etc/sysconfig/network-scripts/ifcfg-eth1:0 file for the public IP, I had forgotten to change the "DEVICE=" field to eth1:0. And since this was a cp of the /etc/sysconfig/network-scripts/ifcfg-eth1 file, it created a conflict. As soon as I corrected this file, everything worked just fine.