[Gllug] sorts of ports
David Damerell
damerell at chiark.greenend.org.uk
Mon Sep 3 09:58:47 UTC 2001
On Saturday, 1 Sep 2001, Leigh Mason wrote:
>i'm having trouble visualising what's happening when people talk about
>entering a machine via port x or port y, with regard to network
>communication.
>i understand that any i/o device has to have interface circuits to
>communicate data transfer to the cpu.
>and that within each interface there are registers similar to the cpu and at
>least one of those registers is a buffer register (for data) called a port.
>(please correct me if i'm wrong).
>when a connection is made between two computers there is only one interface
>in action (modem for example) that the data is being carried across. the
>interface has a 16 bit data register allowing the 65535 possible port
>numbers, but it is still just one physical port - right?
Er, not quite.
Normally your Ethernet (or modem) hardware knows nothing about TCP/IP
at all, including IP port numbers. IP packets are entirely
encapsulated in packets for the lower-level transport, like this;
/here's the stuff your Ethernet /this here is an IP packet \\
|card understands, that tells |that the Ethernet card will ||
|it this is for this machine and|pass unchanged to the OS and||
\not a lot else. \contains an IP port number //
The OS's IP stack has an idea of what ports are open and belong to
which processes, and passes the IP packet to the appropriate process.
--
David Damerell <damerell at chiark.greenend.org.uk> flcl?
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list