My requirement is like this:
I have 3 ports in my box, 1 port is used for the primary, and communicate with outside, for others two ports, each of them connects to a separate inner-network, such as sub-network-1, sub-network-2. network1 and network2 can not see each others, so IP address in them can be the same and without conflict.
network1: 192.168.5.2-192.168.5.100/24
network2: 192.168.5.2-192.168.5.100/24
In my box,
I want port1 and port2 both have the same IP 192.168.5.1. Port1 is used to connect with network1 only, and port2 is used to connect with network2 only.
Now, assuming that there is a process named proc1, sometimes I want proc1 to communicate with network1 and sometimes with network2.
I know setfib(1) can help on multi-route-table, but I think the limitation of it is IP can not conflict.
Any solutions can solve my issue?
Thanks in advance.
I have 3 ports in my box, 1 port is used for the primary, and communicate with outside, for others two ports, each of them connects to a separate inner-network, such as sub-network-1, sub-network-2. network1 and network2 can not see each others, so IP address in them can be the same and without conflict.
network1: 192.168.5.2-192.168.5.100/24
network2: 192.168.5.2-192.168.5.100/24
In my box,
I want port1 and port2 both have the same IP 192.168.5.1. Port1 is used to connect with network1 only, and port2 is used to connect with network2 only.
Now, assuming that there is a process named proc1, sometimes I want proc1 to communicate with network1 and sometimes with network2.
I know setfib(1) can help on multi-route-table, but I think the limitation of it is IP can not conflict.
Any solutions can solve my issue?
Thanks in advance.