Re: How to access hosts in other subnet




Basically, you need to know HOW to reach them, i.e. which gateway/router
(see phisical connections) you have to contact; it must be a host with an
address 192.168.3.x and two network cards!

If you don't go to Internet from your Linux machine, perhaps
you have simply to change the gateway to the router LAN IP, and you'll have
both the access to Internet and to your private subnetworks.

Otherwise your gateway is OK and you'll have to setup static routes for
those destinations; so you can use your gateway for Internet Access again.

So, for example, if you can reach 192.168.4.10 via 192.168.3.50
set up a static route as root with
route add -host 192.168.4.10/32 gw 192.168.3.50

Again,
route add -host 192.168.5.11/32 gw 192.168.3.50
if the gateway is the same,

then
route add -host 192.168.10.12/32 gw 192.168.3.50
if the gateway is the same,

and to finish
route add -net 192.168.0.0/16 gw 192.168.3.50
if the gateway is the same.

If you need a permanent configuration you have to set up startup files
accordingly to your linux distribution for static routes in a similar
manner.

Regards
Dam

lovecreatesbea...@xxxxxxxxx wrote:

My Linux machine is assigned the following network setting:

address 192.168.3.101
gateway 192.168.3.101
netmask 255.255.255.0

But I need to access hosts reside in other subnetworks

address 192.168.4.10
address 192.168.5.11
address 192.168.10.12

(address 192.168.x.x etc.)

Before I assigned more IP adresses for my machine to access those
hosts. Can I use a proper netmask with only single IP address to do
so?

.



Relevant Pages

  • Re: VPN and remote gateway
    ... > It seems you use the wrong route add command. ... > when the VPN connection is established. ... > | using the remote network as my gateway. ...
    (microsoft.public.windows.server.sbs)
  • Re: confused routes with multiple nics
    ... Perhaps that 10.0.0.1 gateway leads to other subnets in the 10.0.0.0/8 ... There is a route to 129.200.32.0 - 129.200.32.63, ... Because these hosts are directly attached, ... The DNS servers have to know about ...
    (comp.os.linux.networking)
  • Re: confused routes with multiple nics
    ... dns 129.172.51.4 ... gateway 10.0.0.1 ... There is a route to 129.200.32.0 - 129.200.32.63, ... Because these hosts are directly attached, ...
    (comp.os.linux.networking)
  • Re: Persistent Route ignored on W2K when destination network is unavailable
    ... a global setting like the gateway to a particular subnet should be set ... this network access the internet via a NAT firewall (connected to ... via a WAN link. ... route on the Cisco firewall so that any traffic to the internet gets ...
    (microsoft.public.win2000.networking)
  • Re: AIX 1.3 Failures and Fables
    ... DESTINATION GATEWAY FLGS REFCNT USE INTERFACE ... Is my interpretation of the AIX 1.3 #man route correct? ... Manually manipulates the routing tables. ... Is the destination host or network. ...
    (comp.sys.ibm.ps2.hardware)