Unable to assign static IP to OpenSUSE13.2

Hello all, this is my first time with Open Suse and installed 13.2 on the machine. I was trying to assign a static IP to my machine but failed. These are the steps I do:

Open YaST, Go to Network Devices -> Network Settings -> In Overview tab, I assign the static IP and then in Routing tab, I add the default gateway, when I save it, after applying settings, internet just goes away. I reset things back and things start working normal. Can you guys please help me or if you need any more information, I can provide you.

Thanks

Add a DNS (IP of your Router).
Gateway also IP of your Router.

Like said above. You can set those things, but they have to be correct. Something we can not decide from the information you give.

The IP address must be in the correct range (and not used by another systems on the same LAN).
The netmask must also be that of the network used on your LAN.

The default gateway mus be that of your router.

The above should be enough to give you connection to the internet by using IP addresses. E.g.

ping -c1 130.57.66.6

should succeed.
But when you also want to use host/domain names, you must have at least one DNS server defined (better two). This could also be your router (most routers act as DNS servers) or another DNS server offered by your ISP, or one general available like 8.8.8.8.

Thanks guys for your answers. I would like to tell that the static IP address (range) and the gateway is provided to me by my ISP (comcast) and even if I do that, it doesn’t work. Also, when I provide Subnet Mask as 255.255.255.0 and save it, after all configurations apply, I check that and it becomes /24.

Sorry, if I didn’t understand your answers correctly but somehow I still am not able to correct set that up.

Also, is there some command to find the ip of my router? (Sorry if that’s a stupid question)

What about telling us some facts instead of vagueries like “but I failed”. How do you come to the conclusion that you failed? After all “I failed” is only a human interpretation of the facts you experience on your system. And we like to see the facts, not the conclusions. :wink:

So, after you did your configuration, please show:

ip addr

and

ip router

And to compare with the “working” situation, the same.

And while you are new here (Welcome!), to post that:
Please use CODE tags around copied/pasted computer text in a post. It is the # button in the tool bar of the post editor. When applicable copy/paste complete, that is including the prompt, the command, the output and the next prompt.

And I do not know of any statment that will go and search all addresses of your LAN for to check if they may have router capabilities.

On 2015-07-27 18:56, ssc wrote:
>
> Hello all, this is my first time with Open Suse and installed 13.2 on
> the machine. I was trying to assign a static IP to my machine but
> failed. These are the steps I do:
>
> Open YaST, Go to Network Devices -> Network Settings -> In Overview tab,
> I assign the static IP and then in Routing tab, I add the default
> gateway, when I save it, after applying settings, internet just goes
> away. I reset things back and things start working normal. Can you guys
> please help me or if you need any more information, I can provide you.

Basically, the manual settings would be the same as the automatic
settings. Typically only the IP number will be a bit different.

So, find out what the automatic settings are. Run in a terminal “ip
addr” and “ip route”.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

On 2015-07-27 20:16, hcvv wrote:
> And I do not know of any statment that will go and search all addresses
> of your LAN for to check if they may have router capabilities.

nmap and a script, perhaps. Far from trivial.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

If you’re sure that you have assigned an address for the correct subnet, then you might find the gateway (router) reported via

arp -n

Thanks to all of you for your replies. This is the output of the commands before I set any static IP:

ip addr

ssc@linux-u5nc:~> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:1b:21:92:6c:a8 brd ff:ff:ff:ff:ff:ff
3: enp8s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:25:68:e0 brd ff:ff:ff:ff:ff:ff
4: enp2s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:1b:21:92:6c:a9 brd ff:ff:ff:ff:ff:ff
5: enp5s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:37:29:74 brd ff:ff:ff:ff:ff:ff
6: enp8s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:25:90:25:68:e1 brd ff:ff:ff:ff:ff:ff
    inet 10.1.10.18/24 brd 10.1.10.255 scope global enp8s0f1
       valid_lft forever preferred_lft forever
    inet6 2601:589:4701:9600:e9dc:f1e8:9d50:fd14/64 scope global temporary dynamic 
       valid_lft 345576sec preferred_lft 9521sec
    inet6 2601:589:4701:9600:225:90ff:fe25:68e1/64 scope global mngtmpaddr dynamic 
       valid_lft 345576sec preferred_lft 345576sec
    inet6 fe80::225:90ff:fe25:68e1/64 scope link 
       valid_lft forever preferred_lft forever
7: enp5s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:37:29:75 brd ff:ff:ff:ff:ff:ff
8: enp6s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:37:29:76 brd ff:ff:ff:ff:ff:ff
9: enp9s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:25:68:e2 brd ff:ff:ff:ff:ff:ff
10: enp6s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:37:29:77 brd ff:ff:ff:ff:ff:ff
11: enp9s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:25:68:e3 brd ff:ff:ff:ff:ff:ff

ip route

ssc@linux-u5nc:~> ip route
default via 10.1.10.1 dev enp8s0f1  proto dhcp 
10.1.10.0/24 dev enp8s0f1  proto kernel  scope link  src 10.1.10.18

**sudo arp -n

**

ssc@linux-u5nc:~> sudo arp -n
Address                  HWtype  HWaddress           Flags Mask            Iface
10.1.10.30               ether   c8:bc:c8:9e:ec:d5   C                     enp8s0f1
10.1.10.28               ether   00:25:64:cf:da:dc   C                     enp8s0f1
174.48.14.147            ether   c4:04:15:b9:4e:b2   C                     enp8s0f1
10.1.10.15               ether   74:44:01:36:58:90   C                     enp8s0f1
10.1.10.23               ether   c4:2c:03:35:7c:b8   C                     enp8s0f1
10.1.10.25               ether   b8:ac:6f:bf:47:df   C                     enp8s0f1
10.1.10.1                ether   c4:04:15:b9:4e:b4   C                     enp8s0f1

This is after I set static IP from YaST and internet stops working.

ip addr

ssc@linux-u5nc:~> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:1b:21:92:6c:a8 brd ff:ff:ff:ff:ff:ff
3: enp8s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:25:68:e0 brd ff:ff:ff:ff:ff:ff
4: enp2s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:1b:21:92:6c:a9 brd ff:ff:ff:ff:ff:ff
5: enp5s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:37:29:74 brd ff:ff:ff:ff:ff:ff
6: enp8s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:25:90:25:68:e1 brd ff:ff:ff:ff:ff:ff
    inet 50.244.177.209/24 brd 50.244.177.255 scope global enp8s0f1
       valid_lft forever preferred_lft forever
    inet6 2601:589:4701:9600:e9dc:f1e8:9d50:fd14/64 scope global temporary dynamic 
       valid_lft 345576sec preferred_lft 9521sec
    inet6 2601:589:4701:9600:225:90ff:fe25:68e1/64 scope global mngtmpaddr dynamic 
       valid_lft 345576sec preferred_lft 345576sec
    inet6 fe80::225:90ff:fe25:68e1/64 scope link 
       valid_lft forever preferred_lft forever
7: enp5s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:37:29:75 brd ff:ff:ff:ff:ff:ff
8: enp6s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:37:29:76 brd ff:ff:ff:ff:ff:ff
9: enp9s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:25:68:e2 brd ff:ff:ff:ff:ff:ff
10: enp6s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:37:29:77 brd ff:ff:ff:ff:ff:ff
11: enp9s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:25:90:25:68:e3 brd ff:ff:ff:ff:ff:ff

**ip route

**

ssc@linux-u5nc:~> ip route
default via 50.244.177.214 dev enp8s0f1
50.244.177.0/24 dev enp8s0f1  proto kernel  scope link  src 50.244.177.209

**sudo arp -n

**

ssc@linux-u5nc:~> sudo arp -n
Address                  HWtype  HWaddress           Flags Mask            Iface
50.244.177.214           ether   c4:04:15:b9:4e:b4   C                     enp8s0f1

So, what help can you guys provide after this information? Or if you need more information, please let me know. I really need to resolve this issue :frowning:

In he first sutuation your IP address is 10.1.10.18, your network is 10.1.10.0/24 and your router is 10.1.10.1.

In the second situation your IP address is 50.244.177.209, your nework is 50.244.177.0/24 and your router is 50.244.177.214.

As I assume that your router did not change his IP address, this can not be correct. Also while 10.1.10.0/24 is inside a private address range (which is normal for a home LAN), 50.244.177.214 is not (and thus may only be used for your LAN if you got that network assigned from an authority).

It is not clear to me what you try to achieve.
I can understand that you want a fixed IP address for your system (I have them myself), but that mus then be an address inside your network (10.1.10.0/24). And it must not be in he list that your DHCP server in the router is using (thus check your router for it and choose one outside that range, or change the configuration of your DHCP server, or switch DHCP serving off in your router when all systems in your LAN get fixed IP addresses).

Maybe you should explain why you are doing what you try to do, because that is unclear and thus hampers giving good advices.

Thanks again for your reply. This is what I am trying to achieve. All servers have their static IP that is open to the world and they can directly access that server from that IP or hostname. And that is exactly what I am trying to achieve. Not sure, if that is possible or not or how etc… Sorry for being so noob.

On 2015-07-28 18:56, ssc wrote:
>
> Thanks again for your reply. This is what I am trying to achieve. All
> servers have their static IP that is open to the world and they can
> directly access that server from that IP or hostname. And that is
> exactly what I am trying to achieve. Not sure, if that is possible or
> not or how etc… Sorry for being so noob.

Well… one way may be to configure the router in passtrhough mode.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Please explain about your network. Do you have two routers? Or do you have two IP addresses (10.0.0.1 and 50.244.177.214) configured on the inetrnal connction of your router?

A few more things.

I asked you earlier what you mean with “I failed …”. You gave no answer. Please tell what happens that made you think you failed to assign a network address. That is only a conclusion, not a fact.

In fact your thread title “Unable to assign static IP to OpenSUSE13.2” is wrong. because you have shown that you have asssigned to interface enp8s0f1 the IP address 50.244.177.209 and the netmask 255.255.255.0.

I can not know if this is

  1. the correct networkinterface (you have more there);
  2. the correct IP address;
  3. the correct netmask.

I also do not know if interface enp8s0f1 is connected to the correct network because in the original/working situation you use the same network interface, but it is there connected to the 10.0.1.0/24 network. Did you change the cable?

And when you realy think that your system is connected to the 50.244.177.0/24 LAN and that 50.244.177.214 is the router there, please try

ping -c1 50.244.177.214

I asked you earlier what you mean with “I failed …”. You gave no answer. Please tell what happens that made you think you failed to assign a network address. That is only a conclusion, not a fact.

Because, my internet stops working, so that’s why I concluded that I fail.

I only have one router. And the static IP’s and Gateway is provided by my ISP. I called them and asked that if I have any static IP’s for my network and they gave me that list. My system never connects to 50.244.177.0 and I am not sure if 50.244.177.214 is my router.

I am new to networking stuff like this as well so not sure what to tell you guys in order to seek the best possible help. My aim is to just allow my machine to have a static IP that could be access from outside world (i.e. anywhere from the world)

I know you guys are really putting your efforts and time and I thank you guys but I am also sorry for being such noob with terms and problem description.

Thanks

Even “my internet stops working” is a vague thing to say. You peobablt did somethiung like starting Firefox and trying to loada page from the forums. But why do you not say so.

You talk about a “that list from your IP”, but you never showed us that list. I w antto see why you use 50.244.177.209 for your system and why yyou use 50.24.177.214 for your default gateway (router).

And about your router’ IP address. Look at this:

henk@boven:~> ping -c1 50.244.177.214
PING 50.244.177.214 (50.244.177.214) 56(84) bytes of data.
64 bytes from 50.244.177.214: icmp_seq=1 ttl=48 time=131 ms

--- 50.244.177.214 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 131.632/131.632/131.632/0.000 ms
henk@boven:~>

To me it looks that this is the Internet side of your router.

In post #12 you say “All servers have their static IP that is open to the world”. Are those systems in the same LAN as your’s? Post the IP address of at least one of them here.

====================================

Let me try to paint the picture about what we think you have.


         LAN 10.0.10.0/24
(other    system)10.1.10.10------|
                                 |
(another  system)10.1.10.13------|
                                 |------10.10.0.1(router)a.b.c.d------internet
(openSUSE system)10.1.10.18------|
                                 |
(        printer)10.1.10.40------|

The above is a schematic of a LAN with network 10.1.10.0/24. I have added there four systems, one of them is 10.1.10.18, the other are theoretical to give the scheme some body and to give you an understanding how ALL system sin a LAN should have addresses in the same subnet. That includes the router, which has 10.1.10.1 on the LAN.

The router is different becaus it has also another side, to your ISP (and the internet). There is a complete different IP address there, that I have given as a.b.c.d. (It could be that it is 50.244.177.214, but that is pure speculation from me).

When your openSUSE system sends a TCP packet to another system on the LAN (one with address within 10.1.10.0.14), it will do so directly.
When your openSUSE system seds a packet with any other address, it will send it to the default router 10.1.10.1. And the router will “route” that package to the next router, which is on the other side with your ISP.

When you change the IP address of the openSUSE system to something different then one within 10.1…10.0/24 (as you do), the result will be that you can not connect anymore to the other systems in the LAN.
When you change the default gateway to another address, you can not access the internet anymore because there is no router in your LAN with that address.

So you can only do the changes you have done when you transfer your openSUSE system to another LAN. One which has 50.244.177.0/24 as it’s network address range. And one that has 50.244.177.214 as it’s router to the rest of the world.

It is (about) the same as when your house has the address Mainstreet 12. When you then put a sign on your house saying Broadstreet 55, no post will ever arrive, because the postman will walk with your letter to Broadstreet and not find your house. And when the postman walks through Mainsteer,he will never see Mainstreet 10 anymore (for which he will have no leters anyhow). You have to move your house to Broadstreet, not only change it’s address.

HTH

I am sorry but I cannot find “that list” in your posts.

I do not believe that you have a /24 network (mask 255.255.255.0) because (1) you are not skilled and a 254 host network would typically be for a small ISP or university. (2) 50.244.177.0/24 PTR records all show as generic comcast static hosts no mailservers, nameservers etc. Your router has a MAC of “c4:04:15:b9:4e:b4” which indicates a Netgear home router.
It is unusual that your server is reporting that it has 10 physical ethernet ports (all Super Micro Computer – SMC), unless you are configuring this box as a router/bridge or somesuch.

If my guess is right, I think that the main problem is with your router configuration. You need to set the secondary LAN IP address (also known as an IP alias) to “50.244.177.214” with a net mask of “255.255.255.248” (aka /29). When you configure the openSUSE bo static IP to “50.244.177.209” you should use “/29” as the subnet mask.

Even “my internet stops working” is a vague thing to say. You peobablt did somethiung like starting Firefox and trying to loada page from the forums. But why do you not say so.

Actually, I am working on this server machine remotely and connected to it via team viewer. So, once I configure the static IP address, I loose connection to machine and then I have to ask someone from the office (none of them knows a single thing about linux or command line stuff, so I have to tell them manually to revert changes I made).

You talk about a “that list from your IP”, but you never showed us that list. I w antto see why you use 50.244.177.209 for your system and why yyou use 50.24.177.214 for your default gateway (router).

This is the list given to me:

Static IPs.
50.244.177.209
50.244.177.210
50.244.177.211
50.244.177.212
50.244.177.213
Gateway
50.244.177.214

And why I use 50.244.177.214 because when I called that ISP, they provided me with that Gateway.

And about your router’ IP address. Look at this:
Code:
henk@boven:~> ping -c1 50.244.177.214
PING 50.244.177.214 (50.244.177.214) 56(84) bytes of data.
64 bytes from 50.244.177.214: icmp_seq=1 ttl=48 time=131 ms

— 50.244.177.214 ping statistics —
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 131.632/131.632/131.632/0.000 ms
henk@boven:~>
To me it looks that this is the Internet side of your router.

Yes, when I even tried it from my machine (not the one I have installed open suse on but from my own machine ubuntu14.04), I can see almost the same output.

In post #12 you say “All servers have their static IP that is open to the world”. Are those systems in the same LAN as your’s? Post the IP address of at least one of them here.

That I was trying to quote as an example, like in open world there are all servers which are open to the world (e.g. www.google.com and many other servers) so that is what my core purpose is. I want this machine (with openSuse installation) to have an IP that is known to the world (right now, I do not care about hostname).

The router is different becaus it has also another side, to your ISP (and the internet). There is a complete different IP address there, that I have given as a.b.c.d. (It could be that it is 50.244.177.214, but that is pure speculation from me).

So, how do I assign my router this IP: 50.244.177.214? Do I have to do it physically or how?

So, in short, what I like is, my machine has a static IP (either one of the mentioned list or any other) and I want the traffic to come in and go out. Is that possible please???

And by the way, thanks a lot again and again for your detailed answers but I am really sorry that I am unable to understand things. If there is some reading out there, may be that can help me or you guys can help me sort this problem out?

Thanks

All the talking above is in fact NOT about configuring a static IP. As said earlier, you did that already. And it is there!
And fixed in this context means: not using DHCP.

The talking is about how your network is and how it is connected to other networks and which address ranges belong to which network.

You can configure every NIC with some fixed IP address (and mask), but you can only use it when that IP address belongs to the network it is in.

You can also configure every route or default route you like, but that address should also belong to the network and there must be a router that uses it.

You can sit down somewhere in India and cry “I am in Greece”, but you would not be able to talk to the people there.

I am with eng-int that there is a lot more to understand for us before we understand what is going on here. We need pictures lik I made above, but then about your real situation.

And again, you can not simply change the IP address and then hoping that it will connect to anything. You have to move it to the correct LAN. When you change the address from 10.1.10.18 to 50.244.177.209, you must also do something with a cable to put it simple.