James Kao 04/11/2005 NETWORK -Performance -Latency is the minimum amount of time to transmit the smallest unit of information Setup latency is the time to get the first bit across and includes transmission latency. -Bandwidth is the speed that information flow across a network. -Fiber has bandwidth of approx 100Gbit/sec -speed is limited by the transmitting and receiving device and opacity at high frequencies. -quality of the fiber; info can travel ~1000km without regeneration -bandwidth can be increased by wavelength division multiplexing: using multiple frequencies to trasmit data. -Protocol: An agreement on how different parties talk. There are different layers of protocols. It is similar to politics -Hierarchical Protocols: communication between the different layers of a system -Peer to Peer Protocols: communication between the same layer on different machines Hierarchy --------------- ---------------- |application | | /\ | |-------------| Peer to Peer |-HierarChical-| | |<--------------->| \/ | |-------------| |--------------| . . . . |-------------| Physical signal |--------------| | | <-------------->| | |-------------| |--------------| -ISO Protocols 1. Physical layer: electrical signals 2. Data Link: transfer of packets between a direct connection, includes error dection/recovery. 3. Network layer: Provides connection and routing of packets (addresses/IP). 4. Transport layer: low level network access. Includes breaking messages into packets, flow control, retransmission and address generation. 5. Session layer: process to process protocols. 6. Presentation layer: takes care of differences in formats like character type, number represenation, full/half duplex. 7. Application layer: interaction with users. -WAN (Wide Area Networks) - individually built up broadcast networks -Broadcast networks: a single shared communication medium with no central controller to allocate access. -Aloha Network (simplest broadcast network) It sends message to a satellite and the satellite broadcasts the message. Because of the long delay to communicate with the satellite so can't listen. Throughput | 1/(2e) | _-_ | / \ | / \ | / \ | / \ | / \ | / \ |______________________ offered load -throughput can be imporived to 1/e by using sloted aloha where a message can only be transmitted in specified time slots. This way messages either don't interfere with each other or interfere completely. -Eithernet: Information transmitted across a coax cable and everyone can listen. (ether- an all pervasive medium) -Listen before broadcast. If a collision is detected, signal there is a collision and wait for a random interval (exponential with increasing mean) before retry. -Ethernet frame (used by all ethernet): destination address (6 bytes), source address (6 bytes), type (2 bytes), data (46-1500 bytes), frame check sequence (4 bytes). -Problems: Reliability: if there is a collision/jam then noone can do anything. Fairness: no guarantee against starvation. Bandwidth and range of transmission limited by cable (can be improved by using switch). Security: Anyone connected to listen to all traffic -More recent designs: -using switch to route packets. -different data rate, 10Mbit, 100Mbit, 1Gbit. -wireless (802.11) -Ring Networks: A type of broadcast network, has an additional protocol built on top of ring like point to point links +---------+ / \ / \ / \ + + | | | | + + \ / \ / \ / +---------+ Messages usually travel in one direction (unidirectional). A token (special packet) goes around the ring and anyone have the ring is allowed to transmit. If a station has nothing to broadcast it retransmits everything it received. It works in FIFO way, if a packet belongs to the station, take it off, otherwise retransmit it. Problems: If the ring is broken, the whole network goes down If the token gets corrupted or goes missing the network dies. There might be starvation. If a second token is created the system gets confused. -Ring network/ethernet can be used for LAN, they need to be linked to construct a WAN. -Three methods for link between two machines: -Circuit switching: direct wire connection between 2 ends. Like traditional telephone -Packet switching: Message is chopped up and broken into packets and sent in pieces. If done fast enough it's like a virtual circuit. -Message switching: Virtual circuit or physical link exists long enough for a complete message and is dropped after completion. -Name, addresses and routes. -Name: a symbolic term that's easy for people to remember. -Address: where something is, Usually contains number of the network, number of site on the network, and id of the host. e.g.jones@chaos.netnode.berkeley.edu -Route: A direction of which direction/route to pick for each step. e.g. hplabs!hp-pcd!hpcvc0!cliff Sometimes routing table can get very large and there can be many routes. In such cases, can keep a partial table. In LANs, only gateways need to worry about routing. -Communication Problems -Corrupted packets, need error correction or detection. -Station can not recieve fast enough, denial of service. -Receiver is down but sender still sends -Packets arrive out of order. -Datagram protocols: Used to deliver individual packets, packets are not guaranteed to arrive in order. -Connection: Used to guarantee delivery and order (Virtual circuit) -Sender and receiver must remember states. -To improve efficiency, acknowledgement can be for a group of packets or can be slightly delayed. -TCP/IP (a collection of network protocols making up the internet protocol suite) -Level 3, Network Layer: provides host to host datagram delivery. Header includes version# ( allows change of protocol), header length, total length, time to live (when the packet should be discarded), checksum (error checking), source address, destination address. -ICMP: Internet Control Message Protocol is used by gateways and hosts to tell each other conditions related to their IP services like routing, congestion etc.