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.
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.
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.
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.
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.