ROUTING: 2 subnets in 1 network segmet

Hi Peeps.

Greetings.

Here’s the scenario:

  1. hotspot is running on eth2
  2. 192.168.0.1 is assigned to eth2
  3. 192.168.1.1 is also assigned to eth2
  4. dhcp server is running on eth2 and providing 192.168.0.0/24 ip address to customers
  5. some other devices on the same eth2 segment are on 192.168.1.0/24 network
  6. customers on 192.168.0.0/24 are natting fine and authenticating
  7. however, i need NOT to NAT the 192.168.1.0 network so i can route that network in and out as-is. How do I do that?

Thanks in advance.

Marlboroman

I guess you have set NAT to interface.

When you set NAT rule set source IP address range to one you want NAT to work for. IP’s that are not in specified range won’t NAT.

Hi,

Is at a customer that you need to assign is own “real” IP?

If yes, you can create a routing mark and src-NAT that routing mark to a different IP
First mark the network:

chain=prerouting action=mark-routing new-routing-mark=1.0 network 
     passthrough=yes src-address=192.168.1.0/24 in-interface=ether2

Then src-NAT to another address(8.8.8.8=“real” IP, ether1=WAN):

chain=srcnat action=src-nat to-addresses=8.8.8.8 routing-mark=1.0 network 
     out-interface=ether1

Q: in your 7 note, you wrote “so i can route that network in and out as-is”
are you pointing the 1.0/24 network to another network (not internet)? for example: Bridge between 2 office branches

Hope it helps…

Hello friends,

Thanks for all your reply. I got it working with only this:

/ip hotstpot ip-bindings add address=192.168.1.0/24 type=bypassed

The thing is the hotspot is binding a 192.168.0.0 address to every 192.168.1.0 address seen.

Thanks for all your replies. I learned from them.

Best regards,

MarlboroMan

To stop that set the adress-pool property of all user profiles and all hotspot profiles to ‘none’.

http://wiki.mikrotik.com/wiki/Manual:Hotspot_Introduction#Getting_an_Address

Thanks fewi.

I’ll try that.