Network connection issue

I am running SuSE 11.3 64 bit as guest OS in Win7 64 bit using Virtualbox 4.3.12. The issue I face is described below

  1. I originally used “NAT Networking” for the VM and everything worked fine.

  2. I change to “Bridged Networking”. It also worked fine as long as I let SuSE use DHCP. However when I try to use a fixed ip, there is no network connection after YaST has updated the configuration.

  3. If I change back to DHCP there is still no network connection. For that reason I suspect there is a bug in YaST: the script it executes invalidates network configuraton. I have to revert back to a snapshot.

I the YaST ‘network settings’ dialog there is an option to enter a hostname. It does not matter if I accept what is proposed or f I try something else. The ip and subnet-mask I am entering are definitely valid. The Wndows host also uses fixed p (192.168.1.10) and works fine. For SuSE guest I use 192.168.1.11 (what is inside the pool of ip’s reservered by my router for fixed ip’s). Subnet mask for both is 255.255.255.0.

For my needs I need Bridged Networking with a fixed ip. Did I overlook something? Is there bug in YaST? Or can somebody guide me how to create a functional network configuration a non-YaST way?

On 2014-06-08 13:36, jazcykel wrote:
>
> I am running SuSE 11.3 64 bit as guest OS in Win7 64 bit using
> Virtualbox 4.3.12. The issue I face is described below
>
> 1) I originally used “NAT Networking” for the VM and everything worked
> fine.
>
> 2) I change to “Bridged Networking”. It also worked fine as long as I
> let SuSE use DHCP. However when I try to use a fixed ip, there is no
> network connection after YaST has updated the configuration.

Typically you did not set the IP correctly, or the name server, or the
gateway, or the route - things all done by dhcp automatically.

You can check by running “ifconfig”, “route” and “grep nameserver
/etc/resolv.conf” before and after, to compare.


Cheers / Saludos,

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

Thanks for the reply, but it did not help. I’d like a more detailed step-by-step explanation on how to make it work, and mabe even try it themselves on a similar environment, if someone could take the time for this.

I am not familiar with Linux commands (the reason why I use SuSE actually - as it has YaST).

There are 3 inputs to be specified in YaST in the ‘edit’ dialog for the network card after selecting ‘fixed ip’.

  1. ip. I enter “192.168.1.11”. It is definitely valid as I have described.
  2. so is subnet mask “255.255.255.0”
  3. hostname. Here I am uncertain. Yast proposes “linuxsomething.link”. Does not work. What I try myself doesn’t either. Should ‘link’ above be replaced (with what then?) or will I need to open other setting dialogs as well?

And please note what I also wrote (it was an important point actually!), that setting the network card back to DHCP does not bring the network connection back again. It seems configuration has been destroyed forever.

On 2014-06-08 14:56, jazcykel wrote:
>
> Thanks for the reply, but it did not help. I’d like a more detailed
> step-by-step explanation on how to make it work, and mabe even try it
> themselves on a similar environment, if someone could take the time for
> this.

Ok, just do this. Let your system with dhcp, working, then open any
terminal you like, and type (as plain user):


/sbin/ifconfig
/sbin/route
grep nameserver /etc/resolv.conf

When you have that data, and paste it all here, from initial command
prompt, to last command prompt, in a single mouse sweep, and please do
so inside code tags (the ‘#’ button in the forum editor).
See photo

Then switch to bridge mode, and repeat the above.

This is a diagnostic for us to see how things are, not a solution.


Cheers / Saludos,

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

Setting the name server to the ip of my router (192.168.1.1 - the same as the Wndows host uses) does not help either.

Please, always show what you did (have now), how can we check if you made errors when we see nothing?

On 2014-06-08 16:06, jazcykel wrote:
>
> Setting the name server to the ip of my router (192.168.1.1 - the same
> as the Wndows host uses) does not help either.

Just do the commands I requested and paste it all back here, as asked.


Cheers / Saludos,

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

Thanks for willingness to look into it. It may take a few days for me to provide the requested information, as I have some urgent work now.

You may need to arp. Simply changing a configuration is not enough.

Unlike “chatty” Windows, by default openSUSE does not issue an arp after a network configuration change (IIRC there is a checkbox to enable if you really want it). The alternative is to reboot which will arp automatically on bootup. I don’t remember if simply restarting the network service should accomplish the same (would if you’re implementing DHCP or want to renew your DHCP lease) with the following command

systemctl restart network

Also, this assumes you have a simple SOHO setup. If you’re implementing network security like LDAP, AD, etc then you will likely have to make a number of changes there, too. In general, if you’re running LDAP/AD specifically you will have “old” network settings tied to your network account in DHCP, DNS and Domain Controller which other machines will use to contact your machine.

Additionally, if you configure a static (fixed) IP address, note that you <must> not set an address that’s within your DHCP scope (IP address range)! If you do this, then it’s possible for DHCP to assign another machine the same address as your machine, creating confusion and lost connections. You need to understand how the IP address mask works to know what IP address you can configure that’s still valid while not in the DHCP scope. If you don’t know how to do this, you must post your proposed fixed IP address and the the DHCP scope.

TSU

I have seen this issue in my home lab setup.

when switching to static IP you need to also set the routing for the NIC to your gateway/router IP
not in the nick edit section but on the main section of yast/networking 4th tab.
my issue with this is that you only can set one routing to single interface.
and if you move to bridged network like if you using Xen/KVM with bridging you need to switch the routing to main bridge ie. br0

when I do this on my server I get the internet working fine.
some times though the setting get lost during updates or other changes and need to be done again.
not sure what was the thinking behind this setup.

before settng a fixed ip:

linux-6np2:~ # /sbin/ifconfig
enp0s3 Link encap:Ethernet HWaddr 08:00:27:F8:3C:51
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fef8:3c51/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1809 (1.7 Kb) TX bytes:13434 (13.1 Kb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:960 (960.0 b) TX bytes:960 (960.0 b)

linux-6np2:~ # /sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.2.2 0.0.0.0 UG 0 0 0 enp0s3
10.0.2.0 * 255.255.255.0 U 0 0 0 enp0s3
loopback * 255.0.0.0 U 0 0 0 lo
linux-6np2:~ # grep nameserver /etc/resolv.conf
nameserver 192.168.1.1
linux-6np2:~ # ^C
linux-6np2:~ #

after settng a fixed ip:

linux-6np2:~ # /sbin/ifconfig
enp0s3 Link encap:Ethernet HWaddr 08:00:27:F8:3C:51
inet addr:192.168.1.11 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fef8:3c51/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:120 (120.0 b) TX bytes:11129 (10.8 Kb)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:720 (720.0 b) TX bytes:720 (720.0 b)

linux-6np2:~ # /sbin route
bash: /sbin: Is a directory
linux-6np2:~ # /sbin/route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
loopback * 255.0.0.0 U 0 0 0 lo
192.168.1.0 * 255.255.255.0 U 0 0 0 enp0s3
linux-6np2:~ # grep nameserver /etc/resolv.cnf
grep: /etc/resolv.cnf: No such file or directory
linux-6np2:~ # grep nameserver /etc/resolv.conf
nameserver 192.168.1.1
linux-6np2:~ # ^C
linux-6np2:~ #

It erroneously creates a loopback interface, right? I did not ask for that!

c:/pic1.jpg

sorry, I could not attach images. I have no option to put them online.

But I have already explained what do: from YaST GUI open ‘Network settings’ … edit properties for the network card. Enter ip = “192.168.1.11”, subnet = “255.255.255.0”. Accept the hostname proposed. Proceed and in the “Hostname/DNS” tab define my router ip (192.168.1.1) as ‘Nameserver1’.

I DID NOT check the checkbox Assign Hostname to Loopback ip".

And what about the default router?

Sorry, I ws too fast in interpreting the console output. It creates a loopback interface on 127.0.0.1 - what is no problem of course.

I do not understand the last question. Please elaborate. Where will I find that option (in YaST GUI)? and what should it be/not be?

With YaST on SuSE 10.something several years ago I was able to set a static ip very easily exactly as I do now. But that was a dual boot configuration and not a VM.

@tshu … I have really replied to all that alrady. I am WITHIN the scope of static ip’s in router settings. Would you mnd read before replying, please?

I think vl1969 is on the track. I have tried to follow the advice, but no luck. More elaboration would be appreciated.

And to the comment about Wndows: In Windows you do this (using a static ip) in 5 seconds without any issues - here it takes 5 hours or 5 days. This GUI design is plain horrible (it was nice in SuSE 10.x versions and worked like a charm)!

On 2014-06-09 21:46, jazcykel wrote:
>
> before settng a fixed ip:

You forgot this:

When pasting computer commands and such, please use a CODE BLOCK, so
that the forum software doesn’t do silly things like converting URLS to
tiny urls, parenthesis into smileys, or otherwise hide or alter the
commands you entered. You get them by clicking on the ‘#’ button in the
forum editor. See photo


> enp0s3    Link encap:Ethernet  HWaddr 08:00:27:F8:3C:51
> inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
....
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> default         10.0.2.2        0.0.0.0         UG    0      0        0 enp0s3
> 10.0.2.0        *               255.255.255.0   U     0      0        0 enp0s3
> loopback        *               255.0.0.0       U     0      0        0 lo
....
> nameserver 192.168.1.1

after settng a fixed ip:


> enp0s3    Link encap:Ethernet  HWaddr 08:00:27:F8:3C:51
> inet addr:192.168.1.11  Bcast:192.168.1.255  Mask:255.255.255.0
....
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> loopback        *               255.0.0.0       U     0      0        0 lo
> 192.168.1.0     *               255.255.255.0   U     0      0        0 enp0s3
....
> nameserver 192.168.1.1

Well, the IPs are in a very different range, for one thing. Let’s assume
that is correct, by looking at your router address.

And, the fixed IP case has no default route. You did not setup a
gateway, so you have no network. Maybe local, certainly not outside.

(it is the same thing as Henk asks, post #13).

How do you it? Same as in Windows, you also define a default route in
the network properties. clickety click :slight_smile:

> It erroneously creates a loopback interface, right? I did not ask for
> that!

It is mandatory.


Cheers / Saludos,

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

On 2014-06-10 00:06, jazcykel wrote:

> This GUI design is plain horrible (it was nice in SuSE 10.x versions and
> worked like a charm)!

It is the same config as has been for many years. :slight_smile:

But this is not SuSE. It is openSUSE. SUSE (not SuSE) refers to the
commercial version.


Cheers / Saludos,

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

On 2014-06-09 23:46, jazcykel wrote:
>
> @tshu … I have really replied to all that alrady. I am WITHIN the
> scope of static ip’s in router settings. Would you mnd read before
> replying, please?

Calm down, please. Antagonizing is not productive :slight_smile:

However, I have looked twice over your posts in this thread, and I do
not find a reference to the scope of the static IPs in your router.
Maybe I missed it, but that means two of us have not seen it.

But anyway, that’s not your problem, or not the main one. We’ll see
after you add the gateway address.


Cheers / Saludos,

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