subnet – How to replace explicit IP range route setting in OS with router configuration?

Closed. This question is off-topic. It is not currently accepting answers.

NE is a site for to ask and provide answers about professionally managed networks in a business environment. Your question falls outside the areas our community decided are on topic. Please visit the help center for more details. If you disagree with this closure, please ask on Network Engineering Meta.

I have a Mikrotik Router B750Gr3 i want all requests to 192.168.5.0/24 be redirected to mikrotik router. How to properly do it?
i have a mikrotik router that gets dhcp configs including ip 192.168.1.220/23 and gateway 192.168.1.254 .
mikrotik router provides IPs in range 192.168.60.0/24.
there are cameras connected to 192.168.1.254 cisco router that are in 192.168.5.0/24 subnet and that router is routing 192.168.5.0/24 requests to the cameras.
i’ve added routing rule to mikrotik router to route 192.168.5.0/24 requests to 192.168.1.254 or %ether1 (WAN).
if i add explicit route rule on a computer to be routed to mikrotik
sudo ip route add 192.168.5.0/24 via 192.168.60.1

then i can access camera (tested with ping 192.168.5.216) if explicit route is not added then
$ ping 192.168.5.216
PING 192.168.5.216 (192.168.5.216) 56(84) bytes of data. From 192.168.5.181 icmp_seq=1 Destination Host Unreachable

How to do this properly without explicit route rule in computer OS?

Host
Operating System: CentOS Stream 9
Roiuter details:
ModelR B750Gr3
Revision r4
Serial Number HG409Z9033T
Firmware Type mt7621L
Factory Firmware 6.49.11
Current Firmware7.15.1
Upgrade Firmware7.15.1

I had to add DHCP server option populating 121 class value 0x18C0A805C0A83C01.
/ip dhcp-server option
add code=121 name=StaticRoute value=0x18C0A805C0A83C01

/ip dhcp-server network
set [find address=192.168.60.0/24] dhcp-option=StaticRoute

one tricky thing is that length of the mask part of the value has to correspond to prefix 0x18 – 3 bytes instead of usual 4

Stay in the Loop

Get the daily email from CryptoNews that makes reading the news actually enjoyable. Join our mailing list to stay in the loop to stay informed, for free.

Latest stories

- Advertisement - spot_img

You might also like...