Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can not start network connection
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
colag
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2009
Posts: 105

PostPosted: Sun Apr 06, 2014 1:02 pm    Post subject: Can not start network connection Reply with quote

It is PPPoE (ppp over ethernet)
Followed this: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=3

Code:
ln -s /etc/init.d/net.lo /etc/init.d/net.ppp0
ln -s /etc/init.d/net.lo /etc/init.d/net.eth0

config_eth0=null (Specify your ethernet interface)
config_ppp0="ppp"
link_ppp0="eth0" (Specify your ethernet interface)
plugins_ppp0="pppoe"
username_ppp0='user'
password_ppp0='password'
pppd_ppp0="
noauth
defaultroute
usepeerdns
holdoff 3
child-timeout 60
lcp-echo-interval 15
lcp-echo-failure 3
noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp"

rc_need_ppp0="net.eth0"


But ifconfig doesn't show eth0 device, network is not starting, pppoe-start doesn't work. What can be the reason for this?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21431

PostPosted: Sun Apr 06, 2014 3:47 pm    Post subject: Reply with quote

There are several possible reasons. What is the output of emerge --info ; ip l ; ip a?
Back to top
View user's profile Send private message
colag
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2009
Posts: 105

PostPosted: Mon Apr 07, 2014 2:46 am    Post subject: Where is eth0 device? Reply with quote

ip a or ip l displays a device named "enp2s0" or something like that. But eth0 is expected. /etc/init.d/net.lo is symlinkd to /etc/init.d/net.eth0 , /etc/init.d/net.eth0 start get error or not device found like error.

It is pppoe connection. So during pppoe-setup i had to type enp2s0 instead of eth0, then it worked.

Did this from quick install:

Code:
livecd etc # cd init.d
livecd init.d # ln -s net.lo net.eth0
livecd init.d # cd ../conf.d
livecd conf.d # echo 'config_eth0="192.168.1.10 netmask 255.255.255.0 brd 192.168.1.255"' >> net
livecd conf.d # echo 'routes_eth0="default via 192.168.1.1"' >> net
livecd conf.d # echo 'hostname="myhostname"' > hostname
livecd conf.d # rc-update add net.eth0 default


What can be the reason not having eth0 ?
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 07, 2014 3:02 am    Post subject: Re: Where is eth0 device? Reply with quote

colag wrote:
ip a or ip l displays a device named "enp2s0" or something like that. But eth0 is expected. /etc/init.d/net.lo is symlinkd to /etc/init.d/net.eth0 , /etc/init.d/net.eth0 start get error or not device found like error.

colag ... simply substitute eth0 for enp2s0 ...

Code:
# rc-update del net.eth0 default
# rm /etc/init.d/net.eth0
# ln -s /etc/init.d/net.lo /etc/init.d/net.enp2s0
# sed -i.bak -e 's/eth0/enp2s0/g' /etc/conf.d/net
# rc-update add net.enp2s0 default

best ... khay
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21431

PostPosted: Mon Apr 07, 2014 3:17 am    Post subject: Re: Where is eth0 device? Reply with quote

colag wrote:
What can be the reason not having eth0 ?
You might have omitted the driver for the network card. However, based on the device name provided, it is more likely that you installed a braindamaged version of udevd and did not tell it not to be stupid. It then renamed your device.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Mon Apr 07, 2014 3:26 am    Post subject: Reply with quote

^^ ;)

Get eudev or mdev or go static. With udev pass net.ifnames=0 to your kernel.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Mon Apr 07, 2014 3:27 am    Post subject: Reply with quote

enp2s0 = udev / systemd network interface persistent naming.

you can disable this by 1 inserting a udev rule to over ride the rule that is generating those names, or 2 run eudev instead. there are more options, like mdev or static dev but i dont know too much about those.

Code:

ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules


according to https://forums.gentoo.org/viewtopic-p-7280006.html#7280006
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Mon Apr 07, 2014 3:46 am    Post subject: Reply with quote

Merged the preceding five posts.
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