Unable to access the Internet while setting the static IP
Hi Team,
I have assigned static IP in RHEL 7 after that i am unable to get the Internet access in server.
But If i assign to dhcp then able to access the internet. Please let us know how to get the Internet access even after setting to static IP in Server.
Responses
How do you access internet over there? Is this system configured to connect corporate or enterprise network then you may have to check for proxy settings? Otherwise, if this a simple home network where you connect to internet using internet service provider gateway then you may have to check if it is set properly?
What you could also do is that.... enable "dhcp" mode on your system... restart network service.. check what IP address gets assigned to your system.... and check out /etc/resolv.conf file as well.. also check out routing detaills... #ip route
Please provide more details of your setup so that community could help you..
Hi Ibrahim,
In your case, one easy way to get both internet connection and static IP on the system is to assign one more IP address (need to add another network adapter) to the system. Later, set first interface to be on dhcp mode and second one on static mode. You could bind your hostname with static IP address set on secondary network interface, and this way you get to access internet, and you could ping your static IP from your host system. You would need to edit and set same range static IP address to your virtual network adapter so that it would allow communication from your base (host) to guest system. I tested this and works for me on my Latop which is running with Windows, and I've Virtual Box installed where there is guest VM with RHEL6.9 installed, eth0 is on NAT, eth1 is on Host-Only-Network with an IP address set for the gateway in same range for communication.
I hope this helps!
Thanks.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
