TCP/IP
What are the two end-to-end protocols?
TCP
UDP
What protocol needs these two protocols to work?
IP
Programmers do not concern them selves with the details, but what is the name of the thing that they use to create a connection?
Socket
What does the socket do?
The socket can have data written to and read from it, from both computers either end of the network
How do you setup a socket?
- Host sets up a socket specifying the following to listen on:
a. protocol i.e. UDP or TCP
b. IP address
c. port
What is a port number?
This is the unique identifier used once a packet has been received that specifies which application that packet is to be set to
What is a port number unique to?
Each application
They must be bought
What is meant by a pipe connection?
This means that a connection needs to be made between the client and the host,
before transferring data to the socket
data is streamed from the host to a client
data only flows one way
What is another way of saying pipe?
virtual connection
Do you have to create a pipe with TCP?
yes
Do you have to create a pipe with UDP?
no
What does TCP take as an input?
A stream of bytes is written to the socket and will output a stream of bytes to the corresponding socket in the remote host
Using TCP what order do the bytes arrive in?
The order that they were sent, from the applications perspective
They actually arrive as packets in the order the fastest packet to get to the computer
How is data communicated with TCP/IP?
- Data is generated
- Data is then given to the OS with delivery address
- Socket is set-up using (protocol, IP address & port) to pass data to the operating system
Note: both party's need to create a socket when using TCP
- OS wraps in TCP or UDP
- Packet is handed over to the network via network interface
- Network helps deliver packets to address
- Receiving computer unwraps data, then hands data to the correct port
- OS hands data to the correct socket
- Program 'handles' data
Layers
Name all the layers required in data communication from the TCP/IP model
How many layers does the OSI model have?
7
From which layer does the layer consume services relative to its self?
The layer below
How does a layer communicate with its counter part or peer on the other side of the network?
By passing data on the header to the layer below it
When the data moves up the stack on the receiving computer
it will then be read by the peer
What is the name data and header?
protocol data unit (PDU)
what does the protocol data unit contain?
Data from the layer above, and a header which contains the protocol information and address
What is it called when you put data into a PDU?
Encapsulation
If we change one layer does it effect the rest?
No
How does the data move through the layers?

- Data will be passed down through the layers, with each layer adding some sort of header
- The data will then be sent across the network
- The data will then be passed up each layer on the receiving node, where the each layer will then analyze the corresponding header, and pass it up to the next layer; so the bottom layer will analyze the header that was appended by the bottom layer on the sending node
- The data will eventually reach the application and then finally the user
Logically speaking which layer does the top layer speak to on the other side?
The top layer
What is a peer?
It is the corresponding layer on the other side of the network
What is a protocol overhead?
This is the data that has been added to the head by each layer
What does the header contain?
Protocol specific information such as addresses
