Page 1 of 1

IP set manual but get from DHCP

Posted: Wed Mar 14, 2018 11:11 pm
by sekii
Hi,
Set RB951 wi-fi to bridge mode. Set ip from ip-addresses
Then reboot mikrotik
Mikrotik get second ip from my dhcp, why? I set static IP.
In log i get this - temporary moving client ether1 from slave to master port bridge1, update you config

What i do wrong?

Thanks.

Re: IP set manual but get from DHCP

Posted: Thu Mar 15, 2018 3:34 am
by 2frogs
Disable or remove the dhcp-client, it is most likely left over from default config. The message about moving the client from ether1 to the bridge is because the bridge interface is the proper place to have the dhcp-client, but if you are setting an ip then the dhcp-client is not needed.

Re: IP set manual but get from DHCP

Posted: Thu Mar 15, 2018 7:37 am
by sekii
Thank you!
I'm fogot for dhcp-client :)

Re: IP set manual but get from DHCP

Posted: Thu May 16, 2019 8:58 pm
by Danny723
Hi all,

I didn't forget to disable DHCP client, but I'm getting error log message anyway. Anyone know why?

Code: Select all

may/15 00:47:53 system,error,critical router was rebooted without proper shutdown
may/15 00:48:00 bridge,info hardware offloading activated on bridge "bridge" ports: ether1
may/15 00:48:00 bridge,info hardware offloading activated on bridge "bridge" ports: ether2
may/15 00:48:00 bridge,info hardware offloading activated on bridge "bridge" ports: ether3
may/15 00:48:00 dhcp,error temporary moving client ether1 from slave to master port, update your config!!!
may/15 00:48:02 interface,info ether1 link up (speed 100M, full duplex)
may/15 00:48:02 dhcp,info dhcp-client on ether1 got IP address 10.0.0.250
may/15 00:48:07 caps,info CAP selected CAPsMAN MikroTikRouter (xx:xx:xx:xx:xx:xx/9/0)
may/15 00:48:09 caps,info CAP connected to MikroTikRouter (xx:xx:xx:xx:xx:xx/9/0)
may/15 00:48:09 caps,info CAP joined MikroTikRouter (xx:xx:xx:xx:xx:xx/9/0)
may/15 00:58:19 system,info,account user admin logged in from 10.0.0.191 via web
may/15 01:00:19 system,info,account user admin logged out from 10.0.0.191 via web
I use wsAP ac lite, powered by PoE from MikroTik router. IP address is entered statically, but eventhough it is setup statically, it ask for IP address and gets it accordint to logs right after bootup.
wsAP is setup as CAP.

Code: Select all

[admin@MikroTikCAP] > export
# may/16/2019 19:37:46 by RouterOS 6.44.3
# software id = E7WQ-AKI0
#
# model = RouterBOARD wsAP 5Hac2nD
# serial number = xxxxxxxxxxxxx
/interface bridge
add admin-mac=B8:69:F4:22:5D:95 auto-mac=no comment=defconf name=bridge
/interface ethernet
set [ find default-name=ether1 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
set [ find default-name=ether2 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
set [ find default-name=ether3 ] advertise=10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
/interface wireless
# managed by CAPsMAN
# channel: 2452/20-Ce/gn(20dBm), SSID: MikroTikCAPWiFi, CAPsMAN forwarding
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce distance=indoors frequency=auto mode=ap-bridge ssid=MikroTik-225D98 wireless-protocol=802.11
# managed by CAPsMAN
# channel: 5180/20-Ceee/ac(23dBm), SSID: MikroTikCAPWiFi, CAPsMAN forwarding
set [ find default-name=wlan2 ] band=5ghz-a/n/ac channel-width=20/40/80mhz-Ceee distance=indoors frequency=auto mode=ap-bridge ssid=MikroTik-225D97 wireless-protocol=802.11
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip hotspot profile
set [ find default=yes ] html-directory=flash/hotspot
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp interface=bridge name=defconf
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
add bridge=bridge comment=CAPsMAN interface=ether1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/interface wireless cap
#
set bridge=bridge discovery-interfaces=bridge enabled=yes interfaces=wlan1,wlan2
/ip address
add address=10.0.0.250/24 comment=defconf interface=bridge network=10.0.0.0
/ip dhcp-client
# DHCP client can not run on slave interface!
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router.lan
/ip firewall filter
add action=accept chain=input comment="defconf: accept established,related,untracked" connection-state=established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=drop chain=input comment="defconf: drop all not coming from LAN" in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
add action=accept chain=forward comment="defconf: accept established,related, untracked" connection-state=established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" connection-state=invalid
add action=drop chain=forward comment="defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN
/system clock
set time-zone-name=Europe/Prague
/system identity
set name=MikroTikCAP
/system scheduler
add comment="xxx" interval=1w name=ConfigSaveCAP on-event=ConfigSaveCAP policy=\
ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=may/13/2019 start-time=00:00:00
/system script
add dont-require-permissions=no name=ConfigSaveCAP owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="system backup save"
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
[admin@MikroTikCAP] >
If I understand it issue is with this, in WebFig it looks like disabled, but actually here in CLI it show as disabled=no.

Code: Select all

# DHCP client can not run on slave interface!
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=ether1
So, how exactly should I clean this thing up - in the way I won't screw even more things up...

Re: IP set manual but get from DHCP

Posted: Thu May 16, 2019 9:34 pm
by Sob
If you don't need dhcp client, you can remove it completely. You can add it back any time you want.

Re: IP set manual but get from DHCP

Posted: Fri May 17, 2019 9:06 am
by mkx
If you want to keep the DHCP client config at hand, you can disable it by running command
/ip dhcp-client
set [ find interface=ether1 ] disabled=yes

Re: IP set manual but get from DHCP

Posted: Fri May 17, 2019 8:37 pm
by Danny723
If you don't need dhcp client, you can remove it completely. You can add it back any time you want.
Shouldn't disable and delete work exactly the same way?

If you want to keep the DHCP client config at hand, you can disable it by running command
So I forced disable by your command, it worked. Thanks. It also cut me off, but works fine after power cycle on static IP. Anyone has some idea why disablement from WebFig didn't work? From my perspectiove both should do exactly the same.

Re: IP set manual but get from DHCP

Posted: Fri May 17, 2019 10:00 pm
by Sob
Disable and delete should have the same effect. But either the move from slave port to bridge does something unexpected, or maybe you didn't really disable it. I tried the same config and when I added existing interface with dhcp client to bridge, dhcp client in WebFig changed, so that it looked like disabled (gray italic text) but it wasn't really disabled. Maybe you did the same and you missed it?

Re: IP set manual but get from DHCP

Posted: Sun May 19, 2019 1:55 pm
by Danny723
Disable and delete should have the same effect. But either the move from slave port to bridge does something unexpected, or maybe you didn't really disable it. I tried the same config and when I added existing interface with dhcp client to bridge, dhcp client in WebFig changed, so that it looked like disabled (gray italic text) but it wasn't really disabled. Maybe you did the same and you missed it?
Yes, that is exactly the thing. But I wasn't aware of this till device booted up and text appeared in logs. This is really confusing. There should be some dialog, which will pop-up and text shouldn't grey out. Like this you can't be sure if your config is really what is showing in WebFix...

Anyway, thanks all for pitching in, my error message was solved.

Re: IP set manual but get from DHCP

Posted: Sun May 19, 2019 4:55 pm
by Sob
In fact, even WebFig knew that it wasn't disabled, on closer look there was still "D" button to disable it. But that was significantly less noticeable than the whole line text style. The item was red as invalid in WinBox. I don't know if WebFig does something like that, I rarely use it.

Re: IP set manual but get from DHCP

Posted: Sun Oct 06, 2019 9:28 am
by MirhosseiniAmir
Hi All
I have a CRS125-24G-1S , each interface has static IP and has its own range of IP.
I attached a pic so that you understand better.
Each Interface is connected to a wireless link and the other side of the wireless link , DHCP server is running on bridge port ( and bridge has wlan and sfp port ) for the network connected to it.
Question 1 : Should ( or can ) an interface with static IP get IP from DHCP ?
The 2 Wirelesses running 6.45.1 with no problem.

The problem is :
When I upgrade CRS125 to 6.45.1 ( or some versions higher than 6.40.9 ) although I do not have dhcp client running on CRS , It shows an IP address lease with the name of CRS125 on Netmetal ( Other side of wireless link ) DHCP server lease, and starts connecting with that IP. When I downgrade to 6.40.9 every thing is OK again.
Question 2 : If there is a problem with my config , why other side of wireless link dose not get IP from DHCP ?
Question 3 : If there is a problem with my config , why every thing is OK with 6.40.9 and after that the problem comes up ?

Please Help me with that .