Network: a collection of nodes and link
Nodes are either hosts or routers
• Host: end-node that runs software to support applications, e.g., laptop, server, smartphone
• Router: a node that relays and routes messages, e.g., ADSL modem, Wi-Fi access point
Link: a physical medium that connects nodes (can include hubs, switches)
Application (program): uses the network, e.g., Spotify
• A layer is a set of related communication functions that
– provide services to the layer above it
– by using services of the layer below it
Services are either connection-oriented or connectionless; connection-oriented services create logical connections between end nodes before the transmission of higher-layer data
A protocol is a set of rules that determines how communicating entities in the same layer
interact
• A layer can contain many different protocols but not the opposite
• A layer-n entity is a piece of software or hardware that executes a layer-n protocol
• Layer-n entities at different nodes are called peer processes • Layer-n peer processes communicate by exchanging PDUs (protocol data units)
Layers at the same node communicate by exchanging SDUs (service data units) and control information over a SAP (service access point)
• SDUs are encapsulated into PDUs: PDU = header + SDU + trailer
• A layer can fragment a SDU into smaller pieces at the transmitter and reassemble the SDU at the receiver
• A layer may put several SDUs into a single PDU at the transmitter and unpack the SDUs at the receiver; this is called aggregation
• A layer can serve several entities in the layer above (multiplexing)
• A layer can use several entities in the layer below (splitting)
• Sometimes we use layer-specific names for PDUs
message
segment
packet
frame
- 7,6,5 -> application -> provides services frequently needed by application programs
-4 -> transport -> end-t-end transfer of messages
-3 -> network -> tranfer or packets over several links
-2 -> data link ->transfer of frames over a single link
-1 -> physical -> transfer of bits over a physical channel
• Internetworking is needed to provide connectivity between hosts that are attached to different networks
• If Alice wants to talk to Bob, messages need to traverse five networks that are connected by routers
– We assume here that the switches are transparent, i.e., not noticeable, to the data-link layer in hosts and routers
• In the TCP/IP model, the protocol IP provides internetworking
The Internet model is also called the TCP/IP model
5=application
4=transport
3=network
2=data link
1=physical
5. Application = DNS, DHCP, HTTP, SMTP
4. Transport= UDP, SCP, IGMP
3. Network= ICMP, IP
1 + 2 Data Link + Physical = Wi-Fi Ethernet
4. Transport
TCP = reliable, connection-oriented , full-duplex, byte-based, stream service
UDP = best effort, connectionless, datagram service
SCTP = reliable, connection-oriented, multihoming, full-duplex, communication over multiple IP message-based services possible, multistream service
3. Network
IP = best effort, connectionless, packet transfer
Internet names
• Unique and “easy” to remember
• Independent of physical location
• Hostname has two parts: host + domain name
www.(host)chalmers.se(domain)-> DNS translate -> 129.16.17.21 (32 bit for IPv4) net id + host id
Internet Addresses
• An IP address uniquely identifies a network
interface card (NIC)
• A NIC can have several IP addresses
• A node can have several IP addresses, e.g., if attached to several networks
• Routing decisions are based on destination IP addresses
• IP address has two parts: net id and host id
• LANs (and other networks) assign link-layer (physical, MAC) addresses to the physical attachment to the network
• The link-layer protocol uses link-layer addresses to transfer packets to the appropriate destination on the same network
• IP addresses need to be resolved (translated) to link-layer addresses before transmission over the network—this is done with ARP (Address Resolution Protocol)
• Example: Ethernet uses 48-bit addresses
– Each Ethernet NIC has a globally unique Medium Access Control (MAC) address =physical address = link-layer address – The first 24 bits identify the NIC manufacturer; the second 24 bits are a serial number
– 24:A2:E1:E6:BF:C4 12 hex numbers = 6 bytes = 48 bits
• Three main types
– Unicast (point-to-point): address a single node on the network
– Multicast (point-to-multipoint): address more than one of the nodes on the network
– Broadcast (point-to-multipoint): address all nodes on the network
• Ethernet addressing scheme
– Unicast example: 24:A2:E1:E6:BF:C4 (second hex digit must be even)
– Multicast example: 01:80:C2:00:00:00 (second hex digit must be odd)
– Broadcast: FF:FF:FF:FF:FF:FF
Internet name: rent domain name from a domain name registrar (e.g., GoDaddy)
IP address: typically dynamically assigned at power up through Dynamic Host Configuration Protocol (DHCP)
Link-layer address: assigned to NIC at manufacturing
To transmit an IP datagram over a link, the IP destination address needs to be translated (resolved) to the corresponding link-layer address