Latency - how long time does it take to send an empty message?(usually one way unless it tells you round trip)
Transfer rate - what is the rate at which we can send data?
Message size
The packet delivery time or latency is the time from when the first
bit leaves the transmitter until the last is received.
Transmission time = Packet size / Bit rate
Propagation time = Distance / propagation speed
Multi-Layered Network Architecture
The seven-layer OSI (Open System Interconnect) model
The IP networking stack includes 5 layers:
Application (FTP, HTTP)
Transport (TCP, UDP)
Network (IP)
Datalink (Ethernet frames)
Physical (e.g. Ethernet, FDDI)
Fiber Distributed Data Interface (FDDI) is a standard for data transmission in a local area network. It uses optical fiber as its standard underlying physical medium.
Communication layers
Application: the end product
Presentation: encoding of information, serialization, marshaling
Session: security, authentication, initialization
Transport: messages, streams, reliability, flow control
Network: addressing of nodes in a network, routing, switching
Data link: point to point deliver of frames, medium access, link control
Physical layer: bits to analog signals, electrical, optical, radio …
Routing
Two approaches:
Distance vector: send routing table to neighbors, RIP, BGP
Link state: tell everyone about your direct links, OSPF
Socket
A socket is the programmer’s abstraction of the network layer.
an endpoint of a virtual network connection;
identified by an IP address & port number, and a transport protocol (TCP, UDP, …)
Datagram sockets for messages (UDP)
Stream sockets for duplex byte streams (TCP)
Stream Socket
A TCP socket for stream-based communication
Server
Creates a listening socket bound to a port (could be in several steps: create, bind, listen)
Accepts an incoming connection request and creates a communication socket for reading/writing a byte stream.
Client
Creates a communication socket and connects it to a server identified by an IP address and a port.
Reads/writes from a socket.
Datagram socket
Server
Create a message socket and bind it to a port.
Receive an incoming message (message contains a source IP address and port number).
Client
Create a message socket bound to a source port.
Create a message and give it a destination address and port number.