"No gateway" when static IP address

Dear people,

I am using openSuse 13.1 x86_64. I need to setup my wired network configuration as static IP, not via DHCP.

And I edited the IP, Mask, Gateway, DNS through NetworkManager, However, it always shows “No gateway”.

But other computer (windows/ubuntu) with the same cable pluged works fine.

Does anyone have ideas about it?

On 12/12/2013 11:56 PM, maxwellsuse wrote:
>
> Dear people,
>
> I am using openSuse 13.1 x86_64. I need to setup my wired network
> configuration as static IP, not via DHCP.
>
> And I edited the IP, Mask, Gateway, DNS through NetworkManager, However,
> it always shows “No gateway”.
>
> But other computer (windows/ubuntu) with the same cable pluged works
> fine.
>
> Does anyone have ideas about it?

Using 13.1 KDE, I was using NM with the IP assigned by DHCP. To test what yo
want to do, I deleted /etc/resolv.conf, unplugged the wire, then used the
Connection Manager to set a fixed IP, mask, gateway, and DNS. When I plugged in
the wire, the appropriate /etc/resolv.conf was created, and “/sbin/route -n” was
what I expected. The connection works exactly as I expected.

What did you do differently?

I have openSUSE 13.1 i386 and I have the same problem.

What I did is:

In ‘NetworkManager’ widget > ‘Manage Connections…’ > ‘Network Connections’ > ‘Wired’ tab > Selected my ‘Wired connection’ > Clicked on ‘Edit’ > ‘IPv4 Address’ tab :

Method: Manual
IP Address: 192.168.1.75
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.254

I do not do anything in DNS stuff… they are left blank. I think this is not required in my case? Press OK several times, admin password, etc.

Now the wired connections connects with the fixed IP I gave, but no gateway.

Any ideas?

If you have no need for NetworkManager (ie. you don’t need to use WLAN or move the machine around a lot) you should switch to Traditional If-Up in YAST -> Network Devices -> Network Settings -> Global Options -> Traditional Method with ifup, then go to Overview, Edit the Network Card in use, set the IP address, netmask etc. you need, click Next, Routing and set your gateway for IPv4 and/or IPv6 depending on what you use.

Then OK and you should be done.

I meant i586 on previous post.

Now I have also deleted /etc/resolv.conf, unplugged the wire, configure and plugged the wire. I understand from lwfinger that this file should be created again somehow… not the case for me. Hopefully not having resolv.conf would not give additional issues.

Thanks for your reply.

I used to have it configured like that here in the office (Traditional Method with ifup), and it worked ok. But I would like to keep the NetworkManager, as I do move this laptop a lot and I always have issues to use WiFi on Hotels.

What am I doing wrong?

Thanks for any advice.

well… now it works…

I went back to Traditional Method with ifup as before. When Yast was applying the configuration (this progress bar with a list and checkmarks) I was asked to install a required package: smpppd. I confirmed installation. Afterwards I noticed the missing /etc/resolv.conf was created again. In Yast, I switched (again) from Traditional … ifup to NetworkManager. The previously static address configured in NM was still there. Although the NetworkManager still shows “IPv4 Gateway: No IP Gateway” I do have Internet.

I do not think this is the way it was supposed to be, but at least works for me now.