LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Static IP (private) not working (https://www.linuxquestions.org/questions/linux-networking-3/static-ip-private-not-working-684417/)

figure002 11-18-2008 04:33 PM

Quote:

Originally Posted by billymayday (Post 3346772)
When you open up Network Settings from yast, there's a routing tab on the RHS.

You need to add 192.161.1.1 as the default gateway.

Everything under the routing tab is disabled. The button for Add is disabled too. And the dropdown menu for Standard Gateway is empty. So I can't change anything there..

EDIT: Turns out I could just enter the gateway IP (192.168.1.1) in the empty list, but internet still didn't work after that.

billymayday 11-18-2008 04:37 PM

Are you running yast as root?

Try firing it up from a root terminal session (just type yast2 at the command line)

figure002 11-18-2008 04:44 PM

Yes, I'm running Yast as root, because I have to enter my root password everytime I run Yast. I also fired up Yast from a root terminal session, but there was no difference.

billymayday 11-18-2008 04:53 PM

Something is awry then.

Either you have entered something wrong that is causing this or yast is on strike. I can change it here OK.

You are using "Network Settings" from the "Network Devices" tab?

billymayday 11-18-2008 05:00 PM

You can always add the route manually. Not sure if it will persist in SuSe

Quote:

route add default gw 192.168.1.1

The_Nerd 11-18-2008 06:29 PM

I had a similar problem to what you are experiencing just today. It turned out to be a IP conflict between the two devices in my computer. For some reason, when I changed one devices IP address (eth0) it would change the other one's as well to the same thing. Even though the second network device (eth1) was disabled, this caused a conflict. Maybe try removing your wireless completely? Disable it in the bios?

billymayday 11-18-2008 06:32 PM

Except it seems pretty clear it's a routing problem since there is no default gateway.

Were you experiencing a routing issue or just IP conflict?

The_Nerd 11-18-2008 10:20 PM

Quote:

Originally Posted by billymayday (Post 3346909)
Except it seems pretty clear it's a routing problem since there is no default gateway.

Were you experiencing a routing issue or just IP conflict?

Yes, however it was the same for me today. It seamed like a routing problem at first, because sometimes I could ping the router/the 'net (google), and suddenly it would stop. I am just saying it might be possible...

figure002 11-19-2008 08:03 AM

Quote:

Originally Posted by billymayday (Post 3346815)
You are using "Network Settings" from the "Network Devices" tab?

I use the Network Settings in Yast, and then use the second tab to change the eth0 device to static IP. I used the third tab to set 'Nameserver 1' to 192.168.1.1 and Domainname to 'site'. And most options in the fourth tab (Routing) are disabled, except for the Default Gateway menu, which is an empty menu.

Quote:

Originally Posted by billymayday (Post 3346829)
You can always add the route manually. Not sure if it will persist in SuSe
route add default gw 192.168.1.1

I tried that before, but it didn't work. After that command I still couldn't load any webpages.


Quote:

Originally Posted by The_Nerd (Post 3346908)
I had a similar problem to what you are experiencing just today. It turned out to be a IP conflict between the two devices in my computer. For some reason, when I changed one devices IP address (eth0) it would change the other one's as well to the same thing. Even though the second network device (eth1) was disabled, this caused a conflict. Maybe try removing your wireless completely? Disable it in the bios?

So when you would do ifconfig, both eth0 and wlan would have the same IP? That isn't the case with me, as you can see from my previous posts. My wlan has a different IP than eth0. Also I didn't get an IP conflict.

heloma 11-19-2008 08:20 AM

This is definitly a routing issue, you need to add a static route (default gateway):
as root #route add default gw 192.168.1.1

If you are using Linksys, you will need also to clear your routing table.

good luck.


heloma

DotHQ 11-19-2008 08:21 AM

Reading through this one thing does not make sense to me. In post 11 you posted the stats with dhcp off. In the ifconfig I see:
Quote:

RX packets:6486 errors:0 dropped:0 overruns:0 frame:0
TX packets:6335 errors:0 dropped:0 overruns:0 carrier:0
Whenever I've seen my ifconfig show that I'm transmitting and receiving packets, that's a good thing. But here you are indeed transmitting and receiving but have no connetion. :confused:

Are you restarting networking after you make these changes?

service network restart works on my distros ...

figure002 11-19-2008 09:41 AM

I finally got it to work.

First I tried the following commands as root:
# route add default gw 192.168.1.1
followed by
# service network restart

But this only worked half. Skype would then work, but i could not ping to google.com or visit websites.

So I took another look at billymayday's advice. He told me to set the Default Gateway to '192.168.1.1' in the Routing tab in the Network Settings. When I tried this earlier, another option (Actualize DNS-data through DHCP) under the DNS tab was enabled. This time I disabled it and manually entered '192.168.1.1' for 'Namespace 1'. This in combination with the Default Gateway set to 192.168.1.1, does work :D I hope this works for other people also.

Thanks a lot for your help guys!

heloma 11-19-2008 02:45 PM

You need to add external dns servers to your hostfile,

add the following lines to /etc/resolv.conf
nameserver 4.2.2.2
nameserver 142.77.1.1



that's it !


All times are GMT -5. The time now is 11:58 PM.