Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

[SOLVED] Ethernet connection stopped working after replug.

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
Arcenturion
n00b
n00b
Posts: 30
Joined: Mon Apr 22, 2013 6:41 pm

[SOLVED] Ethernet connection stopped working after replug.

  • Quote

Post by Arcenturion » Mon Apr 22, 2013 8:06 pm

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: Select all

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: Select all

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.
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Mon Apr 22, 2013 9:05 pm

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: Select all

ifconfig -a > myifconfig
Now myifconfig should be treat like a log, and you could apply what i have said upper, you can

Code: Select all

cat myifconfig
to check its content.
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

Re: My wired ethernet connection stopped working after replu

  • Quote

Post by khayyam » Mon Apr 22, 2013 9:16 pm

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: Select all

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: Select all

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
Top
Arcenturion
n00b
n00b
Posts: 30
Joined: Mon Apr 22, 2013 6:41 pm

  • Quote

Post by Arcenturion » Mon Apr 22, 2013 9:17 pm

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

So, here's my ifconfig -a.

Code: Select all


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
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Mon Apr 22, 2013 9:31 pm

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: Select all

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: Select all

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.
Top
Arcenturion
n00b
n00b
Posts: 30
Joined: Mon Apr 22, 2013 6:41 pm

  • Quote

Post by Arcenturion » Mon Apr 22, 2013 9:33 pm

Here's my new ifconfig -a.

Code: Select all

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 
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Mon Apr 22, 2013 9:41 pm

the question is: does it work now ? :)
Top
Arcenturion
n00b
n00b
Posts: 30
Joined: Mon Apr 22, 2013 6:41 pm

  • Quote

Post by Arcenturion » Mon Apr 22, 2013 9:45 pm

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.
Top
Arcenturion
n00b
n00b
Posts: 30
Joined: Mon Apr 22, 2013 6:41 pm

  • Quote

Post by Arcenturion » Mon Apr 22, 2013 10:04 pm

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

Code: Select all

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.
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Mon Apr 22, 2013 10:37 pm

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

Code: Select all

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: Select all

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: Select all

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.
Top
Arcenturion
n00b
n00b
Posts: 30
Joined: Mon Apr 22, 2013 6:41 pm

  • Quote

Post by Arcenturion » Tue Apr 23, 2013 5:41 pm

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!
Top
krinn
Watchman
Watchman
User avatar
Posts: 7476
Joined: Fri May 02, 2003 6:14 am

  • Quote

Post by krinn » Tue Apr 23, 2013 9:07 pm

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.
Top
Post Reply

12 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic