Re: pc2pc unix-tips.eng

From: A Mooron (moorons@themail.co.uk)
Date: Thu Jul 26 2001 - 16:52:54 CEST


>IP-adresses are : 192.168.1.1 and 192.168.1.2 ; Ping command
>works fine, but the command # nc -n 192.168.1.1 > /myfile.tgz
>results in the message: no ports found.
>
>On the other computer I issue the command: # cat myfile.tgz | nc -l
>-n 192.168.1.2
>
>So why does the documentation mention port 5555 ?
>What are port numbers for?
The IP shows the position/identity of the machine (where to send the
data),
whereas ports are a virtual construction to allow lots of TCP/IP traffic
to go on simultaniously - imagine it like thousands of mail boxes (ports)
in a large dorm (computer).

Ports are given after the IP address with nc.

Try;

nc -lp 5000 > myfile.tgz

( _l_isten on _p_ort 5000 & pipe to file)

and then

cat myfile.tgz | nc 192.168.1.2 5000

(pipe myfile.tgz to IP 192.168.1.2 on port 5000)

Jarvist

---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.dk
For additional commands, e-mail: mulinux-help@sunsite.dk



This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:19 CET