* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Introduction to computer communication networks
SIP extensions for the IP Multimedia Subsystem wikipedia , lookup
Net neutrality wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
Point-to-Point Protocol over Ethernet wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Distributed firewall wikipedia , lookup
Net neutrality law wikipedia , lookup
Network tap wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Computer network wikipedia , lookup
Deep packet inspection wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Airborne Networking wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Internet protocol suite wikipedia , lookup
UniPro protocol stack wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Introduction to Network Computing Bill Chu The World-Wide-Web revolution Virtually all the general purpose computers are connected in the past five years. Killer applications Visical World Wide Web Email E-commerce / On-line trading Napster E-Business The Internet has changed the way we Understand computing Use/write applications Deliver application Maintain applications Sample network-based applications Hotmail Yahoo Amazon.com Tax return Games E-bay Cracking of DES The network has become the computer storage library market Introduction to computer communication networks Bei-Tseng (Bill) Chu Protocol A protocol is a series of steps, involving two or more parties, designed to accomplish a task Everyone involved in the protocol must know the protocol and all of the steps to follow in advance Everyone in the protocol must agree to follow it The protocol must be unambiguous; each step must be well defined and there must be no chance of a misunderstanding. The protocol must be complete; there must be a specified action for every possible situation. Communication Protocol Model A template to describe a protocol It has three components Address: naming Format: messages Behavior: rules Protocol Model Address: - how to name a partner Format: - specify the message formats Rules: - specify the behaviors of the protocol - what should be done when something happens Protocol Example: Phone Phone conversation Protocol Address: phone number xxx-xxxx Format: English Rules: - dial when initiating - pick up phone when ringing - ... Can a single protocol do it all? Computer communication has to deal all sorts of problems Electrical/Optical signals/noise Errror detection and recovery medium control access message boundary routing, fragmentation flow control (net congestion) loss and duplicated messages synchronization representation application specific Yes. It can be done but how to develop in timely fashion (debug, verify and low cost) how to maintain it how to extend and evolve it Layered Approach Divide and conquer partition into multiple layers of software each layer has clear programming interfaces each layer solves a limited set of problems each layer encapsulates the related details Pros each interface provides a service to adjacent layers reduce complexity, isolate changes, promote manageability Cons efficiency ISO Reference Model Layer Number Layer Name Problems to Be Solved 7 6 5 4 3 2 1 Application layer Presentation layer Session layer Transport layer Network layer Data link layer Physical layer application specific (Lab #2) data representation (XDR) synchronization & dialog (client/server) reliable delivery of messages (sockets) routing & fragmentation medium access control & framing signaling, physical connections Not every layer is created equal Some functions occurs in multiple layers: + Error handling may be in every layer + Flow control can be in multiple layers physical and data link are hardware heavy network and transport are software heavy session and presentation are typically light layers ISO vs. TCP/IP 7.Application Application 6.Presentation 5.Session 4.Transport Transport 3.Network Internet 2.Data Link Host to network 1. Physical Physical layer protocols Highly physical network technology dependent Main tasks define the signaling protocol what is the meaning of 1s or 0s what is bad signals define the physical connections required voltages or frequencies RS232 connectors for RS232 serial line communication RJ45 or BNC connectors for Ethernet define the communication media define the network topology Physical Network Technologies Circuit-switched network (CS) connection-oriented network establish connection before communication once communication established, a circuit line is reserved for the communicating partners example: telephone network Packet-switched network (PS) store-forward based network packet sent from a node to another node the intermediate node stores the packet and decides to forward to another node towards the destination no circuit line is reserved example: Ethernet Circuit connection Routing table In Out 2 4 Host B in out Routing table Host A Routing table In Out 3 4 2 1 Routing table In Out 2 4 In Out 2 3 2 4 Comparisons: CS and PS Circuit-switched line resource performance cost adaptive routing switch device reliability utilization dedicated guaranteed expensive not easy highly complex high low Packet-switched shared averaged less easy simple higher higher Network Types by Scope WAN MAN wide area network cross large span of space (continental) typically heterogeneous and low speed example: Internet metro-area network regional scope (city-wide) LAN local area network limited scope (a couple of buildings) typically homogeneous & high speed example: Ethernet & Token ring Network Transmission Medium Open air Optical radio, microwaves, satellites, infrared noise signals, collision clear signals, low power and high rate (Gbps) Copper wire Lower cost interfaces Bi-directional Bus Network Topology Every nodes tap into a common medium Signals may collide with each other need to arbitrate who will get the bus capable of broadcasting message (one send & many listen) the common medium is the bottleneck single node failure causes no network failure the medium failure brings down the network Example: (old, 10BASE2, 10BASE5) Ethernet common medium Cable Modem Star Network Topology One node at the center as the master node Other nodes linked to the master as slaves slaves communicate via master easy to arbitrate among slaves (master decides) not scalable (the master is the bottleneck) normally for small networks or that requires predictable performance master failure shutdowns the whole net Example: Ethernet, DSL slave Master slave slave slave slave Ring Network Topology Nodes are arranged in a ring One node receives from its predecessor & sends to its successor arbitrate who can access the ring messages forwarded by each node sender deletes its messages from the ring the common ring is the single point of failure (complicated connectors needed) Mash Network Topology Nodes are arranged in grids each node can talk to its neighbors directly non-neighbor nodes needs store-andforward for communication Hyper Network Topology No restrictions on how to link the nodes Topology can adapt to individual organization needs slave Master slave slave slave slave Data Link Layer Protocols Main tasks medium access control framing arbitrate who can use the transmission medium define the boundaries of a packet Physical technology dependent (like physical layer) typically implemented in hardware or firmware when you buy a network card, you get both physical and data link layer protocols in the card Introduction to Internet and TCP/IP Bei-Tseng (Bill) Chu Motivations for Internet Observations: Different physical networks everywhere Limited connectivity connection between limited hosts different needs for different technologies legacy networks each physical technology has its limits Different technologies use different “languages” Need for a uniform virtual network universal connectivity every host speaks the same language independent of physical networks Virtual Network over Physical Networks Internet Virtual network Physical network Internet Protocol (Network layer) Ethernet Token Ring …... hosts ATM Design Goals of Internet A virtual (global) network independent of physical technologies independent of locations universal language Universal connectivity every host is equal no matter of Scalable growth without limits its architecture and system origin its physical network attachment Robust no single point of failure Problems to be Solved Universal naming Routing how to route IP packages among different local networks to reach the destination? Fragmentation how to translate the universal name to local name used by local physical network? different physical networks use different package sizes. how this should be handled? Error handling Internet Architecture Internet: ‘‘the mother of all networks’’ THE network of (interconnected) networks Physical networks interconnected via gateways Gateway(router) is a host glues nets together Other nets attached to multiple nets forward IP packages between nets Gateway Gateway Token Ring Ethernet IP Packet Format IP packet consists of header and data portions IP header IP data portion IP Header Format V HL type total length Identification F frag. offset TTL prot header cksum Source IP address Destination IP address options if any IP Address IP address specifies a connection to a network instead of a host Dotted notation IP address == NetID + HostID each byte in an IP address represented as a decimal bytes are separated with a period (.) example: 152.15.35.44 Classes 0 8 16 24 class A 0 class B 10 class C 110 class D 1110 Multicast address class E 11110 reserved for future use NetID 31 HostID NetID HostID NetID HostID How do computers talk to each other on an ethernet bus 8.2.1.1 00550DA2F5D82 8.2.1.2 02550JA2F5D82 8.2.1.3 02950JX2F5Y82 Each computer on the internet as a unique IP address. Each network interface (e.g. ethernet card) has a unique address 8.2.1.1 wants to send a message 8.2.1.3 It yells “yaahoo, who is 8.1.2.3” Each computer listens to messages on the bus (collision detection and resolution) for “yaahoo” 8.2.1.3 replies to 00550DA2F5D82 “I am 02950JX2F5Y82” 8.2.1.1 sends the message to 8.2.1.3. IP Routing Principles Route packages according to their destination IP net ID Forward packages hop by hop each gateway has the routing knowledge of its nearby neighbors hosts route packages to gateway and gateway does the rest. Routing types direct routing If the destination net ID is the same as the local net ID, no routing to gateway is needed and send the package via underlying physical network indirect routing if the destination net ID is different from the local net ID, send the package to an appropriate gateway. IP Rules Fragmentation rules if underlying net size < packet size & not final dest if final dest is reached & packets are fragmented break packet into small packets and send them reassemble fragmental packets into original size Error rules if IP header is erroneous, drop/report it Table-Driven IP Routing Each IP host has a IP routing table each entry associates a destination net ID with a forwarding gateway each route has a performance metrics number of hops to reach the destination Route table for 152.15.36.9 Dest. Net ID Next hop host NIF 163.29 152.15.254.2 54 e0 163.29.x.x ncsu 152.15.36.9 163.29.10.88 152.15.254.254 e0 Default 152.15.35.1 e0 152.15.x.x uncc net3 152.15.35.1 Routes in an IP Routing Table Next-hop routes Host-specific routines the destination is an IP net ID: a packages addressed to any host in the net, send to the associated gateway the destination is a complete IP address: route all packages to the specified host via the associated gateway Default routes the catch all routing: all packages not specified by the above, send the gateway associated with the default route. the gateway associated with the default route is called default gateway Topology of the internet 9.1.1.2 9.1.1.3 9.1.1.1 b c net: 9.1.1.x 9.1.1.4 8.2.1.1 8.2.1.2 8.2.1.3 2 3 a 1 d 4 net: 8.2.1.x hardware addresses net 3.1.1.x 8.2.1.4 net 1.1.1.x net 2.1.1.x Sub-netting All hosts in a network must have the same net work number As the number of networks grow, so does the need for net work numbers Solution: subnet, divide the host name portion of the IP address into subnet id and the host Subnet mask and routing table. Intranet example: home networking Broadband provider Internet Intranet IP address PC Internet IP Address PC PC Router Intranet IP address Intranet IP address Intranet IP address PPP protocol (phone dialin) Computer (client) dials to a modem. Computer on the other (ISP server) end is on the internet. The ISP server assigns an ip address for the dialing computer All messages send from the client are routed by the isp host to the rest of the internet. DHCP protocol (most ethernet) Client sends a message (on the local bus) to a DHCP server requesting an IP address for the session DHCP server assigns an ip address IP Fragmentation IP packages are broken to fit underlying physical network when a package is sent locations of fragmentation original package sender gateways that forward the package IP packages are reassembled at the final destination gateway fragment assemble net 1 net 2 IP Fragmentation Example Original IP datagram IP header 800 bytes 800 bytes fragmentation Fragment 1 (offset 0) IP header (fragment 1) 800 bytes Fragment 2 (offset 800) IP header (fragment 2) 800 bytes Fragment 3 (offset 1600) IP header (fragment 3) 250 bytes 250 bytes ISO vs. TCP/IP 7.Application Application 6.Presentation 5.Session 4.Transport Transport 3.Network Internet 2.Data Link Host to network 1. Physical Transport Layer Why do we need a transport layer? Network layer provides delivery only Users want to transport data from a host to a host in a best effort fashion from application to application in a reliable delivery Transport layer fits the gap between user needs and IP messaging provide communication endpoint for applications deliver messages reliably Problems to Be Solved in Transportation layer Missing packets Duplicated packets Out of order packets Flow control Synchronization Reliable Delivery via Unreliable Networks Missing packet Duplicate messages sequencing packets Flow control sequencing packets Out of order messages acknowledge and timeout retransmission wait and stop window-sliding Synchronization hand shaking Transport Protocols in TCP/IP User Datagram Protocol (UDP) provide communication endpoint for applications best effort delivery of messages (packets) message boundary is observed the protocol embedded in Internet Datagram sockets Transmission Control Protocol (TCP) provide communication endpoint for applications reliable delivery via connection-based communication no message boundary between packages the protocol embedded in Internet Stream sockets Establish a TCP Connection Three way handshaking application 1 TCPpack p; p.codebit=SYN; p.seq_no = x; p.winsize=S1; send (p); tcp_state=SYNSENT; receive(p); application 2 syn+x syn+ack+y p.ack = p.seq_no + 1; p.seq_no = x++; send(p); tcp_state=ESTABLISHED ack TCPpack pack; tcp_state=LISEN; receive(pack); pack.ack=pack.seq_no+1 pack.seq_no = y; pack.winsize=S2; send(pack); tcp_state=ESTABLISHED; Denial of service attacks Exploits the TCP session establishment protocol. An attacker will send syn, but never sends ack. This type of attack is also called “sync flood”. Synchronized attacks launched on multiple (often victim) machines. TCP Retransmission Sender is free to divide user stream data in packets expects an ack for each packet sent starts a timer when a packet is sent upon an ack reception, advances seq_no expected upon a timer expiration, resends the packet Receiver sends an ack whenever a packet is received deletes the packet if it duplicated is free to pass acknowledged packets to user is forced to pass to user the data when receives a PUSH