routing between two interfaces with ips from the same subnet

Hello,
I have two ethernet interfaces with different Ip from the same subnetwork

ether1 - 10.1.1.2/24
ether2 - 10.1.1.3/24

they have the same gateway 10.1.1.1/24

How can i force different packets to pass via specific interface?
ex: all HTTP (80) packets to pass via ether1 interface to 10.1.1.1 gw,
and all other packets to pass via ether2 interface to 10.1.1.1 gw

Diagram:

________/ ether1 -----
user - MK____________HUB----GW 10.1.1.1
________\ ether2 -----/


Note: (_) - just a space
Thanks


Hello Friend,

I think better your scnario change difference subnet,..!!!
on routerOS is not valid, when you did put same subnet on two or many interfaces,
When your suggestion plain like this[your diagram], you must 'BRIDGE' methode and put IPs on 'BRIDGE'

regards
Hasbullah.com

May be there any other posibilities to indicate on what interface to be router?

this must work on the interfaces with ips from the same subnetwork. I understand that it is not allowed by the networking rules, but i have to do it.

If not Mikrotik, may be other OS or Hardware can do this?

Thanks a lot

My question is something from advanced routing… not just a mistake in subnetworks

Thanks again

Is the gateway the same hardware or two different gateways with the same IP?

If it is the same hardware, why use two different paths?
If it is two different machines with the same IP, why use the same IP?


i think, he put two interfaces for one gateway and one subnet too...!! and difference IP every NIC-interface
so, sorry when i am wrong for thinking... :wink:

regards
Hasbullah.com

Yeah man, you are right..
This is like a simulation of two PC with different IP in the same subnet.

So, Mikrotik accept to add two different IP from the same subnet to different interfaces.

so, the aim is just to force MK to route the traffic via specific interface regarding some rules (like port 80 via one interface, and else via second interface)

Please, don’t ask me why i have to put the same subnet on two interfaces… Just i need it.

Thanks a lot


peace all :wink:

any ideas? :slight_smile:

WHy the cloak and dagger attitude? Is this like secret FBI stuff or something?

I think if we understood your intention, we could better help with a solution…

There are an DHCP server on the ISP. It gives IP on the DHCP client request.
In normal mode, a few PC can get ip via this DHCP server. All ip are from the same subnet like 10.1.1.0/24

I have to emulate several PC using one MK (Router OS).
Mikrotik (Router OS) have several interfaces, connected to the same DHCP Server. Each interface gets one IP from DHCP server. But all IP are from the same subnetwork. It was no problems at this step.

The problem, is how to rute traffic via specific interface?
Like to mark (via mangle) packets, and to force them to go via specific interface.

Thanks for helping…

do you need to specifically route traffic, or load-balance it?

It will be great the both :slight_smile:
Especialy specific routing…

Thanks man!

Any ideas?

How about specifying a different IP address on the 3rd interface and adding both IP’s of your outgoing interfaces as gateways?

This should alternate connections between the two IP’s

hi

will it be good if he uses cheap routers (nat boxes) to make differences in the gw & the subnet mask?

thanks

MT - Please add interface routing - please please please … It would solve all these users problems with duplicate default gateways.

Sam

cannot make route with same subnet

regards

if a MK is a router


the interfaces is a broadcast domain, and you try put two interface in the same broadcast domain.


how make a rule for routes ? you can´t do this

best regards



If I make:

IP addresses
192.168.0.1/24 - Local
10.5.8.1/24 - Local
195.10.10.200 - Public1
195.10.10.201 - Public2

Route
dst-address gateway interface mark
10.5.8.0/24 192.168.0.1 Local
0.0.0.0/0 195.10.10.200 Public1 p2p
0.0.0.0/0 195.10.10.201 Public2 other
0.0.0.0/0 195.10.10.1 Public1 (gateway of ISP)


Will it work?

i am thinking , will not work

because you have in the same segment network in public1 and public2

the address scheme is wrong for a router.

if you can put example in public1 195.10.11.200 public1 and for the other 195.10.10.201 public2

and what mask you want use for the public interface ? 30 bits 255.255.255.252 ? or is a typical class C network 255.255.255.0 24 bits ?

best regards