Community discussions

MikroTik App
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 694
Joined: Sat Feb 26, 2005 5:37 am

Static DHCP lease and two subnets

Sun Feb 27, 2005 9:04 pm

I am not sure if this is a bug, but this is what happens.


I have MT with three lan adapters. One is used for external network and two other for two local networks on ip ranges 10.30.0.0/24 (lan1) and 10.31.0.0/24 (lan2).

I have computer connected to lan1 and I've set static Ip lease 10.30.0.1 to computer based on his MAC.

I have this settings:

lan1-pool (10.30.0.1 - 10.30.255.255)
lan2-pool (10.31.0.1 - 10.31.255.255)

lan1-dhcp (interface=lan1; address-poool=lan1-pool; authoritative=yes)
lan2-dhcp (interface=lan2; address-poool=lan2-pool; authoritative=yes)

lease (address=10.30.0.1; mac=<client MAC>)




When this computer is connected to lan1 everything works fine. But, since this computer is used for testing, I want to attach it to lan2 occasionaly, to be able to test settings for that lan. When I do that, MT still recognizes computer by it's MAC and again attaches IP 10.30.0.1 which is inapropriate, since computer is no more connected to lan1 and cannot work using that address.

I expected different behaviour of MT: DHCP should matter static leases only if computer is attached to lan which actualy uses that IP range.

On other router I used to maintain, I could set static lease rules like this:

"if computer using this MAC is attached to this lan adpater then give it this IP."

That allowed me not just that set static lease for the computer only if it is attached to proper lan, but also to give it different lease if atached to other lan.
 
GJS
Member
Member
Posts: 418
Joined: Sat May 29, 2004 4:07 pm
Location: London

Sun Feb 27, 2005 9:21 pm

Are you using two DHCP servers, one for each LAN interface? You could also reduce your lease time, though this would increase network traffic a little.
 
pedja
Long time Member
Long time Member
Topic Author
Posts: 694
Joined: Sat Feb 26, 2005 5:37 am

Fri Mar 04, 2005 2:48 am

Yes, I've set two dhcp servers for each LAN. Problem is that I cannot set static leases for the same MAC for each server or I do not see the way. If I set lease rule, both servers use the same rule which gives invalid IP for one of them.

Lease expiration won't help since this is static lease, locked on adapter's MAC.
 
User avatar
scurtis@acrsokc.com
just joined
Posts: 13
Joined: Tue Mar 01, 2005 5:10 am
Location: Oklahoma City
Contact:

Public IP

Sat Mar 05, 2005 2:02 pm

I have the same issue. I have set up 66.143.27.10 to 10.10.10.110 in routes and assresses. I configured remote IPaddess in PPPOE secret. Still cant ping fromoutside - I am lost!!!