Community discussions

MikroTik App
 
adiku
just joined
Topic Author
Posts: 4
Joined: Tue Nov 07, 2017 3:53 pm

DHCP Relay

Tue Nov 07, 2017 4:15 pm

Hi everyone.
I have RB2011UiAS-2HnD from a few days.
I'm trying configure router for DHCP Relay. I did follow this instruction: https://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Relay
Clients get IP/NetMask/DNS from server, but I can't get out thru router. (can't ping anything)
Could someone point me in right direction.
I must set correct rule on firewall, NAT or set right route?

DHCP server: 192.168.0.2
Router WAN: 192.168.0.250
[admin@MikroTik] /ip dhcp-relay> print
 #   NAME	INTERFACE	DHCP-SERVER	LOCAL-ADDRES
 0   relay1	bridge1		192.168.0.2		192.168.0.250

sorry for my English
 
sizeofbool
just joined
Posts: 17
Joined: Fri Oct 13, 2017 2:09 pm

Re: DHCP Relay

Wed Nov 08, 2017 12:42 am

Post your configuration:
export hide-sensitive compact
Also more information about your network would help.
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1174
Joined: Fri Jul 28, 2017 2:53 pm

Re: DHCP Relay

Wed Nov 08, 2017 9:00 am

Your config is wrong. If your DHCP-Server is 192.168.0.2, then its correct. But if your relay's local-address is not 192.168.0.250, then its wrong. Local address is your LAN gateway.
 
adiku
just joined
Topic Author
Posts: 4
Joined: Tue Nov 07, 2017 3:53 pm

Re: DHCP Relay

Wed Nov 08, 2017 9:45 am

sizeofbool

Here are some more information
DHCP is dhcpd on FreeBSD 10.1

Scheme:
https://www.dropbox.com/s/iloa58ee81uz7 ... y.jpg?dl=1

# nov/08/2017 07:47:16 by RouterOS 6.40.4
# software id = YN40-DR0V
# model = 2011UiAS-2HnD
/interface bridge
add name=br_65.x
add name=br_LAN
/interface ethernet
set [ find default-name=ether1 ] comment=WAN
set [ find default-name=ether6 ] comment="LAN 192.168.0.x"
/ip neighbor discovery
set ether1 discover=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa2-psk eap-methods="" management-protection=allowed mode=dynamic-keys name=DPR supplicant-identity=""
add authentication-types=wpa2-psk eap-methods="" management-protection=allowed mode=dynamic-keys name=IT supplicant-identity=""
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n country=poland disabled=no mode=ap-bridge security-profile=DPR ssid=DPR wireless-protocol=802.11
add disabled=no keepalive-frames=disabled mac-address=66:D1:54:AB:E5:1B master-interface=wlan1 multicast-buffering=disabled name=IT security-profile=IT ssid=IT \
    wds-cost-range=0 wds-default-cost=0 wps-mode=disabled
/ip pool
add name=dhcp_pool0 ranges=192.168.65.100-192.168.65.150
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=br_65.x name=dhcp1
/interface bridge nat
add action=accept chain=srcnat out-bridge=br_65.x
/interface bridge port
add bridge=br_LAN interface=ether6
add bridge=br_LAN interface=wlan1
add bridge=br_65.x interface=IT
add bridge=br_65.x interface=ether5
/ip address
add address=192.168.65.254/24 interface=br_65.x network=192.168.65.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1 use-peer-ntp=no
/ip dhcp-relay
add dhcp-server=192.168.0.2 disabled=no interface=br_LAN local-address=192.168.0.250 name=relay1
/ip dhcp-server network
add address=192.168.65.0/32 dns-server=192.168.64.254 gateway=192.168.65.254 netmask=24
/ip dns
set allow-remote-requests=yes
/ip firewall address-list
add address=192.168.0.0/24 list=LAN
add address=192.168.65.0/24 list=192.168.65.x
/ip firewall filter
add action=accept chain=input src-address-list=192.168.65.x
add action=log chain=input log=yes src-address=!192.168.0.187
add action=accept chain=forward src-address-list=192.168.65.x
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
/ip route
add disabled=yes distance=1 dst-address=192.168.0.0/24 gateway=br_LAN pref-src=192.168.0.0
/system clock
set time-zone-name=Europe/Warsaw
/system ntp client
set enabled=yes primary-ntp=192.168.0.128 secondary-ntp=192.168.0.232

Anumrak
Making configuration changes does not work.
Customers does not receive addresses after set 'Local Address' to gateway IP
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1174
Joined: Fri Jul 28, 2017 2:53 pm

Re: DHCP Relay

Wed Nov 08, 2017 3:28 pm

Do you assign the "interface"?
Read this on the bottom https://wiki.mikrotik.com/wiki/Manual%3AIP/DHCP_Relay
 
adiku
just joined
Topic Author
Posts: 4
Joined: Tue Nov 07, 2017 3:53 pm

Re: DHCP Relay

Wed Nov 08, 2017 4:25 pm

Yes, interface is assigned.

Let's assume we have no DHCP server.
IP addresses are entered manually.
How to pass through this traffic?
 
User avatar
Anumrak
Forum Guru
Forum Guru
Posts: 1174
Joined: Fri Jul 28, 2017 2:53 pm

Re: DHCP Relay

Wed Nov 08, 2017 10:35 pm

Yes, interface is assigned.

Let's assume we have no DHCP server.
IP addresses are entered manually.
How to pass through this traffic?
Through the gateway of course. It will be forwarding traffic. Maybe your router don't know about. Or, if 192.168.0.0 is connected network, traffic will be routed from one net to another, or bridged, if hosts in same broadcast domain.
 
adiku
just joined
Topic Author
Posts: 4
Joined: Tue Nov 07, 2017 3:53 pm

Re: DHCP Relay

Thu Nov 09, 2017 11:29 am

Problem solved everything works.
I added ether1 (WAN) to the bridge used for DHCP-relay.

Who is online

Users browsing this forum: No registered users and 13 guests