Chapter 4 Network Layer

Size: px
Start display at page:

Download "Chapter 4 Network Layer"

Transcription

1 Sungkyunkwan University Chapter 4 Network Layer Prepared by H. Choo 2018-Fall Computer Networks Copyright Networking Laboratory 1/52

2 Presentation Outline 4.1 Introduction 4.2 Network-Layer Protocols 4.3 Unicast Routing 4.4 Multicast Routing 4.5 IPv Fall Computer Networks Networking Laboratory 2/237

3 4.1 Introduction (1/3) Video Content The video lets you have a view with a route of data packet on the Internet One of trillions involved in the trillions of Internet interactions that happen every second Look deep beneath the surface of the most basic Internet transaction, and follow the packet as it flows from your fingertips, through circuits, wires, and cables, to a host server, and then back again, all in less than a second Link: Fall Computer Networks Networking Laboratory 3/237

4 4.1 Introduction (2/3) Fall Computer Networks Networking Laboratory 4/237

5 4.1 Introduction (3/3) [Fig 4.1 Communication at the network layer ] 2018-Fall Computer Networks Networking Laboratory 5/237

6 4.1 Introduction Network-layer Services: Packetizing Encapsulating the payload (data received from upper layer) in a network-layer packet at the source If the content of the payload is too large, it needs to be fragmented Decapsulating the payload from the network layer packet at the destination If the packet is fragmented at the source or at routers along the path, the network layer is responsible for waiting until all fragments arrive, reassembling them, and delivering to the upper-layer 2018-Fall Computer Networks Networking Laboratory 6/237

7 4.1 Introduction Network-Layer Services Routing Since a physical network is a combination of networks (LANs and WANs), therefore, there is more than one route from the source to the destination We have to find the best one among these possible routes Forwarding Move packets from router s input to appropriate router output Forwarding value Send the packet out of interface 2 B Data B Data [ Fig 4.2 Forwarding process ] 2018-Fall Computer Networks Networking Laboratory 7/237

8 4.1 Introduction Network-Layer Services Error control The packet in the network layer maybe fragmented at each router, so error checking at this layer is inefficient. However, a checksum field is added to control any corruption in the header Flow control This service is provided for most of the upper-layer protocols because of the reasons as follows: No error control in this layer Upper-layer can use buffers to receive data Flow control makes the network-layer more complicated and the whole system less efficient 2018-Fall Computer Networks Networking Laboratory 8/237

9 4.1 Introduction Network-Layer Services Congestion control Congestion in the network-layer is a situation in which too many datagrams are present in an area of the Internet No congestion control is implemented at the Network layer in the Internet Quality of Service The provisions are mostly implemented in the upper layer Security The network layer was designed with no security provision 2018-Fall Computer Networks Networking Laboratory 9/237

10 4.1 Introduction Packet Switching Data communication switching techniques are divided into two broad categories: circuit switching and packet switching Packet switching, however, is only used at network-layer A message from upper layer is divided into manageable packets and each packet is sent through the network Today, a packet-switched network can use two different approaches: Datagram approach: Connectionless Service Virtual circuit approach: Connection-Oriented Service 2018-Fall Computer Networks Networking Laboratory 10/237

11 4.1 Introduction Packet Switching: Datagram approach (1/2) Connectionless Service Each packet has no relationship to any other packet [Fig 4.3 A connectionless packet-switched network] 2018-Fall Computer Networks Networking Laboratory 11/237

12 4.1 Introduction Packet Switching: Datagram approach (2/2) Each packet is routed based on the information contained in its header SA DA Data SA DA Data [ Fig 4.4 Forwarding process in a router when used in a connectionless network] 2018-Fall Computer Networks Networking Laboratory 12/237

13 4.1 Introduction Packet Switching: Virtual-Circuit Approach (1/5) Connection-Oriented Service A virtual connection should be set up to define the path before sending datagrams [ Fig 4.5 A virtual-circuit packet-switched network ] 2018-Fall Computer Networks Networking Laboratory 13/237

14 4.1 Introduction Packet Switching: Virtual-Circuit Approach (2/5) Each packet is forwarded based on the label in the packet [ Fig 4.6 Forwarding process in a router when used in a virtual-circuit network ] 2018-Fall Computer Networks Networking Laboratory 14/237

15 4.1 Introduction Packet Switching: Virtual-Circuit Approach (3/5) Set up phase: request packet and acknowledge packet need to be exchanged between the sender and the receiver A to B A to B A to B A to B [ Fig 4.7 Sending request packet in a virtual-circuit network ] 2018-Fall Computer Networks Networking Laboratory 15/237

16 4.1 Introduction Packet Switching: Virtual-Circuit Approach (4/5) [ Fig 4.8 Sending acknowledgments in a virtual-circuit network ] 2018-Fall Computer Networks Networking Laboratory 16/237

17 4.1 Introduction Packet Switching: Virtual-Circuit Approach (5/5) Data-Transfer Phase [ Fig 4.9 Flow of one packet in an established virtual circuit ] 2018-Fall Computer Networks Networking Laboratory 17/237

18 4.1 Introduction Network-Layer Performance The upper-layer protocols that use the service of the network layer expect to receive an ideal service, but the network layer is not perfect The performance of a network can be measured in terms of Delay Throughput Packet loss 2018-Fall Computer Networks Networking Laboratory 18/237

19 4.1 Introduction Network-Layer Performance: Delay Transmission delay Delay tr = (Packet length) / (Transmission rate) Propagation delay Delay pg = (Distance) / (Propagation speed) Processing Delay Delay pr = Time required process a packet in a router or a destination Queuing delay Delay qu = The time a packet waits in input and output queues Total delay n: the number of routers between two end hosts Delay total = (n+1)(delay tr +Delay pg +Delay pr ) + (n)(delay qu ) 2018-Fall Computer Networks Networking Laboratory 19/237

20 4.1 Introduction Network-Layer Performance: Throughput (1/3) Throughput at any point in a network is defined as the number of bits passing through the point in a second, transmission rate [ Fig 4.10 Throughput in a path with three links in a series ] Throughput = minimum{tr 1, TR 2,, TR n } 2018-Fall Computer Networks Networking Laboratory 20/237

21 4.1 Introduction Network-Layer Performance: Throughput (2/3) The Internet backbone has a very high transmission rate, in the range of gigabits per second The throughput, therefore, is normally defined as the minimum transmission rate of the two access links that connect to the source and destination [ Figure 4.11 A path through the Internet backbone ] 2018-Fall Computer Networks Networking Laboratory 21/237

22 4.1 Introduction Network-Layer Performance: Throughput (3/3) Besides, the link between two routers is not always dedicated to one flow. A router may collect the flow from several sources or distribute the flow between several sources. In this case the transmission rate is actually shared between the flows [ Fig 4.12 Effect of throughput is shared links ] 2018-Fall Computer Networks Networking Laboratory 22/237

23 4.1 Introduction Network-Layer Performance: Packet loss When a router receives a packet while processing another packet, the received packet needs to be stored in the input buffer. A router, however, has an input buffer with a limited size A time may come when the buffer is full and the next packet needs to be dropped The effect of packet loss on the Internet network layer is that the packet needs to be resent, which in turn may create overflow and cause more packet loss 2018-Fall Computer Networks Networking Laboratory 23/237

24 4.1 Introduction Network-Layer Congestion The study of congestion in this layer may only help us to better understand cause of congestion at the transport layer and find possible remedies to be used in network layer There are two issues related: Packet delay and throughput [ Fig 4.13 Packet delay and throughput as functions of load ] 2018-Fall Computer Networks Networking Laboratory 24/237

25 4.1 Introduction Network-Layer Congestion: Congestion control (1/4) Open-loop congestion control: prevents congestion before it happens. Retransmission policy: retransmission is sometimes unavoidable. Retransmission in general may increase congestion in the network. However, a good retransmission policy can prevent congestion Window policy: the type of window at the sender which consists of Go- Back-N window and Selective Repeat window also effect congestion. Go-Back-N window: when the timer for a packet time out, several packets may be resent, even some may have arrived safe Selective Repeat window: tries to send the specific packets that have been lost or corrupted 2018-Fall Computer Networks Networking Laboratory 25/237

26 4.1 Introduction Network-Layer Congestion: Congestion control (2/4) Open-loop congestion control: Acknowledgement policy: imposed by the receiver also effect congestion. If the receiver does not acknowledge every packet it receives, it may slow down the sender and help prevent congestion Discard policy: operated by routers may prevent congestion and not harm the integrity of the transmission Admission policy: is a quality-of-service mechanism (discussed in chapter 8), can also prevent congestion in virtual-circuit networks 2018-Fall Computer Networks Networking Laboratory 26/237

27 4.1 Introduction Network-Layer Congestion: Congestion control (3/4) Closed-loop congestion control: tries to alleviate congestion after it happens Backpressure Choke packet [ Fig 4.14 Backpressure method for alleviating congestion ] [ Fig 4.15 Choke packet ] 2018-Fall Computer Networks Networking Laboratory 27/237

28 4.1 Introduction Network-Layer Congestion: Congestion control (4/4) Closed-loop congestion control: Implicit Signaling: there is no communication between the congested node or nodes and the source. The source guesses that there is congestion somewhere in the network from other symptoms Explicit Signaling: Explicit signaling can occur in either the forward or the backward direction which can be seen in an ATM network. It will be discussed in Chapter Fall Computer Networks Networking Laboratory 28/237

29 Practice Problem (1/4) Consider the following network path with 3 links and two store and forward packet switches Note that each switch has 1.5 MB of memory for doing store and forward. Assume that the processing delay at switches is 0 sec. The transmission rate and the propagation delays of the links are as indicated in the picture 2018-Fall Computer Networks Networking Laboratory 29/237

30 Practice Problem (2/4) What s the maximum size of data this network path can carry at any moment? 2018-Fall Computer Networks Networking Laboratory 30/237

31 Practice Problem (3/4) (cont.) A MP3 file is roughly 4MB, how many MP3 files the path can carry at any moment? 2018-Fall Computer Networks Networking Laboratory 31/237

32 Practice Problem (4/4) Calculate the total time required to transfer a 1.5 MB file in the following case, assuming RTT of 80 ms, and an initial handshaking before the file is sent 2018-Fall Computer Networks Networking Laboratory 32/237

33 4.1 Introduction Structure of A Router: Components (1/6) A router has four components: input ports, output ports, the routing processor, and the switching fabric [ Fig 4.16 Router components ] 2018-Fall Computer Networks Networking Laboratory 33/237

34 4.1 Introduction Structure of A Router: Components (2/6) Input ports Output ports [ Fig 4.17 Input port ] [ Fig 4.18 Output port ] 2018-Fall Computer Networks Networking Laboratory 34/237

35 4.1 Introduction Structure of A Router: Components (3/6) Routing Processor Performing the function of the network layer Finding the address of the next hop and, at the same time, the output port number from which packet is sent out This activity is sometimes referred to as table lookup because the routing processor searches the forwarding table 2018-Fall Computer Networks Networking Laboratory 35/237

36 4.1 Introduction Structure of A Router: Components (4/6) Switching Fabrics [ Fig 4.19 Crossbar switch ] [ Fig 4.20 Banyan switch ] 2018-Fall Computer Networks Networking Laboratory 36/237

37 4.1 Introduction Structure of A Router: Components (5/6) Switching Fabrics Banyan switch [ Figure 4.21: Examples of routing in a banyan switch ] 2018-Fall Computer Networks Networking Laboratory 37/237

38 4.1 Introduction Structure of A Router: Components (6/6) Batcher-Banyan switch: design a switch that comes before the banyan switch and sorts incoming packets according to their destination [ Fig 4.22 Batcher-Banyan switch ] 2018-Fall Computer Networks Networking Laboratory 38/237

39 4.2 Network-Layer Protocol In this section, we show how the network layer is implemented in the TCP/IP protocol suite The protocols in the network layer have gone through several versions We concentrate on the current version (4), in the last section of this chapter, we briefly discuss version 6, which is on the horizon 2018-Fall Computer Networks Networking Laboratory 39/237

40 4.2 Network-Layer Protocol In this section, we show how the network layer is implemented in the TCP/IP protocol suite The network layer in version 4 can be thought of as one main protocol and three auxiliary protocols: Internet Protocol ver. 4 (IPv4), main protocol, is responsible for packetizing, forwarding and delivery of packet Internet Control Message Protocol ver. 4 (ICMPv4) helps IPv4 to handle some errors in the network-layer delivery Internet Group Management Protocol (IGMP) helps IPv4 in multicasting Address Resolution Protocol (ARP) glues the network and data-link layer 2018-Fall Computer Networks Networking Laboratory 40/237

41 4.2 Network-Layer Protocol Network layer protocol in TCP/IP protocol suite [ Fig 4.23 Position of IP and other network-layer protocols in TCP/IP protocol suite ] 2018-Fall Computer Networks Networking Laboratory 41/237

42 4.2 Network-Layer Protocol IP Datagram Format (1/11) Packets used by the IP are called IP datagrams [ Fig 4.24 IP datagram ] 2018-Fall Computer Networks Networking Laboratory 42/237

43 4.2 Network-Layer Protocol IP Datagram Format (2/11) Version (VER) 4-bit field which defines the version of the IP protocol Currently the version is 4 Version 6 may totally replace version 4 in the future If the machine is using some other version of IP, the datagram is discarded Header length (HLEN) 4-bit field which defines the total length of the datagram header in 4-byte words This field is needed because the head length is variable Service type 8-bit field which was referred to as type of service (TOS) 2018-Fall Computer Networks Networking Laboratory 43/237

44 4.2 Network-Layer Protocol IP Datagram Format (3/11) Total length 16-bit field which defines the total length of the IP datagram in bytes Length of data = total length header length This field is necessary in case that the padding is added in the frame Length: Minimum 46 bytes L2 header Data < 46 bytes Padding L2 Trailer [ Encapsulation of a small datagram in an Ethernet frame ] Identification: 16-bit field which is used in fragmentation 2018-Fall Computer Networks Networking Laboratory 44/237

45 4.2 Network-Layer Protocol IP Datagram Format (4/11) Flags 3-bit field which is used in fragmentation Time to live A datagram has a limited lifetime in its travel through an internet This field is originally designed to hold a timestamp, which was decremented by each visited router This field is mostly used to control the maximum number of hops visited by the datagram. This value is approximately two times the maximum number of routers between any two hosts If the value is zero, the router discards the datagram 2018-Fall Computer Networks Networking Laboratory 45/237

46 4.2 Network-Layer Protocol IP Datagram Format (5/11) Protocol: 8-bit field which defines the higher level protocol that uses the services of the IP layer [ Figure 4.25: Multiplexing and demultiplexing using the value of the protocol field ] 2018-Fall Computer Networks Networking Laboratory 46/237

47 4.2 Network-Layer Protocol IP Datagram Format (6/11) Checksum 16-bit field used for error check using checksum Source address 32-bit field which defines the IP address of the source Destination address 32-bit field which defines the IP address of the destination 2018-Fall Computer Networks Networking Laboratory 47/237

48 4.2 Network-Layer Protocol IP Datagram Format (7/11) Maximum Transfer Unit: when a datagram is encapsulated in a frame, the total size of the datagram must be less than MTU [ Figure 4.26: Maximum transfer unit (MTU) ] 2018-Fall Computer Networks Networking Laboratory 48/237

49 4.2 Network-Layer Protocol IP Datagram Format (8/11) Fields Related to Fragmentation: Fragmentation is to divide the datagram to make it possible to pass through a network The source usually does not fragment the IP packet When a datagram is fragmented, each fragment has its own header with most of the fields repeated, but some changed The reassembly of the datagram is done only by the destination host 2018-Fall Computer Networks Networking Laboratory 49/237

50 4.2 Network-Layer Protocol IP Datagram Format (9/11) Fields Related to Fragmentation Identification (16-bit) This field identifies a datagram originating from the source host The combination of the identification and source IP address must uniquely define a datagram as it leaves the source host The identification number helps the destination in reassembling the datagram Flags (3-bit) The first bit is reserved The second bit is called the do not fragment bit The third bit is called the more fragment bit D: Do not fragment M: more fragment D M 2018-Fall Computer Networks Networking Laboratory 50/237

51 4.2 Network-Layer Protocol IP Datagram Format (10/11) Fields Related to Fragmentation Fragmentation offset (13-bit) This is offset of the data in the original datagram measured in units of 8 bytes [ Fig 4.27 Fragmentation examples ] 2018-Fall Computer Networks Networking Laboratory 51/237

52 4.2 Network-Layer Protocol IP Datagram Format (11/11) An example of fragmentation [ Fig 4.28 Detailed fragmentation example ] 2018-Fall Computer Networks Networking Laboratory 52/237

53 Practice Problem An IP message 12,000 bytes wide (including the 20-byte IP header) that needs to be sent over a link with an MTU of 3,300 bytes Fall Computer Networks Networking Laboratory 53/237

54 4.2 Network-Layer Protocol IP Datagram Format: Security of IPv4 (1/2) In this section, we only give a brief idea about the security issues in IP protocol and the solution. There are 3 issues: Packet Sniffing: a passive attack, in which the attacker does not change the contents of data packet Packet Modification: the attacker intercepts the packet, changes its contents, and sends the new packet to the receiver IP Spoofing: An attacker can masquerade as somebody else and create an IP packet that carries the source address of another computer IPSec: used in conjunction with the IP protocol, creates a connectionoriented service between two entities in which they can exchange IP packets 2018-Fall Computer Networks Networking Laboratory 54/237

55 4.2 Network-Layer Protocol IP Datagram Format: Security of IPv4 (2/2) IPSec: used in conjunction with the IP protocol, creates a connectionoriented service between two entities in which they can exchange IP packets Defining Algorithm and Keys: The two entities that want to create a secure channel between themselves can agree on some available algorithms and keys to be used for security purposes Packet Encryption: The packets exchanged between two parties can be encrypted for privacy using one of the encryption algorithms and a shared key agreed upon in the first step Data Integrity: Data integrity guarantees that the packet is not modified during the transmission Origin Authentication: IPSec can authenticate the origin of the packet to be sure that the packet is not created by an imposter 2018-Fall Computer Networks Networking Laboratory 55/237

56 4.2 Network-Layer Protocol IPv4 address An IP address is a 32-bit address The IP addresses are unique The address space of IPv4 is 2 32 or 4, 294, 967, 296 Notation Binary Notation : In binary notation, the IP address is displayed as 32 bits Dotted-Decimal Notation : Internet addresses are usually written in decimal form with a decimal point separating the bytes [ Fig 4.29 Three different notations in IPv4 addressing ] 2018-Fall Computer Networks Networking Laboratory 56/237

57 4.2 Network-Layer Protocol IPv4 address: Hierarchy in addressing A 32-bit IPv4 address is hierarchical, but divided only into two parts The first part of the address called the prefix, defines the network The second part of the address called the suffix, defined the node [ Fig 4.30 Hierarchy in addressing ] 2018-Fall Computer Networks Networking Laboratory 57/237

58 4.2 Network-Layer Protocol IPv4 address: Classful addressing In classful addressing, the IP address space is divided into five classes: A, B, C, D, E [ Fig 4.31 Occupation of the address space in classful addressing ] 2018-Fall Computer Networks Networking Laboratory 58/237

59 4.2 Network-Layer Protocol IPv4 address: Address Depletion The addresses being rapidly used up. So, no more addresses available for organizations or individuals that needed to be connected to the Internet Class A with 16,777,216 IPs. Since there may be only a few organizations that are this large, most of the addresses in this class were wasted Class B addresses were designed for midsize organization, but many of the addresses also remained unused Class C has only 256 IPs, it was so small that most companies were not comfortable using a block in this address Class E were almost never used, wasting the whole class 2018-Fall Computer Networks Networking Laboratory 59/237

60 4.2 Network-Layer Protocol IPv4 address: Subnetting and Supernetting Subnetting and Supernetting are proposed to alleviate address depletion In Subnetting, Class A or B is divided into several subnets. Each subnet has a larger prefix length than the original network. In other words, we divide a large block into smaller block This idea did not work because most large organizations were not happy about dividing the block and giving some of the unused addresses to smaller organizations In Supernetting, we combine several class C blocks into a larger block to be attractive to organizations that need more than 256 IPs This idea did not work either because it makes the routing of packets more difficult 2018-Fall Computer Networks Networking Laboratory 60/237

61 4.2 Network-Layer Protocol IPv4 address: Classless addressing (1/7) In classless addressing, variable-length blocks are used that belong to no classes. We can have a block of 1 address, 2 addresses, 4 addresses, 128 addresses, and so on The prefix in an address defines the block (network); the suffix defines the node (device). Therefore, we can have a block of 2 0, 2 1, 2 2,, 2 32 addresses A small prefix means a larger network; a large prefix means a smaller network [ Figure 4.32: Variable-length blocks in classless addressing ] 2018-Fall Computer Networks Networking Laboratory 61/237

62 4.2 Network-Layer Protocol IPv4 address: Classless addressing (2/7) Restrictions Number of Addresses in a Block The number of addresses in a block must be a power of two First Address Mask The first address must be evenly divisible by the number of addresses In classless addressing, the address must be accompanied by the mask The mask is given in classless inter-domain routing or CIDR notation with the number of 1s Format of classless addressing address is X.Y.Z.t/n, the n after the slash defines the number of bits that are the same in every address in the block 2018-Fall Computer Networks Networking Laboratory 62/237

63 4.2 Network-Layer Protocol IPv4 address: Classless addressing (3/7) Mask Prefix is another name for the common part of the address range, similar to the netid in classful addressing Prefix length is the length of the prefix (n in the CIDR notation) Classful addressing is a special case of classless addressing /n Mask /n Mask /n Mask /n Mask / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / Fall Computer Networks Networking Laboratory 63/237

64 4.2 Network-Layer Protocol IPv4 address: Classless addressing (4/7) Mask The suffix is the varying part, similar to the hostid The suffix length is the length of the suffix (32-n) in CIDR notation [ Fig 4.34 Information extraction in classless addressing ] 2018-Fall Computer Networks Networking Laboratory 64/237

65 4.2 Network-Layer Protocol IPv4 address: Classless addressing (5/7) Example 4.1: A classless address is given as /27. We can find the above three pieces of information as follows The number of addresses in the network is 2 32 n = 2 5 = 32 addresses. The first address can be found by keeping the first 27 bits and changing the rest of the bits to 0s The last address can be found by keeping the first 27 bits and changing the rest of the bits to 1s 2018-Fall Computer Networks Networking Laboratory 65/237

66 4.2 Network-Layer Protocol IPv4 address: Classless addressing (6/7) Example 4.2: We repeat Example 4.1 using the mask. The mask in dotted-decimal notation is The AND, OR, and NOT operations can be applied to individual bytes using calculators and applets at the book website 2018-Fall Computer Networks Networking Laboratory 66/237

67 4.2 Network-Layer Protocol IPv4 address: Classless addressing (7/7) Example 4.3: In classless addressing, an address cannot per se define the block the address belongs to. For example, the address can belong to many blocks. Some of them are shown below with the value of the prefix associated with that block 2018-Fall Computer Networks Networking Laboratory 67/237

68 4.2 Network-Layer Protocol IPv4 address: Network address (1/6) The first address of the address block, network address, is particularly important because it is used in routing a packet to its destination network First address = (prefix in decimal) * 2 32-n = (prefix in decimal) * N [ Fig 4.35 Network address ] 2018-Fall Computer Networks Networking Laboratory 68/237

69 4.2 Network-Layer Protocol IPv4 address: Network address (2/6) An ISP has requested a block of 1000 addresses. Since 1000 is not a power of 2, 1024 addresses are granted The prefix length is calculated as n = 32 log = 22. An available block, /22, is granted to the ISP 2018-Fall Computer Networks Networking Laboratory 69/237

70 4.2 Network-Layer Protocol IPv4 address: Network address (3/6) An organization is granted a block of addresses with the beginning address /24. The organization needs to have 3 subblocks of addresses to use in its three subnets: one subblock of 10 addresses, one subblock of 60 addresses, and one subblock of 120 addresses. Design the subblocks There are = 256 addresses in this block The first address is /24 The last address is /24 To satisfy the third requirement, we assign addresses to subblocks, starting with the largest and ending with the smallest one 2018-Fall Computer Networks Networking Laboratory 70/237

71 4.2 Network-Layer Protocol IPv4 address: Network address (4/6) The number of addresses in the largest subblock, which requires 120 addresses, is not a power of 2 We allocate 128 addresses The subnet mask for this subnet can be found as n 1 = 32 log = 25 The first address in this block is /25; the last address is /25 The number of addresses in the second largest subblock, which requires 60 addresses, is not a power of 2 either We allocate 64 addresses The subnet mask for this subnet can be found as n 2 = 32 log 2 64 = 26 The first address in this block is /26; the last address is / Fall Computer Networks Networking Laboratory 71/237

72 4.2 Network-Layer Protocol IPv4 address: Network address (5/6) The number of addresses in the largest subblock, which requires 10 addresses, is not a power of 2 We allocate 16 addresses The subnet mask for this subnet can be found as n 1 = 32 log 2 16 = 28. The first address in this block is /28; the last address is /28 If we add all addresses in the previous subblocks, the result is 208 addresses, which means 48 addresses are left in reserve. The first address in this range is The last address is We don t know about the prefix length yet. Figure 4.36 shows the configuration of blocks. We have shown the first address in each block Fall Computer Networks Networking Laboratory 72/237

73 4.2 Network-Layer Protocol IPv4 address: Network address (6/6) /28 [ Figure 4.36: Solution to Example 5 ] 2018-Fall Computer Networks Networking Laboratory 73/237

74 4.2 Network-Layer Protocol IPv4 address: Address aggregation One of the advantages of the CIDR strategy is address aggregation. When blocks of addresses are combined to create a larger block, routing can be done based on prefix of the larger block [ Fig 4.37 Example of address aggregation ] 2018-Fall Computer Networks Networking Laboratory 74/237

75 4.2 Network-Layer Protocol IPv4 address: Special addresses This-host address: It is used whenever a host needs to send an IP datagram but it does not know its own address to use as the source address: /32 Limited-broadcast address: when router want to send data to all devices: /32 Loopback address: one of the addresses is always as a destination address: /8 Private addresses: / / / /16 We will see the application of these addresses when we discuss NAT later Multicast addresses: is reserved for multicast addresses: / Fall Computer Networks Networking Laboratory 75/237

76 Practice Problem For the IP address /16, Find the First useable IP address Find the Broadcast address Find the Last useable IP address 2018-Fall Computer Networks Networking Laboratory 76/237

77 4.2 Network-Layer Protocol IPv4 address: DHCP (1/8) Dynamic Host Configuration Protocol (DHCP) A large organization or an ISP can receive a block of addresses directly from ICANN (Internet Corporation for Assigned Names and Numbers) A small organization can receive a block of addresses from an ISP Address assignment in an organization can be done automatically using the Dynamic Host Configuration Protocol (DHCP) Permanent or temporary IP addresses are assigned to hosts 2018-Fall Computer Networks Networking Laboratory 77/237

78 4.2 Network-Layer Protocol IPv4 address: DHCP (2/8) DHCP Message Format [ Fig 4.39 Option format ] [ Fig 4.38 DHCP message format ] 2018-Fall Computer Networks Networking Laboratory 78/237

79 4.2 Network-Layer Protocol IPv4 address: DHCP (3/8) The joining host creates a DHCPDISCOVER message where only the transaction-id field is set to a random number The DHCP server or servers responds with a DHCPOFFER message in which the your-ip-address field defines the offered IP address for the joining host and the server-ip-address includes the IP address of the server The joining host receives one or more offers and selects the best of them. The joining host then sends a DHCPREQUEST message to the server that has given the best offer The selected server responds with an DHCPACK message 2018-Fall Computer Networks Networking Laboratory 79/237

80 4.2 Network-Layer Protocol IPv4 address: DHCP (4/8) DHCP Operation [ Fig 4.40 Operation of DHCP ] 2018-Fall Computer Networks Networking Laboratory 80/237

81 4.2 Network-Layer Protocol IPv4 address: DHCP (5/8) Video Content How a computer gets its IP address An explanation of DHCP and how it works. Link: Fall Computer Networks Networking Laboratory 81/237

82 4.2 Network-Layer Protocol IPv4 address: DHCP (6/8) DHCP Operation Fall Computer Networks Networking Laboratory 82/237

83 4.2 Network-Layer Protocol IPv4 address: DHCP (7/8) Two Well-known Ports DHCP uses two well-known ports: 68 and 67 Using FTP The server does not send all information that a client may need for joining the network In DHCPACK message, the server defines the pathname of a file in which the client can find the complete information Error Control DHCP uses the service of UDP, which is not reliable To provide error control, DHCP uses two strategies: Requires that UDP uses the checksum Requires DHCP client uses timers and a retransmission policy if it does not receive DHCP reply to a request 2018-Fall Computer Networks Networking Laboratory 83/237

84 4.2 Network-Layer Protocol IPv4 address: DHCP (8/8) To provide dynamic address allocation, the DHCP client acts as state machine that performs transitions from one state to another [ Fig 4.41 FSM for the DHCP client ] 2018-Fall Computer Networks Networking Laboratory 84/237

85 4.2 Network-Layer Protocol IPv4 address: NAT (1/4) Network Address Translation(NAT) This technology can provide the mapping between the private and universal addresses and at the same time support virtual private networks [ Figure 4.42: NAT ] 2018-Fall Computer Networks Networking Laboratory 85/237

86 4.2 Network-Layer Protocol IPv4 address: NAT (2/4) [ Figure 4.43: Address translation ] 2018-Fall Computer Networks Networking Laboratory 86/237

87 4.2 Network-Layer Protocol IPv4 address: NAT (3/4) [ Fig 4.44 Translation ] 2018-Fall Computer Networks Networking Laboratory 87/237

88 4.2 Network-Layer Protocol IPv4 address: NAT (4/4) Using both IP addresses and port addresses To allow a many-to-many relationship between private-network hosts and external server programs The translation table includes source and destination port addresses and the transport layer protocol [ Table 4.1 Five-column translation table ] 2018-Fall Computer Networks Networking Laboratory 88/237

89 4.2 Network-Layer Protocol Forwarding of IP Packets: Forwarding Techniques (1/4) Next-Hop Method: the routing table holds only the address of the next hop Destination Route Routing tables based on route Destination Route Destination Route Host B R1, R2, Host B Host B R2, Host Host B Host B Host A Host B Network R1 Network R2 Network Destination Next Hop Destination Next Hop Destination Next Hop Host B R1 Host B R2 Host B - [ Routing tables based on next hop ] 2018-Fall Computer Networks Networking Laboratory 89/237

90 4.2 Network-Layer Protocol Forwarding of IP Packets: Forwarding Techniques (2/4) Network-Specific Method: only one entry that defines the address of the destination network itself Routing table for host S based on host-specific method Destination A B C D Next Hop R1 R1 R1 R1 Routing table for host S based on network-specific method Destination N2 Next Hop R1 A B C D S N1 R1 N Fall Computer Networks Networking Laboratory 90/237

91 4.2 Network-Layer Protocol Forwarding of IP Packets: Forwarding Techniques (3/4) Host-Specific Method: The destination host address is given in the routing table Efficiency is sacrificed Routing table for host A Destination Next Hop Host A N1 Host B N2 N3 R1 R1 R3 R1 R3 R2 Host B N2 N Fall Computer Networks Networking Laboratory 91/237

92 4.2 Network-Layer Protocol Forwarding of IP Packets: Forwarding Techniques (4/4) Default Method Routing table for host A Host A Destination N2 Default Next Hop R1 R2 R1 N1 N2 Default router R2 Rest of the Internet 2018-Fall Computer Networks Networking Laboratory 92/237

93 Packet 4.2 Network-Layer Protocol Forwarding of IP Packets: with Classless Addressing (1/7) One column for the mask is needed to find the network address in a routing table At least four columns are needed in a routing table Address Aggregation To reduce the number of entries in a routing table In this method, the blocks of addresses for several organizations are aggregated into one larger block Forwarding module Extract destination address Next-hop address and interface number Search table To ARP Mask (/n) Network address Nexthop address Interface number 2018-Fall Computer Networks Networking Laboratory 93/237 [ Fig 4.45 Simplified forwarding module in classless address ]

94 4.2 Network-Layer Protocol Forwarding of IP Packets: with Classless Addressing (2/7) Address Aggregation Organization /26 [ Fig 4.47 Address aggregation ] Organization 2 Organization / /26 m1 m2 m0 m4 m3 R1 m0 R2 m1 Organization /26 Mask Network address Next-hop address Interface Mask Network address Next-hop address Interface /26 /26 /26 /26 / Default router m0 m1 m2 m3 m4 /24 / Routing table for R1 - Default router m0 m1 Routing table for R Fall Computer Networks Networking Laboratory 94/237

95 4.2 Network-Layer Protocol Forwarding of IP Packets: with Classless Addressing (3/7) Longest Mask Matching In case that some organizations are not geographically close to the others The routing table is sorted from the longest mask to the shortest mask 2018-Fall Computer Networks Networking Laboratory 95/237

96 4.2 Network-Layer Protocol Forwarding of IP Packets: with Classless Addressing (4/7) Longest Mask Matching [ Fig 4.48 Longest mask matching ] Suppose a packet arrives at router R2 for organization 4 with destination address The first mask at router R2 is applied, which gives the network address The packet is routed correctly from interface m1 and reaches organization Fall Computer Networks Networking Laboratory 96/237

97 4.2 Network-Layer Protocol Forwarding of IP Packets: with Classless Addressing (5/7) Hierarchical Routing If the routing table has a sense of hierarchy like the Internet architecture, the routing table can decrease in size If a block assigned to the local ISP starts with a.b.c.d/n, the ISP can create blocks starting with e.f.g.h/m, m is greater than n The rest of the Internet does not have to know this division 2018-Fall Computer Networks Networking Laboratory 97/237

98 4.2 Network-Layer Protocol Forwarding of IP Packets: Forwarding with Classless Addressing (6/7) Hierarchical Routing [ Fig 4.49 Hierarchical routing with ISPs ] 2018-Fall Computer Networks Networking Laboratory 98/237

99 4.2 Network-Layer Protocol Forwarding of IP Packets: with Classless Addressing (7/7) Geographical Routing Extension of hierarchical routing Routing Table Search Algorithms Searching in Classful Addressing The routing table can be divided into three tables for efficiency The default mask is applied to find the corresponding bucket Searching in Classless Addressing The longest match can be used Instead of list, other data structure such as a tree or a binary tree can be used 2018-Fall Computer Networks Networking Laboratory 99/237

100 4.2 Network-Layer Protocol Forwarding of IP Packets: based on label (1/3) In a connection-oriented network, a switch forwards a packet based on the label attached to the packet [ Fig 4.51 Forwarding based on label ] 2018-Fall Computer Networks Networking Laboratory 100/237

101 4.2 Network-Layer Protocol Forwarding of IP Packets: based on label (2/3) Multi-Protocol Label Switching (MPLS) When behaving like a router, MPLS can forward the packet based on the destination address When behaving like a switch, it can forward a packet based on the label [ Fig 4.52 MPLS header added to an IP packet ] The MPLS header is actually a stack of sub headers that is used for multilevel hierarchical switching 2018-Fall Computer Networks Networking Laboratory 101/237

102 4.2 Network-Layer Protocol Forwarding of IP Packets: based on label (3/3) Multi-Protocol Label Switching (MPLS) The MPLS header is actually a stack of subheaders that is used for multilevel hierarchical switching [ Fig 4.53 MPLS header made of a stack of labels ] Label: the label used to index the forwarding table in the router Exp: reserved S: if this is 1, the header is last on in the stack TTL: when it reaches zero, the packet is discarded 2018-Fall Computer Networks Networking Laboratory 102/237

103 4.2 Network-Layer Protocol ICMPv4 The Internet Control Message Protocol (ICMP) has been designed to compensate the following two deficiencies: The IP protocol has no error-reporting or error-correcting mechanism The IP protocol has no built-in mechanism to notify the original host ICMP itself is a network layer protocol ICMP messages are first encapsulated inside IP datagrams before going to the lower layer ICMP message IP header IP data Frame header Frame data Trailer 2018-Fall Computer Networks Networking Laboratory 103/237

104 4.2 Network-Layer Protocol ICMPv4: ICMP messages (1/6) ICMP messages are first encapsulated inside IP datagrams before going to the lower layer ICMP message IP header IP data Frame header Frame data Trailer 2018-Fall Computer Networks Networking Laboratory 104/237

105 4.2 Network-Layer Protocol ICMPv4: ICMP messages (2/6) ICMP messages are divided into two broad categories ICMP message Error-reporting Query The error-reporting messages report problems that a router or a host(destination) may encounter when it processes an IP packet The query messages help a host or a network manager get specific information from a router or another host 2018-Fall Computer Networks Networking Laboratory 105/237

106 4.2 Network-Layer Protocol ICMPv4: ICMP messages (3/6) ICMP messages Category Type Message Error-reporting messages Query messages 3 Destination unreachable 4 Source quench 11 Time exceeded 12 Parameter problem 5 Redirection 8 or 0 Echo request or reply 13 or 14 Timestamp request or reply 17 or 18 Address mask request or reply 10 or 9 Router solicitation or advertisement 2018-Fall Computer Networks Networking Laboratory 106/237

107 4.2 Network-Layer Protocol ICMPv4: ICMP messages (4/6) An ICMP message has an 8 bytes header and a variable size data section 8 bits 8 bits 8 bits 8 bits Type Code Checksum Rest of header Data section In error-reporting messages, the data section carries information for finding the original packet that had the error In query messages, the data section carries extra information based on the type of the query 2018-Fall Computer Networks Networking Laboratory 107/237

108 4.2 Network-Layer Protocol ICMPv4: ICMP messages (5/6) Error-reporting messages Error reports Destination unreachable Source quench Time exceeded Parameter problem Redirection ICMP always reports error messages to the original source No ICMP error messages will be generated in response to a datagram carrying an ICMP error messages No ICMP error messages will be generated for a fragmented datagram that is not the first fragment No ICMP error messages will be generated for a datagram having a multicast address No ICMP error message will be generated for a datagram having a special address such as or Fall Computer Networks Networking Laboratory 108/237

109 4.2 Network-Layer Protocol ICMPv4: Destination Unreachable When a router cannot route a datagram or a host cannot deliver a datagram, the datagram is discarded The router or the host sends a destination-unreachable message back to the source host Type : 3 Code: 0 to 15 Checksum Unused (All 0s) Part of the received IP datagram including IP header plus the first 8 bytes of the datagram data 2018-Fall Computer Networks Networking Laboratory 109/237

110 4.2 Network-Layer Protocol ICMPv4: Source Quench The source-quench message in ICMP was designed to add a kind of flow control to the IP When a router or host discards a datagram due to congestion, it sends a source-quench message to the sender of the datagram It informs the source that the datagram has been discarded It warns the source that there is congestion somewhere in the path and that the source should slow down the sending process One source-quench message is sent for each datagram that is discarded due to congestion Type : 4 Code : 0 Checksum Unused (All 0s) Part of the received IP datagram including IP header plus the first 8 bytes of the datagram data 2018-Fall Computer Networks Networking Laboratory 110/237

111 4.2 Network-Layer Protocol ICMPv4: Time Exceeded (1/3) Whenever a router decrements a datagram with a time-to-live value to zero, it discards the datagram and sends a time-exceeded message to the original source (Code 0) When the final destination does not receive all of the fragments in a set time, it discards the received fragments and sends a time-exceeded message to the original source (Code 1) Type : 11 Code : 0 or 1 Checksum Unused (All 0s) Part of the received IP datagram including IP header plus the first 8 bytes of the datagram data 2018-Fall Computer Networks Networking Laboratory 111/237

112 4.2 Network-Layer Protocol ICMPv4: Time Exceeded (2/3) The traceroute program can be used to trace the route of a packet from the source to the destination The traceroute program uses the ICMP messages and the TTL field in the IP packet to find the route 2018-Fall Computer Networks Networking Laboratory 112/237

113 4.2 Network-Layer Protocol ICMPv4: Time Exceeded (3/3) traceroute [ Fig 4.55 Example of traceroute program ] 2018-Fall Computer Networks Networking Laboratory 113/237

114 4.2 Network-Layer Protocol ICMPv4: Parameter Problem A parameter-problem message can be created by a router or the destination host Type : 12 Code : 0 or 1 Checksum Pointer Unused (All 0s) Part of the received IP datagram including IP header plus the first 8 bytes of the datagram data Code 0 There is an error ambiguity in one of the header fields The value in the pointer field points to the byte with the problem Code 1 The required part of an option is missing 2018-Fall Computer Networks Networking Laboratory 114/237

115 4.2 Network-Layer Protocol ICMPv4: Redirection (1/2) A host usually starts with a small routing table that is gradually augmented and updated To update the routing table of the host, routers send a redirection message to the host Redirection message A R1 IP packet R2 B LAN LAN IP packet IP packet 2018-Fall Computer Networks Networking Laboratory 115/237

116 4.2 Network-Layer Protocol ICMPv4: Redirection (2/2) Type : 5 Code : 0 to 3 Checksum IP address of the target router Part of the received IP datagram including IP header plus the first 8 bytes of the datagram data Code 0 Redirection for a network-specific route Code 1 Redirection for a host-specific route Code 2 Redirection for a network-specific route based on a specified type of service Code 3 Redirection for a host-specific route based on a specified type of service 2018-Fall Computer Networks Networking Laboratory 116/237

117 4.2 Network-Layer Protocol ICMPv4: Query Message In this type of ICMP message, a node sends a message that is answered in a specific format by the destination node Query Echo request and reply Timestamp request and reply Address-mask request and reply Router solicitation and advertisement 2018-Fall Computer Networks Networking Laboratory 117/237

118 Practice Problem How many DHCP packets are exchanged between a client and a server before the client receives an IP address? 2018-Fall Computer Networks Networking Laboratory 118/237

119 4.2 Network-Layer Protocol ICMPv4: Echo Request and Reply (1/2) An echo-request message can be sent by a host or router An echo-reply message is sent by the host or router which receives an echo-request message Echo-request and echo-reply messages can be used by network managers to check the operation of the IP protocol Echo-request and echo-reply messages can test the reachability of a host Type : 8 or 0 Code : 0 Checksum Identifier Sequence number Optional data Sent by the request message; repeated by the reply message 2018-Fall Computer Networks Networking Laboratory 119/237

120 4.2 Network-Layer Protocol ICMPv4: Echo Request and Reply (2/2) The ping program is used to find if a host is alive and responding Ping approximate round trip times in milli-seconds The initial TTL packet value for an IP packet is 255 and then it is decremented by 1 each time it encounters a router 2018-Fall Computer Networks Networking Laboratory 120/237

121 4.2 Network-Layer Protocol ICMPv4: Timestamp Request and Reply Hosts and routers can use the timestamp-request and timestamp-reply messages to determine the round-trip time needed for an IP datagram to travel between them Type : 13 or 14 Code : 0 Checksum Identifier Original timestamp Receive timestamp Transmit timestamp Sequence number Each timestamp field can hold a number representing time measured in milliseconds from midnight in Universal Time 2018-Fall Computer Networks Networking Laboratory 121/237

122 4.2 Network-Layer Protocol ICMPv4: Address-Mask Request and Reply To obtain its mask, a host sends an address-mask-request message to a router on the LAN The router receiving the address-mask-request message responds with an address-mask-reply message Type : 17 or 18 Code : 0 Checksum Identifier Address mask Sequence number The address-mask field is filled with zeros in the request message 2018-Fall Computer Networks Networking Laboratory 122/237

123 4.3 Unicast routing In an internet, the goal of the network layer is to deliver a datagram from its source to its destination or destinations. If a datagram is destined for only one destination (one-to-one delivery), we have unicast routing. In this section and the next, we discuss only unicast routing; multicast and broadcast routing will be discussed later in the chapter Fall Computer Networks Networking Laboratory 123/237

124 4.3 Unicast routing General Idea: An Internet as a Graph To find the best route, an internet can be modeled as a graph We can think of each router as a node and each network between a pair of routers as an edge [ Fig 4.56 An internet and its graphical representation ] 2018-Fall Computer Networks Networking Laboratory 124/237

125 4.3 Unicast routing General Idea: Least-cost routing When an internet is modeled as a weighted graph, one of the ways to interpret the best route from the source router to the destination router is to find the least cost between the two If there are N routers in an internet, there are (N-1) least-cost paths from each router to any other router We need N*(N-1) least-cost paths for the whole internet 2018-Fall Computer Networks Networking Laboratory 125/237

126 4.3 Unicast routing General Idea: Least-cost-trees A least-cost tree is a tree with the source router as the root that spans the whole graph (visits all other nodes) [ Fig 4.57 Least-cost trees for nodes in the internet ] 2018-Fall Computer Networks Networking Laboratory 126/237

127 4.3 Unicast routing Routing Algorithm: Distance vector routing(1/9) In distance vector routing, the least cost route between any two nodes is the route with minimum distance [ Fig 4.58 The distance vector corresponding to a tree ] 2018-Fall Computer Networks Networking Laboratory 127/237

128 4.3 Unicast routing Routing Algorithm: Distance vector routing(2/9) Bellman-Ford equation is used to find the least cost (shortest distance) between a source node x, and a destination node y, through some intermediary nodes (a, b, c, ) [ Fig 4.59 Graphical idea behind Bellman-Ford equation ] 2018-Fall Computer Networks Networking Laboratory 128/237

129 4.3 Unicast routing Routing Algorithm: Distance vector routing(3/9) Initialization: each node can know only the distance between itself and its immediate neighbors [ Fig 4.60 The first distance vector for an internet ] 2018-Fall Computer Networks Networking Laboratory 129/237

130 4.3 Unicast routing Routing Algorithm: Distance vector routing(4/9) Sharing: A node is not aware of a neighbor s table The best solution for each node is to send its entire table to the neighbor and let the neighbor decide what part to use and what part to discard In distance vector routing, each node shares its routing table with its immediate neighbors periodically and when there is a change 2018-Fall Computer Networks Networking Laboratory 130/237

131 4.3 Unicast routing Routing Algorithm: Distance vector routing(5/9) Updating: [ Fig 4.61 Updating distance vectors ] 2018-Fall Computer Networks Networking Laboratory 131/237

132 4.3 Unicast routing Routing Algorithm: Distance vector routing(6/9) [ Table 4.4 Distance vector routing algorithm for a node ] 2018-Fall Computer Networks Networking Laboratory 132/237

133 4.3 Unicast routing Routing Algorithm: Distance vector routing(7/9) Two-Node Loop Instability: A problem with distance vector routing is instability Before failure X 2 - X 6 A 2 4 X A B After failure X X X 6 A 2 4 A B After A receives update from B X X 10 B X 6 A 2 4 A B Finally X X 2 4 A X B [ Fig 4.62 Two-node instability ] 2018-Fall Computer Networks Networking Laboratory 133/237

134 4.3 Unicast routing Routing Algorithm: Distance vector routing(8/9) Solutions of two-node loop instability: Defining Infinity Most implementations of the distance vector protocol define the distance between each node to be 1 and define 16 as infinity Split Horizon In this strategy, instead of flooding the table through each interface, each node sends only part of its table through each interface Node B eliminates the last line of its forwarding table before it sends to A Poison Reverse Node B can still advertise the value for X, but if the source information is A, it can replace the distance with infinity as a warning: Do not use this value; what I know about this come from you 2018-Fall Computer Networks Networking Laboratory 134/237

135 4.3 Unicast routing Routing Algorithm: Distance vector routing(9/9) Three-Node Instability X 2 - X 6 A X A B C X 5 A X - X X A B C X 5 A 1. Before failure 2. After A sends the route to B and C, but the packet to C is lost X - X 8 C X A B C X 5 A X 12 B X 8 C X A B C X 5 A 3. After C sends the route to B 4. After B sends the route to A 2018-Fall Computer Networks Networking Laboratory 135/237

136 4.3 Unicast Routing Routing Algorithms: Link-State Routing (1/7) Link-state (LS) routing is a routing algorithm for creating least-cost trees and forwarding tables Link-state database (LSDB) To create a least cost tree with this method, each node needs to have a complete map of the network, which means it needs to know the state of each link The collection of states for all links is called the link-state database. [Fig 4.63 Example of a link-state database] 2018-Fall Computer Networks Networking Laboratory 136/237

137 4.3 Unicast Routing Routing Algorithms: Link-State Routing (2/7) Building LSDB This can be done by a process called flooding. 1. Each node can send some greeting messages to all its immediate neighbors (those nodes to which it is connected directly) to collect two pieces of information for each neighboring node: the identity of the node and the cost of the link. 2. The combination of these two pieces of information is called the LS packet (LSP). LSP also includes a sequence number, which increases when a new version of the LSP is created. 3. Each node creates the LSP and sends out of each interface. When a node receives an LSP, it compares the LSP with the copy it may already have by checking the sequence number. Then, it discards the old LSP and keeps the new one and then sends a copy of it out of each interface except the one from which the packet arrived. 4. After receiving all new LSPs, each node creates the comprehensive LSDB as shown in Figure Fall Computer Networks Networking Laboratory 137/237

138 4.3 Unicast Routing Routing Algorithms: Link-State Routing (3/7) Building LSDB [Fig 4.64 LSPs created and sent out by each node to build LSDB] 2018-Fall Computer Networks Networking Laboratory 138/237

139 4.3 Unicast Routing Routing Algorithms: Link-State Routing (4/7) Formation of Least-Cost Trees After receiving all LSPs, each node will have a copy of the whole topology A shortest path tree is needed The Dijkstra algorithm creates a shortest path tree from a graph 2018-Fall Computer Networks Networking Laboratory 139/237

140 4.3 Unicast Routing Routing Algorithms: Link-state routing (5/7) Dijkstra s algorithm Start Set root to local node and move it to permanent list Tentative list Yes is empty? No Among nodes in tentative list, move the one with the shortest path to permanent list Add each unprocessed neighbor of last moved node to tentative list if not already there. If neighbor is in the tentative list with larger cumulative cost, replace it with new one Stop 2018-Fall Computer Networks Networking Laboratory 140/237

141 4.3 Unicast Routing Routing Algorithms: Link-State Routing (6/7) Dijkstra s algorithm [Fig 4.65 Least-cost tree] 2018-Fall Computer Networks Networking Laboratory 141/237

142 4.3 Unicast Routing Routing Algorithms: Link-State Routing (7/7) Dijkstra s algorithm [Table 4.5 Dijkstra s algorithm] 2018-Fall Computer Networks Networking Laboratory 142/237

143 4.3 Unicast Routing Routing Algorithms: Path-Vector Routing (1/5) Path Vector Routing Path vector routing is not based on least-cost routing Path vector routing is mostly designed to route a packet between ISPs Spanning trees The path from a source to all destinations is also determined by the best spanning tree If there is more than one route to a destination, the source can choose the route that meets its policy best A source may apply several policies at the same time. One of the common policies uses the minimum number of nodes to be visited Fall Computer Networks Networking Laboratory 143/237

144 4.3 Unicast Routing Routing Algorithms: Path-Vector Routing (2/5) Spanning trees: Each source has created its own spanning tree that meets its policy The policy is to use the minimum number of nodes to reach a destination [Fig 4.66 Spanning trees in path-vector routing] 2018-Fall Computer Networks Networking Laboratory 144/237

145 4.3 Unicast Routing Routing Algorithms: Path-Vector Routing (3/5) Creation of spanning trees When a node is booted, it creates a path vector based on the information it can obtain about its immediate neighbor A node sends greeting messages to its immediate neighbors to collect these pieces of information Each node, after the creation of the initial path vector, sends it to all its immediate neighbors. Each node, when it receives a path vector from a neighbor, updates its path vector the equation: Path(x, y) = best {path(x, y), [(x+path(v,y)]} for all v s in the internet 2018-Fall Computer Networks Networking Laboratory 145/237

146 4.3 Unicast Routing Routing Algorithms: Path-Vector Routing (4/5) Creation of spanning trees [ Fig 4.67 path vectors made at booting time ] [ Fig 4.68 Updating path vectors ] 2018-Fall Computer Networks Networking Laboratory 146/237

147 4.3 Unicast Routing Routing Algorithms: Path-Vector Routing (5/5) Path-vector algorithm [ Table 4.6 Path-vector algorithm for a node ] 2018-Fall Computer Networks Networking Laboratory 147/237

148 Practice Problem Dijkstra shortest path algorithm example B C A D 1 D E 2018-Fall Computer Networks Networking Laboratory 148/237

149 Practice Problem What is the significance of name Distance vector routing 2018-Fall Computer Networks Networking Laboratory 149/237

150 4.3 Unicast Routing Unicast Routing Protocols: Introduction Introduction Three common protocols used in the Internet are introduced Routing Information Protocol (RIP): based on the distance-vector algorithm Open Shortest Path First (OSPF): based on the link-state algorithm Border Gateway Protocol (BGP): based on the path-vector algorithm 2018-Fall Computer Networks Networking Laboratory 150/237

151 4.3 Unicast Routing Unicast Routing Protocols: Internet structure(1/2) Internet structure Backbones: provide global connectivity Provider network: at a lower level, use the backbones for global connectivity Customer networks: use the services provided by the provider networks Any of these three entities can be called an Internet Service Provider or ISP, but at different level [ Fig 4.69 Internet structure ] 2018-Fall Computer Networks Networking Laboratory 151/237

152 4.3 Unicast Routing Unicast Routing Protocols: Internet structure(2/2) Hierarchical Routing Hierarchical routing means considering each ISP as an autonomous system (AS). Routing inside an AS is referred to as intradomain routing Global routing to glue all ASs together is referred to as interdomain routing Autonomous system Autonomous system Autonomous system Autonomous system 2018-Fall Computer Networks Networking Laboratory 152/237

153 4.3 Unicast Routing Unicast Routing Protocols: RIP (1/10) RIP The Routing Information Protocol (RIP) is an intradomain routing protocol used inside an autonomous system Hop Count RIP basically implements distance vector routing algorithm with some considerations The cost is defined as the number of hops, which means the number of networks (subnets) a packet needs to travel through from the source router to the final destination host In RIP, the maximumcost of a path can be 15, which means 16 is considered as infinity (no connection) 2018-Fall Computer Networks Networking Laboratory 153/237

154 4.3 Unicast Routing Unicast Routing Protocols: RIP (2/10) Forwarding Tables 1 hop (N4) 2 hops (N3, N4) 3 hops (N2, N3, N4) [Fig 4.70 Hop counts in RIP] [Fig 4.71 Forwarding tables] 2018-Fall Computer Networks Networking Laboratory 154/237

155 4.3 Unicast Routing Unicast Routing Protocols: RIP (3/10) RIP Implementation RIP runs at the application layer, but creates forwarding tables for IP at the network layer RIP uses UDP port 520 for route updates RIP has two versions RIP-1 and RIP-2. We discuss only RIP Fall Computer Networks Networking Laboratory 155/237

156 Repeated 4.3 Unicast Routing Unicast Routing Protocols: RIP (4/10) RIP messages RIP has two types of messages: request and response Command Version Reserved Family Tag Network address Subnet mask Next-hop address Distance [Fig 4.72 RIP message format] 2018-Fall Computer Networks Networking Laboratory 156/237

157 4.3 Unicast Routing Unicast Routing Protocols: RIP (5/10) RIP messages Request A request message is sent by a router that has just come up or by a router that has some time-out entries Response (or update) A response can be either solicited or unsolicited A solicited response is sent only in answer to a request An unsolicited response is sent periodically, every 30s or when there is a change in the routing table 2018-Fall Computer Networks Networking Laboratory 157/237

158 4.3 Unicast Routing Unicast Routing Protocols: RIP (6/10) RIP algorithm RIP implements the same algorithm as the distance-vector routing algorithm, but has some changes A router needs to send the whole contents of its forwarding table in a response message The receiver adds one hop to each cost and changes the next router field to the address of the sending router. Each route in the modified forwarding table is called the received route and each route in the old forwarding table is called the old route. The received router selects the old routes as the new ones except in the following three cases: 2018-Fall Computer Networks Networking Laboratory 158/237

159 4.3 Unicast Routing Unicast Routing Protocols: RIP (7/10) 1. If the received route does not exist in the old forwarding table, it should be added to the route. 2. If the cost of the received route is lower than the cost of the old one, the received route should be selected as the new one. 3. If the cost of the received route is higher than the cost of the old one, but the value of the next router is the same in both routes, the received route should be selected as the new one. This is the case where the route was actually advertised by the same router in the past, but now the situation has been changed. For example, suppose a neighbor has previously advertised a route to a destination with cost 3, but now there is no path between this neighbor and that destination. The neighbor advertises this destination with cost value infinity (16 in RIP) 2018-Fall Computer Networks Networking Laboratory 159/237

160 4.3 Unicast Routing Unicast Routing Protocols: RIP (8/10) RIP algorithm [ Fig 4.73 Example of an autonomous system using RIP ] 2018-Fall Computer Networks Networking Laboratory 160/237

161 4.3 Unicast Routing Unicast Routing Protocols: RIP (9/10) Timer in RIP Timers Periodic 25~35 s Expiration 180 s Garbage collection 120 s Periodic Timer It controls the advertising of regular update messages The working model uses a random number between 25 and 35s It counts down; when zero is reached, the update message is sent 2018-Fall Computer Networks Networking Laboratory 161/237

162 4.3 Unicast Routing Unicast Routing Protocols: RIP (10/10) Timer in RIP (cont d) Expiration Timer It governs the validity of a route If there is a problem on an internet and no update is received within the allotted 180s, the route is considered expired and the hop count of the route is set to 16 Garbage Collection Timer When the information about a route becomes invalid, the router does not immediately purge that route from its table It continues to advertise the route with a metric value of 16 At the same time, a timer called the garbage collection timer is set to 120s When the count reaches zero, the route is purged 2018-Fall Computer Networks Networking Laboratory 162/237

163 4.3 Unicast Routing Unicast Routing Protocols: OSPF(1/15) OSPF (Open Shortest Path First) OSPF is an intradomain routing protocol like RIP It is based on the link-state routing protocol Metric Each link can be assigned a weight based on the throughput, RTT (round trip time), reliability, hop count, and so on. Total cost: 4 Total cost: 7 Total cost: 12 [ Fig 4.74 Metric in OSPF ] 2018-Fall Computer Networks Networking Laboratory 163/237

164 4.3 Unicast Routing Unicast Routing Protocols: OSPF(2/15) Forwarding tables Each OSPF router can create a forwarding table after finding the shortestpath tree between itself and the destination using Dijkstra s algorithm [ Fig 4.75 Forwarding tables in OSPF ] 2018-Fall Computer Networks Networking Laboratory 164/237

165 4.3 Unicast Routing Unicast Routing Protocols: OSPF(3/15) Areas OSPF divides an autonomous system into areas An area is a collection of networks, hosts, and routers all contained within an autonomous system Area border routers summarize the information about the area and send it to other areas All of the areas inside an autonomous system must be connected to a special area called backbone If the connectivity between a backbone and an area is broken, a virtual link between routers must be created 2018-Fall Computer Networks Networking Laboratory 165/237

166 4.3 Unicast Routing Unicast Routing Protocols: OSPF(4/15) Areas [ Fig 4.76 Areas in an autonomous system ] 2018-Fall Computer Networks Networking Laboratory 166/237

167 4.3 Unicast Routing Unicast Routing Protocols: OSPF(5/15) Link-state advertisement Router link A router link advertises the existence of a router as a node A point-to-point link connects two routers without any other host or router in between A transient link is a network with several routers attached to it A stub link is a network that is connected to only one router [ Fig 4.77 Router link] 2018-Fall Computer Networks Networking Laboratory 167/237

168 4.3 Unicast Routing Unicast Routing Protocols: OSPF(6/15) Link-state advertisement Network link A network link advertises the network as a node Since a network cannot do announcements itself, one of the routers is assigned as the designated router and does the advertising [ Fig 4.78 Network link] 2018-Fall Computer Networks Networking Laboratory 168/237

169 4.3 Unicast Routing Unicast Routing Protocols: OSPF(7/15) Link-state advertisement Summary link to network This is done by an area border router It advertises the summary of links collected by the backbone to an area or the summary of links collected by the area to the backbone Summary link to AS This is done by an AS router It advertises the summary links from other AS to the backbone area External link This is done by an AS router to announce the existence of a single network outside the AS 2018-Fall Computer Networks Networking Laboratory 169/237

170 4.3 Unicast Routing Unicast Routing Protocols: OSPF(8/15) Link-state advertisement [ Fig 4.79 Five different LSPs ] 2018-Fall Computer Networks Networking Laboratory 170/237

171 4.3 Unicast Routing Unicast Routing Protocols: OSPF(9/15) OSPF Implementation OSPF is implemented as a program in the network layer that uses the service of the IP for propagation. An IP datagram that carries a message from OSPF sets the value of the protocol field to 89. There are two versions: version 1 and version 2. Most implementations use version Fall Computer Networks Networking Laboratory 171/237

172 4.3 Unicast Routing Unicast Routing Protocols: OSPF(10/15) OSPF Messages Two message headers used in OSPF: OSPF common header: is used in all messages. The link-state general header: is used in some messages. Five message types used in OSPF: Hello message: Used by a router to introduce itself to the neighbors and announces all neighbors that it already knows Database description message: Sent in response to the hello message to allow a newly joined router to acquire the full LSDB Link-state request message: Sent by a router that needs information about a specific link state Link-state update message: Used for building the LSDB Link-state acknowledgment: Used to create reliability in OSPF 2018-Fall Computer Networks Networking Laboratory 172/237

173 4.3 Unicast Routing Unicast Routing Protocols: OSPF(11/15) OSPF Messages Hello message Used by a router to introduce itself to the neighbors and announces all neighbors that it already knows Database description message Sent in response to the hello message to allow a newly joined router to acquire the full LSDB Link-state request message Sent by a router that needs information about a specific link state 2018-Fall Computer Networks Networking Laboratory 173/237

174 4.3 Unicast Routing Unicast Routing Protocols: OSPF(12/15) OSPF Messages Link-state update message Used for building the LSDB Link-state acknowledgment Used to create reliability in OSPF 2018-Fall Computer Networks Networking Laboratory 174/237

175 4.3 Unicast Routing Unicast Routing Protocols: OSPF(13/15) OSPF Messages [ Fig 4.80 OSPF message formats ] 2018-Fall Computer Networks Networking Laboratory 175/237

176 4.3 Unicast Routing Unicast Routing Protocols: OSPF(14/15) OSPF Messages [ Fig 4.81 OSPF message formats ] 2018-Fall Computer Networks Networking Laboratory 176/237

177 4.3 Unicast Routing Unicast Routing Protocols: OSPF(15/15) OSPF Algorithm OSPF implements the link-state routing algorithm with some considerations: After each router has created the shortest-path tree, the algorithm needs to use it to create the corresponding routing algorithm The algorithm needs to be augmented to handle sending and receiving all five types of messages 2018-Fall Computer Networks Networking Laboratory 177/237

178 4.3 Unicast Routing Unicast Routing Protocols: Practice Problem What is the difference between OSPF and RIP? 2018-Fall Computer Networks Networking Laboratory 178/237

179 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (1/13) BGP4: Border Gateway Protocol Version 4 is the only interdomain routing protocol used in the Internet today BGP4 is based on the path-vector algorithm [ Fig 4.82 A sample internet with four ASs ] To enable each router to route a packet to any network in the internet, external BGP4 (ebgp) is installed on each border router internal BGP (ibgp) is installed on all routers 2018-Fall Computer Networks Networking Laboratory 179/237

180 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (2/13) Operation of external BGP Two routers, which ebgp is installed on, try to create a TCP connection using the well-known port 179 as ebgp session. The circled number defines the sending router in each case. For example, message number 1 is sent by router R1 and tells router R5 that N1, N2, N3,and N4 can be reached through router R1. [ Fig 4.83 ebgp operation ] 2018-Fall Computer Networks Networking Laboratory 180/237

181 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (3/13) Operation of internal BGP It also uses the service of TCP on the well-known port 179, but it creates a session between any possible pair of routers inside an autonomous system An AS router combines the reachability information about another AS with the reachability information it already knows about the AS it belongs to Then the AS router sends a new update message to another AS In this way, all the network devices can transmit data to another in another AS 2018-Fall Computer Networks Networking Laboratory 181/237

182 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (4/13) [ Fig 4.84 Combination of ebgp and ibgp sessions in our Internet ] The first message (numbered1) is sent by R1 announcing that networks N8 and N9 are reachable through the path AS1-AS2 to R2, R3, and R4. Routers R2, R4, and R6 do the same thing, like R1, but send different messages to different destinations. When R1 receives the update message from R2, it combines the reachability information about AS3 with the reachability information it already knows about AS1 and sends a new update message to R5. The process continues when R1 receives the update message from R Fall Computer Networks Networking Laboratory 182/237

183 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (5/13) Operation of internal BGP [ Fig 4.85 Finalized BGP path tables] 2018-Fall Computer Networks Networking Laboratory 183/237

184 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (6/13) Injection of Information into Intradomain Routing The role of BGP is to help the routers inside the AS to augment their routing information. In other words, it is injected into intradomain forwarding tables (RIP or OSPF). Fig 4.83 assumes that all ASs are using RIP as the intradomain routing protocol. [ Fig 4.86 Forwarding tables after injection from BGP] 2018-Fall Computer Networks Networking Laboratory 184/237

185 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (7/13) Path attributes Interdomain routing needs more information about how to reach the final destination compared to intradomain routing These pieces(information) are called path attributes [ Fig 4.87 Format of path attribute ] 2018-Fall Computer Networks Networking Laboratory 185/237

186 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (8/13) Path attributes ORIGIN (type 1) A well-known mandatory attribute Defines the source of the routing information (1: RIP or OSPF, 2:BGP, 3: unknown source) AS-PATH (type 2) A well-known mandatory attribute Defines the list of autonomous systems through which the destination can be reached NEXT-HOP A well-known mandatory attribute Defines the next router to which the data packet should be forwarded 2018-Fall Computer Networks Networking Laboratory 186/237

187 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (9/13) Path attributes MULTI-EXIT-DISC (type 4) An optional non-transitive attribute Discriminates among multiple exit paths to a destination LOCAL-PREF (type 5) A well-known discretionary attribute It is normally set by the administrator, based on the organization policy The routes the administrator prefers are given a higher local preference 2018-Fall Computer Networks Networking Laboratory 187/237

188 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (10/13) Path attributes ATOMIC-AGGREGATE (type 6) A well-known discretionary attribute Defines the destination prefix; only single destination network AGGREGATOR (type7) Optional transitive attribute Emphasizes that the destination prefix is an aggregate 2018-Fall Computer Networks Networking Laboratory 188/237

189 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (11/13) Route Selection In the case where multiple routes are received to a destination, BGP needs to select one among them. [ Fig 4.88 Flow diagram for route selection] 2018-Fall Computer Networks Networking Laboratory 189/237

190 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (12/13) Messages Open message To create a neighborhood relationship, a router running BGP opens a TCP connection with a neighbor and sends an open message Update message It is used by a router to withdraw destinations that have been advertised previously, to announce a route to a new destination Keepalive message BGP peers exchange keepalive messages regularly to tell each other they are alive Notification is sent when an error condition is detected or a router wants to close session 2018-Fall Computer Networks Networking Laboratory 190/237

191 4.3 Unicast Routing Unicast Routing Protocols: BGP4 (13/13) Messages [ Fig 4.89 BGP Messages] 2018-Fall Computer Networks Networking Laboratory 191/237

192 4.4 Multicasting Routing Introduction: Unicasting Unicasting There is one source and one destination network [ Fig 4.90 Unicasting ] 2018-Fall Computer Networks Networking Laboratory 192/237

193 4.4 Multicasting Routing Introduction: Multicasting (1/2) Multicasting There is one source and a group of destinations [ Fig 4.91 Multicasting ] 2018-Fall Computer Networks Networking Laboratory 193/237

194 4.4 Multicasting Routing Introduction: Multicasting (2/2) Multicasting versus multiple unicasting [ Fig 4.92 Multicasting versus multiple unicasting ] Multicasting starts with a single packet from the source that is duplicated by the routers In multiple unicasting, several packets start from the source 2018-Fall Computer Networks Networking Laboratory 194/237

195 4.4 Multicasting Routing Introduction: Multicast Applications Multicast applications Access to distributed databases Most of the large databases today are distributed. A user s request is multicast to all the database locations, and the location that has the information responds Information dissemination For example, a software update can be sent to all purchasers of a particular software package. News can be easily disseminated through multicasting Teleconferencing The individuals attending a teleconference all need to receive the same information at the same time. Distance learning Lessons taught by one professor can be received by a specific group of students Fall Computer Networks Networking Laboratory 195/237

196 4.4 Multicasting Routing Introduction: Broadcasting Broadcasting One-to-all communication Broadcasting means one-to-all communication: A host sends a packet to all hosts in an internet Broadcasting in this sense is not provided at the Internet level for the obvious reason that it may create a huge volume of traffic and use a huge amount of bandwidth Partial broadcasting, however, is done in the Internet. For example, some peerto-peer applications may use broadcasting to access all peers Fall Computer Networks Networking Laboratory 196/237

197 4.4 Multicasting Routing Multicast Basics: Multicast Addresses (1/3) Multicast addresses In multicast communication, the sender is only one, but the receiver is many For this reason, we need multicast addresses A multicast address defines a group of recipients [ Fig 4.93 Needs for multicast addresses ] 2018-Fall Computer Networks Networking Laboratory 197/237

198 4.4 Multicasting Routing Multicast Basics: Multicast Addresses (2/3) Multicast addresses in IPv4 A router or a destination host needs to distinguish between a unicast and a multicast datagram. IPv4 assigns a block of addresses for this purpose. In addressing, all of class D was used for multicast addresses as the block /4 (from to ). [ Fig 4.94 A multicast address in binary ] 2018-Fall Computer Networks Networking Laboratory 198/237

199 4.4 Multicasting Routing Multicast Basics: Multicast Addresses (3/3) Multicast addresses in IPv4 The multicast block (class D) is divided into several common subblocks Local network control block ( /24) Assigned to a multicast routing protocol to be used inside a network Internetwork control block ( /24) Assigned to a multicast routing protocol to used in the whole Internet Source-specific multicast block ( /8) It is used for source specific multicast routing in IGMP protocol GLOP Block ( /8) This block defines a range of addresses that can be used inside an autonomous system (AS) Administratively scoped block ( /8) The addresses in this block are used in a particular area of the Internet 2018-Fall Computer Networks Networking Laboratory 199/237

200 4.4 Multicasting Routing Multicast Basics: Collecting groups information(1/3) IGMP: Internet Group Management Protocol The protocol that is used today for collecting information about membership IGMP is a protocol defined at the network layer IGMP messages are encapsulated in an IP datagram There are only two types of messages in IGMP version3 Query and report messages group [ Fig 4.95 IGMP operation ] 2018-Fall Computer Networks Networking Laboratory 200/237

201 4.4 Multicasting Routing Multicast Basics: Collecting groups information(2/3) IGMP Query message: A query message is periodically sent by a router to all hosts attached to it to ask them to report their interests about membership in groups. It can take one of three forms: 1. A general query message is sent about membership in any group It is encapsulated in a datagram with the destination address All routers attached to the same network receive this message to inform them that this message is already sent and that they should refrain from resending it 2. A group-specific query message is sent from a router to ask about the membership related to a specific group This is sent when a router does not receive a response about a specific group and wants to be sure that there is no active member of that group in the network 2018-Fall Computer Networks Networking Laboratory 201/237

202 4.4 Multicasting Routing Multicast Basics: Collecting groups information(3/3) IGMP Query message 3. A source-and-group-specific query message is sent from a router to ask about the membership related to a specific group when the message comes from a specific source or sources Report message A report message is sent by a host as a response to a query message The message contains a list of records in which each record gives the identifier of the corresponding group and the addresses of all sources that the host is interested in receiving messages from The message is encapsulated in a datagram with the multicast address Fall Computer Networks Networking Laboratory 202/237

203 4.4 Multicasting Routing Multicast Basics: Multicast forwarding (1/2) Multicast forwarding In unicast communication, the destination address of the packet defines one single destination In multicast communication, the destination of the packet defines one group, but that group may have more than one member in the internet [ Fig 4.96 Destination in unicasting and multicasting ] 2018-Fall Computer Networks Networking Laboratory 203/237

204 4.4 Multicasting Routing Multicast Basics: Multicast forwarding (2/2) Multicast forwarding Forwarding in unicast communication depends only on the destination address of the packet Forwarding decisions in multicast communication depend on both the destination and the source address of the packet Forwarding is based on where the packet should go and where the packet has come from [ Fig 4.97 Forwarding depends on the destination and the source ] 2018-Fall Computer Networks Networking Laboratory 204/237

205 Practice Problem Difference between multicast and unicast forwarding 2018-Fall Computer Networks Networking Laboratory 205/237

206 4.4 Multicasting Routing Multicast Basics: Two approaches to multicasting Two approaches to multicasting Source-based tree: one tree per source shortest path trees reverse path forwarding Group-shared tree: group uses one tree minimal spanning (Steiner) center-based trees 2018-Fall Computer Networks Networking Laboratory 206/237

207 4.4 Multicasting Routing Intradomain Routing Protocol: DVMRP (1/3) Multicast Distance Vector (Distance Vector Multicast Routing Protocol - DVMRP) is the extension of the RIP which is used in unicast routing. It uses the source-based tree approach to multicasting in three steps: The router uses an algorithm called Reverse Path Forwarding (RPF) The router uses an algorithm called Reverse Path Broadcasting (RPB) The router uses an algorithm called Reverse Path Multicasting (RPM) 2018-Fall Computer Networks Networking Laboratory 207/237

208 4.4 Multicasting Routing Intradomain Routing Protocol: DVMRP (2/3) Reverse Path Forwarding (RPF) It relies on router s knowledge of unicast shortest path from the to the router Reverse Path Broadcasting (RPB) source RPB actually creates a broadcast tree from the graph that has been created by the RPF algorithm [ Fig 4.98 RPF versus RPB ] 2018-Fall Computer Networks Networking Laboratory 208/237

209 4.4 Multicasting Routing Intradomain Routing Protocol: MOSPF (1/2) Multicast Link State (Multicast Open Shortest Path First -MOSPF) It is the extension of the OSPF protocol, which is used in unicasting routing The router uses the Dijkstra algorithm to create a shortest-path tree with S as the root and all destination in the internet as the leaves The router finds itself in the shortest-path tree created in the first step The shortest-path subtree is actually a broadcast subtree with the router as the root and all networks as the leaves The router can forward the received packet out of only those interfaces that correspond to the branches of the multicast tree 2018-Fall Computer Networks Networking Laboratory 209/237

210 4.4 Multicasting Routing Intradomain Routing Protocol: MOSPF (2/2) Multicast Open Shortest Path First (MOSPF) [ Fig 4.99 Example of tree formation in MOSPF ] 2018-Fall Computer Networks Networking Laboratory 210/237

211 4.4 Multicasting Routing Intradomain Routing Protocol: PIM (1/4) Protocol Independent Multicast (PIM) Not dependent on any specific underlying unicast routing algorithm (works with all) Two different multicast distribution scenarios Protocol Independent Multicast-Dense Mode (PIM-DM) Group members densely packed, in close proximity. Bandwidth more plentiful Protocol Independent Multicast-Sparse Mode (PIM-SM) Group members widely dispersed Bandwidth not plentiful 2018-Fall Computer Networks Networking Laboratory 211/237

212 4.4 Multicasting Routing Intradomain Routing Protocol: PIM (2/4) Protocol Independent Multicast (PIM) PIM-DM: The first packet is broadcast to all networks, which have or do not have members. After a prune message arrives from a router with no member, the second packet is only multicast. [ Fig Idea behind PIM-DM ] 2018-Fall Computer Networks Networking Laboratory 212/237

213 4.4 Multicasting Routing Intradomain Routing Protocol: PIM (3/4) Protocol Independent Multicast (PIM) PIM-SM: The core router in PIM-SM is called the rendezvous point (RP). Multicast communication is achieved in two steps: Any router that has a multicast packet to send to a group of destinations first encapsulates the multicast packet in a unicast packet (tunneling) and sends it to the RP. The RP then decapsulates the unicast packet and sends the multicastpacket to its destination Fall Computer Networks Networking Laboratory 213/237

214 4.4 Multicasting Routing Intradomain Routing Protocol: PIM (4/4) Protocol Independent Multicast (PIM) [ Fig Idea behind PIM-SM ] 2018-Fall Computer Networks Networking Laboratory 214/237

215 4.5 Internet Protocol version 6 Introduction: Internet Protocol version 6 (IPv6) An IPv6 address is 128 bits long. Compared with the 32-bit address of IPv4, this is a huge (2 96 times) increase in the address space The main changes in the IPv6 protocol: Larger address space. Better header format: IPv6 uses a new header format in which options are separated from the base header and inserted. This simplifies and speeds up the routing process because most of the options do not need to be checked by routers New options: IPv6 has new options to allow for additional functionalities Allowance for extension: to allow the extension of the protocol if required by new technologies or applications Support for resource allocation: two new fields, traffic class and flow label, have been added to enable the source to request special handling of the packet. E.g. support traffic such as real-time audio and video Support for more security: providing the encryption and authentication options 2018-Fall Computer Networks Networking Laboratory 215/237

216 4.5 Internet Protocol version 6 Introduction: Video (1/2) Video Content When the Internet was launched in 1983, no one ever dreamed that there might be billions of devices and users trying to get online But like a telephone network that is running out of phone numbers, the current Internet is running out of IP addresses And if we don't roll out Internet Protocol v6 (IPv6), we won't have the room we need to grow and the Internet would become tangled, unsafe and unsustainable Link: Fall Computer Networks Networking Laboratory 216/237

217 4.5 Internet Protocol version 6 Introduction: Video (1/2) Fall Computer Networks Networking Laboratory 217/237

218 4.5 Internet Protocol version 6 Packet Format (1/4) [ Fig IPv6 datagram ] 2018-Fall Computer Networks Networking Laboratory 218/237

219 4.5 Internet Protocol version 6 Packet Format (2/4) Version: For IPv6, the value is 6 Traffic class: Identify priority among datagrams in flow. It replaces the type-of-service field in IPv4. Flow Label: Identify datagrams in same flow Payload length: 2-byte payload length field defines the length of the IP datagram excluding the header Next header: Identify upper layer protocol or the type of first extensionheader Hop limit: The 8-bit hop limit field serves the same purpose as the TTL field in IPv4 Source and destination address: These are 16-byte field which defines Internet address of the source and destination Payload: the payload field in IPv6 has a different format and meaning 2018-Fall Computer Networks Networking Laboratory 219/237

220 4.5 Internet Protocol version 6 Packet Format (3/4) Payload: the payload field in IPv6 has a different format and meaning [ Fig Payload in an IPv6 datagram ] 2018-Fall Computer Networks Networking Laboratory 220/237

221 4.5 Internet Protocol version 6 Packet Format (4/4) Concept of flow and priority in IPv6 In IPv6, the flow label has been directly added to the format of the IPv6 datagram to allow us to use IPv6 as a connection-oriented protocol Fragmentation and reassembly IPv6 datagrams can be fragmented only by the source, not by the routers The reassembly takes place at the destination Extension headers Extension headers play a necessary and important part in IPv6. In particular, three extension headers - fragmentation, authentication, and extended security payload - are present in some packets Fall Computer Networks Networking Laboratory 221/237

222 4.5 Internet Protocol version 6 IPv6 Addressing An IPv6 address is 128 bits or 16 bytes long, four times the address length in IPv4 Binary : Colon hexadecimal : FEF6:BA98:7654:3210:ADEF:BBFF:2922:FF00 The leading zeros of a section can be omitted , 000F F Zero compression FDEC:0:0:0:0:BBFF:0:FFFF FEDC::BBFF:0:FFFF 2018-Fall Computer Networks Networking Laboratory 222/237

223 4.5 Internet Protocol version 6 IPv6 Addressing IPv6 uses hierarchical addressing IPv6 allows slash or CIDR notation Address space The address space of IPv6 contains addresses This address space is 2 96 times the IPv4 address Three address types Unicast Anycast Multicast 2018-Fall Computer Networks Networking Laboratory 223/237

224 4.5 Internet Protocol version 6 IPv6 Addressing: Address space allocation(1/3) The address space of IPv6 is divided into several blocks of varying size and block is allocated for a special purpose [ Table 4.7 Prefixes for assigned IPv6 addresses ] 2018-Fall Computer Networks Networking Laboratory 224/237

225 4.5 Internet Protocol version 6 IPv6 Addressing: Address space allocation(2/3) Global unicast addresses [ Fig Global unicast address ] 2018-Fall Computer Networks Networking Laboratory 225/237

226 4.5 Internet Protocol version 6 IPv6 Addressing: Address space allocation(3/3) The block in global unicast addresses is used for unicast communication between two hosts in the Internet The global routing prefix is used to route the packet through the Internet to the organization site, such as the ISP that owns the block The last q bits define the interface identifier 2018-Fall Computer Networks Networking Laboratory 226/237

227 4.5 Internet Protocol version 6 IPv6 Addressing: Special addresses (1/4) The unspecified address is a subblock containing only one single address, which is used during bootstrap when a host does not know its own address and wants to send inquiry to find it The loopback address consists of one single address 2018-Fall Computer Networks Networking Laboratory 227/237

228 4.5 Internet Protocol version 6 IPv6 Addressing: Special addresses (2/4) A compatible address is used when a computer using IPv6 wants to send a message to another computer using IPv6 A mapped address is used when a computer already migrated to version 6 wants to send an address to a computer still using version Fall Computer Networks Networking Laboratory 228/237

229 4.5 Internet Protocol version 6 IPv6 Addressing: Special addresses (3/4) Other Assigned Blocks IPv6 uses two large blocks for private addressing and one large multicasting Unique local block The packet carrying this type of address as the destination address is not expected to be routed block for Link local block It is designed for private addresses 2018-Fall Computer Networks Networking Laboratory 229/237

230 4.5 Internet Protocol version 6 IPv6 Addressing: Special addresses (4/4) Other Assigned Blocks Multicast block It is used to define a group of hosts instead of just one 2018-Fall Computer Networks Networking Laboratory 230/237

231 4.5 Internet Protocol version 6 Transition from IPv4 to IPv6: Dual stack It is recommended that all hosts before migrating completely to version 6, have a dual stack of protocols during the transition [ Fig Dual stack ] 2018-Fall Computer Networks Networking Laboratory 231/237

232 4.5 Internet Protocol version 6 Transition from IPv4 to IPv6: Tunneling Tunneling is a strategy used when two computers using IPv6 want to communicate with each other and the packet must pass through a region that used IPv4 [ Fig Tunneling strategy ] 2018-Fall Computer Networks Networking Laboratory 232/237

233 4.5 Internet Protocol version 6 Transition from IPv4 to IPv6: Header Translation Header translation is necessary when the majority of the Internet has moved to IPv6 but some systems still use IPv4 [ Fig Header translation strategy ] 2018-Fall Computer Networks Networking Laboratory 233/237

234 Practice Problem Why we are moving to IPv Fall Computer Networks Networking Laboratory 234/237

235 4.5 Internet Protocol version 6 ICMPv6 ICMPv6 (Internet Control Message Protocol version 6) This new version follows the same strategy and purposes of version 4 It is more complicated than ICMPv4 Some protocols that were independent in version 4 are now part of ICMPv6 Some new messages have been added to make it more useful [ Fig Comparison of network layer in version 4 and version 6 ] 2018-Fall Computer Networks Networking Laboratory 235/237

236 4.5 Internet Protocol version 6 ICMPv6: Types of ICMPv6 (1/2) [ Fig ICMPv6 messages (part 1) ] 2018-Fall Computer Networks Networking Laboratory 236/237

Chapter 18. Introduction to Network Layer

Chapter 18. Introduction to Network Layer Chapter 18. Introduction to Network Layer 18.1 Network Layer Services 18.2 Packet Switching 18.3 Network Layer Performance 18.4 IPv4 Addresses 18.5 Forwarding of IP Packets Computer Networks 18-1 Communication

More information

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia IP - The Internet Protocol Based on the slides of Dr. Jorg Liebeherr, University of Virginia Orientation IP (Internet Protocol) is a Network Layer Protocol. IP: The waist of the hourglass IP is the waist

More information

Network Layer (4): ICMP

Network Layer (4): ICMP 1 Network Layer (4): ICMP Required reading: Kurose 4.4.3, 4.4.4 CSE 4213, Fall 2006 Instructor: N. Vlajic 2 1. Introduction 2. Network Service Models 3. Architecture 4. Network Layer Protocols in the Internet

More information

Lecture 3. The Network Layer (cont d) Network Layer 1-1

Lecture 3. The Network Layer (cont d) Network Layer 1-1 Lecture 3 The Network Layer (cont d) Network Layer 1-1 Agenda The Network Layer (cont d) What is inside a router? Internet Protocol (IP) IPv4 fragmentation and addressing IP Address Classes and Subnets

More information

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst EITF25 Internet Techniques and Applications L7: Internet Stefan Höst What is Internet? Internet consists of a number of networks that exchange data according to traffic agreements. All networks in Internet

More information

TSIN02 - Internetworking

TSIN02 - Internetworking Lecture 2: The Internet Protocol Literature: Forouzan: ch 4-9 and ch 27 2004 Image Coding Group, Linköpings Universitet Outline About the network layer Tasks Addressing Routing Protocols 2 Tasks of the

More information

Network Layer: outline

Network Layer: outline Network Layer: outline 1 introduction 2 virtual circuit and datagram networks 3 what s inside a router 4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 5 routing algorithms link state

More information

Chapter 7 Internet Protocol Version 4 (IPv4) Kyung Hee University

Chapter 7 Internet Protocol Version 4 (IPv4) Kyung Hee University Chapter 7 Internet Protocol Version 4 (IPv4) 1 7.1 Introduction The transmission mechanism used by the TCP/IP Unreliable and connectionless datagram protocol Best-effort delivery service IP packets can

More information

Vorlesung Kommunikationsnetze

Vorlesung Kommunikationsnetze Picture 15 13 Vorlesung Kommunikationsnetze Prof. Dr. H. P. Großmann mit B. Wiegel sowie A. Schmeiser und M. Rabel Sommersemester 2009 Institut für Organisation und Management von Informationssystemen

More information

Department of Computer and IT Engineering University of Kurdistan. Network Layer. By: Dr. Alireza Abdollahpouri

Department of Computer and IT Engineering University of Kurdistan. Network Layer. By: Dr. Alireza Abdollahpouri Department of Computer and IT Engineering University of Kurdistan Network Layer By: Dr. Alireza Abdollahpouri What s the Internet: nuts and bolts view PC server wireless laptop cellular handheld millions

More information

Chapter 19 Network Layer: Logical Addressing

Chapter 19 Network Layer: Logical Addressing Chapter 19 Network Layer: Logical Addressing 19.1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 19.2 19-1 IPv4 ADDRESSES An IPv4 address is a 32-bit address

More information

TSIN02 - Internetworking

TSIN02 - Internetworking Lecture 2: Internet Protocol Literature: Forouzan: ch (4-6), 7-9 and ch 31 2004 Image Coding Group, Linköpings Universitet Lecture 2: IP Goals: Understand the benefits Understand the architecture IPv4

More information

internet technologies and standards

internet technologies and standards Institute of Telecommunications Warsaw University of Technology 2017 internet technologies and standards Piotr Gajowniczek Andrzej Bąk Michał Jarociński Network Layer The majority of slides presented in

More information

Internet Technology 3/23/2016

Internet Technology 3/23/2016 Internet Technology // Network Layer Transport Layer (Layer ) Application-to-application communication Internet Technology Network Layer (Layer ) Host-to-host communication. Network Layer Route Router

More information

Lecture 8. Network Layer (cont d) Network Layer 1-1

Lecture 8. Network Layer (cont d) Network Layer 1-1 Lecture 8 Network Layer (cont d) Network Layer 1-1 Agenda The Network Layer (cont d) What is inside a router Internet Protocol (IP) IPv4 fragmentation and addressing IP Address Classes and Subnets Network

More information

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer 1 CPSC 826 Intering The Network Layer: Routing & Addressing Outline The Network Layer Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu November 10, 2004 Network layer

More information

Router Architecture Overview

Router Architecture Overview Chapter 4: r Introduction (forwarding and routing) r Review of queueing theory r Router design and operation r IP: Internet Protocol m IPv4 (datagram format, addressing, ICMP, NAT) m Ipv6 r Generalized

More information

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing Network layer: Overview Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing 1 Network Layer Functions Transport packet from sending to receiving hosts Network layer protocols in every

More information

Network layer: Overview. Network Layer Functions

Network layer: Overview. Network Layer Functions Network layer: Overview Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing 1 Network Layer Functions Transport packet from sending to receiving hosts Network layer protocols in every

More information

Internet Control Message Protocol (ICMP)

Internet Control Message Protocol (ICMP) Internet Control Message Protocol (ICMP) 1 Overview The IP (Internet Protocol) relies on several other protocols to perform necessary control and routing functions: Control functions (ICMP) Multicast signaling

More information

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca Based partly on lecture notes by David Mazières, Phil Levis, John Janno< Administrivia IP out today. Your job: Find partners and tell us Implement

More information

IP - The Internet Protocol

IP - The Internet Protocol IP - The Internet Protocol 1 Orientation IP s current version is Version 4 (IPv4). It is specified in RFC 891. TCP UDP Transport Layer ICMP IP IGMP Network Layer ARP Network Access Link Layer Media 2 IP:

More information

TCP/IP Protocol Suite

TCP/IP Protocol Suite TCP/IP Protocol Suite Computer Networks Lecture 5 http://goo.gl/pze5o8 TCP/IP Network protocols used in the Internet also used in today's intranets TCP layer 4 protocol Together with UDP IP - layer 3 protocol

More information

Lecture 8. Basic Internetworking (IP) Outline. Basic Internetworking (IP) Basic Internetworking (IP) Service Model

Lecture 8. Basic Internetworking (IP) Outline. Basic Internetworking (IP) Basic Internetworking (IP) Service Model Lecture 8 Basic Internetworking (IP) Reminder: Homework 3, Programming Project 2 due on Tuesday. An example internet is shown at right. Routers or gateways are used to connect different physical networks.

More information

Da t e: August 2 0 th a t 9: :00 SOLUTIONS

Da t e: August 2 0 th a t 9: :00 SOLUTIONS Interne t working, Examina tion 2G1 3 0 5 Da t e: August 2 0 th 2 0 0 3 a t 9: 0 0 1 3:00 SOLUTIONS 1. General (5p) a) Place each of the following protocols in the correct TCP/IP layer (Application, Transport,

More information

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis Computer Network Fundamentals Spring 2008 Week 4 Network Layer Andreas Terzis Outline Internet Protocol Service Model Addressing Original addressing scheme Subnetting CIDR Fragmentation ICMP Address Shortage

More information

Module 7 Internet And Internet Protocol Suite

Module 7 Internet And Internet Protocol Suite Module 7 Internet And Internet Protocol Suite Lesson 22 IP addressing. ICMP LESSON OBJECTIVE General The lesson will continue the discussion on IPv4 along with the idea of ICMP. Specific The focus areas

More information

Lecture 8. Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1

Lecture 8. Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1 Lecture 8 Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1 Outline Chapter 3 - Internetworking 3.1 Switching and Bridging 3.2

More information

Internet Protocols (chapter 18)

Internet Protocols (chapter 18) Internet Protocols (chapter 18) CSE 3213 Fall 2011 Internetworking Terms 1 TCP/IP Concepts Connectionless Operation Internetworking involves connectionless operation at the level of the Internet Protocol

More information

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang CS 356: Computer Network Architectures Lecture 10: IP Fragmentation, ARP, and ICMP Xiaowei Yang xwy@cs.duke.edu Overview Homework 2-dimension parity IP fragmentation ARP ICMP Fragmentation and Reassembly

More information

ICMP (Internet Control Message Protocol)

ICMP (Internet Control Message Protocol) Today s Lecture ICMP (Internet Control Message Protocol) Internet Protocols CSC / C 573 I. ICMP Overview II. ICMP rror Reporting III. ICMP Query / Response Messages IV. ICMP Message Processing Fall, 2005

More information

Network Layer. The Network Layer. Contents Connection-Oriented and Connectionless Service. Recall:

Network Layer. The Network Layer. Contents Connection-Oriented and Connectionless Service. Recall: Network Layer The Network Layer Recall: The network layer is responsible for the routing of packets The network layer is responsible for congestion control 1 2 Contents 4.1.1 Connection-Oriented and Connectionless

More information

Network Layer. Recall: The network layer is responsible for the routing of packets The network layer is responsible for congestion control

Network Layer. Recall: The network layer is responsible for the routing of packets The network layer is responsible for congestion control The Network Layer 1 Network Layer Recall: The network layer is responsible for the routing of packets The network layer is responsible for congestion control 2 Contents Connection-Oriented (virtual circuit)

More information

Chapter 4: Network Layer

Chapter 4: Network Layer Chapter 4: Introduction (forwarding and routing) Review of queueing theory Routing algorithms Link state, Distance Vector Router design and operation IP: Internet Protocol IPv4 (datagram format, addressing,

More information

CC231 Introduction to Networks Dr. Ayman A. Abdel-Hamid. Internet Protocol Suite

CC231 Introduction to Networks Dr. Ayman A. Abdel-Hamid. Internet Protocol Suite CC231 Introduction to Networks Dr. Ayman A. Abdel-Hamid College of Computing and Information Technology Arab bacademy for Science &T Technology and Maritime Transport Internet Protocol Suite IP Suite Dr.

More information

NETWORK LAYER: IP Addressing

NETWORK LAYER: IP Addressing NETWORK LAYER: IP Addressing McGraw-Hill The McGraw-Hill Companies, Inc., 2004 2000 Position of network layer McGraw-Hill The McGraw-Hill Companies, Inc., 2004 Network layer duties McGraw-Hill The McGraw-Hill

More information

Internet Protocol. Outline Introduction to Internet Protocol Header and address formats ICMP Tools CS 640 1

Internet Protocol. Outline Introduction to Internet Protocol Header and address formats ICMP Tools CS 640 1 Internet Protocol Outline Introduction to Internet Protocol Header and address formats ICMP Tools CS 640 1 Internet Protocol Runs on all hosts in the Internet and enables packets to be routed between systems

More information

SEN366 (SEN374) (Introduction to) Computer Networks

SEN366 (SEN374) (Introduction to) Computer Networks SEN366 (SEN374) (Introduction to) Computer Networks Prof. Dr. Hasan Hüseyin BALIK (12 th Week) The Internet Protocol 12.Outline Principles of Internetworking Internet Protocol Operation Internet Protocol

More information

Lecture 4 - Network Layer. Transport Layer. Outline. Introduction. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

Lecture 4 - Network Layer. Transport Layer. Outline. Introduction. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen Lecture 4 - Network Layer Networks and Security Jacob Aae Mikkelsen IMADA September 23, 2013 September 23, 2013 1 / 67 Transport Layer Goals understand principles behind network layer services: network

More information

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane This presentation is adapted from slides produced by Jim Kurose and Keith Ross for their book, Computer Networking:

More information

ICMP (Internet Control Message Protocol)

ICMP (Internet Control Message Protocol) ABSTRACT : ICMP stands for internet control message protocol it is a vital protocol of network layer among the seven layers of OSI(open system interconnection). Here we deal with the several situations

More information

Internetworking Part 2

Internetworking Part 2 CMPE 344 Computer Networks Spring 2012 Internetworking Part 2 Reading: Peterson and Davie, 3.2, 4.1 19/04/2012 1 Aim and Problems Aim: Build networks connecting millions of users around the globe spanning

More information

Position of IP and other network-layer protocols in TCP/IP protocol suite

Position of IP and other network-layer protocols in TCP/IP protocol suite Position of IP and other network-layer protocols in TCP/IP protocol suite IPv4 is an unreliable datagram protocol a best-effort delivery service. The term best-effort means that IPv4 packets can be corrupted,

More information

Master Course Computer Networks IN2097

Master Course Computer Networks IN2097 Chair for Network Architectures and Services Prof. Carle Department for Computer Science TU München Master Course Computer Networks IN2097 Prof. Dr.-Ing. Georg Carle Christian Grothoff, Ph.D. Chair for

More information

CSCI-1680 Network Layer: IP & Forwarding John Jannotti

CSCI-1680 Network Layer: IP & Forwarding John Jannotti CSCI-1680 Network Layer: IP & Forwarding John Jannotti Based partly on lecture notes by David Mazières, Phil Levis, Rodrigo Fonseca Administrivia IP out today. Your job: Find partners, get setup with Github

More information

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS 1. General (5p) a) The so-called hourglass model (sometimes referred to as a wine-glass ) has been used

More information

CCNA Exploration Network Fundamentals. Chapter 06 Addressing the Network IPv4

CCNA Exploration Network Fundamentals. Chapter 06 Addressing the Network IPv4 CCNA Exploration Network Fundamentals Chapter 06 Addressing the Network IPv4 Updated: 20/05/2008 1 6.0.1 Introduction Addressing is a key function of Network layer protocols that enables data communication

More information

Network Layer: Internet Protocol

Network Layer: Internet Protocol Network Layer: Internet Protocol Motivation Heterogeneity Scale Intering IP is the glue that connects heterogeneous s giving the illusion of a homogenous one. Salient Features Each host is identified by

More information

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Network Layer PREPARED BY AHMED ABDEL-RAOUF Network Layer PREPARED BY AHMED ABDEL-RAOUF Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on receiving side, delivers segments to transport

More information

McGraw-Hill The McGraw-Hill Companies, Inc., 2000

McGraw-Hill The McGraw-Hill Companies, Inc., 2000 !! McGraw-Hill The McGraw-Hill Companies, Inc., 2000 "#$% & '$# )1 ) ) )6 ) )* )- ). )0 )1! )11 )1 )1 )16 )1 3'' 4", ( ( $ ( $ $$+, $$, /+ & 23,4 )/+ &4 $ 53" Network Layer Position of network layer Figure

More information

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols Guide to Networking Essentials, 6 th Edition Chapter 5: Network Protocols Objectives Describe the purpose of a network protocol, the layers in the TCP/IP architecture, and the protocols in each TCP/IP

More information

internet technologies and standards

internet technologies and standards Institute of Telecommunications Warsaw University of Technology 2015 internet technologies and standards Piotr Gajowniczek Andrzej Bąk Michał Jarociński Network Layer The majority of slides presented in

More information

CS475 Networks Lecture 8 Chapter 3 Internetworking. Ethernet or Wi-Fi).

CS475 Networks Lecture 8 Chapter 3 Internetworking. Ethernet or Wi-Fi). Assignments Reading for Lecture 9: Section 3.3 3.2 Basic Internetworking (IP) Bridges and LAN switches from last section have limited ability CS475 Networks Lecture 8 Chapter 3 Internetworking is a logical

More information

ETSF05/ETSF10 Internet Protocols Network Layer Protocols

ETSF05/ETSF10 Internet Protocols Network Layer Protocols ETSF05/ETSF10 Internet Protocols Network Layer Protocols 2016 Jens Andersson Agenda Internetworking IPv4/IPv6 Framentation/Reassembly ICMPv4/ICMPv6 IPv4 to IPv6 transition VPN/Ipsec NAT (Network Address

More information

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition ELEC / COMP 177 Fall 2016 Some slides from Kurose and Ross, Computer Networking, 5 th Edition Presentation 2 Security/Privacy Presentations Nov 3 rd, Nov 10 th, Nov 15 th Upload slides to Canvas by midnight

More information

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August 1964

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August 1964 The requirements for a future all-digital-data distributed network which provides common user service for a wide range of users having different requirements is considered. The use of a standard format

More information

ET4254 Communications and Networking 1

ET4254 Communications and Networking 1 Topic 9 Internet Protocols Aims:- basic protocol functions internetworking principles connectionless internetworking IP IPv6 IPSec 1 Protocol Functions have a small set of functions that form basis of

More information

ECE 158A: Lecture 7. Fall 2015

ECE 158A: Lecture 7. Fall 2015 ECE 158A: Lecture 7 Fall 2015 Outline We have discussed IP shortest path routing Now we have a closer look at the IP addressing mechanism We are still at the networking layer, we will examine: IP Headers

More information

Network Layer: Control/data plane, addressing, routers

Network Layer: Control/data plane, addressing, routers Network Layer: Control/data plane, addressing, routers CS 352, Lecture 10 http://www.cs.rutgers.edu/~sn624/352-s19 Srinivas Narayana (heavily adapted from slides by Prof. Badri Nath and the textbook authors)

More information

Introduction to Internetworking

Introduction to Internetworking Introduction to Internetworking Introductory terms Communications Network Facility that provides data transfer services An internet Collection of communications networks interconnected by bridges and/or

More information

Chapter 5 TCP/IP SUITE

Chapter 5 TCP/IP SUITE Chapter 5 TCP/IP SUITE Objectives:- TCP/ IP Model Concept. Defining/functioning of different Layers of TCP / IP suite. 5.1 Introduction Addressing mechanism in the Internet An IP address is an address

More information

Networking: Network layer

Networking: Network layer control Networking: Network layer Comp Sci 3600 Security Outline control 1 2 control 3 4 5 Network layer control Outline control 1 2 control 3 4 5 Network layer purpose: control Role of the network layer

More information

IPv6 Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land

IPv6 Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land IPv6 1 IPv4 & IPv6 Header Comparison IPv4 Header IPv6 Header Ver IHL Type of Service Total Length Ver Traffic Class Flow Label Identification Flags Fragment Offset Payload Length Next Header Hop Limit

More information

Network Layer/IP Protocols

Network Layer/IP Protocols Network Layer/IP Protocols 1 Outline IP Datagram (IPv4) NAT Connection less and connection oriented service 2 IPv4 packet header 3 IPv4 Datagram Header Format version of the IP protocol (4 BIts) IP header

More information

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing Last time Network layer Introduction forwarding vs. routing Virtual circuit vs. datagram details connection setup, teardown VC# switching forwarding tables, longest prefix matching IP: the Internet Protocol

More information

Data Communication Prof. A. Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 34 TCP/ IP I

Data Communication Prof. A. Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 34 TCP/ IP I Data Communication Prof. A. Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 34 TCP/ IP I Hello and welcome to today s lecture on TCP/IP. (Refer Slide

More information

CS-435 spring semester Network Technology & Programming Laboratory. Stefanos Papadakis & Manolis Spanakis

CS-435 spring semester Network Technology & Programming Laboratory. Stefanos Papadakis & Manolis Spanakis CS-435 spring semester 2016 Network Technology & Programming Laboratory University of Crete Computer Science Department Stefanos Papadakis & Manolis Spanakis CS-435 Lecture #4 preview ICMP ARP DHCP NAT

More information

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition ELEC / COMP 177 Fall 2011 Some slides from Kurose and Ross, Computer Networking, 5 th Edition Topics This week: Network layer (IP, ARP, ICMP) Next week: More network layer (Routers and routing protocols)

More information

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6 RMIT University Data Communication and Net-Centric Computing COSC 1111/2061 Internetworking IPv4, IPv6 Technology Slide 1 Lecture Overview During this lecture, we will understand The principles of Internetworking

More information

The Internet. The Internet is an interconnected collection of netw orks.

The Internet. The Internet is an interconnected collection of netw orks. The Internet The Internet is an interconnected collection of netw orks. Internetw orking-1 Internetworking! Communications Network: A facility that provides a data transfer service among stations attached

More information

TDTS06: computer Networks

TDTS06: computer Networks TDTS06: computer Networks Lecturer: Johannes Schmidt The slides are taken from the book s companion Web site with few modifications: Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith

More information

Chapter 4: network layer

Chapter 4: network layer Chapter 4: network layer chapter goals: understand principles behind network layer services: network layer service models forwarding versus routing how a router works routing (path selection) broadcast,

More information

IPv6. IPv4 & IPv6 Header Comparison. Types of IPv6 Addresses. IPv6 Address Scope. IPv6 Header. IPv4 Header. Link-Local

IPv6. IPv4 & IPv6 Header Comparison. Types of IPv6 Addresses. IPv6 Address Scope. IPv6 Header. IPv4 Header. Link-Local 1 v4 & v6 Header Comparison v6 Ver Time to Live v4 Header IHL Type of Service Identification Protocol Flags Source Address Destination Address Total Length Fragment Offset Header Checksum Ver Traffic Class

More information

EEC-484/584 Computer Networks

EEC-484/584 Computer Networks EEC-484/584 Computer Networks Lecture 13 wenbing@ieee.org (Lecture nodes are based on materials supplied by Dr. Louise Moser at UCSB and Prentice-Hall) Outline 2 Review of lecture 12 Routing Congestion

More information

Internet Control Message Protocol (ICMP)

Internet Control Message Protocol (ICMP) Chapter 9 Internet Control Message Protocol (ICMP) مترجم : دکتر محمد حسین یغمایی 1 TCP/IP Protocol Suite CONTENTS TYPES OF MESSAGES MESSAGE FORMAT ERROR REPORTING QUERY CHECKSUM ICMP PACKAGE مترجم : دکتر

More information

II. Principles of Computer Communications Network and Transport Layer

II. Principles of Computer Communications Network and Transport Layer II. Principles of Computer Communications Network and Transport Layer A. Internet Protocol (IP) IPv4 Header An IP datagram consists of a header part and a text part. The header has a 20-byte fixed part

More information

Chapter 4 Network Layer

Chapter 4 Network Layer Chapter 4 Network Layer Computer Networking A Top-Down Approach These slides are based on the slides made available by Kurose and Ross. All material copyright 1996-2012 J.F Kurose and K.W. Ross, All Rights

More information

Chapter 6. Delivery and Forwarding of IP Packets

Chapter 6. Delivery and Forwarding of IP Packets Chapter 6 Delivery and Forwarding of IP Packets TCP/IP Protocol Suite 1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. OBJECTIVES: To discuss the delivery of

More information

Internet Protocol (IP)

Internet Protocol (IP) CPSC 360 - Network Programming Internet Protocol (IP) Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu March 14, 2005 http://www.cs.clemson.edu/~mweigle/courses/cpsc360

More information

Networks. an overview. dr. C. P. J. Koymans. Informatics Institute University of Amsterdam. February 4, 2008

Networks. an overview. dr. C. P. J. Koymans. Informatics Institute University of Amsterdam. February 4, 2008 Networks an overview dr. C. P. J. Koymans Informatics Institute University of Amsterdam February 4, 2008 dr. C. P. J. Koymans (UvA) Networks February 4, 2008 1 / 53 1 Network modeling Layered networks

More information

Chapter 6 Delivery and Routing of IP Packets

Chapter 6 Delivery and Routing of IP Packets Chapter 6 Delivery and Routing of IP Packets Outline Delivery Forwarding Routing Structure of a Router Delivery v.s. Routing Delivery The way a packet is handled by the underlying networks under the control

More information

CHAPTER-2 IP CONCEPTS

CHAPTER-2 IP CONCEPTS CHAPTER-2 IP CONCEPTS Page: 1 IP Concepts IP is a very important protocol in modern internetworking; you can't really comprehend modern networking without a good understanding of IP. Unfortunately, IP

More information

The Interconnection Structure of. The Internet. EECC694 - Shaaban

The Interconnection Structure of. The Internet. EECC694 - Shaaban The Internet Evolved from the ARPANET (the Advanced Research Projects Agency Network), a project funded by The U.S. Department of Defense (DOD) in 1969. ARPANET's purpose was to provide the U.S. Defense

More information

CSEP 561 Internetworking. David Wetherall

CSEP 561 Internetworking. David Wetherall CSEP 561 Internetworking David Wetherall djw@cs.washington.edu Internetworking t Focus: Joining multiple, different networks into one larger network Forwarding models Application Heterogeneity Transport

More information

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner Communication Networks (0368-3030) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University Allon Wagner Kurose & Ross, Chapter 4 (5 th ed.) Many slides adapted from: J. Kurose & K. Ross

More information

CS 356: Computer Network Architectures. Lecture 14: Switching hardware, IP auxiliary functions, and midterm review. [PD] chapter 3.4.1, 3.2.

CS 356: Computer Network Architectures. Lecture 14: Switching hardware, IP auxiliary functions, and midterm review. [PD] chapter 3.4.1, 3.2. CS 356: Computer Network Architectures Lecture 14: Switching hardware, IP auxiliary functions, and midterm review [PD] chapter 3.4.1, 3.2.7 Xiaowei Yang xwy@cs.duke.edu Switching hardware Software switch

More information

Lecture 8 Network Layer: Logical addressing

Lecture 8 Network Layer: Logical addressing Data Communications ACOE412 Lecture 8 Network Layer: Logical addressing Spring 2009 1 0. Overview In this lecture we will cover the following topics: 14.Network Layer: Logical addressing 14.1 IPv4 Addresses

More information

ICS 351: Networking Protocols

ICS 351: Networking Protocols ICS 351: Networking Protocols IP packet forwarding application layer: DNS, HTTP transport layer: TCP and UDP network layer: IP, ICMP, ARP data-link layer: Ethernet, WiFi 1 Networking concepts each protocol

More information

To make a difference between logical address (IP address), which is used at the network layer, and physical address (MAC address),which is used at

To make a difference between logical address (IP address), which is used at the network layer, and physical address (MAC address),which is used at To make a difference between logical address (IP address), which is used at the network layer, and physical address (MAC address),which is used at the data link layer. To describe how the mapping of a

More information

ICS 451: Today's plan

ICS 451: Today's plan ICS 451: Today's plan ICMP ping traceroute ARP DHCP summary of IP processing ICMP Internet Control Message Protocol, 2 functions: error reporting (never sent in response to ICMP error packets) network

More information

COMP211 Chapter 4 Network Layer: The Data Plane

COMP211 Chapter 4 Network Layer: The Data Plane COMP211 Chapter 4 Network Layer: The Data Plane All material copyright 1996-2016 J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 7 th edition Jim Kurose, Keith Ross

More information

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access Last time Wireless link-layer Introduction Wireless hosts, base stations, wireless links Characteristics of wireless links Signal strength, interference, multipath propagation Hidden terminal, signal fading

More information

IPv6: An Introduction

IPv6: An Introduction Outline IPv6: An Introduction Dheeraj Sanghi Department of Computer Science and Engineering Indian Institute of Technology Kanpur dheeraj@iitk.ac.in http://www.cse.iitk.ac.in/users/dheeraj Problems with

More information

Lecture 18 Overview. Last Lecture. This Lecture. Next Lecture. Internet Protocol (1) Internet Protocol (2)

Lecture 18 Overview. Last Lecture. This Lecture. Next Lecture. Internet Protocol (1) Internet Protocol (2) Last Lecture Internet Protocol (1) This Lecture Internet Protocol (2) Lecture 18 Overview Source: chapters 19.1, 19.2, 22,1 22.2, 26.6 Next Lecture Transport Control Protocol (1) Source: chapters 24.1,

More information

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 12

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 12 CMPE 150/L : Introduction to Computer Networks Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 12 1 Chapter 4: outline 4.1 introduction 4.2 virtual circuit and datagram networks 4.3 what

More information

Data Communication & Networks G Session 7 - Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

Data Communication & Networks G Session 7 - Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer Data Communication & Networks G22.2262-001 Session 7 - Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer Dr. Jean-Claude Franchitti New York University Computer Science

More information

Problems of IP. Unreliable connectionless service. Cannot acquire status information from routers and other hosts

Problems of IP. Unreliable connectionless service. Cannot acquire status information from routers and other hosts Chapter 09 ICMP Problems of IP Unreliable connectionless service Best effort service IP datagrams are discarded If destination is not found If TTL becomes 0 If reassembly timer expires Cannot acquire status

More information

Lecture 11: Networks & Networking

Lecture 11: Networks & Networking Lecture 11: Networks & Networking Contents Distributed systems Network types Network standards ISO and TCP/IP network models Internet architecture IP addressing IP datagrams AE4B33OSS Lecture 11 / Page

More information

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August The requirements for a future all-digital-data distributed network which provides common user service for a wide range of users having different requirements is considered. The use of a standard format

More information

The Internet Protocol. IP Addresses Address Resolution Protocol: IP datagram format and forwarding: IP fragmentation and reassembly

The Internet Protocol. IP Addresses Address Resolution Protocol: IP datagram format and forwarding: IP fragmentation and reassembly The Internet Protocol IP Addresses Address Resolution Protocol: IP datagram format and forwarding: IP fragmentation and reassembly IP Addresses IP Addresses are 32 bit. Written in dotted decimal format:

More information