Community discussions

MikroTik App
 
tarana
just joined
Topic Author
Posts: 5
Joined: Thu Feb 02, 2023 10:01 pm

Routing between two subnet without NAT

Sat Feb 04, 2023 7:39 am

Hi,

I'm new to Mikrotik. I have the following simple topology,

Host_A-----------------192.168.1.0/24-------------ether10[CRS-518]ether12---------------------172.16.1.0/24-------------------Host_B
.1 .2 .2 .1

Host_A has default route pointing to 192.168.1.2 and Host_B has default route pointing to 172.16.1.2. Is there a way to make CRS-518 to forward traffic between host_A and host_B. without NAT? If so, could you provide me a working configuration for this scenario.

Thank you,

Lawrence
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Routing between two subnet without NAT

Sun Feb 05, 2023 11:44 pm

Not sure what you mean?

You have users on subnet A and users on Subnet B on the same device and want them to be able to see each other????
 
tarana
just joined
Topic Author
Posts: 5
Joined: Thu Feb 02, 2023 10:01 pm

Re: Routing between two subnet without NAT

Tue Feb 07, 2023 8:37 pm

Yes, that's what I try to do for the past few day.

Host_A----------------------------192.168.31.0/24--------------------ether27[CRS-518]ether28---------------------172.16.31.0/24------------------------Host_B
192.168.31.3/24 192.168.31.1/24 172.16.31.1/24 172.16.31.4/24

I can ping from host_a to ether27 and ping from host_b to ether28, but host_a cannot even ping ether28, 172.16.31.1, on CRS-518. I think that's because the nexthop is not properly. Here's what I see on the CRS-518.

[admin@CRS_354_ROS] > /ip/address/print where interface="ether37"
Columns: ADDRESS, NETWORK, INTERFACE
# ADDRESS NETWORK INTERFACE
1 192.168.31.1/24 192.168.31.0 ether37
[admin@CRS_354_ROS] > /ip/address/print where interface="ether38"
Columns: ADDRESS, NETWORK, INTERFACE
# ADDRESS NETWORK INTERFACE
2 172.16.31.1/24 172.16.31.0 ether38
[admin@CRS_354_ROS] >

[admin@CRS_354_ROS] > /ip/arp/print
Flags: D, P - PUBLISHED; C - COMPLETE
Columns: ADDRESS, MAC-ADDRESS, INTERFACE
# ADDRESS MAC-ADDRESS INTERFACE
0 DC 192.168.88.2 54:EE:75:4C:10:2C bridge
1 DC 192.168.31.100 EC:30:91:5A:6A:C1 bridge
2 DC 192.168.31.3 00:1E:06:39:E2:9B bridge <----- arp for host_a
3 DC 172.16.31.4 00:1E:06:39:E7:C8 bridge <----- arp for host_b
[admin@CRS_354_ROS] >
[admin@CRS_354_ROS] > /ip/route/print
Flags: D - DYNAMIC; A - ACTIVE; c, y - COPY
Columns: DST-ADDRESS, GATEWAY, DISTANCE
DST-ADDRESS GATEWAY DISTANCE
DAc 172.16.31.0/24 bridge 0 <----- nexthop points to bridge, not outgoing interface ether38
DAc 192.168.31.0/24 bridge 0 <------ same situation as in interface ether37
DAc 192.168.88.0/24 bridge 0
[admin@CRS_354_ROS] >

So, the question is what Mikrotik CLI configuration is needed to make the route pointing to outgoing interface. In other product, which is really trivia and it's create automatically, especially for a router. But of course, I'm comparing apple to orange in terms of vendor/platform at the moment.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Routing between two subnet without NAT

Tue Feb 07, 2023 8:43 pm

/export file=anynameyouwish ( minus router serial # and any public WANIP information )
 
User avatar
k6ccc
Forum Guru
Forum Guru
Posts: 1490
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)
Contact:

Re: Routing between two subnet without NAT

Wed Feb 08, 2023 7:40 pm

As anav asked, please export your configuration. If you had simply added the two LANs to the router, it would have worked without any additional work (it's a router after all) So without knowing your configuration, we are simply guessing.
To export and paste your configuration (and I'm assuming you are using WebFig or Winbox), open a terminal window, and type (without the quotes) "/export hide-sensitive file=any-filename-you-wish". Then open the files section and right click on the filename you created and select download in order to download the file to your computer. It will be a text file with whatever name you saved to with an extension of .rsc. Suggest you then open the .rsc file in your favorite text editor and redact any sensitive information. Then in your message here, click the code display icon in the toolbar above the text entry (the code display icon is the 7th one from the left and looks like a square with a blob in the middle). Then paste the text from the file in between the two code words in brackets.
 
tarana
just joined
Topic Author
Posts: 5
Joined: Thu Feb 02, 2023 10:01 pm

Re: Routing between two subnet without NAT

Thu Feb 09, 2023 4:49 am

The issue is resolved after remove the interface from the 'bridge' that's in the default configuration. Once that's done, the ping went through,

[admin@CRS_354_ROS] > ip route print where dst-address~"31"
Flags: D - DYNAMIC; A - ACTIVE; c, y - COPY
Columns: DST-ADDRESS, GATEWAY, DISTANCE
DST-ADDRESS GATEWAY DISTANCE
DAc 172.16.31.0/24 ether38 0
DAc 192.168.31.0/24 ether37 0
[admin@CRS_354_ROS] > ip arp print where interface~"ether"
Flags: D, P - PUBLISHED; C - COMPLETE
Columns: ADDRESS, MAC-ADDRESS, INTERFACE

ADDRESS MAC-ADDRESS INTERFACE
4 DC 172.16.31.4 00:CE:06:39:A7:C8 ether38
5 DC 192.168.31.3 00:CE:06:39:A2:CB ether37
[admin@CRS_354_ROS] >
root@dc-313:/home/devops# traceroute 172.16.31.4
traceroute to 172.16.31.4 (172.16.31.4), 30 hops max, 60 byte packets
1 192.168.31.1 (192.168.31.1) 0.700 ms 0.561 ms 0.570 ms
2 172.16.31.4 (172.16.31.4) 1.098 ms 1.055 ms 0.921 ms
root@dc-313:/home/devops#

I agree that it's a router after all, but Mikrotik like to make the nexthop as a 'bridge'. That I don't know why.
 
kevinds
Long time Member
Long time Member
Posts: 575
Joined: Wed Jan 14, 2015 8:41 am

Re: Routing between two subnet without NAT

Sun Feb 12, 2023 11:00 pm

The issue is resolved after remove the interface from the 'bridge' that's in the default configuration. Once that's done, the ping went through,

.....

I agree that it's a router after all, but Mikrotik like to make the nexthop as a 'bridge'. That I don't know why.
So that 'out of the box' it works like the regular 'off-the-shelf' SOHO gateway routers.

The other option for you would be to start with a blank configuration.

Who is online

Users browsing this forum: UkRainUa and 47 guests