1 / 36

Introduction to Computer Networks

Introduction to Computer Networks. Internetworking. University of Ilam By: Dr. Mozafar Bag-Mohammadi. Outline. Internetworking Best Effort Service Model Segmentation and Reassembly (SAR) Global Addressing Scheme Packet forwarding. Internetworking. Communication between networks.

sscudder
Download Presentation

Introduction to Computer Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Computer Networks Internetworking University of Ilam By: Dr. Mozafar Bag-Mohammadi

  2. Outline • Internetworking • Best Effort Service Model • Segmentation and Reassembly (SAR) • Global Addressing Scheme • Packet forwarding.

  3. Internetworking • Communication between networks. • Problems: • Different Networking technologies (Heterogeneity). • So many Networks (Scaling). • Some terminologies: • “internetworking” refer to an arbitrary collection of connected networks. • “Internet” the global internetwork. • “Network” either directly connected or switched network using any LAN technology such as Ethernet, Token ring, ATM, etc.

  4. Network 1 (Ethernet) H7 R3 H8 H2 H1 H3 Network 4 (point-to-point) Network 2 (Ethernet) R1 R2 H4 Network 3 (FDDI) H5 H6 IP Internet • Concatenation of Networks or “networks of Networks”. • “R” is routers and “H” is hosts.

  5. H1 H8 TCP TCP R1 R2 R3 IP IP IP IP IP FDDI PPP ETH ETH ETH FDDI PPP ETH IP Internet (cont) • Protocol Stack • Everything is running on top IP

  6. Source Routing • All routing information is provided by the source. • The address can be implemented by a linked list in the packet header.

  7. Virtual Circuit Switching • Problems with source routing: • The source must know the whole topology of network. • The number of switches (header) is variable. • 2nd solution: use the telephone model or virtual circuits. • Explicit connection setup (and tear-down) phase. This is called signaling. • Each flow is identified by a Virtual Circuits Identifier (VCI). • Switch needs to maintains a VC table.

  8. 0 Switch 1 3 1 2 Switch 2 2 3 1 5 11 0 Host A 7 0 Switch 3 1 3 4 Host B 2 Virtual Circuit Switching (cont) • Subsequence packets follow the same circuit • Sometimes called connection-oriented model. • VCIs is swapped in the switches. • Example: Lookup table.

  9. Virtual Circuit Model • Typically wait full RTT for connection setup before sending first data packet. • While the connection request contains the full address for destination, each data packet contains only a small identifier, making the per-packet header overhead small. • If a switch or a link on the path fails, the connection is broken and a new one needs to be established. • Connection setup provides an opportunity to reserve resources.

  10. Host D Host E 0 Switch 1 Host F 3 1 Switch 2 2 Host C 2 3 1 0 Host A 0 Switch 3 Host B Host G 1 3 2 Host H Datagram Switching • No connection setup phase since it is costly. • Each packet forwarded independently • Sometimes called connectionless model • Analogy: postal system • Each switch maintains a forwarding (routing) table

  11. Datagram Model • There is no round trip time delay waiting for connection setup; a host can send data as soon as it is ready. • Source host has no way of knowing if the network is capable of delivering a packet or if the destination host is even up. • Since packets are treated independently, it is possible to route around link and node failures. • Since every packet must carry the full address of the destination, the overhead per packet is higher.

  12. Cell Switching (ATM) • Connection-oriented packet-switched network • Used in both WAN and LAN settings • Signaling (connection setup) Protocol: Q.2931 • Specified by ATM forum • Packets are called cells • 5-byte header + 48-byte payload • Commonly transmitted over SONET • other physical layers possible

  13. Variable vs Fixed-Length Packets • No Optimal Length • if small: high header-to-data overhead • if large: low utilization for small messages • Fixed-Length Easier to Switch in Hardware • simpler • enables parallelism

  14. Big vs Small Packets • Small Improves Queue behavior • finer-grained pre-emption point for scheduling link • maximum packet = 4KB • link speed = 100Mbps • transmission time = 4096 x 8/100 = 327.68us • high priority packet may sit in the queue 327.68us • in contrast, 53 x 8/100 = 4.24us for ATM • near cut-through behavior • two 4KB packets arrive at same time • link idle for 327.68us while both arrive • at end of 327.68us, still have 8KB to transmit • in contrast, can transmit first cell after 4.24us • at end of 327.68us, just over 4KB left in queue

  15. Big vs Small (cont) • Small Improves Latency (for voice) • voice digitally encoded at 64KBps (8-bit samples at 8KHz) • need full cell’s worth of samples before sending cell • example: 1000-byte cells implies 125ms per cell (too long) • smaller latency implies no need for echo cancellors • ATM Compromise: 48 bytes = (32+64)/2

  16. 0 4 8 16 19 31 TOS Length V ersion HLen Ident Flags Offset TTL Protocol Checksum SourceAddr DestinationAddr Pad Options (variable) (variable) Data Service Model • Connectionless (datagram-based) • Best-effort delivery (unreliable service) • packets are lost. No recover from lost. • packets are delivered out of order • duplicate copies of a packet are delivered • packets can be delayed for a long time

  17. Packet Headers • The current Version is 4 or IPv4. • HLen- the Header Length: from 5-15 in 32-bit words. • Length- the total length of the packet including headers. Max length is 64K. • TTL: Time To Live is expressed in second. It is to prevent packet from permanently circulating in a loop. • Protocol: specify the packet application ex. 1 for ICMP. It is for demultiplexing to higher layer protocols. • Checksum: is a 1-complement error checksum for the header only.

  18. Packet Headers (Cont) • TOS: type of Service • Precedence Specify the priority • Type of Services Specify routing, for instance cheapest, fastest and more reliable • D for Delay • T for Throughput • R for Reliability • C for low cost. • Note: Precedence is only for inside channel queuing.

  19. Packet Headers (Cont) • Options If C set, the option will copied to all fragments. Otherwise, only to the first one. • Class 0 for control • Class 2 for debugging and measurement. Options are rarely used in today except for ‘loose’ and ‘strict’ source routing parameters. ‘loose’ and ‘strict’ source option sometimes, is used for IP encapsulation in another IP or “Tunneling”

  20. Fragmentation and Reassembly • Flags • DF: Don’t Fragment • MF: More Fragment coming In fragmentation, IP copy the original header and only modify The length, which is the new length, and offset. Offset is used for reassembly. • Note: Fragmentation may degrade the network performance. • TCP implement “Path MTU discovery”. It start with large packet and with DF set flag, if it passed, TCP keeps the same packet size, otherwise, it reduces it.

  21. Fragmentation and Reassembly (cont) • Each network has a Maximum Transfer Unit size, MTU • Strategy • fragment when necessary (MTU < Datagram) • try to avoid fragmentation at source host • re-fragmentation is possible • fragments are self-contained datagrams • delay reassembly until destination host • do not recover from lost fragments

  22. H1 R1 R2 R3 H8 ETH IP (1400) FDDI IP (1400) PPP IP (512) ETH IP (512) PPP IP (512) ETH IP (512) PPP IP (376) ETH IP (376) Example • Packet delivery from host H1 to host H8

  23. Start of header Ident = x Offset = 0 0 Rest of header 1400 data bytes Start of header Ident = x 1 Offset = 0 Rest of header 512 data bytes Start of header Ident = x 1 Offset = 512 Rest of header 512 data bytes Start of header Ident = x 0 Offset = 1024 Rest of header 376 data bytes Example (cont) The packets are fragmented as:

  24. 7 24 A: 0 Network Host 14 16 B: 1 0 Network Host 21 8 C: 1 1 0 Network Host Addressing • Each host in the network is identified by an address having the following property. • globally unique • hierarchical: network + host • Address Classes • Class D for Multicasting • Class E for experiments • Address Notation • 10.3.2.4 • 128.96.33.81 • 192.12.69.77

  25. IP Addresses • Example: • Class “A” address www.mit.edu • 18.181.0.31 • (18<128 => Class A) • Class “B” address mekong.stanford.edu • 171.64.74.155 • (128<171<128+64 => Class B)

  26. 142.12/19 Classless AddressingCIDR Class-based: A B C D 0 232-1 Classless: 128.9.0.0 65/8 128.9/16 0 232-1 216 128.9.16.14

  27. 128.9.19/24 128.9.25/24 128.9.16/20 128.9.176/20 Classless AddressingCIDR 128.9/16 0 232-1 128.9.16.14 Most specific route = “longest matching prefix”

  28. Forwarding Datagrams • “Network ID” uniquely identifies a physical network. • All hosts and routers sharing a Network ID share same physical network. • Every datagram contains a destination address. • Is the datagram for a host on directly attached network? • If no, consult forwarding table to find next-hop. • If only one next-hop, can use default routing.

  29. Forwarding Datagrams 128.17.20.1 e.g. 128.9.16.14 => Port 2 R2 Prefix Next-hop Port 3 65/8 128.17.16.1 128.17.14.1 R1 R3 1 2 128.9/16 128.17.14.1 2 2 128.9.16/20 128.17.14.1 3 7 128.9.19/24 128.17.10.1 128.9.25/24 128.17.14.1 2 R4 128.9.176/20 128.17.20.1 1 142.12/19 128.17.16.1 3 128.17.16.1

  30. Requires Routing Table Default Routing Default Routing Default Routing R1 R2 R3 R4 R5

  31. 3. 1. Output Scheduling 2. Forwarding Table Interconnect Forwarding Decision Forwarding Table Forwarding Decision Forwarding Table Forwarding Decision Inside a Router

  32. Forwarding in an IP Router • Lookup packet DA in forwarding table. • If known, forward to correct port. • If unknown, drop packet. • Decrement TTL, update header Checksum. • Forward packet to outgoing interface. • Transmit packet onto link.

  33. Address Translation • Map IP addresses into physical addresses • destination host • next hop router • ARP • table of IP to physical address bindings • broadcast request if IP address not in table • target machine responds with its physical address • table entries are discarded if not refreshed

  34. ARP Details • Request Format • HardwareType: type of physical network (e.g., Ethernet) • ProtocolType: type of higher layer protocol (e.g., IP) • HLEN & PLEN: length of physical and protocol addresses • Operation: request or response • Source/Target-Physical/Protocol addresses • Notes • table entries timeout in about 10 minutes • update table with source when you are the target • update table if already have an entry • do not refresh table entries upon reference

  35. 0 8 16 31 Hardware type = 1 ProtocolT ype = 0x0800 HLen = 48 PLen = 32 Operation SourceHardwareAddr (bytes 0 – 3) SourceHardwareAddr (bytes 4 – 5) SourceProtocolAddr (bytes 0 – 1) SourceProtocolAddr (bytes 2 – 3) T argetHardwareAddr (bytes 0 – 1) T argetHardwareAddr (bytes 2 – 5) T argetProtocolAddr (bytes 0 – 3) ARP Packet Format

  36. Internet Control Message Protocol (ICMP) • Echo (ping) • Redirect (from router to source host) • Destination unreachable (protocol, port, or host) • TTL exceeded (so datagrams don’t cycle forever) • Checksum failed • Reassembly failed • Cannot fragment

More Related