"mark" <(E-Mail Removed)> wrote in news:1159909811.784976.178010
@e3g2000cwe.googlegroups.com:
> Hello,
>
> Unfortunately I cannot change these IP addresses (it is all about
> topology generation and assigning them to virtual linuxes, so it won't
> be so easy.
Then it cannot possibly work. In your original picture you had deb2 with
two different interfaces that had addresses in the same subnet that doesn't
make any sense at all unless both interfaces were physically connected to
the same Lan in which case the whole excercise is moot.
> The numeration goes like 10.0.host.port).
That would only work if all hosts are on the same Lan and the subnet
encompasses all possible values of 'host'. The the subnet would have to be
at least sixteen bits wide. ie. 10.0.0.0/16 (i.e mask 255.255.0.0)
> The specification you gave me doesn't work
. I am trying with route
> command but still no success... Could you help me out how to set these
> routes for these three workstations so that I could understand it and
> extend to more workstations).
The bottom line is that devices can only talk directly to devices that are
in the same subnets - to get outside of that the local subnet you need a
route to a machine (gateway) that connects to a different subnet (or nets).
e.g
subnet1 10.0.1.0/24 (i.e an eight bit wide subnet, mask 255.255.255.0)
subnet2 10.0.2.0/24 (i.e an eight bit wide subnet, mask 255.255.255.0)
(PC1 10.0.1.1/24 ) -- (10.0.1.2/24 PC2 10.0.2.5/24) -- (10.0.2.20/24 PC3)
PC1 can talk to PC2 by virtue of subnet 10.0.1.0/24 being directly
connected to both. Ditto PC2 to PC3 with respect to subnet 10.0.2.0/24).
For PC1 to talk to PC3, You need to have a static route on PC1 that tells
it how to get to the subnet that PC3 lives on. There are two ways to do
this. You could have a route on PC1 like this:
route add to 10.0.2.20/24 via 10.0.1.2 protocol static
or
route add to 0.0.0.0/0 via 10.0.1.2 proctocol static
This second route is what is known as the default gateway. Basically
anything that PC1 doesn't know how to get to via a specific route is
handled by this catch all route.
Once the packet arrives at 10.0.1.2 (PC2), it already knows how to get to
PC3 because it is on a directly connected subnet. When PC3 gets the packet
and wants to respond to it, you now have the opposite problem - it needs a
route to tell it how to get back to PC1 i.e on PC3 you need a route like:
route add to 10.0.1.0/24 via 10.0.2.5 protocol static
Klazmon.
>
> Thank you in advance, mark
>
>