Community discussions

MikroTik App
 
xtrgeo
newbie
Topic Author
Posts: 40
Joined: Fri Jun 08, 2012 12:07 am

Clinets gets DHCP leases from another DHCP

Mon Jul 08, 2019 2:31 pm

Hello,

I have a simple network as in the picture I attach. My issue is that some clients on RB2011(on bridge interface) gets ip from the dhcp server that runs on the HEX and vice versa!

As you can see on the diagram those two routers are connected directly (port10 rb2011 <--> port3 hex) and the 2 dchp's servers are running on different interfaces on each router!

if you need any of my conf please ask
You do not have the required permissions to view the files attached to this post.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3345
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Clinets gets DHCP leases from another DHCP

Mon Jul 08, 2019 2:56 pm

You need to post your config on both your router.
Id there are no VLAN everything will float around.

I do suggest you are using VLAN and only one device as DHCP server for all your net.
 
xtrgeo
newbie
Topic Author
Posts: 40
Joined: Fri Jun 08, 2012 12:07 am

Re: Clinets gets DHCP leases from another DHCP

Mon Jul 08, 2019 4:00 pm

I'll post the config later but why do I need to use vlan's? My Lan's are completely isolated from each other, since I use different Lan for the interrconnection of the routers and different Lan's (and ports of course) for the clients Lan's. Besides this is one of the principal job of a router: to distinguish Lan's.

DHCP broadcast message (for request) should have stayed in the Lan,right?
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3345
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Clinets gets DHCP leases from another DHCP

Mon Jul 08, 2019 7:03 pm

But with the wrong config, everything are bridged together in on big net.
 
xtrgeo
newbie
Topic Author
Posts: 40
Joined: Fri Jun 08, 2012 12:07 am

Re: Clinets gets DHCP leases from another DHCP

Mon Jul 08, 2019 7:49 pm

Here is the HEX config
/ip pool
add name=dhcp_pool0 ranges=192.168.110.2-192.168.110.254

/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=ether2 lease-time=3h name=dhcp1

/interface detect-internet
set detect-interface-list=all

/ip address
add address=10.5.10.2/29 interface=ether1 network=10.5.10.0
add address=192.168.110.1/24 interface=ether2 network=192.168.110.0
add address=10.5.10.9/29 interface=ether3 network=10.5.10.8

/ip dhcp-server alert
add disabled=no interface=ether2
add disabled=no interface=ether1
add disabled=no interface=ether3

/ip dhcp-server network
add address=192.168.110.0/24 dns-server=8.8.8.8 gateway=192.168.110.1

/ip dns
set servers=8.8.8.8,8.8.4.4

/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
add action=dst-nat chain=dstnat dst-port=41103 in-interface=ether1 protocol=tcp to-addresses=10.5.10.10 to-ports=8291
add action=dst-nat chain=dstnat dst-port=41104 in-interface=ether1 protocol=tcp to-addresses=10.5.10.11 to-ports=8291
add action=dst-nat chain=dstnat dst-port=41105 in-interface=ether1 protocol=tcp to-addresses=10.5.10.12 to-ports=8291

/ip route
add check-gateway=ping distance=1 gateway=10.5.10.1
add check-gateway=ping distance=1 dst-address=192.168.1.0/24 gateway=10.5.10.10
I get alerts that a dhcp exists in interface 2 and this dhcp has the mac of rb2011!!!!


and here is the RB2011
/interface bridge
add name=bridge1

/interface ethernet
set [ find default-name=ether10 ] loop-protect=on

/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n disabled=no frequency=2437 mode=ap-bridge ssid=XXXXXXXX

/ip pool
add name=dhcp_pool0 ranges=192.168.1.2-192.168.1.50

/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=bridge1 lease-time=15h10m name=dhcp1

/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
add bridge=bridge1 interface=ether5
add bridge=bridge1 interface=ether6
add bridge=bridge1 interface=ether7
add bridge=bridge1 interface=ether8
add bridge=bridge1 interface=ether9
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=wlan1

/interface detect-internet
set detect-interface-list=all

/ip address
add address=10.5.10.10/29 interface=ether10 network=10.5.10.8
add address=192.168.1.1/24 interface=bridge1 network=192.168.1.0

/ip dhcp-server network
add address=192.168.1.0/24 dns-server=8.8.8.8 gateway=192.168.1.1

/ip dns
set servers=8.8.8.8

/ip firewall nat
add action=masquerade chain=srcnat disabled=yes out-interface=ether10

/ip route
add check-gateway=ping distance=1 gateway=10.5.10.9

/ip ssh
set allow-none-crypto=yes forwarding-enabled=remote



Thnks for the help