Hi,
I’m hoping somebody can give me insight, I have an address of 192.168.1.101 attached to a VLAN interface (4) with a DHCP server configured with a pool of 0.165-0.170. I want the device to obtain an IP from that range but I get this;
451 366.313070 192.168.1.101 255.255.255.255 DHCP 342 DHCP Offer - Transaction ID 0x8e484091
452 366.932747 0.0.0.0 255.255.255.255 DHCP 342 DHCP Discover - Transaction ID 0x77a06731
453 367.311588 0.0.0.0 255.255.255.255 DHCP 590 DHCP Decline - Transaction ID 0x8e484091
454 368.311551 0.0.0.0 255.255.255.255 DHCP 590 DHCP Discover - Transaction ID 0x8e484091
455 368.314582 192.168.1.101 255.255.255.255 DHCP 342 DHCP Offer - Transaction ID 0x8e484091
456 369.311563 0.0.0.0 255.255.255.255 DHCP 590 DHCP Decline - Transaction ID 0x8e484091
457 370.311528 0.0.0.0 255.255.255.255 DHCP 590 DHCP Discover - Transaction ID 0x8e484091
458 370.314531 192.168.1.101 255.255.255.255 DHCP 342 DHCP Offer - Transaction ID 0x8e484091
459 370.662248 0.0.0.0 255.255.255.255 DHCP 342 DHCP Discover - Transaction ID 0x77a06731
460 371.311544 0.0.0.0 255.255.255.255 DHCP 590 DHCP Decline - Transaction ID 0x8e484091
461 371.957265 0.0.0.0 255.255.255.255 DHCP 342 DHCP Discover - Transaction ID 0x77a06731
462 372.311506 0.0.0.0 255.255.255.255 DHCP 590 DHCP Discover - Transaction ID 0x8e484091
463 372.313562 192.168.1.101 255.255.255.255 DHCP 342 DHCP Offer - Transaction ID 0x8e484091
464 373.311513 0.0.0.0 255.255.255.255 DHCP 590 DHCP Decline - Transaction ID 0x8e484091
What would make a device not accept a DHCP offer from a server?
Thanks
Chris
Can you also show you config?
/export file=anynameyoulike
Remove serial and any other private info.
# mar/19/2025 23:14:53 by RouterOS 6.49.18
# software id = 1EQY-0WWQ
#
# model = CRS318-16P-2S+
/interface bridge
add name="Corporate Bridge" vlan-filtering=yes
/interface ethernet
set [ find default-name=ether16 ] name=\
"-> Acces to Wide Area Networks (ether16)"
set [ find default-name=ether2 ] name="-> Access to corporate backbone primary\
\_switch (ether2)"
set [ find default-name=ether1 ] name=ether1-PLC
set [ find default-name=ether3 ] name=ether3
set [ find default-name=ether13 ] name=ether13
/interface vlan
add interface="Corporate Bridge" name=PLC-vlan-4 vlan-id=4
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=Control ranges=192.168.1.165-192.168.1.170
/ip dhcp-server
add address-pool=Control disabled=no interface=PLC-vlan-4 name=server1
/user group
set full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,pas\
sword,web,sniff,sensitive,api,romon,dude,tikapp"
/interface bridge port
add bridge="Corporate Bridge" interface="-> Access to corporate backbone prima\
ry switch (ether2)"
add bridge="Corporate Bridge" interface=ether3
add bridge="Corporate Bridge" interface=ether4
add bridge="Corporate Bridge" interface=ether5
add bridge="Corporate Bridge" interface=ether6
add bridge="Corporate Bridge" interface=ether8
add bridge="Corporate Bridge" interface=ether9
add bridge="Corporate Bridge" interface=ether10
add bridge="Corporate Bridge" interface=ether11
add bridge="Corporate Bridge" interface=ether12
add bridge="Corporate Bridge" interface=ether13
add bridge="Corporate Bridge" interface=ether14
add bridge="Corporate Bridge" interface=ether15
add bridge="Corporate Bridge" interface=\
"-> Acces to Wide Area Networks (ether16)"
add bridge="Corporate Bridge" interface=sfp-sfpplus1
add bridge="Corporate Bridge" interface=ether7
add bridge="Corporate Bridge" interface=ether1-PLC pvid=4
/ip neighbor discovery-settings
set discover-interface-list=all
/interface bridge vlan
add bridge="Corporate Bridge" tagged="Corporate Bridge" untagged=ether1-PLC \
vlan-ids=4
/ip address
add address=192.168.42.20/24 interface="Corporate Bridge" network=\
192.168.42.0
add address=192.168.1.101 interface=PLC-vlan-4 network=255.255.255.0
/ip dhcp-client
add disabled=no interface=PLC-vlan-4
/ip dhcp-relay
add dhcp-server=192.168.1.230 disabled=no interface=ether1-PLC name=relay1
/ip dns
set servers=8.8.8.8
/ip route
add distance=1 gateway=192.168.42.254
/system clock
set time-zone-autodetect=no time-zone-name=[REMOVED]
/system identity
set name=[REMOVED]
/system ntp client
set enabled=yes primary-ntp=192.168.42.199
/system routerboard settings
set boot-os=router-os
/system scheduler
add name=schedule1 on-event="/system rebooot" policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
start-date=mar/15/2025 start-time=02:45:00
/tool romon
set enabled=yes
/tool sniffer
set file-limit=100000KiB file-name=test.pcap filter-interface=PLC-vlan-4
Can you change this:
/ip address
add address=192.168.1.101 interface=PLC-vlan-4 network=255.255.255.0
to this:
/ip address
add address=192.168.1.101/24 interface=PLC-vlan-4 network=192.168.1.0
Also, please consider going VLAN all the way:
http://forum.mikrotik.com/t/using-routeros-to-vlan-your-network/126489/1
Additionally, a /ip dhcp-server network entry is missing.
Hi
I have made those changes but still no lease.
Thanks for the help so far!
Chris
/ip address print
1 192.168.1.101/24 192.168.1.0 PLC-vlan-4
/ip dhcp-server network print
Flags: D - dynamic
# ADDRESS GATEWAY DNS-SERVER WINS-SERVER DOMAIN
0 192.168.1.101/32 192.168.1.1
[buzzageek@TasmanMiningMainSW-42.20] >
mkx
March 20, 2025, 6:50am
7
In /ip/dhcp-server/network the address property should be set to network address and subnet mask. You’re using 192.168.1.0/24 … The point of this setting is to match DHCP lease address and add corresponding additional settings … and is used when there are multiple subnets (or DHCP address pools) and hence there are different additional settings. It does not need to correspond with DHCP server’s own IP address or router’s address (but in small setups it almost always does).
It is possible to “mismatch” the DHCP server network settings and LAN’s subnet settings, but that’s done only in special use cases … and requires good understanding of what each individual property actually does.