1 / 133

Hosts and Routers

Learn about the roles of hosts and routers in computer networking, how routers forward packets, and how routing tables are used. Explore topics such as static vs dynamic routes, metrics, and interior vs exterior protocols.

petersonb
Download Presentation

Hosts and Routers

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. Hosts and Routers • The computers in Internet terminology are called hosts. They usually have one NIC (network interface card = network adapter = nätverkskort) • Routers are special purpose computers and they have more than one NIC • An old name for routers is gateways • Forward packets between networks (route and switch) • Transform packets as necessary to meet standards for each network • A Windows PC can act as a router if it has more than one NIC, and IP forwarding is enabled in the networking settings.

  2. What Does a Router Do? • Accepts incoming packets • Checks the destination address in the IP header • Look up for destination in the forwarding table • Sends packet to the appropriate next hop • The packet may be dropped if • There is no space in the router’s buffers • The TTL=0 • There is no matching row in the routing table

  3. Forwarding (Routing) Table • The forwarding table consists of two columns: “Destination network” and “Next hop”. • Destination network is some network address and the next hop is the address of the next router. • When the router is connected directly to a network, the “Next hop” is labeled as “Direct” meaning “Directly connected”

  4. Figure 19.29Network-specific routing

  5. Figure 19.31Default routing

  6. Default Route • In order to make the forwarding table shorter (smaller number of rows) the default route is introduced • “Default” or “Else” is a row that points to some “Next hop” and is used whenever a destination is not found in the forwarding table. • Hosts send all packets out of their network to the default router (or gateway)

  7. Figure 19.32 Example: Subnet mask based routing table

  8. Example 10 Using the table in Figure 19.32, the router receives a packet for destination 192.16.7.1. For each row, the mask is applied to the destination address until a match with the destination address is found. In this example, the router sends the packet through interface m0 (host specific).

  9. Example 11 Using the table in Figure 19.32, the router receives a packet for destination 193.14.5.22. For each row, the mask is applied to the destination address until a match with the next-hop address is found. In this example, the router sends the packet through interface m2 (network specific).

  10. Example 12 Using the table in Figure 19.32, the router receives a packet for destination 200.34.12.34. For each row, the mask is applied to the destination address, but no match is found. In this example, the router sends the packet through the default interface m0.

  11. Example: Unicast Routing Host with IP address 128.47.92.67 sends a packet to host 128.47.23.10 Router R1 checks its table and sends it to R2 through its interface 2. Router R2 checks its table and sends it to its interface 1 128.47.23.10 128.47.23.00 /24 1 R2 2 128.47.92.67 R3 2 1 R1 3 128.47.36.00 /24 128.47.36.97

  12. The Forwarding Table • Necessary in every host and the router • On Windows OS it can be seen using the command netstat –rn at the command prompt • Entries in the destination column are networks, not hosts • Once the interface on the router through which the packet is to be delivered is known, the physical address is used for delivery • Contains the columns: Destination (Network destination), Mask (Netmask), Next hop (Gateway), Interface and Metric

  13. Example

  14. How Routers Build the Routing Tables • Preprogrammed or Static Routes • The table is manually configured by a human • The routes cannot be dynamically changed if something fails • Dynamically calculated routes • Calculated by the software built in the routers that provide communication among routers • Algorithms that calculate shortest path are used • Complexity is increased, but the routes change automatically if some part of the network fails

  15. Metric • A metric is a cost assigned for passing through a network • The total cost of the path is the sum of the metrics for the networks that are on the path • Metrics are assigned in such a way that the “best pat” is the path with the minimum total cost

  16. The “Best Path” The “best path” from S to D is A C  B • Factors determining the best path • Bandwidth • Delay • Hop-count • Load • Money • Reliability • The cost or the metric can involve a single or several of these factors B S D A 4 C 1 2

  17. Interior vs. Exterior Protocols • The worldwide Internet is a very large network • It needs to be segmented in areas based upon the entity that administrates the networks and routers in the area • Autonomous System (AS) is a collection of networks and routers under single administration authority • Interior protocols or IGP (Interior Gateway Protocols) • Used for routing inside AS • Exterior protocols or EGP (Exterior Gateway Protocols) • Used for routing between ASs

  18. Figure 21.3Autonomous systems

  19. Figure 21.5 Initial routing tables in a small autonomous system

  20. Figure 21.6Final routing tables for Figure 21.5

  21. Interior Routing Protocols • The goal: To choose the best path, among a set of alternatives based on some or a combination of criteria (e. g. minimum delay, maximum throughput etc.) • The objectives are to use the network resources (bandwidth and the router’s buffers and processing power) in the best way • Two groups of interior protocols • Distance Vector protocols • Link State protocols

  22. Figure 21.2Popular routing protocols RIP = Routing Information Protocol OSPF = Open Shortest Path First BGP = Boarder Gateway Protocol

  23. Unicast vs. Multicast • Unicast: • One source to one destination • Multicast: • One source to many destinations • Many sources to many destinations • Many sources to one destination • Motivation for multicast routing • Growing demand (vide/audio conferences, vide streaming etc) • Bandwidth need to be saved

  24. Example Router 3 Receiver 1 Router 1 • If unicast routing is used, the links between the sender and the Router 1 will be overloaded (bandwidth required will depend on the number of receivers) Receiver 2 Sender Router 2 Receiver 3

  25. Figure 21.23Multicasting

  26. Group Membership vs. Multicast Routing • IGMP (Internet Group Management Protocol) • Keeps router up-to-date with group membership of entire LAN • A device can join or leave a group at any moment • Multicast Routing Protocols • MBone – A set of routers on the Internet that are running multicast routing protocols • Tunneling (encapsulation of multicast packets into unicast packets) is used in the rest of the network

  27. Note: In multicast routing, the router may forward the received packet through several of its ports.

  28. Note: IGMP is a group management protocol. It helps a multicast router create and update a list of loyal members related to each router interface.

  29. Figure 21.32MBONE

  30. Position of transport layer

  31. Chapters Chapter 22 Process-to-Process Delivery Chapter 23 Congestion Control and QoS

  32. Chapter 22 Process-to-ProcessDelivery:UDP and TCP

  33. Note: The transport layer is responsible for process-to-process delivery.

  34. Figure 22.1Types of data deliveries

  35. Application Application TCP, UDP TCP, UDP IP IP Physical Physical IP IP Physical Physical Virtual Connection at the Transport Layer Router Router Host Host Protocol stack in the host Protocol stack in the host Protocol stack in the router

  36. Figure 22.5Socket address • A socket is a data flow between two processes • that is identified by its socket address pair, i.e. • a unique combination of: • Transport protocol (UDP or TCP). • Source IP address and port number. • Destination IP address and port number.

  37. Figure 22.7Connection establishment

  38. Figure 22.8Connection termination

  39. Client-Server Paradigm • Used most often in Internet process-to-process communication, for example, email, web, file transfer, etc. • The client process initiates the communication. • The server process waits for the client to initiate communication, and responds by sending the information required. Example: Web server, email server, ftp server, etc. • A firewall often stops external clients from accessing internal servers, except certain web • Opposite: Peer-to-peer communication, where a program can act both as client (taking initiative) and server (responding to other).

  40. Multiplexing and Demultiplexing Receiver processes Sender processes Web Email MP3 Web Email MP3 TCP UDP TCP UDP IP IP IP datagrams IP datagrams

  41. Connection-oriented vs. Conectionless • A connection-oriented service requires both sender and receiver to create a connection before any data is transferred • TCP provides connection oriented service to the applications • A connectionless service does not create a connection first but simply sends the data • UDP provides connectionless service to the applications

  42. Example: Connection-oriented Service • An analogy to the connection-oriented service is telephone conversation

  43. Example: Connectionless Service • An analogy to connectionless service is the delivery of the mail

  44. Data-link vs. Transport Layer • Data link layer • Responsibile for reliability between two directly connected points • Transport layer • Resposibe for reliability over the internetwork Duties of the data-link layer Network 1 Network 3 Network 2 Internetwork Duties of the data-link layer Duties of the data-link layer Duties of the transport layer

  45. Reliable vs. Unreliable • Transport layer can offer • Unreliable service (UDP) • No guarantee that the packet will be delivered to the destination • Useful especially for transmitting audio and video files where waiting for acknowledgement can be annoying for the user • Reliable service (TCP) • Connection establishment • Connection maintenance • Connection termination

  46. User Datagram Protocol (UDP) • No reliability or connection management! • Serves solely as a labeling mechanism for demultiplexing at the receiver end • Use predominantly by protocols that do no require the strict service guarantees offered by TCP (e.g. real-time multimedia protocols) • Additional intelligence built at the application layer if needed

  47. Transmission Control protocol (TCP) • Provides a connection-oriented end-to-end (user-to-user) reliable byte stream service in both directions (full duplex) • Divides a byte stream into a sequence of segments and sends them to the destination via IP • Uses the destination port, source port to identify the application to which the segment is sent (multiplexing the sessions) • Uses sliding window like scheme for flow control and congestion control

  48. B A Connection Management • Two way handshake protocol is not enough because of potential delays in either A’s request or B’s responce, as shown below. Possibility of confusion exists. A sends a connection request t1 A sends connection request again B receives connection request B establishes a connection and sends an acknowledgement t2 t3 A receives the acknowledgement and establishes a connection t4 A and B exchange data and eventually disconnect B receives connection request B establishes a connection and sends an acknowledgement t5 time time

  49. B A Three-way Handshake Protocol for Connection Establishment A sends a connection request with seq. no. x t1 t2 A sends connection request again with seq. no. y B sends acknowledgement y+1 and seq. no. z t3 A receives the acknowledgement y+1 and sends acknowledgement z+1 t4 The connection is established B sends acknowledgement x+1 and seq. no. w t5 A does not send an acknowledgement and no connection is established t6 time time

  50. Server does passive open Accept connection request Send acceptance Start connection SYN Active open Send connection request SYN+ACK ACK DATA Connection Establishment and Termination • 3-way handshake used for connection establishment • Randomly chosen sequence number is conveyed to the other end • Similar FIN, FIN+ACK exchange used for connection termination The three-way handshake TCP segments are labeled with SYN. The length of data in the first two is 0

More Related