You are not logged in.

#1 2010-12-06 18:08:42

Clerik1
Member
Registered: 2010-12-06
Posts: 6

eth0 stopped working after changing hostname [SOLVED]

As stated in the subject, my eth0 connection stopped working yesterday after I changed the hostname of my computer in /etc/rc.conf and /etc/hosts

I'm afraid that it may have affected my networking hardware somehow, as I no longer see any activity on the NIC or the router.

I only made changes in /etc/rc.conf and /etc/hosts, changing the hostname in rc.conf and adding my new hostname in hosts.

I've listed the relevant contents of rc.conf and hosts, and the output of ifconfig eth0, and lspci | grep net. I have already tried restarting network several times by invoking ./etc/rc.d/network restart.

Scanning through /var/log/everything.log, the following pattern seems to repeat itself after I changed the hostname for the first time:
Dec    5 19:33:17 Ajax kernel: r8169 0000:03:00.0: eth0: link down
Dec    5 19:33:17 Ajax kernel: r8169 0000:03:00.0: eth0: waiting for carrier

Does anyone have any suggestions as to how I might fix this? I find it hard to believe that my NIC would just die on the spot like that.

</etc/rc.conf>
#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#  NETWORKING
#  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
...
HOSTNAME="myhost"
...
eth0="dhcp"
INTERFACES=(eth0)
</rc.conf>

</etc/hosts>
...
127.0.0.1             localhost.localdomain      localhost
...
</hosts>

<# ifconfig eth0>
eth0        Link encap: Ethernet HWaddr ##:##:##:##:##:##
              UP BROADCAST MULTICAST    MTU:1500   Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 b)    TX bytes:0 (0.0 b)
              Interrupt:45 Base address: 0xc000

</#ifconfig eth0>

<# lspci | grep net>
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
</# lspci | grep net>

Last edited by Clerik1 (2010-12-07 02:57:10)

Offline

#2 2010-12-06 18:14:38

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: eth0 stopped working after changing hostname [SOLVED]

Are you using wicd or network manager?
Are you using static or dynamic ip-address?

Offline

#3 2010-12-06 18:20:03

Clerik1
Member
Registered: 2010-12-06
Posts: 6

Re: eth0 stopped working after changing hostname [SOLVED]

@perbh

I haven't installed wicd or networkmanager
# which wicd
no wicd in (/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/vendor:/usr/lib/perl5/core_perl/bin)

# which networkmanager
no network-manager in (/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/vendor:/usr/lib/perl5/core_perl/bin)

I am using a dynamic ip-address assigned by my router (192.168.1.1*)

Offline

#4 2010-12-06 18:31:17

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: eth0 stopped working after changing hostname [SOLVED]

my mistake - didn't think you would take me literally :-(
try 'which NetworkManager'

Offline

#5 2010-12-06 18:33:48

Clerik1
Member
Registered: 2010-12-06
Posts: 6

Re: eth0 stopped working after changing hostname [SOLVED]

@perbh

# which NetworkManager
no NetworkManager in (/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/perlbin/vendor:/usr/lib/perl5/core_perl/bin)

Offline

#6 2010-12-06 18:37:19

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: eth0 stopped working after changing hostname [SOLVED]

What errors does your DHCP client (e.g. dhcpcd) throw when you try to obtain an address? Can you ping localhost?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#7 2010-12-06 18:42:33

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: eth0 stopped working after changing hostname [SOLVED]

I don't see myhost in /etc/hosts

Offline

#8 2010-12-06 18:45:57

Clerik1
Member
Registered: 2010-12-06
Posts: 6

Re: eth0 stopped working after changing hostname [SOLVED]

@ .:B:.
ping 127.0.0.1
64 bytes from 127.0.0.1 : icmp_seq=1 ttl=64 time=0.014 ms
64 bytes from 127.0.0.1 : icmp_seq=1 ttl=64 time=0.006 ms
64 bytes from 127.0.0.1 : icmp_seq=1 ttl=64 time=0.014 ms
^C
- - -   127.0.0.1 ping statistics - - -
3 packets transmitted, 3 received, 0% packet loss, time 1998ms

`./etc/rc.d/network restart` generates the following messages in everything.log:
Dec   6 11:43:08 myhost kernel: r8169 0000:03:00.0: eth0: link down
Dec   6 11:43:08 myhost kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready
Dec   6 11:43:08 myhost dhcpcd[2585]: eth0: waiting for carrier

Last edited by Clerik1 (2010-12-06 18:52:00)

Offline

#9 2010-12-06 18:48:30

Clerik1
Member
Registered: 2010-12-06
Posts: 6

Re: eth0 stopped working after changing hostname [SOLVED]

@skunktrader

</etc/hosts>
...
127.0.0.1      localhost.localdomain    localhost  myhost
...
</hosts>

I just made this change. Am I missing something?

Offline

#10 2010-12-07 01:39:10

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: eth0 stopped working after changing hostname [SOLVED]

Did you check whether your network cable is properly connected? On both sides?

And please use [ code ] tags to post the contents of your files or the output of commands. That immensely improves readability.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#11 2010-12-07 02:56:15

Clerik1
Member
Registered: 2010-12-06
Posts: 6

Re: eth0 stopped working after changing hostname [SOLVED]

I figured it out!

I disconnected power for ~30 minutes and removed the cmos battery to reset the bios.

Thanks for the input everyone, and sorry if my posts were unreadable.

Offline

Board footer

Powered by FluxBB