Networks Other Matters: draft Assignment 2 up (Labs 7 & 8 v. important!!) Ref: [Coulouris&al Ch 3, 4] network performance and principles OSI protocol; routing TCP/IP layers and packet organization IP addresses and NAT firewalls IEEE 802 network standards example: Ethernet virtualization: overlay networks (diagrams from Coulouris et all Distributed Systems) COMP2310 Lecture 23: Networks 2014 1
Network Performance ([Coulouris&al Fig 3.1]) also at chip & board level! latency: time for 1st byte of message to arrive determined primarily through software overheads and routing delays data transfer rate: rate at which subsequent bytes arrive determined primarily by network s physical characteristic time to transmit message = latency + length data transfer rate COMP2310 Lecture 23: Networks 2014 2
Network Principles messages transmitted in packets of restricted length (MTU: max. transfer unit) switching schemes broadcast circuit switching: series connection for whole message (c.f. old telephony) packet switching: packets individually routed to destination internetworks: communication in which several networks are linked together protocols: typically layered, to simplify software interfaces, hide heterogeneity N layers requires N transfers of control and N copies (2!) [Coulouris&al Fig 3.3] encapsulation [Coulouris&al Fig 3.4]: layers in OSI model COMP2310 Lecture 23: Networks 2014 3
[Coulouris&al Fig 3.5] Open Systems Interconnection Model Layers OSI loses out to TCP/IP (90 s) COMP2310 Lecture 23: Networks 2014 4
Internetwork Layers and Transmission Issues transport addressing via an IP address and a port number port numbers 0..1023 reserved for services (server daemons with root permissions) packet delivery: (UDP) datagram: one-shot delivery; networks retains [Coulouris&al Fig 3.6] Internetwork layer a virtual layer sub-layers are not clearly distinguished from each other Transmission Issues: network layer packets have a header and data field no info virtual circuit: a route involving all intervening nodes is set up any number of packets can be (re-) transmitted; routed via virtual circuit number COMP2310 Lecture 23: Networks 2014 5
Routing routers are node s in the network (connected to several network links) routing is process of choosing links at each stage achieved by looking up a routing table on the destination s IP address ([Coulouris&al Fig 3.7]): routing in a wide area network ([Coulouris&al Fig 3.8]): routing tables for nodes A and B COMP2310 Lecture 23: Networks 2014 6
Example: Simplified View of a University Campus Network ([Coulouris&al Fig 3.10]) COMP2310 Lecture 23: Networks 2014 7
Pseudo-code for RIP Routing Algorithm Routers exchange information using the router information protocol send: each t seconds or when ÌÐ changes, send ÌÐ on each non-faulty outgoing link receive: whenever a routing table ÌÖ is received on link Ò: ÓÖ ÐÐ ÖÓÛ ÊÖ Ò ÌÖ { ÊÖ º ÐÒ Òµ { º Ó Ø ÊÖ º Ó Ø ½ ÊÖ º ÐÒ Ò ÊÖ ÊÖ º ØÒØÓÒ ÒÓØ Ò ÌÐ µ ÊÖ ØÓ ÌÐ ÒÛ ØÒØÓÒ ØÓ Ìл» ÓÖ ÐÐ ÖÓÛ ÊÐ Ò ÌÐ { Ð ÊÖ º ØÒØÓÒ ÊÐ º ØÒØÓÒ ²² ÊÖ º Ó Ø < ÊÐ º Ó Ø ÊÐ º ÐÒ Ò µµ ÊÐ ÊÖ ÊÖ º Ó Ø < ÊÐ º Ó Ø ÖÑÓØ ÒÓ ØØÖ ÖÓÙØ»» } }»» ÊÐ º ÐÒ Ò ÖÑÓØ ÒÓ ÑÓÖ ÙØÓÖØØÚ enables network to be adaptive to arrival of new nodes, changing traffic conditions etc COMP2310 Lecture 23: Networks 2014 8
Routing and Congestion Control once a node reaches its capacity, its packet queues grow to its maximum length has no option but to drop further traffic this can cause re-transmission of dropped packets: can result in devastating loss of network performance! rule of thumb: all nodes must keep within 80% of their capacity node only knows address of previous node in the route it can request previous node to slow down rate of sending when near capacity this can propagate back to original sender note: vulnerability of nodes to denial of service attacks! COMP2310 Lecture 23: Networks 2014 9
The Internet Protocol ([Coulouris&al Fig 3.12]) TCP/IP layers IP protocol two main higher-level protocols: transport control protocol (TCP): reliable, connection-oriented user datagram protocol (UDP): unreliable, datagram-based ([Coulouris&al Fig 3.12]) encapsulation in a TCP message ([Coulouris&al Fig 3.17]) IP packet layout COMP2310 Lecture 23: Networks 2014 10
Internet IP Addressing and Protocols ([Coulouris&al Fig 3.15]) internet address structure, showing field sizes in bits ([Coulouris&al Fig 3.16]) decimal representation of Internet addresses reliability: IP header has a checksum IP layer must also insert the physical address of message destination source address is also included but can be forged ( spoofing ) note: packets can be received in any order; requires message to be assembled (at TCP level) why we need cognitive protocols COMP2310 Lecture 23: Networks 2014 11
IP Addressing Issues and Solutions: NAT networks addressing scheme must be universal and efficient in its use of the space the latter is not well achieved with IPv4! solutions include IPv6 (128 bit addresses), address re-mapping schemes (e.g. CIDR) and NAT Network Address Translation Protocol ([Coulouris&al Fig 3.18]) nodes inside NAT-enabled router use a private IP addresses (e.g. 192.168.y.x) when send a packet, router records source IP address & port number in its address translation table router replaces this with its own IP address and a virtual port number when router receives external packet with this virtual port number, it replaces this with the internal node s IP address and port number COMP2310 Lecture 23: Networks 2014 12
Firewall Configurations ([Coulouris&al Fig 3.21]) provide control on services, behaviors and users controlling behaviors (e.g. spam) may require examining message contents also deep packet analysis is used COMP2310 Lecture 23: Networks 2014 13
IEEE 802 Network Standards and the Ethernet IEEE No. Name Title ([Coulouris&al Fig 3.22]) Reference 802.3 Ethernet CSMA/CD Networks (Ethernet) [IEEE 1985a] 802.4 Token Bus Networks [IEEE 1985b] 802.5 Token Ring Networks [IEEE 1985c] 802.6 Metropolitan Area Networks [IEEE 1994] 802.11 WiFi Wireless Local Area Networks [IEEE 1999] 802.15.1 Bluetooth Wireless Personal Area Networks [IEEE 2002] 802.15.4 ZigBee Wireless Sensor Networks [IEEE 2003] 802.16 WiMAX Wireless Metropolitan Area Networks [IEEE 2004a] Ethernets: widely used for local area networks based on contention bus: single connection medium to all nodes nodes ignore messages which do not have their destination address requires collision detection: when 2 nodes try to use bus at same time protocol is called medium access control (MAC) packet ( frame ) layout: bytes: 7 1 6 6 2 46..1500 4 preamble S dest n. source length data checksum COMP2310 Lecture 23: Networks 2014 14
Virtual Networks - Overlay Architecture ([Coulouris&al Fig 4.16]) Skype overlay architecture Overlay networks are virtual network sitting on top of an existing network offering new/enhanced services e.g. multicasts, secure communication enables existing network layers to be extensible e.g. Skype: peer-to-peer internet telephony super nodes (SN): hosts meeting criteria, i.e. high bandwidth and reachability other users selects an SN; 8 SNs might get contacted for user searches TCP used for call requests; TCP or UDP use for voice streaming COMP2310 Lecture 23: Networks 2014 15
Summary network architecture is layered in a stack headers for each level are appended as message moves down addressing is via IP number (to route message to destination machine) and a port (direct message to destination application) TCP is connection-based (broken into packets), reliable; UDP is datagram-based (one shot); unreliable TCP/IP-v4 addresses structured into various type running out of space NAT (virtual port numbers), IPv6 schemes security is an increasing concern! networks are a whole subject of study on their own! COMP2310 Lecture 23: Networks 2014 16