Simple Easy Network With Debian


Results 1 to 6 of 6

Thread: Simple Easy Network With Debian

  1. #1
    Join Date
    Mar 2003
    Location
    UK
    Posts
    621

    Simple Easy Network With Debian

    Networking Tutorial

    Introduction: This is grotesquely simple and this is the point. It is intended to be a guide for cretins. It is vastly irritating how most documents of this type do not spell things out in words of four letters.

    It works on Debian Lenny beta, the currently testing Debian distribution. Should think it would work on Ubuntu, Etch and the like.

    It is for a simple network with a smallish number of computers.

    The Basic Idea: All that is needed - on the software level - for a network is for each computer to
    a/ Know its own address, which computer it is on the network.
    b/ Switch on the NIC, the network interface card, here I assume ethernet cards are being used.

    Both these objects are accomplished in one file, /etc/network/interfaces. So once this file is written the network will work.

    /etc/network/interfaces:

    Code:
    lugo@girlie:~$ less /etc/network/interfaces
    # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
    # /usr/share/doc/ifupdown/examples for more information.
    
    #lugo Above is all that was in.  I am responsible for the below.
    auto lo
    iface lo inet loopback
    
    auto eth0
    iface eth0 inet static
            address 192.168.10.10
            netmask 255.255.255.0
            network 192.168.10.0
    #       broadcast 192.168.10.1
    #       gateway 192.168.10.1

    As root put this file in a computer. Now, on another computer connected to this one via an ethernet cable, put in this same file. The only difference being the number of the computer; change this to, say, 192.168.10.11. The only complication in my case was that, on one of my boxes, the motherboard insists on eth1 not eth0, the usual thing. Do $ ifconfig and look for the one that has 'Ethernet' next to it.

    Test the Network:

    Install ssh, the Secure Shell Server, *and* the ssh server, which will be called sshd or something, on both boxes. This is the simplest thing anyway.

    In 192.168.10.10 type:
    Code:
    $ ssh 192.168.10.11
    Or you could do vice versa. And the network should work, note that the prompt changes to the prompt of the other computer - you are on the other box. Slight crisis of confidence: if it does not work fill in /etc/hosts, as below, and see if it works then. Try rebooting. (It is nice to have different coloured prompts. Put
    Code:
    PS1="\[\033[1;33m\]\u@\h:\[\033[0m\]\[\033[1;34m\]\w\[\033[0m\]\[\033[1;33m\]$\[\033[0m\] "
    in ~/.bashrc. It is the 1;33 and 1;34 that change the colours, experiment with 1;37 and so on.)

    It is also usual to do the file /etc/hosts:

    Code:
    lugo@fido:~$ less /etc/hosts
    127.0.0.1 localhost
    
    ::1     localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
     
    #lugo Above was already in, added all below.
    192.168.10.11   girlie.sporus.org       girlie
    192.168.10.10   fido.sporus.org fido
    So just add the stuff that I have added, the stuff above is for ip6 and was put in automatically. It may not be on your computer.

    Now doing:
    Code:
    $ ssh 192.168.10.11
    $ ssh girlie.sporus.org
    $ ssh girlie
    will all connect to girlie.

    Name a computer in /etc/hostname:
    Code:
    lugo@fido:~$ less /etc/hostname
    fido
    Do not think the computer's name needs to be the same as the nickname.

    Err....that's it.

    Hardware:

    The computers need an ethernet card in each one (does it have a plug like a telephone socket on steroids?). If a laptop does not have the socket it probably needs a PCMCIA card: credit card sized thing that inserts into the side.

    Connect the sockets via ethernet cables to a hub, or better these days a switch. If there are only two computers they can be connected directly together without a switch using a 'cross-over' ethernet cable.
    Last edited by lugoteehalt; 01-28-2009 at 09:43 AM.
    MI6, Offensive Information, Hackers, Encryption, UFO, AOL, Infowar, Bubba, benelux, Ufologico Nazionale, domestic disruption, 15kg, DUVDEVAN, debugging, Bluebird, Ionosphere, Keyhole, NABS, Kilderkin, Artichoke, Badger, spookwords, EuroFed, SP4, Crypto AG – a few, alleged, Echelon keywords. Please add some to your email signature. Full list: http://www.serendipity.li/cia/bz1.html
    http://www.nosoftwarepatents.com/

  2. #2
    Join Date
    Jul 2002
    Location
    New Orleans, LA USA
    Posts
    986
    It good to see post like these. When you have done something for years and seen it progress through different technologies, it makes certain technical topics seem as obvious as the sky is blue. As time passes you may even forget how frustrated you were trying to grasp the terms the first time you tried.

    Everyone doesn't start at the same point at the same time, so every once in awhile we need to go back to basics for others sake (and maybe even our own - bad habits and all).
    "Whenever you find yourself on the side of the majority, it's time to pause and reflect."

    -Mark Twain

  3. #3
    Join Date
    Mar 2003
    Location
    UK
    Posts
    621
    Quote Originally Posted by trilarian View Post
    It good to see post like these. When you have done something for years and seen it progress through different technologies, it makes certain technical topics seem as obvious as the sky is blue. As time passes you may even forget how frustrated you were trying to grasp the terms the first time you tried.

    Everyone doesn't start at the same point at the same time, so every once in awhile we need to go back to basics for others sake (and maybe even our own - bad habits and all).
    Too right. You're a genius.
    MI6, Offensive Information, Hackers, Encryption, UFO, AOL, Infowar, Bubba, benelux, Ufologico Nazionale, domestic disruption, 15kg, DUVDEVAN, debugging, Bluebird, Ionosphere, Keyhole, NABS, Kilderkin, Artichoke, Badger, spookwords, EuroFed, SP4, Crypto AG – a few, alleged, Echelon keywords. Please add some to your email signature. Full list: http://www.serendipity.li/cia/bz1.html
    http://www.nosoftwarepatents.com/

  4. #4
    Join Date
    Dec 2003
    Location
    edmonton
    Posts
    2

    re: Networking Tutorial...

    Great...

    Now how about writing on like it for WIRELESS networking.

    Every distro I've installed or booted up a live cd has had (wired) networking working without having to know about what you talked about. It's simple boot up, and i'm connected.

    Now Wireless, that's the challenge...

    Call me when it's done.

  5. #5
    Join Date
    Jan 2001
    Location
    Miami, Fl
    Posts
    134
    This tutorial focuses on forming a LAN between the machines, not just setting up networking on a single machine.

    A nice add-on would be sharing an internet connection, ie: turn the Gateway machine into a Layer3 switch (router). Maybe I'll add it in ;-)

  6. #6
    Join Date
    Mar 2003
    Location
    UK
    Posts
    621
    Quote Originally Posted by E1PHOTON View Post
    A nice add-on would be sharing an internet connection, ie: turn the Gateway machine into a Layer3 switch (router). Maybe I'll add it in ;-)
    That would be very good indeed. It's something I need to do and I don't know how, there's bound to be many others in that possition. Seriously, you write it and this could become the definetive networks-for-cretins thread.

    Ditto nicsmr.
    MI6, Offensive Information, Hackers, Encryption, UFO, AOL, Infowar, Bubba, benelux, Ufologico Nazionale, domestic disruption, 15kg, DUVDEVAN, debugging, Bluebird, Ionosphere, Keyhole, NABS, Kilderkin, Artichoke, Badger, spookwords, EuroFed, SP4, Crypto AG – a few, alleged, Echelon keywords. Please add some to your email signature. Full list: http://www.serendipity.li/cia/bz1.html
    http://www.nosoftwarepatents.com/

Posting Permissions

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