Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
2 networks on my laptop?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 803

PostPosted: Mon Sep 17, 2012 8:04 pm    Post subject: 2 networks on my laptop? Reply with quote

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?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32452
Location: 56N 3W

PostPosted: Mon Sep 17, 2012 8:16 pm    Post subject: Reply with quote

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)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 803

PostPosted: Tue Sep 18, 2012 5:41 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 4105
Location: USA

PostPosted: Tue Sep 18, 2012 7:14 am    Post subject: Reply with quote

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.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32452
Location: 56N 3W

PostPosted: Tue Sep 18, 2012 5:45 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum