LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-03-2005, 06:41 PM   #1
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Rep: Reputation: 30
internet connection sharing


Hello

After reading a lot about networking, I am overwhelmed, I just have a problem that I am not able to apply all what I learned to solve, I guess I donít know where to start and how.

I just received a adsl from the phone company who helped me to set it up on my w2k system. Now I am on my own, I need to set it so that I can also brows from my desktop which is debian testing/unstable kernel 2.6.13

He adsl modem which is also a router and a firewall according to the manual, has 2 outputs, Ethernet output going to my w2k network card and usb output which is going to my debian box.

W2k box
One network card
2 usb connections

Debian box
One network card
2 usb connections

connection:
I have a choice, either to use debian to connect to the internet and use a cross over cable to the w2k, or to connect both boxes to the modem/router, w2k on Ethernet and debian on usb.
Which is better for me?
I need to be able to physically remove the w2k ďlaptopĒ and take it away to work and when I return home, plug it and surf.
For security, would it not be better if I use the modem/router and connect both to it so that I have 3 different firewall, one on each node?
If I use one as a gateway to serve web to the other, would not be slowing things down because of un-necessary bottle neck on speed of transfer and load sharing issues?

The last issue is, if I cross over between the boxes then I can move files from w2k to debian which is some what needed by me.
I guess it is better for that last need, to use cross over cable and debian as gateway, what do you think?

I guess after this point is solved, then how do I go about setting it up?


Thanks
 
Old 11-03-2005, 08:37 PM   #2
mraray
Member
 
Registered: Sep 2005
Posts: 49

Rep: Reputation: 15
Hi,

Since the modem is also a router, you should purchase a switch (you can get a small, 5 port ethernet switch for cheap...). And then plug both machines into the switch (and then the switch into the router).


I hope this helps

A.
 
Old 11-03-2005, 09:32 PM   #3
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by mraray
Hi,

Since the modem is also a router, you should purchase a switch (you can get a small, 5 port ethernet switch for cheap...). And then plug both machines into the switch (and then the switch into the router).


I hope this helps

A.
and how does that answer my concerns?
 
Old 11-03-2005, 10:03 PM   #4
mraray
Member
 
Registered: Sep 2005
Posts: 49

Rep: Reputation: 15
You don't understand my answer? Or you think that I have missed the point?
 
Old 11-03-2005, 10:26 PM   #5
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Original Poster
Rep: Reputation: 30
I understand what you said but don't understand what it would do.
 
Old 11-03-2005, 10:33 PM   #6
mraray
Member
 
Registered: Sep 2005
Posts: 49

Rep: Reputation: 15
Ahh,

okay....

Reasons for having a switch:
1) I haven't heard of the router supporting both USB and ethernet at the same time
2) It is good to have a seperate device connecting you to the internet (use your modem as router as well).
3) USB for Ethernet (on any OS) is a bad idea (I haven't seen it working well consistantly well on either linux or windows)
4) I don't suggest connecting your windows machine directly to the internet.


In my opinion, the best approach would be to:
1) Purchase a 5 port switch (about $20-$30 $USD)

2) Give each device a unique IP in the same subnet - eg
a) The router: 192.168.0.1
b) the debian machine: 192.168.0.10
c) The windows machine: 192.168.0.11

Use the subnet 255.255.255.0 for all of them

Purchase 3 normal (straight-through) ethernet cables.
Connect all the devices to the switch.

Does that help?


Cheers,
Andrew
 
Old 11-03-2005, 10:45 PM   #7
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by mraray
Ahh,

okay....

Reasons for having a switch:
1) I haven't heard of the router supporting both USB and ethernet at the same time
...
3) USB for Ethernet (on any OS) is a bad idea (I haven't seen it working well consistantly well on either linux or windows)
...
2) Give each device a unique IP in the same subnet - eg
...
Does that help?


Cheers,
Andrew
yes, thanks alot, it helps, now I understand, but a question or 2.
I just called the phone company and they confirmed that it is a USB and ethernet router and I can use both boxes connected at the same time.

in (3), what do you mean by USB for Ethernet?

in (2), the switch does not get an IP address, correct?

I was just on ebay, looking for Ethernet switches, I donít know what to look for, what should be looking for to have/avoid in a switch,
From what I read on ebay Australia, things like
(
star topology
6 x 10/100M RJ-45 port (One Uplink)
10/100M auto-negotiation, maximum speed to 20/200M (full -duplex)
Supports IEEE802.3x full-duplex flow control and back pressure half-duplex flow control
Supports MAC self- learning
Full/ Half duplex for each port
Operating at maximum acket filtering and forwarding rate
Supports and store-and-forward of packet switching
Supports and Extra MDI-II connector for easy expansion
Compact design for SOHO applications, external AC power adapter
Comprehensive LED indications for port status indication
Flow control for both half duplex and full duplex mode
)

is this good.
Thanks


Last edited by ekdya; 11-03-2005 at 10:56 PM.
 
Old 11-03-2005, 10:59 PM   #8
mraray
Member
 
Registered: Sep 2005
Posts: 49

Rep: Reputation: 15
Yes, unless you purchase a managed (expensive) switch, you do not need to set an IP on the switch

by "USB for Ethernet" I mean running ethernet frames over a USB device. (maybe I should have termed it "Ethernet over USB" if that makes more sense?). I work for an ISP, and we have nothing but headaches with these types of devices. Even when installed by experienced users there are often still problems


I am surprised that you can use both the USB and ethernet connections at the same time. Personally I would still put a switch inbetween and just use ethernet (save any head-aches)



Cheers,
Andrew.
 
Old 11-03-2005, 10:59 PM   #9
kmoffat
Member
 
Registered: Jul 2003
Location: near Seattle
Distribution: Debian/Ubuntu/Suse
Posts: 240
Blog Entries: 2

Rep: Reputation: 30
That is the setup I have. An Actiontec dsl modem/router with a linksys switch/router and 3 computers, 2 linux and one windows. Works very well. The usb connection is said to be slower than ethernet. Your other option is wireless. Do you have the modem with wireless built in? if so, you can use ethernet to one computer and wireless to the other, thus avoiding the need for a switch.
 
Old 11-03-2005, 11:11 PM   #10
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Original Poster
Rep: Reputation: 30
So connecting the modem to the switch will populate the whole switch with live web single, and any computer connects to the switch via the Ethernet will have this web feed coming in, now, how do I set up windows and linux, currently w2k box is working with modem/router on Ethernet interface, so would that still work after the switch is here? If so, good, now what about the debian box? I donít have any experience on setting up dhcp even though I read so much about it in the last few days to get this fixed.

Thanks

Ps. Any advice on what switch or any would do?

Thanks
 
Old 11-03-2005, 11:15 PM   #11
kmoffat
Member
 
Registered: Jul 2003
Location: near Seattle
Distribution: Debian/Ubuntu/Suse
Posts: 240
Blog Entries: 2

Rep: Reputation: 30
I use a linksys befs841, which is several years old, and cost about $60 new then. It is a router/switch. I don't know about simple switches.
My modem is set to emulate my old Cisco modem, so has no ip address. The Linksys has the ip and dns settings.
 
Old 11-04-2005, 03:48 AM   #12
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
The "switch" -approach would probably save you a lot of headache, but if you don't want to spend that $20 then this is what I'd do:

Solution 1:
--------------

Plug the Win2k to the USB port of the router/modem
Plug the Debian to the Ethernet port of the router/modem

There _WILL_ be drivers for Win2k for connecting to the modem through USB. I doubt you will get the USB connection to work with your Linux.

Solution 2:
--------------

Plug the Debian into the Ethernet port of the router/modem
Plug the Win2k into another network controller in the Debian computer

Install ipmasq (a forwarding firewall) with "apt-get install ipmasq". That will take care of internet connection sharing.

Make sure that the internal network adapter has a IP address (for example 192.168.0.1). See "man interfaces" and /etc/network/interfaces for more info. External network adapter - the one connected to the router/modem - should get IP information with DHCP.

In Win2k, make sure that DHCP is not used. Set the gateway to abovementioned 192.168.0.1 (or whatever you chose), and give the network controller another IP in the same subnet (maybe 192.168.0.2). Subnet should be 255.255.255.0

You could also try installing "dhcpd", but if your modem is a simple "bridge" then you might run into trouble: by default the dhcpd might listen on the external interface also, serving requests from the internet. Your ISP _will not like this_.

Last edited by basileus; 11-04-2005 at 03:52 AM.
 
Old 11-04-2005, 04:08 AM   #13
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Original Poster
Rep: Reputation: 30
I will get the switch, I just don't know what I need to know to get a switch, it looks like there are different switches with different capabilities as fare as configuration and ease of setting things up, as well as other things "probably", any idea on what to get will be helpful. thanks
 
Old 11-05-2005, 02:00 AM   #14
ekdya
Member
 
Registered: Oct 2003
Posts: 280

Original Poster
Rep: Reputation: 30
ok, I have the switch working good, the modem connected to the phone line, the switch is connected to the modem and the w2k box and the debian box, w2k brows good, but debian can not brows, how do I start? I know I have dhcp packages all installed on my debian box.
 
Old 11-05-2005, 05:39 AM   #15
mraray
Member
 
Registered: Sep 2005
Posts: 49

Rep: Reputation: 15
Hi,

Sorry for the delay in reply (end of year exams at university)

Steps to test:

1) Can you ping the other devices on your network? (you might have an ip address already, just not a default route).
eg ping 192.168.0.1

2) You can try using dhclient

eg

dhclient eth0

(where eth0 is the interface)

there is also an article here
http://www.debian-administration.org/articles/210

About setting your IP (it might help)


Cheers,
Andrew
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Connection Sharing explorer Mandriva 1 03-17-2005 06:25 PM
Internet connection sharing mark_booze Linux - Newbie 22 01-02-2004 12:37 AM
internet connection sharing Sathe Linux - Newbie 4 12-05-2001 08:59 PM
internet connection sharing Danobri Linux - Networking 14 07-21-2001 11:50 PM
Internet Connection Sharing qsilver Linux - Networking 1 07-19-2001 01:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration