Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Lecture 3: Networking and Internetworking Haibin Zhu, PhD. Assistant Professor Department of Computer Science Nipissing University © 2002
  2. 2. Contents <ul><li>3.1 Introduction </li></ul><ul><li>3.2 Types of network </li></ul><ul><li>3.3 Network principle </li></ul><ul><ul><li>IP routing </li></ul></ul><ul><li>3.4 Internet protocols </li></ul><ul><ul><li>TCP </li></ul></ul><ul><ul><li>IP </li></ul></ul><ul><li>3.5 Case study: </li></ul><ul><ul><li>Ether Net </li></ul></ul><ul><ul><li>ATM </li></ul></ul>
  3. 3. Basic terminology: <ul><li>Communication subsystem </li></ul><ul><ul><li>A collection of hardware and software components that provide the communication facilities for a distributed system. </li></ul></ul><ul><li>Host - devices that use a network for communication </li></ul><ul><li>Node - any computer or switching device on a network </li></ul><ul><li>Subnet - (CDK’s definition) set of interconnected nodes that employ same technology to communicate among themselves. </li></ul><ul><ul><li>(Not a standard definition of subnet - which usually denotes an organization of IP addresses and a physical location for routing.) </li></ul></ul>
  4. 4. What are the network issues? <ul><li>Performance </li></ul><ul><li>Scalability </li></ul><ul><li>Reliability </li></ul><ul><li>Security </li></ul><ul><li>Mobility </li></ul><ul><li>Quality of service </li></ul><ul><li>Multicasting </li></ul>
  5. 5. Performance: <ul><li>Message transmission time: </li></ul><ul><ul><li>=latency (the delay that occurs after a send op is executed before data starts to arrive at the dest) </li></ul></ul><ul><ul><li>+ length/data transfer rate (the speed data can be transfered) </li></ul></ul><ul><ul><li>(assuming no message fragmentation) </li></ul></ul><ul><li>Total system bandwidth: </li></ul><ul><ul><li>Total volume of traffic that can be transferred across the network in a given time </li></ul></ul>
  6. 6. Figure 3.1 Network types and comparison Range Bandwidth (Mbps) Latency (ms) LAN 1-2 kms 10-1000 1-10 WAN worldwide 0.010-600 100-500 MAN 2-50 kms 1-150 10 Wireless LAN 0.15-1.5 km 2-11 5-20 Wireless WAN worldwide 0.010-2 100-500 Internet worldwide 0.010-2 100-500
  7. 7. 3.3 Network Principles <ul><li>Packet transmission </li></ul><ul><ul><li>Let a computer have an enough buffer </li></ul></ul><ul><ul><li>Avoid undue delay </li></ul></ul><ul><li>Switching schemes </li></ul><ul><li>Protocols </li></ul><ul><li>Routing </li></ul>
  8. 8. Switching schemes: <ul><li>Broadcast </li></ul><ul><ul><li>Direct addressing </li></ul></ul><ul><li>Circuit switching </li></ul><ul><ul><li>Dialing 705-495-1431 </li></ul></ul><ul><li>Packet switching </li></ul><ul><ul><li>Store-and-forward </li></ul></ul><ul><li>Frame relay </li></ul><ul><ul><li>Fast packet switching based on a method of routing. </li></ul></ul>
  9. 9. Protocols: <ul><li>CDK: </li></ul><ul><ul><li>… a well-known set of rules and formats to be used for communication between processes including two parts of specification: </li></ul></ul><ul><ul><ul><li>The sequence of messages that must be exchanged </li></ul></ul></ul><ul><ul><ul><li>The format of the data in the messages </li></ul></ul></ul><ul><li>What is the difference between a protocol layer and a protocol suite? </li></ul><ul><ul><li>Each layer presents an interface to the layers above it that extends the properties of the underlying communication system. </li></ul></ul><ul><ul><li>A suit is a complete set of protocol layers. </li></ul></ul>
  10. 10. Figure 3.2 Conceptual layering of protocol software Layer n Layer 2 Layer 1 Message sent Message received Communication medium Sender Recipient
  11. 11. Figure 3.3 Encapsulation as it is applied in layered protocols
  12. 12. Figure 3.4 Protocol layers in the ISO Open Systems Interconnection (OSI) model
  13. 13. Figure 3.5 OSI protocol summary Layer Description Examples Application Protocols that are designed to meet the communication requirements of specific applications, often defining the interface to a service. HTTP, FTP , SMTP, CORBA IIOP Presentation Protocols at this level transmit data in a network representation that is independent of the representations used in individual computers, which may Differ. Encryption is also performed in this layer, if required. Secure Sockets ( SSL),CORBA Data Rep. Session At this level reliability and adaptation are performed, such as detection of failures and automatic recovery. Transport This is the lowest level at which messages (rather than packets) are handled. Messages are addressed to communication ports attached to processes, Protocols in this layer may be connection-oriented or connectionless. TCP, UDP Network Transfers data packets between computers in a specific network. In a WAN or an internetwork this involves the generation of a route passing through routers. In a single LAN no routing is required. IP, ATM virtual circuits Data link Responsible for transmission of packets between nodes that are directly connected by a physical link In a WAN transmission is between pairs of routers or between routers and hosts. In a LAN it is between any pair of hosts. Ethernet MAC, ATM cell transfer, PPP Physical The circuits and hardware that drive the network. It transmits sequences of binary data by analogue signalling, using amplitude or frequency modulation of electrical signals (on cable circuits), light signals (on fibre optic circuits) or other electromagnetic signals (on radio and microwave circuits). Ethernet base- band signalling, ISDN
  14. 14. Figure 3.6 Internetwork layers
  15. 15. Packet assembly and delivery: <ul><li>assembly </li></ul><ul><ul><li>Transport layer usually handles assembly and reassembly </li></ul></ul><ul><ul><li>Packets consist of a header and a data. </li></ul></ul><ul><ul><li>If the data > MTU (maximum transfer unit), it must be divided into multiple packets. </li></ul></ul><ul><ul><li>A transport address is the network address of host + port number. </li></ul></ul><ul><li>Delivery </li></ul><ul><ul><li>Two approaches to delivery in the network layer </li></ul></ul><ul><ul><ul><li>Datagram delivery </li></ul></ul></ul><ul><ul><ul><li>Virtual circuit packet delivery </li></ul></ul></ul>
  16. 16. Routing <ul><ul><li>decide the route for each packet </li></ul></ul><ul><ul><li>update knowledge of the network </li></ul></ul>Routing in a wide area network Hosts Links or local networks A D E B C 1 2 5 4 3 6 Routers
  17. 17. Figure 3.8 Routing tables for the network in Figure 3.7 Routings from D Routings from E To Link Cost To Link Cost A B C D E 3 3 6 local 6 1 2 2 0 1 A B C D E 4 4 5 6 local 2 1 1 1 0 Routings from A Routings from B Routings from C To Link Cost To Link Cost To Link Cost A B C D E local 1 1 3 1 0 1 2 1 2 A B C D E 1 local 2 1 4 1 0 1 2 1 A B C D E 2 2 local 5 5 2 1 0 2 1 Hosts Links or local networks A D E B C 1 2 5 4 3 6 Routers
  18. 18. Link-state algorithm: <ul><li>keep a distance vector for destinations in routing table </li></ul><ul><li>send a summary of routing table to neighbors using RIP (router information protocol) </li></ul><ul><li>read tables from neighbors and update as needed </li></ul>
  19. 19. Figure 3.9 Pseudo-code for RIP routing algorithm <ul><li>Send: Each t seconds or when Tl changes, send Tl on each non-faulty outgoing link. </li></ul><ul><li>Receive: Whenever a routing table Tr is received on link n : </li></ul><ul><ul><li>for all rows Rr in Tr { </li></ul></ul><ul><ul><ul><li>if ( Rr.link <> n ) {//Rr.link ==n means that the local will not use it a route(it is a go and return route) </li></ul></ul></ul><ul><ul><ul><li>//the neighbour’s link might be used as a possible route for the local </li></ul></ul></ul><ul><ul><ul><ul><li>Rr.cost = Rr.cost + 1; //if the local use this link </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Rr.link = n ; //if the local use this link </li></ul></ul></ul></ul><ul><ul><ul><ul><li>if ( Rr.destination is not in Tl ) add Rr to Tl; </li></ul></ul></ul></ul><ul><ul><ul><ul><li>// add new destination to Tl </li></ul></ul></ul></ul><ul><ul><ul><ul><li>else for all rows Rl in Tl { </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>if ( Rr.destination = Rl.destination and </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>(Rr.cost < Rl.cost or Rl.link = n )) Rl = Rr; </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>// Rr.cost < Rl.cost : remote node has better route </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>// Rl.link = n : remote node is more authoritative </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><li>} </li></ul></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><li>} </li></ul></ul>
  20. 20. Details: <ul><li>t is typically 30 seconds </li></ul><ul><li>when a faulty link is detected, cost is set to </li></ul><ul><li>costs can be based on bandwidth rather than hops </li></ul><ul><li>slow convergence and loops are a problem </li></ul>
  21. 21. 3.4 Internet Protocols <ul><li>TCP(Transport Control Protocol) abstraction </li></ul><ul><li>TCP </li></ul><ul><ul><li>Ports and sockets </li></ul></ul><ul><ul><li>TCP protocol </li></ul></ul><ul><li>IP Addressing </li></ul><ul><li>IP protocol </li></ul><ul><li>IP routing </li></ul><ul><li>IPv6 </li></ul><ul><li>Firewall </li></ul>
  22. 22. Figure 3.12 TCP/IP layers Messages (UDP) or Streams (TCP) Application Transport Internet UDP(User Datagram Protocol) or TCP packets IP datagrams Network-specific frames Message Layers Underlying network Network interface
  23. 23. Figure 3.13 Encapsulation in a message transmitted via TCP over an Ethernet Application message TCP header IP header Ethernet header Ethernet frame port TCP IP
  24. 24. TCP abstractions: <ul><li>abstraction of a stream of bytes </li></ul><ul><li>a connection is established before messages are sent </li></ul><ul><li>assumes one process is the client and one is the server in establishing a connection </li></ul><ul><li>messages are sent using handles rather than source-destination addresses </li></ul>
  25. 25. TCP <ul><li>Transport services </li></ul><ul><ul><li>Use ports </li></ul></ul><ul><li>Additional mechanisms </li></ul><ul><ul><li>Sequencing (segment number) </li></ul></ul><ul><ul><li>Flow control (segment number + ack + win-size) </li></ul></ul><ul><ul><li>Retransmission (no ack, retransmit) </li></ul></ul><ul><ul><li>Buffering (discard + retransmit ) </li></ul></ul><ul><ul><li>Checksum (if checksum not the same, drop) </li></ul></ul>
  26. 26. Ports: <ul><li>A message destination specified by a small integer (16 bits) any process can send a message to it </li></ul><ul><li>Internet protocols use the combination (IP address, local port) </li></ul><ul><li>IANA (Internet Assigned Numbers Authority) ports: </li></ul><ul><ul><li>well-known ports: 1 - 1023 </li></ul></ul><ul><ul><li>registered ports: 1024 - 49151 </li></ul></ul><ul><ul><li>dynamic or private ports: 49152 - 65535 </li></ul></ul>
  27. 27. UDP <ul><li>A transport-level replica of IP </li></ul><ul><li>Encapsulated with an IP packet </li></ul><ul><li>Source + dest. port numbers </li></ul><ul><li>No guarantee of delivery </li></ul><ul><li>Only checksum added as optional </li></ul><ul><li>Up to 64KB packet </li></ul><ul><li>Fast </li></ul>
  28. 28. Figure 3.14 The programmer's conceptual view of a TCP/IP Internet IP-Internet Protocol
  29. 29. IP Addressing: <ul><li>Universal </li></ul><ul><li>Efficient </li></ul><ul><ul><li>Rate of growth </li></ul></ul><ul><ul><li>Address space allocation </li></ul></ul><ul><li>Lend itself to the development of a flexible and efficient routing scheme </li></ul>
  30. 30. Internet address structure, showing field sizes in bits Reserved >255 All others
  31. 31. Figure 3.16 Decimal representation of Internet addresses octet 1 octet 2 octet 3 Class A: 1 to 127 0 to 255 0 to 255 1 to 254 Class B: 128 to 191 Class C: 192 to 223 224 to 239 Class D (multicast): Network ID Network ID Network ID Host ID Host ID Host ID Multicast address 0 to 255 0 to 255 1 to 254 0 to 255 0 to 255 0 to 255 0 to 255 0 to 255 0 to 255 Multicast address 0 to 255 0 to 255 1 to 254 240 to 255 Class E (reserved): to to to to to Range of addresses
  32. 32. Figure 3.17 IP packet layout
  33. 33. Figure 3.18 IPv6 header layout
  34. 34. Firewalls <ul><li>A system designed to prevent unauthorized access to or from a private network . </li></ul><ul><ul><li>Service control </li></ul></ul><ul><ul><li>Behavior control </li></ul></ul><ul><ul><li>User control </li></ul></ul><ul><ul><li>IP address filtering </li></ul></ul><ul><ul><li>TCP gateway </li></ul></ul><ul><ul><li>Application-level gateway </li></ul></ul>
  35. 35. Figure 3.20 Firewall configurations
  36. 36. Figure 3.21 IEEE 802 network standards IEEE No. Title Reference 802.3 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 Wireless Local Area Networks [IEEE 1999]
  37. 37. 3.5 Network Case study <ul><li>Ethernet </li></ul><ul><ul><li>CSMA/CD (Carrier Sensing Multiple Access/ Collision Detection ) http://www.erg.abdn.ac.uk/users/gorry/course/lan-pages/csma-cd.html </li></ul></ul><ul><ul><li>Package broadcasting </li></ul></ul><ul><ul><li>Package layout </li></ul></ul><ul><ul><ul><li>Preamble(7)+S(1)+Dest. Addr(6) + Source Addr.(6) + Length(2)+ data(46-1500)+checksum(4) </li></ul></ul></ul><ul><li>http://media.pearsoncmg.com/aw/aw_kurose_network_2/applets/csmacd/csmacd.html </li></ul><ul><li>http://www2.rad.com/networks/2001/ethernet/csma.htm </li></ul>
  38. 38. Figure 3.22 Wireless LAN configuration Hidden stations, Fading, Collision masking CSMA/CA (Collision Avoidance) http://www.pcworld.com/howto/article/0,aid,15531,00.asp
  39. 39. ATM (Asynchronous Transfer Mode) <ul><li>Cell relay: </li></ul><ul><ul><li>http://www.webopedia.com/TERM/c/cell_relay.html </li></ul></ul><ul><ul><li>http://www.kevinboone.com/compdict/compdict_ATM_cell_relay.html </li></ul></ul><ul><li>Virtual channel: </li></ul><ul><ul><li>A logical unidirectional association between two endpoints of a link in the physical path from source to destination. </li></ul></ul><ul><li>Virtual path: </li></ul><ul><ul><li>A bundle of virtual channels that are associated with a physical path between two switching nodes. </li></ul></ul>
  40. 40. Figure 3.23 ATM protocol layers
  41. 41. Figure 3.24 ATM cell layout Figure 3.25 Switching virtual paths in an ATM network
  42. 42. Summary <ul><li>Network Principle </li></ul><ul><ul><li>Packet transmission </li></ul></ul><ul><ul><li>Switching </li></ul></ul><ul><ul><li>Protocols </li></ul></ul><ul><ul><li>Routing </li></ul></ul><ul><li>Network Protocols </li></ul><ul><ul><li>TCP </li></ul></ul><ul><ul><li>IP Addressing </li></ul></ul><ul><ul><li>IP Protocol </li></ul></ul><ul><ul><li>IP routing </li></ul></ul><ul><ul><li>Firewall </li></ul></ul><ul><li>Case Study </li></ul><ul><ul><li>Ethernet </li></ul></ul><ul><ul><li>ATM </li></ul></ul>