Static DHCP for Hikvision IP Cameras

I posted this on the beginner forums but it didn't get traction. Maybe it requires more advanced knowledge. I'm running 6.30.2 on a RB450G and can't seem to get static ip leases to work within the DHCP server on some IP cameras I have. I've tried to manually enter them in and also convert a dynamic lease into a static lease with "Make Static" but the cameras just take DHCP no matter what. Any suggestions?

Config below:

/export

aug/06/2015 18:40:25 by RouterOS 6.30.2

software id = 2CBR-CW2K

/interface ethernet
set [ find default-name=ether1 ] name=ether1-gateway
set [ find default-name=ether2 ] name=ether2-master-local
set [ find default-name=ether3 ] master-port=ether2-master-local name=
ether3-slave-local
set [ find default-name=ether4 ] master-port=ether2-master-local name=
ether4-slave-local
set [ find default-name=ether5 ] master-port=ether2-master-local name=
ether5-slave-local
/ip neighbor discovery
set ether1-gateway discover=no
/ip pool
add name=dhcp ranges=192.168.1.10-192.168.1.254
/ip dhcp-server
add add-arp=yes address-pool=dhcp always-broadcast=yes bootp-lease-time=
lease-time bootp-support=dynamic disabled=no interface=
ether2-master-local lease-time=1m name=default
/ip settings
set rp-filter=strict
/ip address
add address=192.168.1.1/24 comment="default configuration" interface=
ether2-master-local network=192.168.1.0
/ip dhcp-client
add comment="default configuration" dhcp-options=hostname,clientid disabled=
no interface=ether1-gateway
/ip dhcp-server config
set store-leases-disk=never
/ip dhcp-server lease
add address=192.168.1.64 client-id=1:xxxxxx mac-address=
xxxxxxx
add address=192.168.1.10 client-id=" camera-front" mac-address=
xxxxxx
add address=192.168.1.11 client-id=camera-m mac-address=xxxxx
add address=192.168.1.12 client-id=camera-b mac-address=xxxx
add address=192.168.1.13 client-id=camera-t mac-address=xxxxx
/ip dhcp-server network
add address=192.168.1.0/24 comment="default configuration" gateway=
192.168.1.1 netmask=24
/ip dns static
add address=192.168.1.1 name=router
/ip firewall filter
add action=drop chain=input comment="Drop Input Invalid" connection-state=
invalid
add chain=input comment="default configuration" protocol=icmp
add chain=input comment="default configuration" connection-state=
established,related
add action=drop chain=input comment="default configuration" in-interface=
ether1-gateway
add action=fasttrack-connection chain=forward comment="default configuration"
connection-state=established,related
add chain=forward comment="default configuration" connection-state=
established,related
add action=drop chain=forward comment="default configuration"
connection-state=invalid
add action=drop chain=forward comment="default configuration"
connection-nat-state=!dstnat connection-state=new in-interface=
ether1-gateway
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration"
out-interface=ether1-gateway
add action=dst-nat chain=dstnat dst-port=xxxx in-interface=ether1-gateway
protocol=tcp to-addresses=xxxxx to-ports=xxxx
add action=dst-nat chain=dstnat dst-port=xxxx in-interface=ether1-gateway
protocol=tcp to-addresses=xxxx to-ports=xxxx
/ip service
set telnet disabled=yes
set ftp address=192.168.1.0/24
set www address=192.168.1.0/24
set ssh disabled=yes
set api disabled=yes
set winbox address=192.168.1.0/24
set api-ssl disabled=yes
/ip upnp
set enabled=yes
/system clock
set time-zone-name=America/Chicago
/system ntp client
set enabled=yes primary-ntp=66.220.10.2 secondary-ntp=216.152.240.220
/tool bandwidth-server
set enabled=no
/tool mac-server
set [ find default=yes ] disabled=yes
add interface=ether2-master-local
add interface=ether3-slave-local
add interface=ether4-slave-local
add interface=ether5-slave-local
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2-master-local
add interface=ether3-slave-local
add interface=ether4-slave-local
add interface=ether5-slave-local
/tool mac-server ping
set enabled=no
/tool romon port
add

Where are you entering the address…it can only be on the camera and can’t be DHCP server! I used the same setup…RB450G that connects Hikvisions IP box cameras with static IP address of my network 10.0.8.0 and a camera has 10.0.8.171.

Are those ids in leases’ client-id what’s actually sent by cameras, or are you just misusing the field for comments? If it’s the latter, just remove them and it will work.

Yes, this. The original poster appears to be abusing the “client-id” field. If you want to attach a note to an object, you need to use “comment”.

– Nathan

I’ve tried it with and without the client id field populated and could not get the cameras to bind. I’ve given up and just turn off dhcp on the cameras and assigned them the static ip I need. With dhcp enabled on the cameras and client id disabled, the cameras just get an ip from the range and not the static ip I assigned.

This is what I ended up doing. I’ve never had a problem assigning static ip addresses from the server before.

I have never done it any other way…illuminate chances of problems…glad it worked out.