Sudden internet failure

Hi,

Been searching around for people with a similar problem for a couple of weeks now, with no hint at a solution. I installed virtual box, had the internet running for a couple of days, then nothing! I’ve been through the network configuration process (with ifup) and ensured things are set at default, and using DHCP (I’m getting the web through university LAN), and the cable is attached, but nothing! Does anybody know how to go about troubleshooting this issue, or what it could be?

Tom

Hi and a warm welcome to the forums :slight_smile:

For start please paste the output of this terminal commands here :

cat /etc/resolv.conf
/sbin/ifconfig

The first one will tell us something about your DNS and the second one about interfaces and the ip addresses You get.

Please wrap the output with code tags. Here’s a tutorial on how to do this :
Posting in Code Tags - A Guide

It will produce a much easier to read post.

Best regards,
Greg

Do you have openSuse installed in a Virtual Machine or did you install Virtual Box in a local openSuse install?

Life just got easier, thank you :slight_smile:

Can you ping to the router (assuming 192.168.0.1) or to an outside source (8.8.8.8).

Hi

Thanks for the quick respose. This is the output from my terminal:

tom@linux-1dio:~> cat /etc/resolv.conf
### /etc/resolv.conf file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
#     NETCONFIG_DNS_STATIC_SEARCHLIST
#     NETCONFIG_DNS_STATIC_SERVERS
#     NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
#     NETCONFIG_DNS_POLICY=''
#
# See also the netconfig(8) manual page and other documentation.
#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
# only, the netconfig settings are same with settings in this
# file and in case of a "netconfig update -f" call.
#
### Please remove (at least) this line when you modify the file!


linux-1dio:/home/tom # ifconfig
eth0      Link encap:Ethernet  HWaddr 20:CF:30:85:7B:FD  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25544 errors:0 dropped:644 overruns:0 frame:0
          TX packets:77 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2640925 (2.5 Mb)  TX bytes:26334 (25.7 Kb)
          Interrupt:53 Base address:0xe000 

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:16436  Metric:1
          RX packets:165 errors:0 dropped:0 overruns:0 frame:0
          TX packets:165 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:22236 (21.7 Kb)  TX bytes:22236 (21.7 Kb)

Also virtualbox was installed on my local machine. When I try to ping, I get

connect: Network is unreachable

Under Network Status, I also have none, click to configure network, but I have, and running through the standard config setup, nothing happens when it’s done! Weird

You have got no IP address configured and no DNS servers. This just can’t work.

What do You get when You try to restart the network service ?

/etc/init.d/network restart

You need to run this as root.

Best regards,
Greg

This is the result from network restart and ifconfig

/etc/init.d/network restart
Shutting down network interfaces:
    eth0      device: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
    eth0                                              done
Shutting down service network  .  .  .  .  .  .  .  . done
Hint: you may set mandatory devices in /etc/sysconfig/network/config
Setting up network interfaces:
    eth0      device: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
    eth0      is controlled by ifplugd
    eth0                                              waiting
Setting up service network  .  .  .  .  .  .  .  .  . done
linux-1dio:/home/tom # ifconfig
eth0      Link encap:Ethernet  HWaddr 20:CF:30:85:7B:FD  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1368673 errors:0 dropped:20864 overruns:0 frame:0
          TX packets:3836 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:139444817 (132.9 Mb)  TX bytes:1311912 (1.2 Mb)
          Interrupt:53 Base address:0xe000 

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:16436  Metric:1
          RX packets:2421 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2421 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:167268 (163.3 Kb)  TX bytes:167268 (163.3 Kb)

linux-1dio:/home/tom # 


So still no IP! I’m configured to get an IP via DHCP.

Cheers.

On 05/11/2011 11:06 AM, tomant wrote:
> eth0 Link encap:Ethernet HWaddr 20:CF:30:85:7B:FD
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:1368673 errors:0 dropped:20864 overruns:0 frame:0
> TX packets:3836 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:139444817 (132.9 Mb) TX bytes:1311912 (1.2 Mb)
> Interrupt:53 Base address:0xe000

There are a lot of RX packets for never having gotten an IP. Are you sure you
don’t have a cable problem that is generating noise?

In Yast, when is your ethernet card set to turn on? Manually? On Boot?
Also, does just requesting an IP address fix anything?

dhcpcd eth0

Its not a cable problem. The cable works fine in this Windows 7 laptop I’m using!

Ethernet card set to turn on on cable connection… Using that command to request an IP doesn’t do anything, still no network.

This is very strange indeed. Could You tell us what is the contents of these files ?

cat /etc/sysconfig/network/dhcp
cat /etc/sysconfig/network/ifcfg-eth0

Best regards,
Greg

It might be that the DHCP server is provided by VirtualBox, you need to figure out how to set up your router as server, so try using the host interface. You need to get the output of the commands put forth by Greg. I’m just suggesting (my two pennies comment).

Its quite long, but here’s the output from the terminal

cat /etc/sysconfig/network/dhcp
## Path:	Network/DHCP/DHCP client
## Description:	DHCP configuration tweaking
#
# Note: 
# To configure one or more interfaces for DHCP configuration, you have to
# change the BOOTPROTO variable in /etc/sysconfig/network/ifcfg-<interface>
# to 'dhcp' (and possibly set STARTMODE='onboot'). 
#
# Most of these options are used only by dhcpcd, not by the ISC dhclient
# (which uses a config file).
#
# Most of the options can be overridden by setting them in the ifcfg-* files,
# too.
#
# Note: The ISC dhclient started by the NetworkManager is not using any
# of these options -- NetworkManager is not using any sysconfig settings.
#

## Type:	string
## Default:	""
## ServiceRestart: network
#
# Which DHCPv4 client should be used? 
# If empty, dhcpcd is tried, then dhclient 
# Other possible values:
# 	dhcpcd   (DHCP client daemon)
# 	dhclient (ISC dhclient)
DHCLIENT_BIN=""

## Type:	string
## Default:	""
## ServiceRestart: network
#
# Which DHCPv6 client should be used? 
# Currently only the dhcp6c client is supported.
#
DHCLIENT6_BIN=""

## Type:        string
## Default:     ""
## ServiceRestart: network
#
# Additional user start options to use when the 'dhcpcd' DHCPv4 client
# is enabled in the DHCLIENT_BIN variable (default).
#
DHCPCD_USER_OPTIONS=""

## Type:        string
## Default:     ""
## ServiceRestart: network
#
# Additional user start options to use when the 'dhclient' ISC DHCPv4
# client is enabled in the DHCLIENT_BIN variable.
#
DHCLIENT_USER_OPTIONS=""

## Type:        string
## Default:     ""
## ServiceRestart: network
#
# Additional user start options to use when the 'dhcp6c' DHCPv6 client
# is enabled in the DHCLIENT6_BIN variable (default).
#
DHCP6C_USER_OPTIONS=""

## Type:	yesno
## Default:	no
#
# Start in debug mode? (yes|no)
# (debug info will be logged to /var/log/messages for dhcpcd, or to
# /var/log/dhclient-script for ISC dhclient)
#
DHCLIENT_DEBUG="no"

## Type: list("",yes,no,first)
## Default: ""
#
# Multiple DHCP clients:
#
# With two or more DHCP clients running, they would concurrently try to replace
# the default route or set the hostname. There are several ways of dealing with
# this conflict (and it is a conflict, because you can have only one default
# route even though routes are stackable and the dhcp clients would change it
# while every lease renew):
#
#  1) Allow both clients to do that stuff. This would work in many cases if
#     only one of the interfaces is used at a time. However, it would lead to
#     undefined behaviour such as changing default route e.g. on dhcp renew.
#
#  2) When both interfaces are connected to the same network, you may configure
#     a bonding interface in active-backup mode (or another, e.g. 802.3ad, when
#     supported and configured by the switch) and configure dhcp on the bonding
#     instead.
#
#  3) When only one of the interfaces is used at time, you may set STARTMODE to
#     ifplugd and specify the priority of the interfaces in IFPLUGD_PRIORITY.
#     This is a common scenario for notebooks to use the wired interface when
#     connected, wireless otherwise.
#
#  4) allow only one of the DHCP clients to do that stuff.
#     This implies that there would be a "primary" interface and a "secondary".
#     This is the assumption the default configuration is based on. But since
#     the system often can't guess which interface is "more important", we
#     simply choose one depending on related configuration or take the first
#     interface that is started with DHCP to be primary ("authoritative").
#     This can be configured by setting DHCLIENT_PRIMARY_DEVICE=yes in one of
#     the /etc/sysconfig/network/ifcfg-* files and DHCLIENT_PRIMARY_DEVICE=no
#     in /etc/sysconfig/network/dhcp (or in all other ifcfg files using DHCP).
#
# When DHCLIENT_PRIMARY_DEVICE is not explicitly configured to yes/no, the
# "primary" interface is choosed as follows:
#
# - On systems with iSCSI Boot Firmare Table, the iBFT primary interface
#   is used as the primary DHCP interface by default.
# - On systems booting via PXE, the interface specified by the BOOTIF kernel
#   parameter is used as primary DHCP interface. Set the global "ipappend 2"
#   parameter in pxelinux.cfg/* files, so the BOOTIF kernel parameter is set.
# - Otherwise, the DHCP client that is started first will be "primary" and
#   allowed the set the default route and hostname ("first up wins" mode,
#   the only one before openSUSE 11.4). To force this "first up wins" mode,
#   set DHCLIENT_PRIMARY_DEVICE="first" in /etc/sysconfig/network/dhcp.
#
# All other running dhcp clients will only configure the interface with an
# address and network routes, but not change the "global" default route or
# hostname.
# See also DHCLIENT_SET_DEFAULT_ROUTE and DHCLIENT_SET_HOSTNAME variables,
# that allow to modify the DHCLIENT_PRIMARY_DEVICE parameter behaviour once
# again.
#
# Thus, to specifically allow an interface's DHCP client to change "global"
# configuration, set the following variable to "yes". Or you can make an
# interface's DHCP client never change these settings if you set it to "no".
# If you leave it empty then ifup-dhcp will decide.
#
DHCLIENT_PRIMARY_DEVICE=""

## Type:	yesno
## Default:	no
#
# Should the DHCP client set the hostname? (yes|no)
# 
# When it is likely that this would occur during a running X session, 
# your DISPLAY variable could be screwed up and you won't be able to open
# new windows anymore, then this should be "no". 
#
# If it happens during booting it won't be a problem and you can 
# safely say "yes" here. For a roaming notebook with X kept running, "no"
# makes more sense. 
#
DHCLIENT_SET_HOSTNAME="yes"

## Type:	yesno
## Default:	yes
#
# Should the DHCP client set a default route (default Gateway) (yes|no)
#
# When multiple copies of dhcpcd run, it would make sense that only one
# of them does it. 
#
DHCLIENT_SET_DEFAULT_ROUTE="yes"

## Type:	integer
## Default:	""
#
# Lease time to request ( -l option)
#
# Specifies (in seconds) the lease that is suggested to the server. 
# The default is 1 hour, use -1 to request infinite lease time.
#
DHCLIENT_LEASE_TIME=""

## Type:        yesno
## Default:     yes
#
# dhcpcd -E/--lastlease option
#
# This setting controls whether dhcpcd should try to use DHCP settings
# provided in its last lease when the dhcp-server is not reachable and
# the lease hasn't expired yet.
# Set this variable to "no" to disable the fallback to the last lease.
#
DHCLIENT_USE_LAST_LEASE="no"

## Type:	integer
## Default:	"0"
#
# dhcpcd -t/--timeout option
#
# You can set the timeout - dhcpcd will terminate after this time when
# does not get a reply from the dhcp server. The dhcpcd default timeout
# is 20 seconds, we set it to 0 to and wait forever to get a lease.
#
# Note: In the past, this setting was set to a much higher value (999999)
# by default, because the dhcpcd < 3.2.3 didn't provided a infinite one.
#
DHCLIENT_TIMEOUT="0"

## Type:	string
## Default:	AUTO
#
# specify a hostname to send ( -h option)
#
# specifies a string used for the hostname option field when dhcpcd sends DHCP
# messages. Some DHCP servers will update nameserver entries (dynamic DNS).
# Also, some DHCP servers, notably those used by @Home Networks, require the
# hostname option field containing a specific string in the DHCP messages from
# clients.
#
# By default the current hostname is sent ("AUTO"), if one is defined in 
# /etc/HOSTNAME. 
# Use this variable to override this with another hostname, or leave empty
# to not send a hostname.
#
DHCLIENT_HOSTNAME_OPTION="AUTO"

## Type:	string
## Default:	""
#
# specify a client ID ( -I option)
#
# Specifies a client identifier string. By default the hardware address of the
# network interface is sent as client identifier string, if none is specified
# here.
#
# Note that dhcpcd will prepend a zero to what it sends to the server. In the
# server configuration, you need to write the following to match on it:
#  option dhcp-client-identifier "\0foo";
#
DHCLIENT_CLIENT_ID=""

## Type:	string("dhcpcd dhclient")
## Default:	""
#
# specify a vendor class ID ( -i option)
#
# Specifies the vendor class identifier string. The default is dhcpcd-<version>.
#
DHCLIENT_VENDOR_CLASS_ID=""

## Type:	yesno
## Default:	no
#
# Send a DHCPRELEASE to the server (sign off the address)? (yes|no)
# This may lead to getting a different address/hostname next time an address
# is requested. But some servers require it.
#
DHCLIENT_RELEASE_BEFORE_QUIT="no"

## Type:	yesno
## Default:	no
#
# Send a DHCPv6 RELEASE to the server (sign off the address)? (yes|no)
# This may lead to getting a different address/hostname next time an address
# is requested. But some servers require it.
#
DHCLIENT6_RELEASE_BEFORE_QUIT="no"

## Type:	integer
## Default:	0
#
# Some interfaces need time to initialize. Add the latency time in seconds
# so these can be handled properly. Should probably set per interface rather than here.
#
DHCLIENT_SLEEP="0"

## Type:	integer
## Default:	15
#
# When the DHCP client is started at boot time, the boot process will stop
# until the interface is successfully configured, but at most for
# DHCLIENT_WAIT_AT_BOOT seconds.
#
# Note: RFC 2131 specifies, that the dhcp client should wait a random time
# between one and ten seconds to desynchronize the use of DHCP at startup.
#
DHCLIENT_WAIT_AT_BOOT="15"

## Type:        yesno
## Default:     yes
## ServiceRestart: yast2
#
# This option is read by YaST during network configuration.
#
# If set, then the hostname is added to /etc/hosts with IP address
# 127.0.0.2. This allows the hostname to be resolved (and thus, the
# host to be reached), if the real network is not reachable.
#
# If unset, YaST will not touch /etc/hosts.
WRITE_HOSTNAME_TO_HOSTS="yes"
## Path:	Network/DHCP/DHCP client
## Description:	DHCP client configuration
## Type:	yesno
## Default:	yes
#
# Should the DHCP client modify /etc/samba/dhcp.conf? 
#
DHCLIENT_MODIFY_SMB_CONF="yes"


cat /etc/sysconfig/network/ifcfg-eth0
BOOTPROTO='dhcp'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME='RTL8111/8168B PCI Express Gigabit Ethernet controller'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='ifplugd'
USERCONTROL='no'
IFPLUGD_PRIORITY='1'


Cheers

I would try changing this setting to no :

WRITE_HOSTNAME_TO_HOSTS="yes"

Also please check what priorities have You got in other ifcfg-* files :

IFPLUGD_PRIORITY='1'

This is an explanation on what this parameter changes :

#  3) When only one of the interfaces is used at time, you may set STARTMODE to
#     ifplugd and specify the priority of the interfaces in IFPLUGD_PRIORITY.
#     This is a common scenario for notebooks to use the wired interface when
#     connected, wireless otherwise.

Best regards,
Greg

I’ve changed ‘yes’ to ‘no’, but still no luck. Also, I don’t connect to the network in any other way (no wireless card) so there is only ifcfg files for eth0 and lo, whicch doesn’t have an ifplugd option.

Cheers for your help, it looks increasingly unlikely that its a software issue…

Fixed!

Installed a new network card, configured and work immediately. The only reason I didn’t suspect this to start with was it’s only a 8 month computer!

Cheers for your help.

Thanks for the feedback. Glad You got it working :slight_smile:

Best regards,
Greg