Linking two or more ethernet.

Linking two or more ethernet.

Post by Ben Carlisl » Thu, 10 Apr 1997 04:00:00



Hi!
        I'm currently attempting to link two linux machines via ethernet... but
neither of them are on the net, I would just like to have communication
between them. I want to telnet into one from the other. Do I assign
random IP addresses? Do I give them hostnames?

TIA,
-Ben

 
 
 

Linking two or more ethernet.

Post by Michael Bussman » Thu, 10 Apr 1997 04:00:00


Howdy!


> neither of them are on the net, I would just like to have communication
> between them. I want to telnet into one from the other. Do I assign
> random IP addresses? Do I give them hostnames?

You should not use _random_ IP addresses, but use the address space
reserverd for private networks (rfc 1918):
10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255

I'd recommend using 192.168.1.1 for your first box, 192.168.1.2 for the
second etc.
Assigning an IP number to an interface is done via
# ifconfig eth0 192.168.1.x netmask 255.255.255.0 broadcast 192.168.1.255

You'll also need a routing entry for this interface:
# route add -net 192.168.1.0 gw 192.168.1.x

HTH

MfG
MB
--


 
 
 

Linking two or more ethernet.

Post by Matt Kirsc » Thu, 10 Apr 1997 04:00:00



> Hi!
>         I'm currently attempting to link two linux machines via ethernet... but
> neither of them are on the net, I would just like to have communication
> between them. I want to telnet into one from the other. Do I assign
> random IP addresses? Do I give them hostnames?

I love the easy questions :)

No, you do not assign them "random" IP addresses.
InterNIC has reserved three ranges of addresses as "non-routable"
addresses for use in local area networks:
10.0.0.0 - Class A
192.168.0.0 - Class B
168.96.0.0 - Another Class B
These ranges simplify connecting your local area network to
the Internet with IP masquerading or a firewall. Since they
do not exist on the Internet, you do not have to worry about
having duplicate addresses on both the Internet and your
local network.

For two machines, you would, for example, assign one machine
192.168.1.1, the second machine 192.168.1.2, and use a netmask
of 255.255.255.0 with a broadcast address of 192.168.1.255.
The netmask allows up to 254 hosts on the network, and isn't
very important. The broadcast is automatically calculated based
on the IP address and netmask.

The hostnames are up to you. You do not have to assign them,
but it's one of the more fun things you can do with Unix.

Linux boxes want hostnames when you set them up, so it
doesn't take much to add them to /etc/hosts with your
IP numbers on both machines. The names are really for
convenience on local machines. I could put the IP
address for www.3com.com in my /etc/hosts, and call it
"flubbo" instead of www.3com.com, and I would still
connect to www.3com.com regardless of what my local
machine thinks the machine is called.

--
Mathew E. Kirsch, CLSE (Certifiable Linux Systems Engineer)
*Opinions expressed herein do not reflect those of my employer.

"If you don't have time to read the FAQ, I don't have time to read it to
you."

 
 
 

1. How to link two PCs via ethernet cards

I am new to Linux.

I have two computers, one for Windows95, the other for Linux.  I have Intel
EtherExpress Pro 10+ cards on both computers, and linked with RJ45.  I know
my LAN works.

I want to know how to setup the Linux machine so that I can share files
between the computers.  I am running Slackware 3.6.

Thank you in advance.

Jing Duan

2. microsoft word

3. Using two Ethernet links to double throughput

4. 3c509b Etherlink III and RH 5.0

5. two modem; two ppp link to internet and double the performance

6. help with awk needed

7. Two Ethernet cards, two networks, now what?

8. newgen turboPS360 (300dpi) / gs

9. One Process on the machine having two IP address and two ethernet interface.

10. Networking between two PC with both having two Ethernet port

11. Two modems 1 ethernet card and two routes need help!

12. Two Ethernet Jacks & Two Networked Boxes

13. howto configure two ethernet adapters as two real separate computers ( on the same cpu )