Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Like Tree2Likes
Hello All I was wondering if anyone could tell me how to setup a LAN with a switch. I was going to buy one since they are on sale. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Oct 2011
    Location
    Staten Island, New York
    Posts
    102

    Question Lan


    Hello All
    I was wondering if anyone could tell me how to setup a LAN with a switch. I was going to buy one since they are on sale. I have three computers I would like to connect to a LAN. Will I need a server to do this or not. I don't have any knowledge of this at all and am a newbie. Instructions will have to specific.
    Thank you in advance for any help.
    Montana68:

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    No, there is nothing magic you need to do to create a LAN. No special LAN server is required either. Creating a LAN is simply the act of networking two or more computers together, one way or another. In your case, it sounds like you will be networking them over CAT5 ethernet. Another common option is wireless (802.11x).

    To start, you'll need to put your 3 computers on the same subnet, e.g.:

    pc1: 192.168.1.101
    pc2: 192.168.1.102
    pc3: 192.168.1.103

    Give them all the same netmask: 255.255.255.0

    Then connect all three of them to the LAN via CAT5 cabling. That is pretty much it. Start pinging.

    If you want them to access the internet, protect them with a firewall, host a webserver, etc. provide more detail.

    Note that the switch itself may have a firewall itself (and other features: DHCP server, port-forwarding, etc.), if it is also a router. What type of switch is it?
    ptkobe and vishalyadav1313 like this.

  3. #3
    Linux Newbie
    Join Date
    Oct 2011
    Location
    Staten Island, New York
    Posts
    102
    Hello atreyu
    Thank you for answering my post.
    The switch that I'm thinking about buying is Rosewill RC-406x Switch 10/100 Mbps 8x RJ45.
    What is DHCP?
    Yes I'll be using Cat5 ethernet. I don't have wireless at home. I don't know how to enter the subnet mask numbers. Do I just make up number like the ones you showed with the last three being different but in numerical order? I also don't know where to enter the netmask numbers either.
    So if you could give me the directions as simple as possible it would be greatly appreciated.
    Thank you for your help.

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Look for Ubuntu networking guide relevant to your version of your distro.

    Here is one example.

    DHCP (Dynamic Host Configuration Protocol) means that the ip address and netmask (and possibly gateway, DNS, and other TCP/IP settings) are getting assigned to DHCP clients automatically. The opposite of that is static configuration. Your switch probably does not have DHCP server so go ahead with static assignment.

    You can use a GUI to do it, or the command line. I'd recommend doing both: use the GUI to get the job done, then look at the config files they modify and see how to do it by hand - it is dead easy. I think the Ubuntu/Debian networking is in /etc/network/interfaces.

    Do not make up the netmask, just use 255.255.255.0 for now, until you better understand network subnet masking. You'll put the ip address, subnet mask, gateway info all in that network config file.

  5. #5
    Linux Newbie
    Join Date
    Oct 2011
    Location
    Staten Island, New York
    Posts
    102
    Thank you again for answering.
    I don't know how to use the GUI for this I could use the terminal given the correct commands. Actually I don't know how to use GUI to do anything. I will look on the site that you gave me the address for and see If it will be possible for me to do it. If I have any problems I'll come back here for some more help.
    Have a good Thanksgiving if you celebrate that holiday.
    Thank you for your help.

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    It is pretty simple from the command line.

    1. open a Terminal window (probably found in your Applications menu or whatever)

    2. edit the config file (using sudo i think for Ubuntu), e.g.:

    Code:
    sudo gedit /etc/network/interfaces
    3. add your IP settings, e.g.:

    Code:
    auto eth0
    iface eth0 inet static
    address 192.168.1.101
    netmask 255.255.255.0
    4. save and quit the editor (gedit)

    5. reboot, or restart networking, e.g.:

    Code:
    sudo /etc/init.d/networking restart
    I do celebrate Thanksgiving, so thanks and the same to you!

  7. #7
    Linux Newbie
    Join Date
    Oct 2011
    Location
    Staten Island, New York
    Posts
    102
    I was just wondering if any of the things I would do to set up the LAN would affect my wireless or modem setup?
    Thank you.

  8. #8
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    If one of those 3 machines is running the wireless and/or accessing the modem, then yes.

    If you are concerned, post more details about your physical setup.

  9. #9
    Linux Newbie
    Join Date
    Oct 2011
    Location
    Staten Island, New York
    Posts
    102
    So if I'm not on line or trying to get on line when I'm setting up nothing should happen.
    As for the setup I have not done it yet and not purchased a switch yet. I was just looking at one because it is on sale for like $10.00. I'm trying to hook up the computer so that I could use the printer for all of them with disconnecting them and also get on line with them all with installing the driver for them all if that is possible.

  10. #10
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    What kind of modem is it? A USB cable modem or an ADSL modem or an old-school phone-line modem or what?

    Yeah, sharing a printer is a great reason for setting up a LAN. If your modem connects directly to one of your PCs via phone-line, then you might have to make it a router, so that the other two can utilize it as their gateway.

    If however, you have a stand-alone cable modem, then you just plug all 3 PCs into it (w/CAT5 cable) and set it as your default gateway (either statically or via DHCP). Again, this depends on what exactly is your type of modem.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •