# Network dhcpcd etc. problem

## Gert Andersen

Hi.

After I have finish installed my new 64bit gentoo system and have emrged dhcpcd as it shal start one netcard up to could connect to my gentoo router for get its ip address and hostname from the router is it like that dhcpcd is go Down and Loose the netcard starting up and only some checking and test runs by

ifconfig eth0 and ifconfig enp2s0 

dhcpcd eth0 and dhcpcd enp2s0

then restart of dhcpcd will make the pc get it ip and hostnames for the Linux router.

Is there some here there know what it make to dhcpcd to not geting Down after a reboot. ?

I have too the other problem with the Network Tool xinetd there not will start up in reason ot some error dhcpcd not seem to Work as it shall and looking for eth0 when the Cards is using enp2s0 

The kernel keep on remane the netcard one moment is it eth mane and another is it enp names. xinetd using eth0 is it saying.

----------

## charles17

 *Gert Andersen wrote:*   

> Is there some here there know what it make to dhcpcd to not geting Down after a reboot. ?

 

You might try running it as a service, see Network management using DHCPCD

 *Gert Andersen wrote:*   

> I have too the other problem with the Network Tool xinetd there not will start up in reason ot some error dhcpcd not seem to Work as it shall and looking for eth0 when the Cards is using enp2s0 
> 
> The kernel keep on remane the netcard one moment is it eth mane and another is it enp names. xinetd using eth0 is it saying.

 

Why do you think you need xinetd?   I didn't ever install it.

----------

## Gert Andersen

[quote="charles17"][quote="Gert Andersen"]Is there some here there know what it make to dhcpcd to not geting Down after a reboot. ?[/quote]

You might try running it as a service, see [url=https://wiki.gentoo.org/index.php?title=Complete_network_stack_without_net.*_scripts]Network management using DHCPCD[/url]

[quote="Gert Andersen"]I have too the other problem with the Network Tool xinetd there not will start up in reason ot some error dhcpcd not seem to Work as it shall and looking for eth0 when the Cards is using enp2s0 

The kernel keep on remane the netcard one moment is it eth mane and another is it enp names. xinetd using eth0 is it saying.[/quote]

Why do you think you need [color=blue][url=https://wiki.gentoo.org/wiki/Security_Handbook/Securing_services#Using_xinetd]xinetd[/url][/color]?   I didn't ever install it.[/quote]

I have a mailer progrom there is running by xinetd to start up server ports for telnet and 3 other ports binkp tfido and fido ports + the telnet ports - binkp itn and the telnet 

The program is named mbsebbs and xinetd read a file in Gentoo /etc/xinet.d/ named mbsebbs there start binkp´itn port  + the telnet port to answer connects from outside.

----------

## charles17

 *Gert Andersen wrote:*   

> The kernel keep on remane the netcard one moment is it eth mane and another is it enp names. xinetd using eth0 is it saying.

 

This happens during boot, as you could see from dmesg.

```
$ dmesg | grep eth0

```

Renaming is caused by a rule of sys-fs/eudev or sys-fs/udev in the file /lib/udev/rules.d/80-net-name-slot.rules which can be overwritten by a corresponding rule in /etc/udev/rules.d/.

----------

## Gert Andersen

[quote="charles17"][quote="Gert Andersen"]The kernel keep on remane the netcard one moment is it eth mane and another is it enp names. xinetd using eth0 is it saying.[/quote]

This happens during boot, as you could see from dmesg.[code]$ dmesg | grep eth0

[/code]

Renaming is caused by a rule of sys-fs/eudev or sys-fs/udev in the file [color=blue]/lib/udev/rules.d/80-net-name-slot.rules[/color] which can be overwritten by a corresponding rule in [color=blue]/etc/udev/rules.d/[/color].[/quote]

I then just need to known the right name and setting to use in /etc/udev/rules.d/ as I have a interface rule file in here but with the old name of 70_* file.

This is like udev not use it.

----------

## charles17

 *Gert Andersen wrote:*   

> I then just need to known the right name and setting to use in /etc/udev/rules.d/ as I have a interface rule file in here but with the old name of 70_* file.

 

Have a look at https://wiki.gentoo.org/wiki/Udev and read man 8 udevadm.

 *Gert Andersen wrote:*   

> This is like udev not use it.

 

There might be some differences between eudev (which I am using) and udev.  You could find the actually applied rules using 

```
$ udevadm info -p /sys/class/net/enp2s0
```

(Make sure /sys/class/net/enp2s0 is correct.)

 and (as root) 

```
# udevadm test /sys/class/net/enp2s0
```

Then overwrite those rules by creating empty files in /etc/udev/rules.d/ like

```
80-net-name-slot.rules
```

Edit: 

No need for putting empty 75-net-description.rules in /etc/udev/rules.d/

See https://wiki.gentoo.org/wiki/Eudev#Keep_classic_.27eth0.27_namingLast edited by charles17 on Sat Apr 02, 2016 3:01 pm; edited 3 times in total

----------

## NeddySeagoon

Gert Andersen,

If you like the kernel names for the network interfaces and not the 'persistent' names add 

```
net.ifnames=0
```

to your kernel command line in your boot loader config file.

This tells [e]udev not to rename your interfaces.

----------

## Gert Andersen

[quote="NeddySeagoon"]Gert Andersen,

If you like the kernel names for the network interfaces and not the 'persistent' names add [code]net.ifnames=0[/code]to your kernel command line in your boot loader config file.

This tells [e]udev not to rename your interfaces.[/quote]

My other Linux systems of Gento is using 70-persitent-net.rules file in /etc/udev/rules.d/ to keep using old names of eth* and to hold the netcard interface not moving around for my router.

so if the new install of Gentoo could use eth* instead of use enp* will all Work fine, self when I instal the new Gentto was it used eth* while intalling but after was it changed to it was eno* names and the Gentoo handbbok is still use the old interface names and some Gentoo programs and utlities is still using the old interface names.

----------

## charles17

 *Gert Andersen wrote:*   

> so if the new install of Gentoo could use eth* instead of use enp* will all Work fine, self when I instal the new Gentto was it used eth* while intalling but after was it changed to it was eno* names and the Gentoo handbbok is still use the old interface names and some Gentoo programs and utlities is still using the old interface names.

 

So what is the problem? Do what's stated in https://wiki.gentoo.org/wiki/Eudev#Keep_classic_.27eth0.27_naming and be happy.

----------

