Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Internet wont work post installation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
cooliasto
n00b
n00b


Joined: 11 Aug 2013
Posts: 12

PostPosted: Tue Dec 24, 2013 3:07 pm    Post subject: Internet wont work post installation Reply with quote

When I hit ifconfig eth0 wont show anymore or the ip address like it did during the installation

Is there a command i can enter to diagnose the problem so i can send it to you guys?
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Tue Dec 24, 2013 3:14 pm    Post subject: Reply with quote

Probably, your interface was renamed during boot.
You can check all the interfaces available by typing "ifconfig -a".
If you'll see something like enp4s0 - it is (your eth0 was renamed)
If you dislike interface renaming, you can add "net.ifnames=0" to kernel boot options
Back to top
View user's profile Send private message
cooliasto
n00b
n00b


Joined: 11 Aug 2013
Posts: 12

PostPosted: Tue Dec 24, 2013 3:49 pm    Post subject: Reply with quote

creaker wrote:
Probably, your interface was renamed during boot.
You can check all the interfaces available by typing "ifconfig -a".
If you'll see something like enp4s0 - it is (your eth0 was renamed)
If you dislike interface renaming, you can add "net.ifnames=0" to kernel boot options


I entered ifconfig -a and it showed enp0s5 which was the interface it was displayed as during the installation, but no ip addres
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 354
Location: the Netherlands

PostPosted: Tue Dec 24, 2013 4:01 pm    Post subject: Reply with quote

You either need to assign an ip address yourself or you can use DHCP.

See: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=1

What is the content of /etc/conf.d/net ?
Easiest is to add the line config_eth0="dhcp", replacing eth0 with your networkname. This will make that interface use dhcp.
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Tue Dec 24, 2013 4:47 pm    Post subject: Reply with quote

Quote:
I entered ifconfig -a and it showed enp0s5 which was the interface it was displayed as during the installation, but no ip addres

You interface (eth0) was renamed to enp0s5. It will not show ip address for enp0s5 because interface was not started and no ip assigned.
You have 2 options: either go with new "unpredictable" interface name enp0s5, or get eth0 back.

If you agree with new name, you have to reconfigure your networking:
1. Replace all the "eth0" with "enp0s5" in /etc/conf.d/net file
2. Remove /etc/init.d/net.eth0 and create link to net.lo for enp0s5
Code:
cd /etc/init.d/
rm net.eth0
ln -s net.lo net.enp0s5
rc-update del net.eth0 default
rc-update add net.enp0s5 default

3. Reboot or start new interface: /etc/init.d/net.enp0s5 start

If you prefer to use old name, just add "net.ifnames=0" to kernel boot options, no more.
Back to top
View user's profile Send private message
cooliasto
n00b
n00b


Joined: 11 Aug 2013
Posts: 12

PostPosted: Thu Dec 26, 2013 7:34 am    Post subject: Reply with quote

creaker wrote:
Quote:
I entered ifconfig -a and it showed enp0s5 which was the interface it was displayed as during the installation, but no ip addres

You interface (eth0) was renamed to enp0s5. It will not show ip address for enp0s5 because interface was not started and no ip assigned.
You have 2 options: either go with new "unpredictable" interface name enp0s5, or get eth0 back.

If you agree with new name, you have to reconfigure your networking:
1. Replace all the "eth0" with "enp0s5" in /etc/conf.d/net file
2. Remove /etc/init.d/net.eth0 and create link to net.lo for enp0s5
Code:
cd /etc/init.d/
rm net.eth0
ln -s net.lo net.enp0s5
rc-update del net.eth0 default
rc-update add net.enp0s5 default

3. Reboot or start new interface: /etc/init.d/net.enp0s5 start

If you prefer to use old name, just add "net.ifnames=0" to kernel boot options, no more.


When I typed rm net.eth0 after changing directory it sad their was no such file or directory
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Thu Dec 26, 2013 9:45 am    Post subject: Reply with quote

skip it and run the rest commands regardless their output
Back to top
View user's profile Send private message
cooliasto
n00b
n00b


Joined: 11 Aug 2013
Posts: 12

PostPosted: Thu Dec 26, 2013 12:47 pm    Post subject: Reply with quote

creaker wrote:
skip it and run the rest commands regardless their output

It went like this, after a second attempt http://imgur.com/PabrcvZ
Back to top
View user's profile Send private message
creaker
l33t
l33t


Joined: 14 Jul 2012
Posts: 651

PostPosted: Thu Dec 26, 2013 1:07 pm    Post subject: Reply with quote

Seems like typo in /etc/conf.d/net file at line 3:
Code:
routes_enp0s5default

check it and correct. It should be like:
Code:
config_enp0s5="192.168.1.2 netmask 255.255.255.0 brd 192.168.1.255"
routes_enp0s5="default via 192.168.1.1"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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