Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 492830 - net-misc/dhcp with sys-apps/openrc-0.12.4 - dhcpd does not respond to requests
Summary: net-misc/dhcp with sys-apps/openrc-0.12.4 - dhcpd does not respond to requests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-29 07:11 UTC by cilly
Modified: 2015-05-19 22:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge info (emergeinfo.txt,5.59 KB, text/plain)
2013-11-29 07:11 UTC, cilly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cilly 2013-11-29 07:11:40 UTC
Created attachment 364174 [details]
emerge info

While on:

sys-apps/openrc-0.12.4
sys-apps/kmod-15
sys-fs/udev-208
virtual/udev-208

dhcpd did not work.

I had to downgrade to:

sys-apps/openrc-0.11.8
sys-fs/udev-204
virtual/udev-200
sys-apps/kmod-13-r1

Network setup:

/etc/conf.d/net.lan0:

###
# lan0 - LAN
###

# use iproute2 instead of ifconfig
modules_lan0="iproute2"

config_lan0="null"

vlans_lan0="1 17 18 19 20 21 22"
# MANAGE
vlan1_name="vlan1"
vlan1_flags="reorder_hdr off gvrp on loose_binding on"
vlan1_ingress="2:6 3:5"
vlan1_egress="1:2"
config_vlan1="null"
# PRIVATE
vlan17_name="vlan17"
vlan17_flags="reorder_hdr off gvrp on loose_binding on"
vlan17_ingress="2:6 3:5"
vlan17_egress="1:2"
config_vlan17="null"
# IPSEC
vlan18_name="vlan18"
vlan18_flags="reorder_hdr off gvrp on loose_binding on"
vlan18_ingress="2:6 3:5"
vlan18_egress="1:2"
config_vlan18="null"
# GUEST
vlan19_name="vlan19"
vlan19_flags="reorder_hdr off gvrp on loose_binding on"
vlan19_ingress="2:6 3:5"
vlan19_egress="1:2"
config_vlan19="null"
# IPTV
vlan20_name="vlan20"
vlan20_flags="reorder_hdr off gvrp on loose_binding on"
vlan20_ingress="2:6 3:5"
vlan20_egress="1:2"
config_vlan20="null"
# 21
vlan21_name="vlan21"
vlan21_flags="reorder_hdr off gvrp on loose_binding on"
vlan21_ingress="2:6 3:5"
vlan21_egress="1:2"
config_vlan21="null"
# 22
vlan22_name="vlan22"
vlan22_flags="reorder_hdr off gvrp on loose_binding on"
vlan22_ingress="2:6 3:5"
vlan22_egress="1:2"
config_vlan22="null"
#

/etc/conf.d/dhcpd

###
# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd

# If you require more than one instance of dhcpd you can create symbolic
# links to dhcpd service like so
#   cd /etc/init.d
#   ln -s dhcpd dhcpd.foo
#   cd ../conf.d
#   cp dhcpd dhcpd.foo
# Now you can edit dhcpd.foo and specify a different configuration file.
# You'll also need to specify a pidfile in that dhcpd.conf file.
# See the pid-file-name option in the dhcpd.conf man page for details.

# If you wish to run dhcpd in a chroot, uncomment the following line
# DHCPD_CHROOT="/var/lib/dhcp/chroot"

# All file paths below are relative to the chroot.
# You can specify a different chroot directory but MAKE SURE it's empty.

# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf
# DHCPD_CONF="/etc/dhcp/dhcpd.conf"

# Configure which interface or interfaces to for dhcpd to listen on.
# List all interfaces space separated. If this is not specified then
# we listen on all interfaces.
DHCPD_IFACE="br1 br17 br18 br19 br20 br21 br22"

# Insert any other dhcpd options - see the man page for a full list.
DHCPD_OPTS="-q"

/etc/conf.d/net.br17

###
# br17 - bridge
###

# use iproute2 instead of ifconfig
modules_br17="iproute2"

bridge_br17="vlan17"
rc_net_br17_need="net.lan0"

brctl_br17="setfd 0
sethello 3
stp on"

config_br17="172.16.17.1 netmask 255.255.255.0 broadcast 172.16.17.255"

postup() {
    #sysctl -w net.ipv4.conf.br17.force_igmp_version=2
    return 0
}
Comment 1 cilly 2013-11-29 09:34:29 UTC
Seems like dhcpd didn't get the requests at all.

Probably, the new openrc network-scripts did not initialize the interfaces correctly.

tcpdump -i br17 showed dhcp requests of clients.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-11-29 13:40:27 UTC
pkg_postinst() says:

 * In this version of OpenRC, the loopback interface no longer
 * satisfies the net virtual.
 * If you have services now which do not start because of this,
 * They can be fixed by adding rc_need="!net"
 * to the /etc/conf.d/<servicename> file.

Is that tripping up dhcpd?
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2013-11-29 16:30:17 UTC
Didn't you install "net-misc/netifrc"?

Please show us the output of "rc-update" (after you run "rc-update --update").

See bug 490750, I am expecting the leftover of openrc-11.x (net.lo) is causing problems like in bug 490512.
Comment 4 cilly 2013-12-03 11:17:30 UTC
eix -e netifrc
[I] net-misc/netifrc
     Available versions:  0.1{tbz2} **9999
     Installed versions:  0.1{tbz2}(12:05:07 PM 12/03/2013)
     Homepage:            http://www.gentoo.org/proj/en/base/openrc/
     Description:         Gentoo Network Interface Management Scripts

This is after installation, before reboot:

rc-update
              apache2 |      default                                  
                  atd |      default                                  
             bootmisc | boot                                          
          consolefont | boot                                          
      courier-authlib |      default                                  
        courier-imapd |      default                                  
    courier-imapd-ssl |      default                                  
             ddclient |      default                                  
                devfs |                                        sysinit
        device-mapper | boot                                          
                dhcpd |      default                                  
                dmesg |                                        sysinit
             fail2ban |      default                                  
           fakeidentd |      default                                  
                 fsck | boot                                          
              haveged |      default                                  
              hostapd |      default                                  
             hostname | boot                                          
              hwclock | boot                                          
            igmpproxy |      default                                  
             iptables |      default                                  
              keymaps | boot                                          
            killprocs |                        shutdown               
           lm_sensors |      default                                  
                local |      default nonetwork                        
           localmount | boot                                          
             loopback | boot                                          
              modules | boot                                          
             mount-ro |                        shutdown               
                 mrtg |      default                                  
                 mtab | boot                                          
                mysql |      default                                  
                named |      default                                  
              net.br1 |      default                                  
             net.br17 |      default                                  
             net.br18 |      default                                  
             net.br19 |      default                                  
             net.br20 |      default                                  
             net.br21 |      default                                  
             net.br22 |      default                                  
             net.lan0 |      default                                  
             net.lan1 |      default                                  
             net.lan2 |      default                                  
             net.lan3 |      default                                  
             net.lan4 |      default                                  
               net.lo | boot                                          
             net.ppp0 |      default                                  
             net.wan0 |      default                                  
             netmount |      default                                  
                  nfs |      default                                  
           ntp-client |      default                                  
                 ntpd |      default                                  
            openl2tpd |      default                                  
              postfix |      default                                  
              privoxy |      default                                  
          privoxy-tor |      default                                  
               procfs | boot                                          
                quota |      default                                  
               racoon |      default                                  
                 root | boot                                          
            saslauthd |      default                                  
            savecache |                        shutdown               
               smartd |      default                                  
                snmpd |      default                                  
                 sshd |      default                                  
                 swap | boot                                          
            swapfiles | boot                                          
               sysctl | boot                                          
                sysfs |                                        sysinit
            syslog-ng |      default                                  
         termencoding | boot                                          
         tmpfiles.dev |                                        sysinit
       tmpfiles.setup | boot                                          
                  tor |      default                                  
        trafficshaper |      default                                  
                 udev |                                        sysinit
           udev-mount |                                        sysinit
              urandom | boot                                          
           vixie-cron |      default
Comment 5 cilly 2013-12-03 12:20:01 UTC
I removed net.lo from runlevel boot and rebooted, didn't help.

I also use module iproute2 in conf.d/net.lo.
Comment 6 cilly 2013-12-03 15:40:31 UTC
(In reply to Jeroen Roovers from comment #2)
> pkg_postinst() says:
> 
>  * In this version of OpenRC, the loopback interface no longer
>  * satisfies the net virtual.
>  * If you have services now which do not start because of this,
>  * They can be fixed by adding rc_need="!net"
>  * to the /etc/conf.d/<servicename> file.
> 
> Is that tripping up dhcpd?

Well, in this case a service would not start at all. In my case all services are started as normal. But dhcpd does nothing. All other services are running (or at least I didn't find any which isn't).
Comment 7 cilly 2014-01-15 09:22:42 UTC
I am still having this problem, can anyone help, pls?

lsof|grep dhcp

dhcpd     7294          dhcp  cwd       DIR                8,3     4096          2 /
dhcpd     7294          dhcp  rtd       DIR                8,3     4096          2 /
dhcpd     7294          dhcp  txt       REG                8,3  2031048    2365778 /usr/sbin/dhcpd
dhcpd     7294          dhcp  mem       REG                8,3    30640    5247466 /lib64/libnss_db-2.17.so
dhcpd     7294          dhcp  mem       REG                8,3    51120    5247627 /lib64/libnss_files-2.17.so
dhcpd     7294          dhcp  mem       REG                8,3    47048    5247714 /lib64/libnss_nis-2.17.so
dhcpd     7294          dhcp  mem       REG                8,3    87984    5247629 /lib64/libnsl-2.17.so
dhcpd     7294          dhcp  mem       REG                8,3    35176    5247746 /lib64/libnss_compat-2.17.so
dhcpd     7294          dhcp  mem       REG                8,3  1728560    5247653 /lib64/libc-2.17.so
dhcpd     7294          dhcp  mem       REG                8,3   144816    5247750 /lib64/ld-2.17.so
dhcpd     7294          dhcp    0u      CHR                1,3      0t0       1028 /dev/null
dhcpd     7294          dhcp    1u      CHR                1,3      0t0       1028 /dev/null
dhcpd     7294          dhcp    2u      CHR                1,3      0t0       1028 /dev/null
dhcpd     7294          dhcp    3u     unix 0x0000000000000000      0t0      17975 P12112
dhcpd     7294          dhcp    4u      raw                         0t0      17976 00000000:0001->00000000:0000 st=07
dhcpd     7294          dhcp    5u     pack              12117      0t0        ALL type=SOCK_PACKET
dhcpd     7294          dhcp    6w      REG                8,3      208    5638364 /var/lib/dhcp/dhcpd.leases
dhcpd     7294          dhcp    7u     pack              12119      0t0        ALL type=SOCK_PACKET
dhcpd     7294          dhcp    8u     pack              12121      0t0        ALL type=SOCK_PACKET
dhcpd     7294          dhcp    9u     pack              12123      0t0        ALL type=SOCK_PACKET
dhcpd     7294          dhcp   10u     pack              12125      0t0        ALL type=SOCK_PACKET
dhcpd     7294          dhcp   11u     pack              12127      0t0        ALL type=SOCK_PACKET
dhcpd     7294          dhcp   12u     IPv4              12129      0t0        UDP *:bootps 
dhcpd     7294          dhcp   20u     IPv4              17972      0t0        UDP *:48941 
dhcpd     7294          dhcp   21u     IPv6              17973      0t0        UDP *:6934
Comment 8 cilly 2014-01-15 09:27:53 UTC
netstat -l|grep domain
tcp        0      0 172.16.22.1:domain      *:*                     LISTEN     
tcp        0      0 172.16.21.1:domain      *:*                     LISTEN     
tcp        0      0 172.16.20.1:domain      *:*                     LISTEN     
tcp        0      0 172.16.19.1:domain      *:*                     LISTEN     
tcp        0      0 pluto.cilly.mine:domain *:*                     LISTEN     
tcp        0      0 172.16.1.1:domain       *:*                     LISTEN     
tcp        0      0 localhost:domain        *:*                     LISTEN     
udp        0      0 172.16.22.1:domain      *:*                                
udp        0      0 172.16.21.1:domain      *:*                                
udp        0      0 172.16.20.1:domain      *:*                                
udp        0      0 172.16.19.1:domain      *:*                                
udp        0      0 pluto.cilly.mine:domain *:*                                
udp        0      0 172.16.1.1:domain       *:*                                
udp        0      0 localhost:domain        *:*                                
Active UNIX domain sockets (only servers)

So it seems dhcpd is not listening on 172.16.17.1
Comment 9 cilly 2014-01-15 10:02:18 UTC
okay, wrong guess, netstat -nl shows correct ip-address 172.16.17.1
Comment 10 cilly 2014-01-15 23:59:14 UTC
openrc-11.8 works without problems
Comment 11 cilly 2015-05-19 22:26:47 UTC
Use workaround to run a separate instance of dhcpd for every interface.