Thanks
@LuizPuppin and @chenhui
I tested as you guys suggested and got it working almost how i wanted:
1) used portswtich command on the interfaces
2) created multiple vlans
3) created vlanif interface per each vlan and assigned IP subnet to them
4) assigned ports to each vlan
5) assigned a default vlan to interfaces
So i got multiple interfaces using same subnets like a switch, and to use multiple subnets i just assign vlan tags of a non default vlan.
Is that the correct way? Or Is there any better alternative?