# 6 NICs runlevel / SSH issue

## rayjchris

I've installed Gentoo on my server which has 6 nics, at present only eth0 actually has an active network connection the other 5 nics do not have anything plugged into them. If I go ahead and create the symbolic links for the other nics:

```
ln -s net.lo net.eth1

ln -s net.lo net.eth2

ln -s net.lo net.eth3

ln -s net.lo net.eth4

ln -s net.lo net.eth5
```

Then having done this and rebooted SSHD will fail to start. This seems to be linked to the fact the other nics have given up attempting to obtain an IP address from my DHCP server (waiting for carrier). Reading around the web some people have suggested using ifplugd to figure out which nics have active connections and only issue DHCP request from those nics. Is this the route I should go down or has ifplugd's functionality been merged into dhcpcd?

This issue seems to pop up whether parallel startup is used or not. 

/etc/rc.conf

```
rc_parallel="NO"
```

rc-status

```

Runlevel: default

 syslog-ng                                                        [  started  ]

 vixie-cron                                                        [  started  ]

 udev-postmount                                               [  started  ]

 net.eth0                                                          [  started  ]

 netmount                                                         [  started  ]

 sshd                                                              [  started  ]

 local                                                             [  started  ]

Dynamic Runlevel: hotplugged

Dynamic Runlevel: needed

 sysfs                                                             [  started  ]

Dynamic Runlevel: manual

```

ls -la /etc/init.d

```
total 208

drwxr-xr-x  2 root root  4096 Nov 15 22:20 .

drwxr-xr-x 33 root root  4096 Nov 15 22:22 ..

-rwxr-xr-x  1 root root  3765 Nov  3 10:57 bootmisc

-rwxr-xr-x  1 root root  1536 Nov  3 10:57 consolefont

-rwxr-xr-x  1 root root  1729 Nov  3 08:20 crypto-loop

-rwxr-xr-x  1 root root   797 Nov  3 10:57 devfs

-rwxr-xr-x  1 root root   500 Nov 13 22:46 dhcpcd

-rwxr-xr-x  1 root root   317 Nov  3 10:57 dmesg

-rwxr-xr-x  1 root root  2275 Nov  3 10:57 fsck

lrwxrwxrwx  1 root root    25 Nov 13 21:37 functions.sh -> /lib64/rc/sh/functions.sh

-rwxr-xr-x  1 root root   738 Nov  3 08:45 git-daemon

-rwxr-xr-x  1 root root   381 Nov  3 10:57 hostname

-rwxr-xr-x  1 root root  2716 Nov  3 10:57 hwclock

-rwxr-xr-x  1 root root  1737 Nov  3 10:57 keymaps

-rwxr-xr-x  1 root root   391 Nov  3 10:57 killprocs

-rwxr-xr-x  1 root root   976 Nov  3 10:57 local

-rwxr-xr-x  1 root root  1868 Nov  3 10:57 localmount

-rwxr-xr-x  1 root root   282 Nov  3 09:24 mdev

-rwxr-xr-x  1 root root  1472 Nov  3 10:57 modules

-rwxr-xr-x  1 root root  1028 Nov  3 10:57 mount-ro

-rwxr-xr-x  1 root root   907 Nov  3 10:57 mtab

lrwxrwxrwx  1 root root     6 Nov 13 22:34 net.eth0 -> net.lo

-rwxr-xr-x  1 root root 15459 Nov  3 10:57 net.lo

-rwxr-xr-x  1 root root  2183 Nov  3 10:57 netmount

-rwxr-xr-x  1 root root  6803 Nov  3 10:57 network

-rwxr-xr-x  1 root root  1526 Nov  3 07:23 nscd

-rwxr-xr-x  1 root root   717 Nov  3 10:57 numlock

-rwxr-xr-x  1 root root  1954 Nov  3 10:57 procfs

-rwxr-xr-x  1 root root   736 Nov  3 11:03 pydoc-2.7

-rwxr-xr-x  1 root root   736 Nov  3 10:56 pydoc-3.1

-rwxr-xr-x  1 root root   304 Nov  3 06:40 reboot.sh

-rwxr-xr-x  1 root root   653 Nov  3 10:57 root

-rwxr-xr-x  1 root root   558 Nov  3 08:48 rsyncd

-rwxr-xr-x  1 root root   938 Nov  3 10:57 savecache

-rwxr-xr-x  1 root root   385 Nov  3 06:40 shutdown.sh

-rwxr-xr-x  1 root root  2040 Nov  3 09:28 sshd

-rwxr-xr-x  1 root root  1642 Nov  3 10:57 staticroute

-rwxr-xr-x  1 root root   789 Nov  3 10:57 swap

-rwxr-xr-x  1 root root   494 Nov  3 10:57 swclock

-rwxr-xr-x  1 root root   703 Nov  3 10:57 sysctl

-rwxr-xr-x  1 root root  1303 Nov  3 10:57 sysfs

-rwxr-xr-x  1 root root  1843 Nov 13 22:44 syslog-ng

-rwxr-xr-x  1 root root  1041 Nov  3 10:57 termencoding

-rwxr-xr-x  1 root root  6667 Nov  3 08:21 udev

-rwxr-xr-x  1 root root  2585 Nov  3 08:21 udev-dev-tarball

-rwxr-xr-x  1 root root  2683 Nov  3 08:21 udev-mount

-rwxr-xr-x  1 root root  1279 Nov  3 08:21 udev-postmount

-rwxr-xr-x  1 root root   937 Nov  3 10:57 urandom

-rwxr-xr-x  1 root root   530 Nov 13 22:41 vixie-cron
```

/etc/conf.d/net:

```
config_eth0=( "dhcp" )

config_eth1=( "dhcp" )

config_eth2=( "dhcp" )

config_eth3=( "dhcp" )

config_eth4=( "dhcp" )

config_eth5=( "dhcp" )
```

Hopefully someone can shed some light on this! let me know if you want some more debugging info and I'll go digging.  :Smile: 

----------

## Jaglover

AFAIK "waiting for carrier" means the cable is not plugged in, has nothing to do with DHCP.

----------

## rayjchris

I expect that if I plugged cables into each of the nics then the server would startup without an issue allowing  the SSH server to start up as well.  But for the time being I don't have a spare switch to do this with.[/post]

----------

## Mad Merlin

Generally you should only be configuring a maximum of one interface for DHCP, as DHCP normally sets the DNS servers and default route, which will clobber eachother if you have multiple DHCP configured interfaces.

The default config is DHCP, so try setting a null config for eth1 through eth5:

```

config_eth1=( "null" )

config_eth2=( "null" )

config_eth3=( "null" )

config_eth4=( "null" )

config_eth5=( "null" )

```

----------

## Hu

If you need to configure multiple interfaces via DHCP, you can instruct the DHCP client for some of the interfaces not to adjust DNS/routing.  See /usr/share/doc/openrc/net.example.bz2 and search for nodns.

----------

