what should be the topolgy using modem and switch to give net access to 2 machines ?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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:
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.
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...
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 ???
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.
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 ???
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.
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.
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.
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...
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.