# 2 networks on my laptop?

## grant123

I have my laptop set up as a router so I can share my internet connection with my wife's laptop with a pair of USB ethernet dongles.  There is a desktop I'd like to be able to ssh into via ethernet from my laptop but I don't need to share my internet connection with it.  I have a third ethernet dongle for this and the desktop has built-in ethernet.  How should I configure the connection to the desktop?

----------

## NeddySeagoon

grant123,

The easy answer is not to use the 3rd USB dongle - use a switch and plug the 3 devices on your local area newtwork into the switch.

Do not allow the desktop a default route if you don't want it on the internet.

Other answers depend on your laprop router setup and the operating systems on your wifes PC and the desktop CP.

You can have three point to point links from the router but the idea makes my head hurt.

Does the router run a dhcp server or is your network entirely static.  Even worse, so you use zeroconf (link local addresses)

----------

## grant123

I actually got it working by starting /etc/init.d/net.eth1 on my laptop, /etc/init.d/net.eth0 on the desktop, and adding a line for eth1 to /etc/shorewall/interfaces.  I can share my internet connection with the desktop by adding a line to /etc/shorewall/masq.

This was really too easy so I'm wondering what I might have overlooked?

----------

## eccerr0r

I was about to say...  I always had troubles like this when I was at school, had all these things and theoretically we could make a network out of them... with the added contraint without buying anything else.

Like for instance I had a 10base2 computer and a 10baseT network.  Well I had another 10base2 card for the other machine I had and theoretically I could bridge the machines together...

I'd say this is almost the same kind of problem.  While since you just need to access that one machine once in a while, and that one machine does not need to access out, this simplifies things a lot.  The only thing I'd have to say is watch out for your udev autoconfig for eth0 and eth1 - though it should keep them the same each time you plug in a specific ethernet adaptor.  If you lose the udev autoconfig you may lose connectivity between the machines when they confuse one for the other...

Otherwise I don't think there are many other issues.  But it only gets fun when you want all three machines have internet access and have all three machines able to connect to each other seamlessly...

And yes, after being out of school for over a decade, I end up buying the switch now.

----------

## NeddySeagoon

grant123,

Ah well, buy the switch next time you add to your network.  Its lower cost than another USB dongle.

Maybe I've been out of school too long too.

----------

