0

I want to make 192.168.1.2/24->192.168.1.1 to access the Internet, but 192.168.1.3/24->192.168.1.100 to access the Internet.

I don't know how to do it.

[admin@RouterOS] /ip/route> print detail 
Flags: D - dynamic; X - disabled, I - inactive, A - active; 
c - connect, s - static, r - rip, b - bgp, o - ospf, d - dhcp, v - vpn, m - modem, y - bgp-mpls-vpn; 
H - hw-offloaded; + - ecmp 
 0  As + dst-address=0.0.0.0/0 routing-table=main pref-src=192.168.1.2 
         gateway=192.168.1.1 immediate-gw=192.168.1.1%ether1 check-gateway=arp 
         distance=1 scope=30 target-scope=10 suppress-hw-offload=no 

 0  As + dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=192.168.1.1 
         immediate-gw=192.168.1.1%ether1 check-gateway=arp distance=1 scope=30 
         target-scope=10 suppress-hw-offload=no 

   DAc + dst-address=192.168.1.0/24 routing-table=main gateway=ether1 
         immediate-gw=ether1 distance=0 scope=10 suppress-hw-offload=no 
         local-address=192.168.1.3%ether1 

   DAc + dst-address=192.168.1.0/24 routing-table=main gateway=ether1 
         immediate-gw=ether1 distance=0 scope=10 suppress-hw-offload=no 
         local-address=192.168.1.2%ether1 

 1  As   dst-address=0.0.0.0/0 routing-table=rtab-1 pref-src=192.168.1.3 
         gateway=192.168.1.100 immediate-gw=192.168.1.100%ether1 check-gateway=arp 
         distance=1 scope=30 target-scope=10 suppress-hw-offload=no 
[admin@RouterOS] /ip/address> print 
Columns: ADDRESS, NETWORK, INTERFACE
# ADDRESS         NETWORK      INTERFACE
0 192.168.1.2/24  192.168.1.0  ether1   
1 192.168.1.3/24  192.168.1.0  ether1   
[admin@RouterOS] /ip/address> /tool/traceroute src-address=192.168.1.3 8.8.8.8
Columns: ADDRESS, LOSS, SENT, LAST, AVG, BEST, WORST, STD-DEV
#  ADDRESS          LOSS  SENT  LAST    AVG   BEST  WORST  STD-DEV
1  192.168.1.1      0%       3  0.2ms   0.2   0.1   0.2    0      
2  ... // more line
[admin@RouterOS] /ip/address> /tool/traceroute src-address=192.168.1.2 8.8.8.8 
Columns: ADDRESS, LOSS, SENT, LAST, AVG, BEST, WORST, STD-DEV
#  ADDRESS          LOSS  SENT  LAST    AVG   BEST  WORST  STD-DEV
1  192.168.1.1      0%       2  0.2ms   0.2   0.1   0.2    0.1    
2  ... // more line

Here's what I'd like to see happen.

[admin@RouterOS] /ip/address> /tool/traceroute src-address=192.168.1.3 8.8.8.8
Columns: ADDRESS, LOSS, SENT, LAST, AVG, BEST, WORST, STD-DEV
#  ADDRESS          LOSS  SENT  LAST    AVG   BEST  WORST  STD-DEV
1  192.168.1.100      0%       3  0.2ms   0.2   0.1   0.2    0      
2  ... // more line
[admin@RouterOS] /ip/address> /tool/traceroute src-address=192.168.1.2 8.8.8.8 
Columns: ADDRESS, LOSS, SENT, LAST, AVG, BEST, WORST, STD-DEV
#  ADDRESS          LOSS  SENT  LAST    AVG   BEST  WORST  STD-DEV
1  192.168.1.1      0%       2  0.2ms   0.2   0.1   0.2    0.1    
2  ... // more line
3
  • 1
    Well, here is a problem you have - what you ask for in the start makes no sense. Bad explanation. You do not know how to do it - I have no idea what you even try to say. So, voting to close. It may be a good idea to use ChatGPT to help you formulate a question that is logically complete.
    – TomTom
    Jun 23 at 9:46
  • 1
    I’m voting to close this question because I have no idea what you even try to do based from the way your question is formulated.
    – TomTom
    Jun 23 at 9:46
  • I belive this is about policy/source-based routing; like "ip rule add from x lookup table x" in Linux. Then this is done essentially in the same way in RouterOS because it is Linux underneath its NIH-caused interface. Jun 23 at 12:49

0

You must log in to answer this question.

Browse other questions tagged .