Configuring ?a very simple network?

Configuring ?a very simple network?

Post by Mari » Sun, 02 Jun 2002 09:16:15



Hello everyone

I need some help to configure two PCs that I have at home.

They are connected to each other via a network cable: One is runnig RHLinux
7.2 and the other RHLinux 4.1 (Vanderbuilt), kernel 2.0.27

My goal is to practice some some basic exercises from Richard Stevens "Unix
Network Programming" that deal with sockets.
Also I'd like to exploit some Unix commands like ping, tcpdump, etc... I
suppose that comprehension of those commands will be hard if I use just a
single standalone computer.

I've notice that there are some unix commands that let one configure a
network but I just do not know how to fill the parameters. One of them,
netconfig, presents the following screen:

     Configure TCP/IP:

[ ]Use dynamic Configuration (BOOTP/DHCP)

   IP address________________
   Netmask___________________
   Default Gateway___________
   Primary Name Server_______

Any kind of help will be most welcome.

    Thank you very much
    Mario

 
 
 

Configuring ?a very simple network?

Post by Ian Northeas » Mon, 03 Jun 2002 18:48:51



> Hello everyone

> I need some help to configure two PCs that I have at home.

> They are connected to each other via a network cable: One is runnig RHLinux
> 7.2 and the other RHLinux 4.1 (Vanderbuilt), kernel 2.0.27

> My goal is to practice some some basic exercises from Richard Stevens "Unix
> Network Programming" that deal with sockets.
> Also I'd like to exploit some Unix commands like ping, tcpdump, etc... I
> suppose that comprehension of those commands will be hard if I use just a
> single standalone computer.

> I've notice that there are some unix commands that let one configure a
> network but I just do not know how to fill the parameters. One of them,
> netconfig, presents the following screen:

>      Configure TCP/IP:

> [ ]Use dynamic Configuration (BOOTP/DHCP)

>    IP address________________
>    Netmask___________________
>    Default Gateway___________
>    Primary Name Server_______

Assuming you don't want to connect this to the wider world, you just
need to allocate yourself a private network number as per RFC1918. Most
people choose 192.168.x.0/24 where x is a random number between 0 and
255. Then give the two machines addresses e.g. 192.168.x.1 and
192.168.x.2. The netmask is 255.255.255.0. You should be able to omit
the other two for a closed network of two machines. Put them in each
others' /etc/hosts files to eliminate the need for a nameserver.

If you have no hub then the connecting cable needs to be a crossover
(assuming it's a UTP cable not BNC).

Regards, Ian

PS A colleague once wrote a reasonably complex sockets application on a
stand alone Linux PC testing it over localhost; but I agree, it is
better to have two.

 
 
 

Configuring ?a very simple network?

Post by fred murph » Mon, 03 Jun 2002 14:57:44


It seems like you aren't using a hub - if so, i hope that network cable
is a crossover cable, or nothing will work.
Why not fill in the 'netconfig' parameters with the following, just for
kicks.

##Machine 1##
IP address  192.168.1.1
Netmask   255.255.255.0
Default Gateway  (leave blank)
Primary Name Server  (also leave blank)

##Machine 2##
IP address  192.168.1.2
Netmask   255.255.255.0
Default Gateway  (leave blank)
Primary Name Server  (also leave blank)

Then you should be able to ping machine 1 from machine 2 with the
command:
ping 192.168.1.1
and vice versa.

Cheers.

----------------8>< snip ---------------------
| Also I'd like to exploit some Unix commands like ping, tcpdump, etc...
I
| suppose that comprehension of those commands will be hard if I use
just a
| single standalone computer.
|
| I've notice that there are some unix commands that let one configure a
| network but I just do not know how to fill the parameters. One of
them,
| netconfig, presents the following screen:
|
|
|      Configure TCP/IP:
|
| [ ]Use dynamic Configuration (BOOTP/DHCP)
|
|    IP address________________
|    Netmask___________________
|    Default Gateway___________
|    Primary Name Server_______
----------------8>< snip ---------------------

 
 
 

1. Configuring ?a very simple network? (Again)

Thank you Ian Northeast & Fred Murphy for your preciose help (see post
Configuring ?a very simple network? )

It seems to me that things are working out in "pc1" witch has RHLinux 7.2
but I cannot find out how to configure the network card and enter the IP
address for pc2 with RHLinux 4.1.
I read parts of the Ethernet Howto but I just can't reach a definite
conclusion.
In pc1 it was easy: the netconfig command displays a couple of options to be
filled that let me do so, but in RHL 4.1 I just do not know what to do.

Mario

PS
I tried to ping pc2 from pc1 (ping 192.168.1.2) and received a msg similar
to: ?Host unreachable?, witch leads me to think that everything is ?fine?

tried the same but from pc2 to pc1 (ping 192.168.1.1) and the msg was:
Network unreacheable. I suppose that this is due to unconfiguration of the
network card.

pc1=192.168.1.1 (with RHL 7.2)
pc2=192.168.1.2 (with RHL 4.1)

2. Hayes ESP II Serial Card

3. help ! SUN and linux, simple network -- networking newbie

4. Pine or Elm configuration

5. Simple howto for configuring a standalone firewall/router ?

6. Need help 4 Logitech SMW under Linux

7. OpenLdap Configure Simple Security Authentication

8. Newbie needs help: Makefile Dependencies

9. simple way to configure samba

10. Help: Need simple steps for configuring sendmail

11. simple question: configuring PCMCIA

12. Too stupid to configure a simple router!

13. Can't configure slapd simple auth to work with netscape's addressbook