You are not logged in.
Pages: 1
I have never linked two Linux machines (local). How to?
Markku
Offline
what do y mean with linking ?
simple ethernet-connection?
Offline
Simplest is a crossover cable, connecting the two ethernet cards directly. And then in oneb ox set the other as the default gateway, and in the other enable forwarding and do SNAT or masquerading in iptables.
Offline
Yes, but that way he is going to need to have the gateway (the one with internet) always on.
The best thing is to buy a little 4port switch. they are cheap, and you get to poweroff any of the PC without problems. Also, you will probably save on 1 ethernet card, as most PCs have only 1.
Do you want to share files? printer? internet? whats the porpouse of the network?
regards.
Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux
Offline
Good point sud_crow, though why would you need two comps if one isn't always up? ;-) But I see your point.
Offline
I'd go with sud_crow's plan, alright, but like he said, it would help to know a bit more about your objective here.
Offline
whats the porpouse of the network?
To run one postgresql database program with php/html interface. The second computer does the editing and new data entries.
I am aware the setup is simple, but never done in Linux but in Windows. Wanted to know if there is/are anything in particular needed to do beside configuring Ethernet and connect with a LAN cable.
Markku
Offline
Heya,
can't help you a lot with this ... mayeb someone else, but this seems a good situation to use zeroconf. Using zeroconf, you won't have to configure anything normally (except maybe zeroconf ...).
Michel
Offline
Wanted to know if there is/are anything in particular needed to do beside configuring Ethernet and connect with a LAN cable.
Not really.
Just configure both boxes in /etc/rc.conf (as 192.168.xxx.1 and 2). Connect both network cards with a crossover cable (important!) or use normal ethernet cables connected to a switch.
You could also add items (on both boxes) to your /etc/hosts to have both of them accessible as names not only IPs.
Offline
Heya,
I was wondering ... I believe with apple's OS/hardware it is possible to use the other cables(no crossover) to conenct 2 computers directly. Anyone know how that works?
thanks,
Michel
Offline
You can make a direct connection between two comps with USB or firewire cables too yes, if that's what you mean.
You need to compile the support for it in your kernel (or as module if that's possible).
Offline
Just configure both boxes in /etc/rc.conf (as 192.168.xxx.1 and 2). Connect both network cards with a crossover cable (important!) or use normal ethernet cables connected to a switch.
You could also add items (on both boxes) to your /etc/hosts to have both of them accessible as names not only IPs.
In Mauritius where I was suppose to setup the LAN, I didn't get time to configure except installing the ethernet cards and link with a LAN cable. Now I have to communicate by e-mail (to a person who has not used Arch).
Is this correct?
Machine 1 (server).
/etc/rc.conf
#
# Networking
#
HOSTNAME="consultation"
lo="lo 127.0.0.1"
eth0="eth0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(lo eth0)
/etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.1 consultation.consultationdomain consultation
Machine 2.
/etc/rc.conf
#
# Networking
#
HOSTNAME="maintenance"
lo="lo 127.0.0.1"
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(lo eth0)
/etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.0.2 maintenance.maintenancedomain maintenance
1. Booth both machines (auto loads ethernet modules, httpd and postgresql)
2. In machine 2
# dhcpcd eth0
Run the database php/html page in a browser:
http://consultation/pow/index.php
3. In machine 1
(no dhcpcd and locally run the db page)
http://consultation/pow/index.php
Markku
Offline
I'm not sure if I understand everything correctly.
Mostly it looks ok until you mention dhcp.
If you have only these two machines you don't need dhcp at all (and we are still talking about LAN with no internet gateway right?). If you are going to use dhcp (for whatever reason) the configuration will be different especialy for the "client" machine (that's what dhcp does - it automatically configures net on a client machine).
I'm assuming you don't have internet there (and no dns servers too) and that you have only these 2 machines (1 server AKA "consultation" + 1 client AKA "maintenance") in a LAN.
In this case both of your rc.conf fragments are ok (what about ROUTES=(!gateway) part ?)
The only thing you should change is to have this /etc/hosts on both machines:
127.0.0.1 localhost.localdomain localhost
192.168.0.1 consultation.consultationdomain consultation
192.168.0.2 maintenance.maintenancedomain maintenance
so "maintenance" machine will be able to call http://consultation/pow/index.php
(And don't run dhcp daemon on the server - it's not necessary).
I hope that's what you want to do.
Offline
In this case both of your rc.conf fragments are ok (what about ROUTES=(!gateway) part ?)
Thanks!
Anything in particular to be done with ROUTES? Currently /etc/rc.conf in both machines, use the same deafult setting:
gateway="default gw 192.168.0.1"
ROUTES=(!gateway
About the dhcpcd, I got confused when seeing dhcpcd configure in different samples when browsing in Internet. The two machines are not connect to Internet.
Markku
Offline
Anything in particular to be done with ROUTES? Currently /etc/rc.conf in both machines, use the same deafult setting:
gateway="default gw 192.168.0.1" ROUTES=(!gateway
No I don't think you should change ROUTES. It's needed when the server is also a gateway to the internet for example, so the client machine knows that every packet to IP outside the range of LAN should go through gateway and not directly. You should be fine with ROUTES=(!gateway).
Offline
Thanks, I am sure it will work. If anything comes up, I will post it here. This thread will be my future LAN reference page. ... maybe useful to someone else too.
Markku
Offline
Pages: 1