LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-03-2006, 09:14 PM   #1
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Rep: Reputation: 45
what should be the topolgy using modem and switch to give net access to 2 machines ?


Hello all,
i've two machines at my home. One desktop and one laptop.
I've ethernet modem.
No hub/switch/router.
My desktop is somewhat working as router. It has two NIC, one for Modem and 2nd one for loacal lan (to connect with laptop).

Internet------>Modem------->Desktop-------->Laptop

So when ever laptop has to access the net, desktop should be on.
I want to get rid of this problem.
So i thought of buying a switch (router is out of my budget).
Now the idea which is in mind is:

Internet------->Modem------->Switch-------->both machines.

So that my desktop need not be on for laptop to access the net.
This topology seems to be feasible but what should be the configuration.
I haven't used switch ever. So don't know on which port of it should the modem and machines be connected ???

Suppose one machine boots up and get connected to the net running "#pppoe-start", how will the second machine get net access when it boots up ??? Same are the questions for windows XP platform.

regards
 
Old 12-03-2006, 10:17 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You still need a NAT router.
 
Old 12-03-2006, 10:24 PM   #3
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by Simon Bridge
You still need a NAT router.
ok..ok, NAT b'coz i get only 1 public IP address from my ISP and i've two machines in my loacl lan.
means no other alternative using switch only (obviously of layer two only )
same would be the case with windows...

regards
 
Old 12-03-2006, 10:40 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
http://tech.groups.yahoo.com/group/ilug-indore/
One of these guys may be able to help you find a second-hand router - some may even have one in a cupboard somewhere...
 
Old 12-05-2006, 11:30 PM   #5
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by Simon Bridge
You still need a NAT router.
ok that day i was convinced with your advice...but few more doubts now.
I don't have any router in my premises. Initially it was a dial-up connection on phone line. Months back it was upgraded to ADSL on the same phone line. So i've ADSL modem now.
Who is doing NAT now ??? This modem or my Desktop machine ???
And if its modem, then why not the topology which i'm thinking of is possible ???


regards
 
Old 12-07-2006, 12:49 AM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
So i've ADSL modem now.
Who is doing NAT now ??? This modem or my Desktop machine ???
From your previous setup, you have an ethernet modem plugged into one nic of a desktop computer. You share this connection with a laptop, by plugging the laptop nic into another nic on the desktop.

In this configuration, the desktop is called a "gateway" - it does the routing.

adsl---(eth1--desktop--eth0)---(eth0--laptop)

Quote:
then why not the topology which i'm thinking of is possible
... with the modem and both computers connected via a switch, how is the modem to tell where to send incoming packets? How do the the computers know where to send outgoing packets? (ie. how will they identify packets to the modem?)

Of course, if the modem can do network translation (maybe it has it's own local IP for eg?) then you can do this (the modem is also a router.) But check your modem documetation - modem/routers usually have at least four ethernet ports, but it is not impossible for a modem and router to be packaged together without a switch.
 
Old 12-07-2006, 07:46 AM   #7
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by Simon Bridge
Of course, if the modem can do network translation (maybe it has it's own local IP for eg?) then you can do this (the modem is also a router.) But check your modem documetation - modem/routers usually have at least four ethernet ports, but it is not impossible for a modem and router to be packaged together without a switch.
Ya, my modem has its local IP and i can configure it through my browser
http://192.168.1.1
so will it do NAT ???



regards
 
Old 12-07-2006, 12:57 PM   #8
AlbinoJap
Member
 
Registered: Mar 2004
Posts: 36

Rep: Reputation: 15
What's the IP on your machine. If your machine has a private address, then your modem is most likely a DSL router. In that case you should be able to put the switch after the modem and then give your laptop a private address on the same subnet.
 
Old 12-07-2006, 08:26 PM   #9
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by AlbinoJap
What's the IP on your machine. If your machine has a private address, then your modem is most likely a DSL router. In that case you should be able to put the switch after the modem and then give your laptop a private address on the same subnet.
modem(192.168.1.1)------>(192.168.1.2)DESKTOP(192.168.0.1)------>(192.168.0.2)Laptop

regards
 
Old 12-07-2006, 08:33 PM   #10
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Then your modem is a router - congratulations. Go ahead and get the switch. Plug the modem and both computers into the switch. You should be fine.

If your modem can be configured to act as a DHCP server - (192.168.1.2 was set by the modem instead of you) then this is all you need to do - otherwise you'll have to tell your computers that 192.168.1.1 is the gateway.
 
Old 12-07-2006, 09:21 PM   #11
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by Simon Bridge
Then your modem is a router - congratulations. Go ahead and get the switch. Plug the modem and both computers into the switch. You should be fine.

If your modem can be configured to act as a DHCP server - (192.168.1.2 was set by the modem instead of you) then this is all you need to do - otherwise you'll have to tell your computers that 192.168.1.1 is the gateway.

Thanks a lot to Simon Bridge and AlbinoJap !!!
and ya, you are absolutly right that 192.168.1.2 was assigned to my desktop by modem only, i didn't configured it.

would like to request you one thing Simon, if possible, conclude this post by giving brief discription about the properties/behavior/configuration of such kinda modems (which are actually DSL router) i.e what make them work as router, how they could be recognized as a router etc etc...

thanks once again...
 
Old 12-08-2006, 04:39 AM   #12
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Well, considering this mdem is also a router, it is a surprise that there is only one ethernet port in it (?) Double check this will you? (Most modem/routers are sold with four ethernet ports as well. If yours is like this, then you can plug up to four computers into it and they can all ose the modem.)

If not, never mind. Just plug all the computers and the modem into the switch. Configure the nics to DHCP, and activate them. Bob's your uncle!

You can probably log in to the modem by http - use a web browser to go to 192.168.1.1 and see what happens.
 
Old 12-08-2006, 06:10 AM   #13
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Original Poster
Rep: Reputation: 45
Quote:
Originally Posted by Simon Bridge
Well, considering this mdem is also a router, it is a surprise that there is only one ethernet port in it (?) Double check this will you?
It has one ethernet port only...
 
  


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
can I set up ethernet between two machines without a hub or switch? Simon Bridge Linux - Networking 13 05-20-2005 02:29 AM
WinXP give me some net access BACompTech Linux - Networking 2 09-22-2004 02:30 PM
Give people a real reason to switch to LINUX jaz General 21 05-04-2004 10:54 PM
Port Forwarding w/2 Machines & 1 Switch TastyWheat Linux - Networking 0 02-27-2004 12:02 AM
This is my topolgy. Do you guys think I am secure???? ForumKid Linux - Security 9 02-02-2002 05:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:23 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