How to configure a gateway

I’d like to connect together on the same network some machines with ip addresses 172.20.* and some others with ip addresses 82.38.*.

How can I do?
Do I need ipfilter?
Thanks a lot.

You probably need simple routing.

If you have Router/Gateway machine with the qnx6 which have interfaces to both networks:
Add forward to your io-net command “io-net -ptcpip forward” in /etc/system/enum/include/net or if u start io-net manually in /etc/rc.d/rc.local or enable forward by adding “sysctl -w net.inet.ip.forwarding=1” in /etc/rc.d/rc.local
However, each machine in both networks except the router (the machine with interfaces to both networks) which want to connect into other network or wants to be connected from other network must have Default Gateway set to IP of the router (IP from its home network) or must have manually added route to other network (eg: machines in network 172.20.* “route add” where is the router IP (in 82.38.* it is “route add” where is the router IP))

If you dont have Router/Gateway, but your machines are on same network segment then:
The machines which want to communicate with each other must have manual route added (as shown above (eg: “route add”, …) where is IP of the interface on each machine)

Hi Mezec,

So, I’m in second case i.e. all my machines are on the same network but I think I miss something:

on a machine I do ‘route add’
on a machine I do ‘route add’

So, a bridge is missing here so I try on the to do ‘ifconfig en0 alias’ but that doesn’t work!

The problem is that don’t want to just connect two machines but all with

Any idea?


IP routing uses the address to determine how to route traffic. This is done by using a netmask and a routing table.

Your problem is you are placing two very different networks (ip wise) on the same physical network. This will not work easily (if at all). As long as you only want these machines to talk to one another and not out through a real gateway, you should be able to “open” up the netmask so they know they are on the same segment.

Try something like:

ifconfig en0 netmask

and see if that works. My concern is that routing and netmasks are based on the binary value of the network portion of the address. The network portion is defined as xx bits from the left side of the address and the node is defined as the remaining bits. Since your two groups of addresses don’t share any common bits from the left side, my ifconfig line attempts to say that the whole address is a node address and there is no network. I have no idea if it will work.

In other words, this is just wrong from an IP point of view. You may get it to work, but to do it right, you either need a gateway, or you need to change the addresses so they share some network bits in common.