[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to connect two PC's with a cross-over ethernet cable?



On Sat, 2004-08-21 at 22:37, Jon Dowland wrote:
> On Sat, 21 Aug 2004 11:06:27 +0200, Bram Merte
> > I have a cross-over ethernet-cable and I would like to be able to
> > configure both computers so I can switch between the current setup and
> > the necessary configuration to transfer files across the cross-over
> > ethernet cable.
> 
> I am presuming that you want to use the same interface for this
> specific purpose as one which is already employed for some other
> purpose currently.

Indeed, both my desktop and my laptop currently contain an ethernet-card
which I connect to my DSL-modem in order to access the net.  I want to
connect these two ethernet cards with each other using the cross-over
cable.

> > How do I know which files contain the current configuration?
> 
> /etc/network/interfaces contains the network configurations

I assume you are experiencing some delays on this list, I posted my
/etc/network/interfaces* files a couple of minutes ago.

> > How do I configure my laptop to be able to use the cross-over
> > connection?
> 
> An entry like the following would do
> 
> iface eth0 inet static
>         address 192.168.3.1 
>         netmask 255.255.255.0

Thanks its reassuring to see the same solution posted by two different
persons!

> ..but presumably would need to replace an existing entry for your
> current use. Switching manually between the two is possible by
> commenting out one of them and issuing /etc/init.d/networking restart.
> However that is a fairly longwinded approach.

At the moment /etc/network/interfaces contains an entry like:
iface eth0 inet dhcp

Will I have to switch between this line and the lines you suggested (and
issue the restart command you mentioned) or can I use my PPPoE
configuration with the above lines as well?

> A better solution is to use logical interface names aka interface
> aliasing. The details are described in manpage interfaces(5) ; the
> mapping 'eth0-home' would probably be what you wanted for transfers,
> and 'eth0-work' for normal usage (or whatever you currently have).

So you would suggest the following /etc/network/interfaces:
auto lo eth0

iface lo inet loopback

iface eth0-lan inet static
        192.168.3.1
        255.255.255.0

iface eth0-wan inet dhcp

> Sorry I can't be more precice about the mechanics here because I
> haven't used it personally, but I think this is probably the simplest
> approach which doesn't involve spending more money.

Can you tell me if this would require additional changes to my PPPoE
config?

I can't seem to find how pppd starts the connection.  (I mean I can't
figure out wheter or not it calls ifup.)

TIA
-- 
# Mertens Bram "M8ram"   <bram-mertens@linux.be>   Linux User #349737 #
# SuSE Linux 8.2 (i586)     kernel 2.4.20-4GB      i686     512MB RAM #
# 11:01pm  up 14 days 12:51,  12 users,  load average: 0.20, 0.39, 0.32 #



Reply to: