[luau] localhost connections

whenever whatever at whoever.net
Thu Mar 21 01:07:01 PST 2002


On Wednesday 20 March 2002 10:19 pm, you wrote:
> On Wed, 20 Mar 2002, whenever wrote:
> >layer 3(network) is where your connection happens, layer 2(data link) is
>
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> >where arp is at, would it try to resolve a MAC for the localhost ?
>
> If I remember the OSI model correctly, the connection happens at layer 2,
> the data link layer.  Layer 3, the network layer, is where all of the
> routing occurs.  Hense, the name 'network'.

Network layer(3) = IP layer + ICMP and TCP/UDP is at Transport layer(4)
so your connection and connection-less is at layer 4, I remember layer 3 and 
4 are kinda combined on TCP/IP. about  data link layer, in fact it has 2 
layers there, 1st is the MAC for arp/rarp provided by ethernet accordance 
with IEEE 802.3, the 2nd layer is the LLC(logical link control) layer 
provided accordance with IEEE 802.2. 

>
> I think the OSI model was derived from a connection oriented protocol.
> IP is a connection-less protocol.  In the OSI model, when you want to

TCP and UDP are encap in IP, you can't say it's connection-less, remember 
host to host only communicate by the same layer, which means layer1 to 
layer1, layer2 to layer2 and so on.  So the control is at the layer above IP 
layer.

> communicate between hostA and hostB, you ask layer 3 to find a route
> between these two hosts.  Then you ask layer 2 to establish a connection.
> Then you use layer 1 to make the physical/virtual connection.
>
in a way it's true, but hosts only can communcate by MAC, ip address is only 
a virtual address and the job of layer 2 is to translate your ip address to 
it's MAC, your ip header are encap on the 802.2 frame to be ship out with 
phsical media to send broadcast to find it's end node.  your routing is taken 
care at layer 3, and applications normally jump from layer 7 to 4/3.

> This is the reverse of how TCP/IP works.  The connection is established in
> TCP, which is above IP.  Also, the 'T' in TCP stands for transport.  But
> the transport layer is layer 4 in OSI.  Thus, TCP/IP is a combination of
> layer 4, 3 and 2.  TCP provides two services; connection (data link), and
> transport.  IP provides the routing (network).  So to map TCP/IP to OSI
> accurately, we would need to break TCP into two pieces, and put IP in the
> middle.
>
> The more I learn about the TCP/IP stack, the more I think it was poorly
> designed.
>

agree, in fact the OSI layer is pretty crazy in the first place, I remember 
the 3 weeks talk with one of the orginal OSI developer(Will Collin, I think 
that's his name) about 2 years ago, he got me totally confused in the first 
week.  You are lucky if you don't have to deal with SS7(or CCS7) and x.25, 
x.25 is ok but SS7 is another crazy protocol.

> --jc

Charles, I hope I didn't confuse you more 



More information about the LUAU mailing list