Our setup: Application Layer (us) Transport Layer (TCP) Internet Layer (IPv4) Data Link Layer (802.3 Ethernet) Some of you have 802.11 (wifi) instead First: A simple demo Homework 1: Easy at this point Active Learning: Connect to the server we make and give it a message Network layers and protocols layers can be replaced lowest layer is physical layer headers Making the network work Error correction routing scalability connections acknowledgement lower levels are unreliable services provided by layers OSI Network Layers Physical Layer: Transmits 0's and 1's This must happen reliably More than one method is used here Not in TCP/IP, although this function must be performed Data link layer: Form 0's and 1's into frames Send acks Hide errors from network layer For broadcast: Manage shared channel Link layer in TCP/IP Network layer: routing For broadcast: Do nothing Internet layer in TCP/IP Packet format in TCP/IP is called IP (Internet Protocol) IP routing is not always effective Transport layer: Separate messages into packets and put them back together TCP and UDP handle this in TCP/IP TCP is reliable, UDP is not Session layer: maintain sessions Sessions involve keep track of which computer should send data, checkpointing long transmissions, etc. Not in TCP/IP, TCP handles some of these functions Presentation layer: Convert internal information to a representation that can be transmitted Allows high-level structures to be defined and transmitted (objects, etc) Not in TCP/IP Application layer: Contains protocols like HTTP, SMTP, SSH, etc. Servers, etc. are here We will use the TCP/IP model, because it exists And we're programming this semester, not philosophizing Why TCP/IP? It put existing protocols into a model OSI is complex and includes layers nobody needs Initial implementations were slow compared to BSD UNIX Politics: Friendly old UNIX had TCP/IP, OSI standard was from the government Was that bad? TCP/IP isn't that generic No physical layer definition Simple client and server in C