Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Ethernet connection stopped working after replug.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Arcenturion
n00b
n00b


Joined: 22 Apr 2013
Posts: 30

PostPosted: Mon Apr 22, 2013 8:06 pm    Post subject: [SOLVED] Ethernet connection stopped working after replug. Reply with quote

Hello, I installed Gentoo two days ago with KDE as my DE, along with an Internet connection that worked. However, when I decided to unplug the Ethernet cable in order to configure a wireless connection, I still have a lost connection even with the Ethernet cable plugged in. My Gentoo computer is a Thinkpad T61 model (using e1000e), and I installed wpa_supplicant and wicd, but

ping google.com returns:

ping:unknown host google.com

ifconfig lo returns:

Code:
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
                    inet 127.0.0.1  netmask 255.0.0.0
                    loop txqueuelen 0 (Local loopback)
                    RX packets 433 bytes 29594 (28.9 KiB)
                    RC errors 0 dropped 0 overruns 0 frame 0
                    TX packets 433 bytes 29594 (28.9 KiB)
                    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


I'm aware that wpa_supplicant and wicd conflicts with NetworkManager, so I turned the daemons of the former two off.

My /etc/conf.d/net is :

Code:

modules=( "dhcpcd" )
config_enp0s25=( "dhcp" )
config_lo=( "dhcp" )
dns_servers_lo=( "8.8.8.8 8.8.4.4" )
dns_servers_lo=( "192.168.1.1" )


By the way, how do you post logs without having to type it out by hand, especially when the logs are from another computer without an internet connection? Sorry, I'm still a huge n00b to Linux.

A big thank you to everyone who'll respond!


Last edited by Arcenturion on Wed Apr 24, 2013 6:04 pm; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Mon Apr 22, 2013 9:05 pm    Post subject: Reply with quote

I'm not sure if you speak about that, but the card configuration is done by openrc at coldplug (when computer boot with the cable in).
If you want unplug/plug and going (hotplug) you need ifplugd or other deamon to detect cable state, and it should run the network init when detect.
Else you plug the cable and run dhcpcd by hands.

showing ifconfig lo is just showing lo is configure, something that should be done in all case, so not informative.
you better show ifconfig -a that would gave better infos.

Your ping: unknown host google.com is just common error message for mis configured dns, so base on that, i would say you just have a dns problem (i know you have configure it in net file, but still, it is. If you have a problem with IP you would have get a "network unreashable" kind of error, or packet loss 100% for wrong routing. This might happen if you dhcpcd the interface by hands without giving to dhcpcd the correct dns to use.

And to post logs without internet, you just need to copy that log into the other computer. If you don't have network, you can put it in an usb key or other device.
And if you need to post something that is not logs, like your ifconfig -a output, you just need to send the output to a file.
Code:
ifconfig -a > myifconfig

Now myifconfig should be treat like a log, and you could apply what i have said upper, you can
Code:
cat myifconfig
to check its content.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Mon Apr 22, 2013 9:16 pm    Post subject: Re: My wired ethernet connection stopped working after replu Reply with quote

Arcenturion wrote:
ifconfig lo returns:

Arcenturion ... unfortunately that tells us very little, the 'lo' (loopback) is always runing, its the interface used for TCP/IP connections locally ... and btw, it can't aquire an address via dhcp.

Arcenturion wrote:
Code:
modules=( "dhcpcd" )
config_enp0s25=( "dhcp" )
config_lo=( "dhcp" )
dns_servers_lo=( "8.8.8.8 8.8.4.4" )
dns_servers_lo=( "192.168.1.1" )

A number of issues here, firstly your using bash arrays, which is depreciated, and secondly your treating 'lo' as the network connection, when you should be configuring "enp0s25" (are you *sure* thats correct? .. seems to have an extra digit tagged on).

Code:
modules_enp0s2="dhcpcd"
config_enp0s2="dhcp"
dhcpcd_enp0s2="-t 10"
dns_servers_enp0s2="192.168.1.1 8.8.8.8 8.8.4.4"

So, nothing need be provided for 'lo' ... and btw, any reason for using google-dns ... you probably only need to define the DNS resolver from the gateway.

Arcenturion wrote:
By the way, how do you post logs without having to type it out by hand, especially when the logs are from another computer without an internet connection?

That would be farily difficult from a machine without networking, you could however dump the output to a file and transfer the file via a usbkey to a machine that does.

best ... khay
Back to top
View user's profile Send private message
Arcenturion
n00b
n00b


Joined: 22 Apr 2013
Posts: 30

PostPosted: Mon Apr 22, 2013 9:17 pm    Post subject: Reply with quote

Thanks for responding and telling me how to easily post logs.

So, here's my ifconfig -a.

Code:


enp0s25: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:1a:6b:d0:0e:21  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xfe000000-fe020000 

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)
        RX packets 433  bytes 29594 (28.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 433  bytes 29594 (28.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=193<UP,RUNNING,NOARP>  mtu 1480
        inet6 ::127.0.0.1  prefixlen 96  scopeid 0x90<compat,host>
        sit  txqueuelen 0  (IPv6-in-IPv4)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 196  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:13:e8:b1:53:dd  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Mon Apr 22, 2013 9:31 pm    Post subject: Reply with quote

Here's the manual way, that should fix your issue and later the net config to have the same effect (without dhcpcd as i just don't like that).

Code:
ifconfig enp0s25 192.168.1.2
route add default gw 192.168.1.1
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
ping -c1 www.google.com

You should be able to post from the non working computer then.

and config to have that is :
Code:
config_enp0s25="192.168.1.2 netmask 255.255.255.0 brd 192.168.1.255"
routes_enp0s25="default via 192.168.1.1"
dns_servers_enp0s25="8.8.8.8"


Or use the one provide by khayyam just changing enp0s2 with enp0s25 to get your dhcp config.
Back to top
View user's profile Send private message
Arcenturion
n00b
n00b


Joined: 22 Apr 2013
Posts: 30

PostPosted: Mon Apr 22, 2013 9:33 pm    Post subject: Reply with quote

Here's my new ifconfig -a.


Code:
enp0s25: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.1.146  netmask 255.255.255.0  broadcast  192.168.1.255
        ether 00:1a:6b:d0:0e:21  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xfe000000-fe020000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 0  (Local Loopback)
        RX packets 433  bytes 29594 (28.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 433  bytes 29594 (28.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=193<UP,RUNNING,NOARP>  mtu 1480
        inet6 ::127.0.0.1  prefixlen 96  scopeid 0x90<compat,host>
        sit  txqueuelen 0  (IPv6-in-IPv4)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 196  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:13:e8:b1:53:dd  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Mon Apr 22, 2013 9:41 pm    Post subject: Reply with quote

the question is: does it work now ? :)
Back to top
View user's profile Send private message
Arcenturion
n00b
n00b


Joined: 22 Apr 2013
Posts: 30

PostPosted: Mon Apr 22, 2013 9:45 pm    Post subject: Reply with quote

Sadly, no. If I combine the /etc/conf.d/net configuration from both of you, will that cause problems?

I'll try to repeat what you guys told me to do, because I'm not sure if I did it right. I'll be sure to report back.
Back to top
View user's profile Send private message
Arcenturion
n00b
n00b


Joined: 22 Apr 2013
Posts: 30

PostPosted: Mon Apr 22, 2013 10:04 pm    Post subject: Reply with quote

Okay, so my ifconfig -a is still the same, and here's how /etc/conf.d/net file is now:

Code:

modules_enp0s25="dhcpcd"
config_enp0s25="dhcp"
dhcpcd_enp0s25="-t 10"
dns_sservers_enp0s25="192.168.1.1 8.8.8.8 8.8.4.4"
config_enp0s25="192.168.1.1 netmask 255.255.255.0 brd 192.168.1.255"
routes_en0s25="default via 192.168.1.1"


Pinging Google now has a delay before it returns the "unknown host" error.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Mon Apr 22, 2013 10:37 pm    Post subject: Reply with quote

You shouldn't of course use both, use dhcp or fix one.

Code:

dns_sservers_enp0s25="192.168.1.1 8.8.8.8 8.8.4.4"
config_enp0s25="192.168.1.146 netmask 255.255.255.0 brd 192.168.1.255"
routes_en0s25="default via 192.168.1.1"


Code:

modules_enp0s25="dhcpcd"
config_enp0s25="dhcp"
dhcpcd_enp0s25="-t 10"
dns_sservers_enp0s25="192.168.1.1 8.8.8.8 8.8.4.4"
routes_en0s25="default via 192.168.1.1"


And look at this one :
Code:
config_enp0s25="192.168.1.1 netmask 255.255.255.0 brd 192.168.1.255"

You are telling system to use a fixed ip adress 192.168.1.1 when your router use that one too.
So you should use any from the range except one already in use, and 1 is use by your router
I have set it to 146 as you just show that one was assign previously.
Back to top
View user's profile Send private message
Arcenturion
n00b
n00b


Joined: 22 Apr 2013
Posts: 30

PostPosted: Tue Apr 23, 2013 5:41 pm    Post subject: Reply with quote

So, after I did what you guys told me to, plus doing a reboot of my Thinkpad, I can ping Google now! Thanks so much!
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Tue Apr 23, 2013 9:07 pm    Post subject: Reply with quote

Glad it works, not that hard finally no ?

You could help others users by editing your first thread to change title with a [SOLVED] in it, so users searching answers to questions your thread has raised will easy see they could find a solve in your, making it valuable.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum