Find the answer to your Linux question:
Results 1 to 9 of 9
I'm looking for some basic intro material for setting up a home network. I've found several tutorials and how-to's, but none that really address my situation. For one thing, I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Location
    Ellicott City, MD
    Posts
    17

    need basic info for LAN configuration


    I'm looking for some basic intro material for setting up a home network. I've found several tutorials and how-to's, but none that really address my situation.

    For one thing, I have a router, so I don't need to know about setting up one machine as an internet gateway (most of the articles I've found are old enough that they assume people will have a hub or switch, and a dedicated gateway server).

    For another thing, I've configured the router to use DHCP to assign addresses to the three machines on this network, so precedures that assume fixed IP addresses get confusing. I'm not sure how to identify the various machines to each other if their addresses change. Of course, I could switch to static IP addresses, but I don't want to do that if the only reason is that I don't know how to work with DHCP, since I know that can be done.

    Also, I'm currently running Linux on the two machines that actually get used (the third is an old Win95 machine that is on its way to PC heaven, as soon as I retrieve some data from it). That means I don't really care about having Windows shares, so I don't necessarily have to use Samba (I think). Again, I don't mind using it, but I'd prefer not to be forced to do it because of my ignorance of a better way. I'd think getting two Linux boxes to talk to each other would be pretty simple, but I haven't been able to get there yet.

    I think all I need is some basic information, but I'm having a hard time finding it for some reason. Any suggestions?

    thanks,
    Bruce

  2. #2
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    The easiest way to configure is to work with fixed ip adresses. You can do that by setting up your dhcp server to assign a fixed number to a fixed machine which is identified by the mac adress of the nic.

    But you can do it without DHCP as well, no need to do anything with mac adresses then. You have to specify the gateway and dns server as well.

    If your router has the internal ip adress 192.168.1.1 you could assign 192.168.1.2 to your first machine, 192.168.1.3 to your second machine etc.
    They can use a netmask of 255.255.255.0 . The gateway will be 192.168.1.1 and the DNS will be the DNS of your provider.

    If you want to leave everything the way it is, you'll have to lookup the actual ip adress of the other machine(s) by typing ifconfig on a console. It will show you ip adress and mac adress too.

    If you want to copy data from your win95 machine, you could enable file and printsharing on that machine and connect through a machine which has samba installed. Configuration is not too complicated, it could be that specifying your interface and workgroup will be enough to access the win95 remotely.
    I\'m so tired .....
    #200472

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Location
    Ellicott City, MD
    Posts
    17
    Well, okay ... I had kind of figured that using static IP addresses would be simpler, but I'd be more comfortable if I made choice for a better reason than that I simply don't know how to do it otherwise.

    I might be a little prejudiced, since DHCP seems to have been the method of choice for several years now in all the networks I've worked with, but that might be for reasons that don't apply to me. In particular, since I have a fixed set of computers that are effectively permanently attached to the LAN, I guess static IP addresses should be fine.

    And it certainly does seem easier ...

    thanks,
    bruce

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    Big networks I've seen in the past have DHCP and one of the two options:
    - fixed adresses based on mac adress
    - variable adresses which are reported to a DNS server

    Most companies do not share data on local harddrives of user computers, they have fileservers for that.

    Since you probably do not have a DNS server there will always be the problem what ip adress other machines have on your network using dynamic adresses. There are several ways to discover the adress of a certain machine, but it is not going to be the easiest way of doing that.
    I\'m so tired .....
    #200472

  6. #5
    Just Joined!
    Join Date
    Jan 2005
    Location
    Ellicott City, MD
    Posts
    17
    Okay, thanks - that makes sense. I had wondered if running a DNS would be necessary in order to know the mapping of IP addresses to computer host names, and if I understand you, the answer is 'yes'. I don't see any advantage to that, and it certainly would be more trouble, so I'll just go with static addresses, and I think most everything else should fall into place.

    I have another very basic question, though: how do I set the host name and domain name for each Linux machine on the LAN? I just installed SuSE Linux on one box yesterday, and I noticed that in the installation process it named the machine "linux", which isn't exactly the most unique choice. My other Linux box, which is currently running Red Hat 9.0, sometimes goes by the name.domain that I set in the Red Hat Network Congfiguration utility, but other times it seems to want to call itself "localhost.localdomain". In fact, the only entry in /etc/hosts is "localhost.localdomain" with the address 127.0.0.1 (?). I'm not sure what that's used for ...

    - Bruce

  7. #6
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    127.0.0.1 is your loopback, used for example to mount ISO files or to use with services you only want to be accessable on the local machine (MySQL comes to mind) .
    You can add your actual ip there and the name of the machine. For example your machine is culled suse and your domain is mynetwork.local you could add an entry to the /etc/hosts like:
    Code:
    127.0.0.1 localhost.localdomain localhost
    192.168.1.2 suse.mynetwork.local suse
    and you could add the other computers as well (you could use the name to refer to the computer as well then)
    Code:
    192.168.1.1 router.mynetwork.local router
    192.168.1.3 redhat.mynetwork.local redhat
    The hostname can be set using hostname as root and if that does not work just edit the /etc/HOSTNAME , it is a text file. On next boot the name will be changed I guess.
    I\'m so tired .....
    #200472

  8. #7
    Just Joined!
    Join Date
    Jan 2005
    Location
    Ellicott City, MD
    Posts
    17
    Quote Originally Posted by puntmuts
    127.0.0.1 is your loopback, ....
    Ah, loopback! Yes, I remember reading about that a while ago. Okay, now I know why I sometimes see localhost.localdomain, and sometimes see my assigned hostname.

    Okay, I'm going to set some static IP adress, edit some /etc/hosts files, and see how everything goes.

    Of course, if I run into trouble, you'll be hearing from me again!

    Thanks for all the help,
    Bruce

  9. #8
    Just Joined!
    Join Date
    Jun 2004
    Location
    Leiria - Portugal
    Posts
    72

    Internet Gateway...

    If you think that having a linux system as a firewall and gateway to the internet is an old fashion, I'm afraid to say th oposite!

    Unless you can by a CISCO router, you will never have so powerfull configuration with a router part as you have using a unix based system like linux!

    Try to read more good documentation. Solving problems with tricks will never be a solid solution!

    See you...

  10. #9
    Just Joined!
    Join Date
    Jan 2005
    Location
    UK
    Posts
    77
    If i wanted to set up a wireless network, would i need to have a wireless router for it to work? Or would i be right in saying i could have a USB connection between my linux box (which also acts as a router) and my DSL modem, and then wireless network cards connecting all the computers on the network to the linux server.

    If both of these are possible, what are the advantages/disadvantages of doing each. Would one be easier to set up (given that i already have a usb modem, and i would have to buy a wireless router), safer or more stable?

Posting Permissions

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