[mythtv-users] HDHR prob with new wallwarts

Stephen Worthington stephen_agent at jsw.gen.nz
Mon Dec 9 10:18:56 UTC 2019


I have tried out setting up isc-dhcp-server on Ubuntu 18.04 to work
with my eth1 card (which I normally do not use except for testing
things like this).  It works fine as long as the configuration is done
correctly.  Here is the /etc/dhcp/dhcpd.conf file I used for my
testing:

# dhcpd.conf

# option definitions common to all supported networks...
option domain-name "jsw.gen.nz";
option domain-name-servers ns1g.jsw.gen.nz, ns2.jsw.gen.nz;

default-lease-time 600;
max-lease-time 7200;

# The ddns-updates-style parameter controls whether or not the server
will
# attempt to do a DNS update when a lease is confirmed. We default to
the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

host gt70 {
  hardware ethernet 8c:89:a5:01:24:b5;
  fixed-address 192.168.100.14;
}

subnet 192.168.100.0 netmask 255.255.255.0 {
        option routers lith.jsw.gen.nz;
        pool {
                range 192.168.100.100 192.168.100.200;
        }
}

First I installed the package:

sudo apt install isc-dhcp-server

Then I told the NetworkManager GUI to give eth1 a fixed IP address of
192.168.100.254, set up the /etc/dhcp/dhcpd.conf file as above,
plugged in my laptop to eth1, told NetworkManager to switch on eth1,
then started the ISC DHCP server:

sudo systemctl start isc-dhcp-server

and it worked and the laptop got the IP address 192.168.100.14.

I also had to do this:

sudo systemctl disable isc-dhcp-server6

as the package also installed the IPv6 DHCP server which was not
wanted for eth1.

So to set up a similar configuration for your dual Ethernet card, you
would want two host{} configurations with the MAC addresses of the two
HDHRs, one with address 192.168.100.1 and the other with the address
192.168.101.1.  And add a second subnet{} configuration for the
192.168.101.0/24 subnet.  Change all the names and name servers to
what you use in your network.  The "option routers" line should have
the IP address of your MythTV backend box.  That line is not
sufficient to allow the HDHRs (or anything else you plug into the dual
Ethernet card) to access the Internet - if you needed that, you would
have to enable routing on the backend box and set up its routing
table, and maybe also add routes in your main router for the two
subnets on the dual Ethernet card.

If you boot the backend box when the HDHRs are switched off,
NetworkManager will not enable the Ethernet ports they are connected
to.  If you do that by mistake, you can turn the HDHRs on, then use
the NetworkManager GUI to enable those Ethernet ports.  Then you will
need to restart the ISD DHCP server:

sudo systemctl restart isc-dhcp-server

That is needed as the ISC DHCP server only looks for the IP addresses
matching its subnet{} configurations when it is first started.


More information about the mythtv-users mailing list