Community discussions

MikroTik App
 
User avatar
tslytsly
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Tue Oct 27, 2015 6:52 pm
Location: Nottingham
Contact:

RouterOS DHCP and windows clients

Mon Dec 05, 2016 9:06 pm

Hi all,

I'm noticing some odd behaviour with the DHCP server on RouterOS.

At work we have a CCR1009-8G-1S-1S+ on software version 6.36.
this acts as the DHCP server for all our networks.

It seems that in the last few months different clients, all windows 7 or higher, get a bad config from the server.
So they will get the correct gateway and DNS servers, but have an APIPA address. If you manually configure the address without making any other changes all is well.

I've just had the same thing happen on my home router, this is a RB2011UiAS-2HnD on SW 6.35.2.

My PC had the correct gateway and DNS info but an APIPA address. Manual setting of the address fixed the issue.

Is this a known problem or is some further digging needed?

Yes I have sufficient IPs left in the pool.
Yes there are no other DHCP servers on the network.

thanks all.
 
pudl
just joined
Posts: 5
Joined: Wed Apr 16, 2014 2:32 pm

Re: RouterOS DHCP and windows clients

Wed Dec 07, 2016 9:44 am

Same here. When computers start, they get 169.254 IP addresses, but right DNS and GW addresses from my DHCP server which is a MikroTik RB1100AHx2. ROS is v6.37.3.
Also Windows domain login time is longer than usual. I can get right addresses (I use static MAC reservations) if I do ipconfig /renew command.
 
pudl
just joined
Posts: 5
Joined: Wed Apr 16, 2014 2:32 pm

Re: RouterOS DHCP and windows clients

Wed Dec 07, 2016 3:12 pm

Maybe this error is not MikroTik related. Maybe it is MS fault:
https://answers.microsoft.com/en-us/win ... 068923d2cd
 
User avatar
tslytsly
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Tue Oct 27, 2015 6:52 pm
Location: Nottingham
Contact:

Re: RouterOS DHCP and windows clients

Wed Dec 07, 2016 3:49 pm

Maybe this error is not MikroTik related. Maybe it is MS fault:
https://answers.microsoft.com/en-us/win ... 068923d2cd
Hmm, could be. I will keep an eye on that forum topic.

However I'm sure I tried a /release /renew and still could not get an IP.
 
th0massin0
Member Candidate
Member Candidate
Posts: 156
Joined: Sun May 11, 2014 4:16 am
Location: Poland

Re: RouterOS DHCP and windows clients

Wed Dec 07, 2016 4:24 pm

Post output of:
/ip dhcp-server export
 
User avatar
tslytsly
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Tue Oct 27, 2015 6:52 pm
Location: Nottingham
Contact:

Re: RouterOS DHCP and windows clients

Wed Dec 07, 2016 5:40 pm

Post output of:
/ip dhcp-server export
OK, this is the CCR:
# dec/07/2016 15:35:36 by RouterOS 6.36
# software id = TXJ8-U3VA
#
/ip dhcp-server
add address-pool=client_dhcp_pool disabled=no interface=client lease-time=3d \
    name=client_dhcp

/ip dhcp-server option
add code=121 name=classlessRoute value=0x18AC1064AC109601
/ip dhcp-server alert
add disabled=no
/ip dhcp-server lease
add address=172.16.150.99 always-broadcast=yes comment="Tom's Laptop WIFI" \
    mac-address=0C:8B:FD:84:39:29 server=client_dhcp
add address=172.16.150.98 always-broadcast=yes comment="Tom's Dock" \
    mac-address=00:50:B6:73:17:F7 server=client_dhcp
add address=172.16.150.97 always-broadcast=yes comment="Tom's laptop" \
    mac-address=28:D2:44:53:A3:C6 server=client_dhcp
add address=172.16.150.35 comment="Service Printer" disabled=yes mac-address=\
    08:00:37:41:71:41 server=client_dhcp
add address=172.16.150.36 always-broadcast=yes client-id=1:0:26:73:5a:2e:fc \
    comment=Copier mac-address=00:26:73:5A:2E:FC server=client_dhcp
add address=172.16.150.35 comment="Service Printer" mac-address=\
    08:00:37:41:B8:B2 server=client_dhcp
add address=172.16.150.91 mac-address=00:50:B6:73:15:C0 server=client_dhcp
add address=172.16.150.20 client-id=1:6c:3b:6b:1c:cf:57 comment=TheDude \
    mac-address=6C:3B:6B:1C:CF:57 server=client_dhcp
/ip dhcp-server network
add address=172.16.150.0/24 dhcp-option=classlessRoute dns-server=\
    172.16.100.185,172.16.100.1 domain=<!removed!> gateway=172.16.150.1
The classless route is because we use dialup to manage some old devices and the route makes sure we can still acess our server.

This is my RB2011:
# dec/07/2016 15:44:32 by RouterOS 6.35.2
# software id = MSSL-M8WS
#
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge-local lease-time=\
    1d name=dhcp1
add address-pool=dhcp_pool1 disabled=no interface=bridge-voip lease-time=1h \
    name=dhcp2
/ip dhcp-server option
add code=242 name=Avaya value=\
    "'MCIPADD=172.16.50.240,MCPORT=1719,HTTPSRVR=172.16.50.240'"
add code=6 name=WorkDNS value="'172.16.100.185'"
add code=15 name=WorkDomain value="'ntvd.local'"
add code=242 name=FRFLVOIP value=\
    "'MCIPADD=192.10.1.1,MCPORT=1719,HTTPSRVR=192.10.1.1'"
/ip dhcp-server option sets
add name=Work options=WorkDNS,WorkDomain,Avaya
/ip dhcp-server lease
add address=192.168.4.2 client-id=1:e0:cb:4e:c6:ad:b8 comment=PC mac-address=\
    E0:CB:4E:C6:AD:B8 server=dhcp1
add address=192.168.142.50 comment=DECT mac-address=7C:2F:80:35:CF:96 server=\
    dhcp2
add address=192.168.4.100 always-broadcast=yes comment=TV mac-address=\
    D0:66:7B:5F:28:7B server=dhcp1
add address=192.168.4.120 comment=YouView mac-address=E8:CD:2D:BB:6C:A1
add address=192.168.4.200 comment=NAS mac-address=00:24:A5:A5:87:6B
add address=192.168.4.110 comment=BluRay mac-address=3C:07:71:ED:B0:09
add address=192.168.4.55 client-id=1:b0:e8:92:f:78:e4 comment=Printer \
    mac-address=B0:E8:92:0F:78:E4 server=dhcp1
add address=192.168.4.11 always-broadcast=yes client-id=1:c:8b:fd:84:39:29 \
    dhcp-option-set=Work mac-address=0C:8B:FD:84:39:29 server=dhcp1
add address=192.168.4.20 mac-address=80:D2:1D:05:95:15 server=dhcp1
add address=192.168.4.15 dhcp-option=FRFLVOIP mac-address=D4:EA:0E:91:23:5B \
    server=dhcp1
add address=192.168.4.14 client-id=1:28:d2:44:53:a3:c6 dhcp-option-set=Work \
    mac-address=28:D2:44:53:A3:C6 server=dhcp1
add address=192.168.142.11 mac-address=28:D2:44:53:A3:C6 server=dhcp2
add address=192.168.4.130 client-id=1:30:a9:de:f2:a1:bc mac-address=\
    30:A9:DE:F2:A1:BC server=dhcp1
/ip dhcp-server network
add address=192.168.4.0/24 comment="default configuration" gateway=\
    192.168.4.1
add address=192.168.142.0/24 dhcp-option-set=Work dns-server=\
    172.16.100.1,172.16.100.185,8.8.8.8 gateway=192.168.142.1
 
toxicfusion
Member
Member
Posts: 326
Joined: Mon Jan 14, 2013 6:02 pm

Re: RouterOS DHCP and windows clients

Wed Dec 07, 2016 7:33 pm

Do you have a switch connected to router and devices connected to said switch?

I've had this issue with MAC & windows PC -- was a switch and the POE autonegotiate issue, took longer for link to establish and acquire the IP address. Was even happening with Fortigate router.
 
User avatar
tslytsly
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Tue Oct 27, 2015 6:52 pm
Location: Nottingham
Contact:

Re: RouterOS DHCP and windows clients

Wed Dec 07, 2016 8:40 pm

Do you have a switch connected to router and devices connected to said switch?

I've had this issue with MAC & windows PC -- was a switch and the POE autonegotiate issue, took longer for link to establish and acquire the IP address. Was even happening with Fortigate router.
yes at work, no for home.

I will see about disabling poe on the PC ports.