Community discussions

MikroTik App
 
marinpareja
just joined
Topic Author
Posts: 21
Joined: Sat Aug 22, 2009 6:53 pm
Location: Sevilla, Spain

DHCP. Give IP in function of the Physical Port.

Tue Mar 18, 2014 12:34 pm

I need to Ip as a function of physical port that I connect. example:

My network is 192.168.1.x/24

if I connect on port 5, I want that computer IP 192.168.1.5
if I connect on port 3, I want that computer IP 192.168.1.3

Where to write the script for the DHCP-Server deliver the IP I want? Any idea?

thank you very much
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12631
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DHCP. Give IP in function of the Physical Port.

Tue Mar 18, 2014 12:37 pm

Why do that?
 
marinpareja
just joined
Topic Author
Posts: 21
Joined: Sat Aug 22, 2009 6:53 pm
Location: Sevilla, Spain

Re: DHCP. Give IP in function of the Physical Port.

Tue Mar 18, 2014 12:57 pm

I have 175 users in a network, all on cable and connect directly to switch. When I have any problem witch cable, it´s so dificult detect the cable on Switch. If I could do fix the Ip-user with the port-fisic, I resolve this problem.
diagrama.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12631
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: DHCP. Give IP in function of the Physical Port.

Tue Mar 18, 2014 1:20 pm

Very hard to do...

I have some ideas about VLAN bridged on each port of each switch, and finally all the VLAN on gateway on same bridge... [and only one DHCP]
Whit this you can trace exactly the source port reading on sniffer the vlan id source...

But is too complicated, I can not help you.



You can not simply sniff traffic on each switch?
 
marinpareja
just joined
Topic Author
Posts: 21
Joined: Sat Aug 22, 2009 6:53 pm
Location: Sevilla, Spain

Re: DHCP. Give IP in function of the Physical Port.

Tue Mar 18, 2014 2:12 pm

Now, I only have this idea:

On each CRS125-24G:
One dhcp-server each port/interface, one IP per pool with reply-arp only activated.

It´s a lot of work and it´s not elegant way to do it.

I hope a better way exist from CCR1016, just only one dhcp-server!!.