Setting Up a DHCP Server for BlackFly Cameras

Based on this topic.

Installing DHCP server (Ubuntu 12.04)

sudo apt-get install isc-dhcp-server

Setting up DHCP

isc-dhcp-server

Edit file /etc/default/isc-dhcp-server and set the four ports of the PoE Ethernet cards as the devices for which the DHCP serves addresses. So it should look something like this

#Defaults for dhcp initscript
#sourced by /etc/init.d/dhcp
#installed at /etc/default/isc-dhcp-server by the maintainer scripts

#This is a POSIX shell fragment

#On what interfaces should the DHCP server (dhcpd) serve DHCP requests"
#Separate multiple interfaces with spaces, e.g. “eth0 eth1".
INTERFACES="eth1 eth2 eth3 eth4"

dhcp.conf

Edit the file /etc/dhcp/dhcpd.conf. A different subnet has to be defined for each Ethernet port. So the additional part of the dhcp.conf looks somewhat like this.

subnet 10.5.5.0 netmask 255.255.255.0 {
    range 10.5.5.40 10.5.5.50;
}
subnet 10.5.6.0 netmask 255.255.255.0 {
    range 10.5.6.40 10.5.6.50;
}
subnet 10.5.7.0 netmask 255.255.255.0 {
    range 10.5.7.40 10.5.7.50;
}
subnet 10.5.8.0 netmask 255.255.255.0 {
    range 10.5.8.40 10.5.8.50;
}

This will allow the DHCP server to give out IP's in the x.x.x.40-50 range on the four Ethernet port.

Setting IPs for the Ethernet Ports

A static IP has to be set for the four ports that should provide IP addresses. The DHCP server gives out the addresses over the Ethernet port which are in the same subnet as the static IP of the port itself. I decided to use 10.5.5.3, 10.5.6.3, 10.5.7.3, and 10.5.8.3. The choice was somewhat arbitrary.

Get It to Run

  1. Plug all cables into the ports (otherwise the DHCP server will deactivate this ports)
  2. Shut down and restart the network to ensure that the static IP's are actually set
  3. Restart DHCP with sudo service isc-dhcp-server restart
  4. By this point the cameras probably do not look for addresses over DHCP anymore, so disconnect and connect them again
  5. Starting flycap should now show all cameras

Assigning Static IP Addresses to the Cameras

This is an alternative approach which assigns a static IP to each camera so no DHCP server is needed.

  • 0x064C IP address
  • 0x065C Subnet mask
  • 0x066C default gateway
  • 0x0014 Write 0x00000007 to let the camera remember the IP

Information is taken from here. Be aware that I have not tried this method!

Author: Sebastian Stabinger

Email: Sebastian.Stabinger@uibk.ac.at

Created: 2018-01-01 Mon 20:06

Emacs 25.3.1 (Org mode 8.2.10)

Validate