Community discussions

MikroTik App
 
infgrp
just joined
Topic Author
Posts: 12
Joined: Sun Oct 01, 2006 6:31 pm

routing between two interfaces with ips from the same subnet

Sat Nov 11, 2006 2:24 am

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
 
User avatar
balimore
Forum Veteran
Forum Veteran
Posts: 884
Joined: Mon Apr 10, 2006 3:38 am

Re: routing between two interfaces with ips from the same su

Sat Nov 11, 2006 5:01 am

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
----
 
infgrp
just joined
Topic Author
Posts: 12
Joined: Sun Oct 01, 2006 6:31 pm

Sat Nov 11, 2006 12:33 pm

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
 
User avatar
GWISA
Member
Member
Posts: 389
Joined: Tue Jan 31, 2006 2:37 pm
Location: Johannesburg, South Africa

Sat Nov 11, 2006 4:15 pm

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?
 
User avatar
balimore
Forum Veteran
Forum Veteran
Posts: 884
Joined: Mon Apr 10, 2006 3:38 am

Sat Nov 11, 2006 4:46 pm

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
----
 
infgrp
just joined
Topic Author
Posts: 12
Joined: Sun Oct 01, 2006 6:31 pm

Sat Nov 11, 2006 4:56 pm

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
 
User avatar
balimore
Forum Veteran
Forum Veteran
Posts: 884
Joined: Mon Apr 10, 2006 3:38 am

Sat Nov 11, 2006 5:02 pm

----
peace all :wink:
---
 
infgrp
just joined
Topic Author
Posts: 12
Joined: Sun Oct 01, 2006 6:31 pm

Sat Nov 11, 2006 11:52 pm

any ideas? :)
 
User avatar
GWISA
Member
Member
Posts: 389
Joined: Tue Jan 31, 2006 2:37 pm
Location: Johannesburg, South Africa

Sun Nov 12, 2006 1:00 am

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

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

Thanks a lot
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...
 
infgrp
just joined
Topic Author
Posts: 12
Joined: Sun Oct 01, 2006 6:31 pm

Advanced routing

Mon Nov 13, 2006 5:42 pm

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....
 
User avatar
GWISA
Member
Member
Posts: 389
Joined: Tue Jan 31, 2006 2:37 pm
Location: Johannesburg, South Africa

Mon Nov 13, 2006 9:26 pm

do you need to specifically route traffic, or load-balance it?
 
infgrp
just joined
Topic Author
Posts: 12
Joined: Sun Oct 01, 2006 6:31 pm

Tue Nov 14, 2006 12:22 am

It will be great the both :)
Especialy specific routing...

Thanks man!
 
infgrp
just joined
Topic Author
Posts: 12
Joined: Sun Oct 01, 2006 6:31 pm

Tue Nov 14, 2006 3:05 pm

Any ideas?
 
User avatar
GWISA
Member
Member
Posts: 389
Joined: Tue Jan 31, 2006 2:37 pm
Location: Johannesburg, South Africa

Tue Nov 14, 2006 3:24 pm

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
 
adaheem
Member Candidate
Member Candidate
Posts: 135
Joined: Sat Aug 26, 2006 12:33 am

Fri Feb 02, 2007 12:57 am

hi

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

thanks
 
changeip
Forum Guru
Forum Guru
Posts: 3830
Joined: Fri May 28, 2004 5:22 pm

Sun Feb 04, 2007 8:32 pm

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

Sam
 
skynoc
Member Candidate
Member Candidate
Posts: 140
Joined: Wed Jul 07, 2004 10:20 pm
Contact:

Tue Feb 13, 2007 12:14 am

cannot make route with same subnet

regards
 
User avatar
aitsecurity
Frequent Visitor
Frequent Visitor
Posts: 84
Joined: Thu Mar 16, 2006 12:28 am
Location: venezuela

Re: routing between two interfaces with ips from the same su

Sat Feb 24, 2007 5:12 am

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


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
 
Life
just joined
Posts: 16
Joined: Tue Feb 13, 2007 1:23 pm

Did you try it?

Sat Mar 03, 2007 11:26 am

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
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?
 
User avatar
aitsecurity
Frequent Visitor
Frequent Visitor
Posts: 84
Joined: Thu Mar 16, 2006 12:28 am
Location: venezuela

Re: Did you try it?

Sat Mar 03, 2007 3:34 pm

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
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
 
Diganet
Member
Member
Posts: 342
Joined: Sun Oct 30, 2005 9:30 pm
Location: Denmark
Contact:

Sat Mar 03, 2007 4:40 pm

Try 3.0Beta6, is has Interface based routing.. so maybe 8)

/Henrik
 
Life
just joined
Posts: 16
Joined: Tue Feb 13, 2007 1:23 pm

Fri Mar 09, 2007 4:07 pm

Thank you to all.

Who is online

Users browsing this forum: No registered users and 133 guests