Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How do I get 2 Linux boxes talking in a LAN?

jon_241jon_241 Member Posts: 45
Hi,

My problem is this, I have 2 Linux-Mandrake 8.1 boxes and I want them to see each other, so I can get my network program to work.

But they cant see each other, whenever I try and browse the network after a while I get the "localhost.localdomain not found" or something error. Why? Does the domain/IP address need changing?

Also I have specified my IP addresses (one as 127.0.0.1 and 127.0.0.2) to ward off a crash I get when I reboot or shutdown on my main machine, freezing on 'shutting down interface eth0'. Any idea why?
I've tried updating the distro but still it happens.

Anyway, these 2 Linux boxes are connected to a hub and a router and my friends' Windows machines are also connected. Would this have an effect?

Do I need to set the gateway IP as the router IP?

Comments

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    [b][red]This message was edited by the Sephiroth at 2002-4-5 21:34:37[/red][/b][hr]
    : Hi,
    :
    : My problem is this, I have 2 Linux-Mandrake 8.1 boxes and I want them to see each other, so I can get my network program to work.
    :
    : But they cant see each other, whenever I try and browse the network after a while I get the "localhost.localdomain not found" or something error. Why? Does the domain/IP address need changing?
    :
    : Also I have specified my IP addresses (one as 127.0.0.1 and 127.0.0.2) to ward off a crash I get when I reboot or shutdown on my main machine, freezing on 'shutting down interface eth0'. Any idea why?
    : I've tried updating the distro but still it happens.
    :
    : Anyway, these 2 Linux boxes are connected to a hub and a router and my friends' Windows machines are also connected. Would this have an effect?
    :
    : Do I need to set the gateway IP as the router IP?
    :
    You need to setup several things. Edit /etc/hosts. Set the IP to 192.168.0.x, x being an unused LAN number. Now at the shell prompt, type SETUP. go to network config. Set the subnet mask to that of your router's subnet mask (usually 255.255.255.0), set the default gateway to your router ip (usually 192.168.0.1), and set the nameserver to whatever your isp's nameservers are. Do NOT use DHCP on your Linux box.

    Here's how my network works (5 machines on it, two being Linux for hosting servers).

    [code]
    Router Info:
    IP: 192.168.0.1
    Subnet: 255.255.255.0
    DHCP Pool List: 192.168.0.11 to 192.168.0.20

    Linux Box A:
    Default Gateway: 192.168.0.1
    Nameserver:
    DHCP: OFF
    /etc/hosts: 192.168.0.2 www.dhta.org www

    Linux Box B:
    Default Gateway: 192.168.0.1
    Nameserver:
    DHCP: OFF
    /etc/hosts: 192.168.0.3 mud.dhta.org mud

    All Windoze Boxes:
    DHCP: ON
    Default Gateway: 192.168.0.1
    [/code]

    Simple enough, I hope. Oh and the board is adding http:// in front of the first linux box hosts file, that is NOT in the hosts file!

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]



  • jon_241jon_241 Member Posts: 45
    Thanks for your help, much appreciated.

    My network programs work (ones I am programming for my project). At least that pretty simple thing is sorted and I feel like I can move on.
    All part of the experience I guess.

    But I still can't browse the network. Do I need to setup SAMBA or something? As I just wanted to drag and drop my source code onto the other linux box to compile.

    One other thing, I would like to download things onto the Windows partition of my drive (Linux being the other of course). How do I declare a shared folder on the Windows partition?
    Is it something to do with that NFS?

  • chamiltonjchamiltonj Member Posts: 1
    [b][red]This message was edited by the chamiltonj at 2002-4-7 20:57:14[/red][/b][hr]
    It seems that you have the two protocols confused. SAMBA can be used to access and provide shares to and from Windows.

    NFS can be used to mount a path from a remote (*nix) machine.

    Although windows can do NFS and (obviously) linux can do windows shares it's much easier to have them talk in their native protocols.

    Hope this Helps

    Charles Hamilton

    PS: BTW,if your windows partition is local on the machine that you want to access, most modern distros allow you to mount FAT, VFAT and NTFS directly.

    : Thanks for your help, much appreciated.
    :
    : My network programs work (ones I am programming for my project). At least that pretty simple thing is sorted and I feel like I can move on.
    : All part of the experience I guess.
    :
    : But I still can't browse the network. Do I need to setup SAMBA or something? As I just wanted to drag and drop my source code onto the other linux box to compile.
    :
    : One other thing, I would like to download things onto the Windows partition of my drive (Linux being the other of course). How do I declare a shared folder on the Windows partition?
    : Is it something to do with that NFS?
    :
    :



  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    Ick, I see several things here I do NOT do for stability and resource reasons.

    1) If you use Linux, build a Linux box, as sharing one with other OS's usually leads to annoyances.

    2) I do NOT use X-Win. The GUI is nice and all, and much more stable than Windoze, but it kills half of Linux' awesome power. I use the shell ONLY, since you can multitask and do anything you want in it, just as you can in X-Win, minus some of the high-res graphics apps.

    As for making the machine viewable on a Windoze/DOS network, you need to install DOS/Windows connectivity on your Linux box, err partition. Then you configure that for the proper workgroup and such.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

Sign In or Register to comment.