[Gllug] Connecting a second Ethernet link (1 Gbps) between two servers

Matthew King matthew.king at monnsta.net
Sun Jan 20 19:24:58 UTC 2008


John Winters <john at sinodun.org.uk> writes:

> At home I have a 100 mbit Ethernet network with various things connected 
> to it all over the place.
>
> I've just realised that my two servers (one a file server and the other 
> of which does some fairly compute-intensive processing) each have two 1 
> Gbps Ethernet ports, so I could connect them together directly with a 
> crossover lead.  I might want to do this, because the compute server 
> wants to be able to do quite a lot of filing as well.
>
> What's the most sensible way to do it?  My first thought is simply to 
> give each end of the new connection a new IP address, but then I foresee 
> endless fiddling to make sure that when one accesses the other it uses 
> the right address for the fast connection.
>
> Is there a simpler way of doing this, which will ensure that all traffic 
> between the two servers uses the 1 Gbps direct link, whilst all other 
> traffic to or from them goes over the general network?

It is possible to give both eth0 and eth1 on each machine the same IP,
eg. 10.0.0.10 and 10.0.0.20, regular default route 10.0.0.1 on
eth0. Then you can:

A:
ifconfig eth0 up 10.0.0.10 netmask 255.255.255.0
ifconfig eth1 up 10.0.0.10 netmask 255.255.255.255
route add -host 10.0.0.20 dev eth1
route add -net default gw 10.0.0.1 dev eth0

B:
ifconfig eth0 up 10.0.0.20 netmask 255.255.255.0
ifconfig eth1 up 10.0.0.20 netmask 255.255.255.255
route add -host 10.0.0.10 dev eth1
route add -net default gw 10.0.0.1 dev eth0

Addresses etc. configured to your taste.

Your network setup software can probably do most of this for you. eg. In
Debian/Ubuntu you can use post-up options per interface stanza.


I am not saying this is the best way to do this, just that it is
possible. It does mean you don't have to go anywhere near the DNS.

Matthew

-- 
I must take issue with the term "a mere child", for it has been my
invariable experience that the company of a mere child is infinitely
preferable to that of a mere adult.
                                           --  Fran Lebowitz
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list