4/11/05 Lecture Network Performance Parameters ---------------------------------------------------------------------------------------------- Latency – the minimum time to get the minimum amount of information between two sites -transmission latency: the time it takes for a bit to get from one end to the other after the connection is set up -set-up latency: the time to get the first bit there only -so set-up latency = transmission latency + set up time Bandwidth- how many bits per second a link can transmit -for a packet of size k, the total time it takes to transmit is latency + k/bandwidth Protocols ---------------------------------------------------------------------------------------------- -this is how you talk or an agreement between host on how information is to be transmitted between them and how it is to be formatted -there are layers in protocols Hierarchical protocols-relates layers in a given system (like network or OS) Peer to peer protocols-relates between the same layers of different systems for example, System A System B ------------ ------------ A | ------------ <-------> ------------ | | ------------ <-------> ------------ |-----> These are Hierarchical protocols or | or communication within a given ------------ <-------> ------------ | system. | ------------ <-------> ------------ | | ------------ <-------> ------------ V | | V These are peer to peer protocols or communication between two systems ISO Layers: ---------------------------------------------------------------------------------------------- 1. Physical Layer: lowest layer, determines the electrical mechanism for transmitting -the bottom link of the example is the physical layer, the layer that actually sends bits through a wire 2. Data Link protocal Layer: creates packets, error detection and recovery from the physical layer 3. Network Layer: connections between nodes that are not directly connected can exist, does routing and addressing 4) Transport Layer: makes sure packet is in order at both end of a connection, flow control(if a packet is sent then it must be recieved), physical address generation 5) Session Layer: process to process protocols 6) Presentation Layer: resolves differences between sites in formats 7) Application Layer: interacts with the user, electronic mail, etc. -5,6,7 definitions are not very meaningful, usually mushed together Question: What level is the server? -depends on what you mean by the server -could involve every layer -networks is not Prof. Smith's specialty Question: Is networks considered part of OS? -back in the days everything was part of OS -databases were overgrown file systems that grew up and moved out of the house -networking was just another IO until it developed -it is important to know something about networks WAN (Wide Area Network) - made up of interconnected LANS LAN(Local Area Network)- usually broadcast networks Broadcast Networks: single shared communication medium, no central controller -simplest is a radio broadcast ALOHA network in hawaii is a simple broadcast network. -all it does is broadcast blindly and use recoverly protocals if packet doesn't get through. -Why can't it be smarter? -if a satalite sends for 10 seconds then the reciever has to be constantly listening throughput | | | |--------------- maximum utilization is 1/2e = 18% because of | | high collisions | V | * * * | * * | * * | * * |________________________ offered load Regular Aloha transmission: | | | |-----|-----|-----|-----|----|----|----|-----|-----|--------- | | __ | ___ | ___ ___ | ____________ | ____________ -the transmissions are arbitrary, needs to back off if there is collision Slotted Aloha: | | | |-----|-----|-----|-----|----|----|----|-----|-----|--------- | |__ | ___ | ___ ___ | ___ | ___ | | | | | | V V no collision collision -with slotted aloha the transmision time is set so either there is no collision at one time slot or there is collision -it doubles the bandwidth of Aloha network Ethernet (use of physical coax cable) -every who is connected to the cable puts a pin in the wire. - in the 19th centry, people thought if you transmit light through a medium, it creates a signal called ether -Carrier sense: listen before broadcasting, defer until channel is clear, then broadcast. -Carrier Sense multiple Access, with collision detection - CSMA/CD -also listen while bradcasting. Collision can still happen if two stations start up at exactly the same time. If collision detected, jam network so that everyone will know about collision -then wait a random interval and retry. -If repeated collisions, wait long and long intervals. Ethernet Frame -basically the packet sent through the ethernet destination address(6 bytes) source address (6 bytes) data (46-1500 bytes) -the size of the frame simplifies error detection not error correction -the longest a cable can be is 4000 feet. (size has to do with collision detection) -uses switch to route. -Wireless Ethernet (801.11a,b,g) -all uses the same frames. Ring network -is a type of broadcast network -looks like a ring of hosts -normally, an electronic token(special packet) circulates at a high speed around the ring. -if a station doesn't have anything to broadcast, it just retransmits everything it recieves -when ready to broadcast, a station waits until the token passes by. -Instead of retransmitting the token, send packet. -you keep forwarding packets (FIFO) until you find one that is address to this host -if no one claims it, the sender would swallow it, when it comes back around. -if any station dies, token can't circulate so ring dies. -if token is missing or corrupted, system dies. -starvation is possible, if someone grabs a token that doesnt belong to them -if a second token is created, system can get messed up Three methods for lining between machines: (types of switching) circuit switching - like a phone company, you have circuit between the source and destination. packet switching - communications are broken into packets and sent piece by piece Message switching - a virtual circuit exist for long enough to complete a message and then the circuit is dropped. Or can use physical link. Gateways- machines that forward between networks. -a packet must be forwarded from machine to machine until it reaches its destination 3 things to help you get a packet to where you want: 1) Name: a symbolic term for something, good for people to remember 2) Address: where the thing is, in a internetwork situation, the number of the site on the network 3)route:directions for how to get there from here. -routing is more effecienct if it is done by the network instead of having a host specify the particular route in every send. -using routing tables -routing tables can be very larg. -In LAN only one gateway worry about routing while all the others just ship the packets Communication Problems: -transmission errors: address is corrupted and the packet circulates forever -host has packet buffers full so it has no place to put another incoming packet -reciever is down but sender sends anyways -packets arrive out of order Datagram protocols: -used to deliver individual packets -not guaranteed to get there or in order -useful for certain applications like streaming video Connections: -guarentees proper delivery of packets -once it is established no packets should be lost and should be in order -in a simple acknowledgedment based protocol, a serial number is stored in every packet. -sender assigns serial numbers, increments for every packet (sequence number) -once a sender sends one or more packets, the reciever sends an ack for every packet or group of packets recieved. -sender waits for ack before sending the next packet. -if a sender does not recieve the ack within some time frame, it will assume that the packet is lost, and retransmits it -flow control problem: if the reciever run out of buffer space and have to start discarding data. TCP/IP -collection of different protocols to make up the internet Level 3 - Network Layer: IP - Internet Protocol - provides host-to- host datagram delivery. -Provides packet routing, will insulate higher levels from network specific characteristics (e.g. packet size). Fields of IP packet header include: version, header length, total length, ID (same for all fragments of datagram), time-to-live, checksum, source address, destination address. IP address 32 bits. (newer version longer). Broken into four 8-bit seg- ments. Addresses allocated in blocks. ICMP - Internet Control Message Protocol - used by gateways and hosts to approse other hosts of conditions related to their IP ser-vices. ARP - address resolution protocol - Maps an IP address to an associated ethernet address. (32 bits -> 48 bits). RARP - Reverse ARP- Maps an ethernet address to an associated IP address. Level 4- Transport Layer: TCP - Transmission Control Protocol: connection oriented, reliable, byte-stream protocol. TCP packet header includes: source port (identifies process or service in sender), destination port, sequence number (32 bits), acknowledgement number, control flags (SYN (connection request) ACK, RST (reset), FIN (end)), window (window size- number of packets that will be accepted), checksum. Provides means to connect with a socket [IP address, port number]. Takes care of timeouts, retransmission, flow control. Some well known ports: 20, 21 (FTP), 23 (Telnet), 25 (SMTP) UDP - User Datagram Protocol - unacknowledged transaction-oriented protocol parallel to TCP. Levels 5-7: Session, Presentation and Application Layers: SMTP- Simple Mail Transfer Protocol DNS - Domain Name Service- maps names to addresses Top level is Network Information Center (NIC) computers. FTP - File Transfer Protocol Telnet - provides virtual terminal services.