Internet Protocol (IP)
IP is the method by which data is transmitted over the Internet.
All Internet communication occurs through transmission of IP packets
(in contrast to serial lines, which transmit continuously).
Each packet contains a header and a block of data (1k).
The header contains the destination machine.
Each machine on the Internet is hence given a unique IP address.
IP packets are encapsulated within (one or more) frames.
If one frame is too small to hold an entire IP packet,
it is split into several smaller IP (sub-) packets.
The destination machine will reconstruct a packet from
all the smaller sub-packets.
Transmission Control Protocol (TCP)
We need reliable communication.
But implementing a reliable, continuous stream is tricky.
You can send single IP packets and then wait for the remote
machine to confirm receipt, but this approach is inefficient.
TCP Solution: Send packets one way and acknowledge
properly received packets the other way.
This Communication is full-duplex (streams are in both directions)
data and acknowledge-packets are transmited both ways simultaneously.
TCP is implemented on top of IP.
TCP packets are encapsulated within the data part of IP packets.
This is why Internet communication is sometimes called TCP/IP.