[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Network configs
> Since NICs, and hubs and all that is favour of the moment, could someone
> tell me if this is possible:
>
> 5 machines all on hub, plus one machine with two NICs, one to hub, and
> one to a sixth machine.
> Can I access machine #6 from any machine, or would I have to log into
> machine #5 to get access to machine #6?
>
> Cheers.
>
> Baz.
On the machine with two cards, ensure there is a good routing table for both
networks, then on all the other machines, make sure their routing tables are
good. :) It's just basic routing ...
For example, say you had this config (assume netmask is 255.255.255.0):
+----+
[192.168.1.1]----| |
| H |
[192.168.1.2]----| | eth0 eth1
| U |--[192.168.1.5 & 192.168.2.1]--[192.168.2.2]
[192.168.1.3]----| |
| B |
[192.168.1.4]----| |
+----+
Each machine is in square brackets :)
All you need is...
* in 192.168.1.1,2,3 and 4 a route that says "all traffic
for 192.168.2.2 to go via 192.168.1.5".
ie,
route add -host 192.168.2.2 netmask 255.255.255.0 gw 192.168.1.5
or
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.5
* in 192.168.2.2 a route that says all traffic for 192.168.1.0/24 to
go via 192.168.2.1...ie,
route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.1
* in the gateway machine, two routes to manage the routing between each
network, which Linux usually sets up every time you config the
the network card, but for completeness:
route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0
route add -net 192.168.2.0 netmask 255.255.255.0 dev eth1
Simple routing :)
Chris...
--
Chris Johnson \ "If not for me then, do it for yourself. If not
sixie@nccnet.co.uk \ for then do it for the world." -- Stevie Nicks
www.nccnet.co.uk/~sixie/ ~---------------------------------------+
Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000 \______
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.