Two interface using the same ip subnet

Dear all,

I have subscription with two DSL Cable Modem serving the same ip subnet with DHCP.
They offered the ip address from 192.168.100.0/24 block.
The two line of DSL goes to ether1 and ether2. How do i handle this situation. Logically we cant setup two interfaces in one mikrotik for the same subnet.

Help, thanks

why did you use the same subnet in the case?

As 2 Wan interface card, you can define 2 different IP address to them.

you can use Proxy-ARP feature

but… could you please describe the situation with more details?

Chupaka,
please explain more details.

I have one weird client, h ehe he .. :sunglasses:
He subscribed with the ADSL Provider and after one subscriber line is not enough, he choose to take another one. So that means there are two ip addresses given by the ADSL Provider running at different interface.

I check the ip address, the ADSL Provider give in DHCP ip 192.168.100.12 and it goes for mikrotik ether1 and the other is 192.168.100.19 and goes to mikrotik ether2.
Both subnet are 255.255.255.0, connected to the same gateway ip address 192.168.100.1 (DSLAM) at ADSL Provider.

So in this case, i need to setup the two lines he subcribed and mix it under Mikrotik.

Thanks

you can use load balancing with interface routing (in v3)

Are you sure ? have you tried it ?

Two line of DSL i mentioned is the same provider with the same range of subnet. Connecting to one mikrotik router with different interface.
As far as i knew, the load balance you said only works with different network block, not the same one.

Please give a real example.
Thanks

in v2, you need two MT routers. in v3, there’s interface routing, so you can mark packets with different routing mark and all’ll be ok

I already have my Mikrotik v3.0rc9
But i cant find the interface routing you mentioned.

Please share the information completely, or perhaps you need a payment for your consultancy ?
Thanks.

in CLI

/ip route add gateway=

Janisk:

I dont think it might work.
How about we set this condition:

Mikrotik-PC
ether1: 192.168.0.1/24
ether2: 192.168.0.2/24

Monitoring-PC
ether1: 192.168.0.3/24

The two PC connected to same switch.
The question is, without routing, does Monitoring-PC able to reach ip 192.168.0.1 and 192.168.0.2 ?
How to do that

Thanks.

t3rm
hmmm… I cannot see connection between the topic problem and your last message…

you should mark some packets (from same connections, of course) as route1, and some others - as route2
in route1 routing table you should have route to 0.0.0.0/0 with gateway=ether1
in route2 routing table you should have route to 0.0.0.0/0 with gateway=ether2
that is all =)

Chupaka:

It seemed you still didnt understand what i meant.
My last post, i hope it’ll make you easier to imagine the thread we’re talking about.

Please consider you have the same network 255.255.255.0 for that 3 nodes.
If those 3 under the same network, why you suggest to use routing ?
CMIIW,
routing didnt needed if the host is in the same network.

So how you manage it to make those three able to ping each other ?

Thank you.

hmmm… i thought, you have standart adsl-lines, and you src-nat your network in provider’s internal 192.168.100.x addresses =)

anyway, what kind of handling of situation do you need? :slight_smile:

Dear t3rm ,


You can mark your traffic routing into two parts like …

chain=prerouting action=mark-routing new-routing-mark=http passthrough=no src-port=1024-65535 dst-port=80 protocol=tc>

and.. other traffic like ..

chain=prerouting action=mark-routing new-routing-mark=other passthrough=no protocol=tcp routing-mark=!http

then you can route your traffic seperetly throuh two interface. I hope this will work becouse this is more like the prevoius stage of loadbalance.( Just dont need the balancing config
option when it is comming from the same subnet)

regards.
zubair

uol-vnet & chupaka:

Please answer the easiest details i gave on my last post.
Or perhaps the network mapping below will make it easier for both of you to understand:
MikrotikDUAL.jpg
That is the same situation when i subscribe with two line of ADSL from the same provider.
Ether1 and Ether2 under the same network.

Thanks.

Dear t3rm ,

Check this configuration as per your requirement .


/ip firewall mangle
add chain=prerouting action=mark-routing new-routing-mark=http passthrough=no
src-port=1024-65535 dst-port=80 protocol=tcp

add chain=prerouting action=mark-routing new-routing-mark=other passthrough=n>
routing-mark=!http

ROUTE ::

/ip route add gateway=192.168.100.1

/ip route add routing-mark=http gateway=192.168.100.2

/ip route add routing-mark=other gateway=192.168.100.3


Now, in this situation all of your http trafiic will route trough IP 192.168.100.2(ether1) and all other traffic but HTTP will route through 192.168.100.3(ether2).

NB: You did not mention your local nat address so I asumed A different class than 192.168.100.x/24

Hope this will work for you.

Thanks
zubair

Why would i need routing ?

From 192.168.100.2 or 192.168.100.3 to reach 192.168.100.1 doesnt need routing isnt it ?
Because those are in the same subnet.

Basic networking principals okay!

If you’re all on the same subnet then you’re right, you don’t need routing. So what are you asking ? If you don’t want to route, then make a bridge. Or plug them all into the same switch and use a single network port with 2 ip addresses. You can use /32 as a subnet mask if you need.

Dear sir ,


If you do not route these packets through those TWO IPS then all the traffic will go to the default gateway directly and in that case only one connection will be active.if your provider manged the bandwidth on IP address then You can not get all the bandwidth from those two links .
In my opinion you have to divide your traffic into two part and force them to route on both connections.



Regards.



Dear changeip

Are you sure that this bridge connection will get all the bandwidth even if the provider assign this bandwidth into two different queues based on those two ips ?

:confused: