OS/2, eCS & ArcaOS - Technical > Networking

Subnets routing?

(1/2) > >>

gamba:
Hi all,

my home OS/2 server has three network interfaces. Currently I'm using just two of them, with Injoy in the middle acting as firewall and providing NAT for the LAN.

I would like now to use the third network interfaces to create a second LAN where I would confine the increasing number of "Internet Of Things" devices around.

Unfortunately, I know nothing about routing! With a setup.cmd file like this one:

route -fh
arp -f
ifconfig lo 127.0.0.1
ifconfig lan0 192.168.0.1 netmask 255.255.255.0 metric 1 mtu 1500   # existing LAN
dhcpstrt -i lan1 -d 0                                                                               # WAN
ifconfig lan2 192.168.2.1 netmask 255.255.255.0 metric 1 mtu 1500   # the hypothetical second LAN
inetcfg -s all
ipgate on

devices on lan0 would be effectively hidden from devices on lan2?

Thanks!
Gabriele

ak120:

--- Quote from: Gabriele on November 07, 2017, 02:27:13 pm ---Hi all,

my home OS/2 server has three network interfaces. Currently I'm using just two of them, with Injoy in the middle acting as firewall and providing NAT for the LAN.
--- End quote ---
I don't know about Injoy's features but I doubt that it can provide NAT for the LAN. But it can probably do for a subset of the IP networking stuff.


--- Quote ---I would like now to use the third network interfaces to create a second LAN where I would confine the increasing number of "Internet Of Things" devices around.
--- End quote ---
For a second (dedicated) LAN an additional physical network infrastructure etc. is required. Static routes will not help much. I don't know what you want to achieve? More reliability or higher theoretical bandwith? A working solution will require the analysis of the common network traffic and the used protocols. At the next step you should define some requirements or usage scenarios.

Dave Yeo:

--- Quote from: Andreas Kohl on November 07, 2017, 07:07:38 pm ---I don't know about Injoy's features but I doubt that it can provide NAT for the LAN. But it can probably do for a subset of the IP networking stuff.

--- End quote ---

Works fine here (the Injoy Dialer) for providing NAT for my LAN.

Ian Manners:
InJoy Firewall includes NAT, you can also run more than one copy to create two subnet's but this is something I've not done for over 10 years and have no idea if Bitwise works version allows that (including in it's license).

With your x:\mptn\bin\setup.cmd file, you can add other routes without problems even without using InJoy but once more this is something I am very rusty with as it's been so long.

route -fh
arp -f
ifconfig lo 127.0.0.1
ifconfig lan0 192.168.0.1 netmask 255.255.255.0
dhcpstrt -i lan1 -d 0
ifconfig lan2 192.168.2.1 netmask 255.255.255.0
route add default 10.0.0.1 netmask 255.255.255.255 -hopcount 1

experiment with:-
==> route add -net xxx.xxx.xxx.xx netmask 255.255.255.255 -hopcount 1
or
==>route add -host 192.168.2.1 10.0.0.2

ie, you need to add a route from your second network to where you want the packets to go, also, hmm, no idea how it works with DHCPd :o)
I would use static IP's as its easier to plan out on paper, then use InJoy's DHCPd module to hand out IP's if you need to for other devices.
Actually, come to think of it.. I think you can setup InJoy with a seperate range for it's DHCPd to the two static ranges ..


--- Quote ---devices on lan0 would be effectively hidden from devices on lan2?
--- End quote ---
Assuming your routing has been setup correctly then yes, devices on LAN2 can be hidden from LAN1 but remember this is only on the software layer. Unless it is required I would setup your internet modem/router with a second internal IP if it has more than one ethernet port and physically separate the networks. Depends on what you wish to do like monitor via InJoy's GUI etc.

Hope I'm not confusing you, I'm getting old :)

Lars:
Giving it a guess:

route add -net 192.168.0.0 netmask 255.255.255.0 192.168.2.1
route add -net 192.168.2.0 netmask 255.255.255.0 192.168.0.1

What the first line should should do is allowing to access network 192.168.0 via the gateway 192.168.2.1, that is access to whatever attaches to lan0 from lan2.
The second line works vice versa: it allows access to network 192.168.2 via the gateway 192.168.0.1, that is access to whatever attaches to lan2 from lan0.

If you want to get lan1 into play, I would assume that it is seen under gateway 10.0.0.1:
route add -net 192.168.0.0 netmask 255.255.255.0 10.0.0.1
route add -net 192.168.2.0 netmask 255.255.255.0 10.0.0.1

Navigation

[0] Message Index

[#] Next page

Go to full version