# Can not start network connection

## colag

It is PPPoE (ppp over ethernet)

Followed this: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=3

```
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?

----------

## Hu

There are several possible reasons.  What is the output of emerge --info ; ip l ; ip a?

----------

## colag

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:

```
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 ?

----------

## khayyam

 *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 ... 

```
# 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

----------

## Hu

 *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.

----------

## Jaglover

^^  :Wink: 

Get eudev or mdev or go static. With udev pass net.ifnames=0 to your kernel.

----------

## 666threesixes666

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.

```

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

```

according to https://forums.gentoo.org/viewtopic-p-7280006.html#7280006

----------

## desultory

Merged the preceding five posts.

----------

