Problem With DHCP on OVH

Hello to all

im running auto provisioning vm on OVH datacenter for ip address to give client use mikrotik dhcp

i have a problem,

OVH datacenter need to add ip address with different network for access internet like

ip address add address=2.2.2.2 network=1.1.1.254 interface=ether1
ip route add distance=1 gateway=1.1.1.254


any body can help me how can add dhcp server give to client ip address like this , ip address with different network

No problem. You just have to add it manually, because when you try to do it using “DHCP Setup” wizard, it doesn’t like it.

/ip pool
add name=point2point ranges=2.2.2.0/24
/ip dhcp-server
add address-pool=point2point disabled=no interface=test1 name=server1
/ip dhcp-server network
add address=2.2.2.0/24 gateway=1.1.1.254 netmask=32

Result on client:

/ip address print
Flags: X - disabled, I - invalid, D - dynamic
 #   ADDRESS            NETWORK         INTERFACE
 ...
 5 D 2.2.2.255/32       1.1.1.254       test1

/ip route print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 ...
 6 ADS  0.0.0.0/0                          1.1.1.254                 0
 ...
 9 ADC  1.1.1.254/32       2.2.2.255       test1                     0

hello and thanks reply,

but i try this way but not work …

and mikrotik DHCP give netmask same as ip address to client …

You also need to have route on device with dhcp server:

/ip route
add dst-address=2.2.2.0/24 gateway=test1

Sorry for skipping that. With that it should work ok, what I posted is actually working config.