LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot reach the internet after configuring Static IP (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-reach-the-internet-after-configuring-static-ip-856213/)

Mitchal 01-13-2011 09:01 PM

Cannot reach the internet after configuring Static IP
 
Hi,
I have installed fedora 14 minimum install and I have configured my machine for Static IP but now i cant reach any external sites or repository, in fact all i can do is ssh to the box.
below is the configuration in my /etc/sysconfig/network-scripts/ifcfg-eth0 file:
DEVICE="eth0"
BOOTPROTO="static"
BROADCAST="10.27.18.255"
IPADDR="10.27.18.117"
NETMASK="255.255.255.0"
HWADDR="00:1E:0B:AD:04:E7"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
USERCTL="no"
IPV6INIT="no"
PEERDNS="yes"

and my DNS is setup to point to my ISP's primary and secondary DNS servers.
I have brought the interface down then up after each change but still cannot ping anything.
Can anyone offer any advise or additional steps i could take to trouble shoot this?
Cheers,
Mitch

jmc1987 01-13-2011 09:07 PM

if you can SSH to the box then your internet seems like its working. From what this tells me either /etc/resov.conf isn't configure properly or you have a firewall blocking your connections. Try to access a website or something by IP to confirm. If you can access a website by IP then its your DNS servers in /etc/resolv.conf.

Good luck

Mitchal 01-16-2011 03:06 PM

Hi JMC1987,
Thanks for your quick reply. I changed my configuration back to dhcp and pinged google as a test and had no issues. this is with no change made to the /etc/resolve.conf file. but if i change it back to static i get the following output:
[root@ticket ~]# ping google.com.au
ping: unknown host google.com.au
[root@ticket ~]# ping 66.102.11.104
connect: Network is unreachable
[root@ticket ~]#

How can i check to see if its blocked by my firewall?

Thanks again for your help

I might just add that i have confirmed the nameservers which appear in resolv.conf are the right ip addresses for our dns servers

trist007 01-16-2011 03:17 PM

If you go with static make sure your DNS is setup correctly in /etc/resolv.conf and that you have a valid route to the gateway 'route -n'. If not, you can run 'ip r a default via 192.168.1.1, assuming your gateway is 192.168.1.1.

Mitchal 01-16-2011 04:00 PM

Solved!!!!!
 
Hi Trist007,
You hit the nail on the head. i had not specified my default gateway.
Thankyou heaps for your help guys. Now i don't have to go to my boss and tell him i can't complete such a noobular task as setting a machine up for static IP.
Saved my career!


All times are GMT -5. The time now is 04:38 PM.