Author Topic: ipgate on - why does it not work?  (Read 1509 times)

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 21
  • Posts: 434
    • View Profile
ipgate on - why does it not work?
« on: December 10, 2016, 12:58:28 pm »
I ever thought it's enough to set ipgate on and OS/2 would route TCP/IP trafic from one interface to the other. I've now a system set up with 2 Intel NICs. One is setup to 10.0.0.x net the other is 192.168.1.202. From another machine in the 192.168.1.x net which has setup default gateway to 192.168.1.202 I wanted to ping the host 10.0.0.138. But the machine with the two NICs does not route between the 2 nets.

Can someone enlighten me what's wrong?

Andreas Schnellbacher

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 24
  • Posts: 433
    • View Profile
Re: ipgate on - why does it not work?
« Reply #1 on: December 10, 2016, 08:03:20 pm »
Most likely you have to add a route on the other machine into the 10.0.0 net.

Maybe the 2-NICs system routes requests to the router, which you have defined as your default route destiny. That's just guesswork. Posting both setup.cmds should help.
« Last Edit: December 10, 2016, 08:11:46 pm by Andreas Schnellbacher »

Andreas Kohl

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 12
  • Posts: 280
    • View Profile
    • warpserver.de
Re: ipgate on - why does it not work?
« Reply #2 on: December 10, 2016, 10:16:09 pm »
It's a good idea to check all interfaces on every host using "netstat -n".

The next step would be to watch at the routing tables with "netstat -r".

It depends how the hosts will receive their routing information. It could be via local setup of static routes (the mentioned ROUTE command in SETUP.CMD), that's also similar in most cases to configuration via DHCP or BOOTP. So when using DHCP the routing informaton about static routes from the server needs to be updated and every DHCP client has to renew its lease.
Manually it's possible to run: "route add -net 10.0 your-router -netmask 255.0.0.0 -hopcount 2"

Otherwise  RDISC or ROUTED can facilitate more dynamic routing demands. Redbook SG24-4730-00 could be more helpful in such situations than documents from TCP/IP's information folder.

Andi B.

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 21
  • Posts: 434
    • View Profile
Re: ipgate on - why does it not work?
« Reply #3 on: December 11, 2016, 11:00:20 am »
Thanks. I've to test some things and think about. Will take some time.

Ian Manners

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 37
  • -Receive: 26
  • Posts: 320
  • I am the computer, it is me.
    • View Profile
    • ComKal Networks Australia
Re: ipgate on - why does it not work?
« Reply #4 on: December 11, 2016, 12:09:15 pm »
Hi Andi,

Think of it as a road interchange, the car/packet needs to know which road/route to take to get to its
destination, and the destination needs to know what road/route to take to send the car/packet back to its
starting point.

Draw a diagram with your computer/modem/router etc on it, with a line connecting the route you wish to
take. Each device needs to know where the next hop is, don't worry about where the box/pc/next hop is
after the immediate next hop is.

The computer with two NIC's installed will need both interfaces setup, and a routing object setup so the computer knows
that any packets not addressed to itself should be instead forwarded to the next hop.

An example x:\mptn\bin\setup.cmd looks like

route -fh
arp -f
ifconfig lo 127.0.0.1
ifconfig lan0 192.168.1.1 netmask 255.255.255.0 metric 0 mtu 1500
ifconfig lan1 10.0.0.2 netmask 255.255.255.0 metric 0 mtu 1500
route add default 10.0.0.1 netmask 255.255.255.255 -hopcount 1
inetcfg -s all
ipgate on


If you enter 'route' at the command line by itself it will give you plenty of ways to spend hours being totally non productive but learning much :)

In the above setup.cmd file,
"route add default 10.0.0.1 netmask 255.255.255.255 -hopcount 1"
tells that computer that all other traffic should be sent to the address 10.0.01 by default.
10.0.0.1 is the next 'hop', or next computer/router/modem in the chain that data is sent to from this computer which has 10.0.0.2 as its interface to the 10.0.0.x subnet.

If you do not use x:\mptn\etc\inetcfg.ini then remove the line "inetcfg -s all"
Cheers
Ian B Manners