Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th March 2011, 11:38
rodobrist rodobrist is offline
Member
 
Join Date: Sep 2010
Posts: 30
Thanks: 10
Thanked 2 Times in 2 Posts
Default uBuntu 10.10 is not being friendly

Hi guys.
I have a very peculiar problem that coffee and effort just cannot seem to fix
I have a web server sitting at a data centre with a direct line into the internet(bad practise i know, i got told off by a pro but its too late now).

Im running uBuntu 10.10 server edition on a ASUS r300 rackmount server 4 gb ram 2 ethernet cards and a XEON processor ... standard stuff i would assume.

My problem is that my internet connection is highly unstable, and whats worse is that a simple /etc/init.d/networking restart does not do the trick.

the basic jist of the past 48 hrs involves me trying different configurations, then trying the restart script... then wondering why it does not work ... then rebooting (yes i just came from windows).

When it reboots it works for about 2 minutes (the internet) then it dies, i then try /etc/init.d/networking restart to no effect followed by a reboot which works.

i have ifconfig, /network/interfaces and init.d/networking

Code:
-------------ifconfig:-------------------

eth0      Link encap:Ethernet  HWaddr e0:cb:4e:12:78:35  
          inet addr:125.7.41.XXX  Bcast:125.7.41.XXX  Mask:255.255.255.240
          inet6 addr: fe80::e2cb:4eff:fe12:7835/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:48 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:5210 (5.2 KB)  TX bytes:6802 (6.8 KB)
          Interrupt:18 Memory:fbce0000-fbd00000 

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:11 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1124 (1.1 KB)  TX bytes:1124 (1.1 KB)
		  
---------network/interfaces--------------
/*------------------------------------

as you can see here i have two network cards with different public ips
but for debugging purposes i have disabled the second one 
(this text is not in the file)

-------------------------------------*/

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
	address 125.7.41.XXX
	netmask 255.255.255.240
	network 125.7.41.XXX
	broadcast 125.7.41.XXX
	gateway 125.7.41.XXX
	# dns-* options are implemented by the resolvconf package, if installed
	#dns-nameservers 203.110.136.142 203.110.136.131
	#dns-search doesnotmatter.com

#auto eth1
#iface eth1 inet static
#	address 125.7.41.XXX
#	netmask 255.255.255.240
#	network 125.7.41.XXX
#	broadcast 125.7.41.XXX
#	gateway 125.7.41.XXX
	# dns-* options are implemented by the resolvconf package, if installed
	#dns-nameservers 203.110.136.142 203.110.136.131
	#dns-search doesnotmatter.com
	
-------------------/etc/init.d/networking--------------------


#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          networking
# Required-Start:
# Required-Stop:     $local_fs
# Default-Start:
# Default-Stop:      0 6
# Short-Description: Raise network interfaces.
### END INIT INFO

PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"

[ -x /sbin/ifup ] || exit 0

. /lib/lsb/init-functions

# helper function to set the usplash timeout. https://launchpad.net/bugs/21617
usplash_timeout () {
        TIMEOUT=$1
        if [ -x /sbin/usplash_write ]; then
            /sbin/usplash_write "TIMEOUT $TIMEOUT" || true
        fi
}

process_options() {
    [ -e /etc/network/options ] || return 0
    log_warning_msg "/etc/network/options still exists and it will be IGNORED! Read README.Debian of netbase."
}

check_network_file_systems() {
    [ -e /proc/mounts ] || return 0

    if [ -e /etc/iscsi/iscsi.initramfs ]; then
        # probably root on iSCSI
        log_warning_msg "not deconfiguring network interfaces: root filesystem appears to be on iSCSI."
        exit 0
    fi

    exec 9<&0 < /proc/mounts
    while read DEV MTPT FSTYPE REST; do
        case $DEV in
        /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
            log_warning_msg "not deconfiguring network interfaces: network devices still mounted."
            exit 0
            ;;
        esac
        case $FSTYPE in
        nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
            log_warning_msg "not deconfiguring network interfaces: network file systems still mounted."
            exit 0
            ;;
        esac
    done
    exec 0<&9 9<&-
}

case "$1" in
start)
        /lib/init/upstart-job networking start



I've never seen this kind of thing before in my 6 months of linux fun, but then again I've never worked with a public IP before
Reply With Quote
Sponsored Links
  #2  
Old 4th March 2011, 13:42
rodobrist rodobrist is offline
Member
 
Join Date: Sep 2010
Posts: 30
Thanks: 10
Thanked 2 Times in 2 Posts
Default

OK advance on the problem.
It only happens when both ethernet cards are configured

ie eth1 is not commented out

This problem happens regardless of whether ufw is enabled or disabled
Reply With Quote
  #3  
Old 6th March 2011, 07:09
rodobrist rodobrist is offline
Member
 
Join Date: Sep 2010
Posts: 30
Thanks: 10
Thanked 2 Times in 2 Posts
Default

Problem solved.
When configuring multiple ethernet cards,
you can only have one gateway in interfaces:
Code:
auto eth0 eth1
iface eth0 inet static
	address 125.7.41.138
	netmask 255.255.255.240
	network 125.7.41.128
	broadcast 125.7.41.14
	gateway 125.7.41.142
iface eth1 inet static
	address 125.7.41.139
	netmask 255.255.255.240
	network 125.7.41.128
hopefully this saves someone a week
Reply With Quote
The Following User Says Thank You to rodobrist For This Useful Post:
falko (6th March 2011)
  #4  
Old 23rd March 2011, 05:37
astinsan astinsan is offline
Junior Member
 
Join Date: Jul 2008
Posts: 11
Thanks: 0
Thanked 2 Times in 2 Posts
 
Default

I had that same issue when I was first using linux. The way found the problem was running top and seeing the memory goto null from the network loop.
Reply With Quote
The Following User Says Thank You to astinsan For This Useful Post:
rodobrist (24th March 2011)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
High quality video security with Ubuntu desktop 10.10, Zoneminder 1.24.x and webcam. letsharehowto HOWTO-Related Questions 7 18th December 2011 13:01
Ubuntu 10.10 Total Freeze jackgow Installation/Configuration 3 25th December 2010 17:17
Problem send/receive Courier+Postfix+Squirrelmail Pirk Installation/Configuration 2 21st May 2010 13:26
Connection timed out on intermail outgoing mails gouravgarg Server Operation 6 5th March 2010 20:31
Unbale to login to Postfix from webmail wasimriz HOWTO-Related Questions 5 6th April 2009 13:49


All times are GMT +2. The time now is 00:08.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.