What is the necessary hardware to connect two computers in a LAN configuration?

User Name

Remember Me?

Password

Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

unless you placed them in a script, then restarting the network should do

Code:

#/etc/init.d/network restart

Code:

#/etc/init.d/networking restart

Code:

# service network restart

Code:

# service networking restart

or something like that
(no you don't have to run ALL of those lines, just one of them, it's just that the syntax varies based on which distribution of Linux you are using.
if you're using windows it would be

Code:

c:\> ipconfig /release
c:\> ipconfig /renew

most distributions ship out of box (read, are pre-configured on install) to use DHCP, and most routers out of box are configured to serve DHCP

failing that (unless the commands are in one of your startup scripts), than simply rebooting will do the trick.

I would like to know how many IPs should I handle for the whole LAN. Suppose 192.168.1.1 is one of them. This would be associated with the MAC on, say, machine A. Then I need, say, 192.168.1.2 for machine B. OK. Now, how many other IPs should I know of?

with 2 computers, a router and a modem, there would be about 5 IPs, but only 3 need to keep track of

the router's Internal IP address (used for accessing the router's configuration page, this is usually 192.168.1.1 by convention
then the IPs of the computers which would be 192.168.1.2 and 192.168.1.3 (or by default 192.168.1.100 and 192.168.1.101 on alot of routers), though you can statically assign them in /etc/network/interfaces (just google that file for the syntax)

some routers can assign IPs on a per mac address, but those are usually the more expensive ones.

the other addresses would be the IP of the router's WAN port and the IP address of the cable modem, (and your public ip which can be found by googling what's my IP), but unless you are running an internet facing server you don't need to know those.

with 2 computers, a router and a modem, there would be about 5 IPs, but only 3 need to keep track of ...

Well, the public IP I can know it with ifconfig. In fact, I did the physical connection and booted A and B. Then run ifconfig in A and saw the public IP. Then the same in B and the same: I had the public IP! ifconfig shows, for A:

inet 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255

For B:
inet 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255

Of course the configuration is now totally symetric with respect to A, B. I presume the public IP is the broadcast above, and the default A computer IP is 192.168.0.100. Hence that of B is 192.168.0.2. Internet is OK on A, and B.

Next I did 'ping 192.168.0.2' from A and 'ping 192.168.0.100' from B: success. Can I access A's files from B (or viseversa)?

It is a router only in that it is a network device between an internal network and the cable connection.

The device has only one connection, and that one connection must go to a switch, hub, or computer.

A switch is nice when you have three or more computers attached - you can make independent sessions between two of the computers without impacting the throughput of the third (presumably connecting to a remote system). A hub is simpler, but traffic on any impacts all... And switches have become cheap enough to push hubs out. Operationally, they are equivalent.

Many cable modems include a switch, but for a higher charge...

Switches also tend to have a processing unit on board that provide DHCP capability to simplify host configuration. This also means that SOMETIMES you have to connect to the switch to reset/configure for your own use. This is also needed to set your own password to prevent someone else from taking over your switch. Usually (if the switch is separate from the cable modem as in this case) you must configure the switch properly to communicate with the cable modem.

The usual case is that the cable modem will get its IP number from the cable company. The single internal network is likely configured to use 192.168.0.1 for its IP number (other values are also possible). The switch usually has to talk to the cable modem, and unless the cable modem provides DHCP (usually), then the switch must be configured to use a 192.168.0.2-254 address (this also assumes the switch knows how to use DHCP for the wan connection to get an IP number from the cable modem...).

If the cable modem is using 192.168.0.x network to talk to the switch, then the switch cannot use 192.168.0.x network to talk to computers connected to the switch. Usually the result is to use 192.168.1.x for the internal network (mine does this, even though the modem contains a 4 port switch + wireless).

Thanks jpollard. What I would like to know is if I can now do as if I were the owner of a cibercafe and, from my machine, i can see all the other machines. In windows, for instance, there would be drives D:, E:, F:, ... in the server, representing the clients disks. I presume I would have to know more than I know to do this. NFS can help? More radically. Can I login from B into A? rlogin?

I'll try rlogin. I have been reading the manual and see that you must supply 'host' as an argument. I.e., the minimal syntax is 'rlogin <host name>'. Now, I've found this is the username people in the other machine (machine B) uses to just login (let's call it selui). And let B have IP 192.168.02. How do I associate this IP with hostname (i.e., username) selui?

I used that form. A has 192.168.0.100, B has 192.168.0.2. In B I issued 'rlogin sem@192.168.0.100', where sem is a user in A, and I got 'Unknown host'.

EDIT: if only rlogin had a good tutorial but I don't seem to find one.

you probably won't find many rlogin tutorials anymore as it has been obsolete for some time now and has been replaced by SSH (yes you can still use rlogin but SSH is more flexible and is much easier to use).