Presentation is loading. Please wait.

Presentation is loading. Please wait.

CPEG512 Advanced Computer Networks

Similar presentations


Presentation on theme: "CPEG512 Advanced Computer Networks"— Presentation transcript:

1 CPEG512 Advanced Computer Networks
University of Nizwa Electrical and computer Engineering CPEG512 Advanced Computer Networks Week8 Fall 2014/2015 Atef Abu Salim

2 Data link layer The Data Link layer of a model typically has the following responsibilities: 1. Creates a frame 2. Creates an error-free logical connection Error control Flow control 3. Makes sure the receiver stays synchronized with the incoming data stream. CPEG512 11/11/2014

3 Flow Control Ensuring the sending entity does not overwhelm the receiving entity: Preventing buffer overflow. Propagation time. Transmission time. CPEG512 11/11/2014

4 Error Control Detection errors Lost frames Damaged frames
Automatic repeat request CPEG512 11/11/2014

5 The network layer is responsible:
The delivery of individual packets from the original source to the final destination . Logical addressing: if the packet passes the network boundary we need another addressing system to help (source to destination) connection. Routing : route or switch the packet to final destination. Source-to-destination delivery (End-to-End). CPEG512 11/11/2014

6 Internet Protocol Provides information about how and where data should be delivered Subprotocol that enables TCP/IP to internetwork To internetwork is to traverse more than one LAN segment and more than one type of network through a router In an internetwork, the individual networks that are joined together are called subnetworks CPEG512 11/11/2014

7 Internet Protocol cont.
IP is an unreliable, connectionless protocol, which means it does not guarantee delivery of data Connectionless Allows protocol to service a request without requesting verified session and without guaranteeing delivery of data CPEG512 11/11/2014

8 Position of IP in TCP/IP protocol suite
CPEG512 11/11/2014

9 Datagram A packet in the IP layer is called a datagram, a variable- length packet consisting of two parts: header and data. The header is 20 to 60 bytes in length and contains information essential to routing and delivery. CPEG512 11/11/2014

10 IP datagram CPEG512 11/11/2014

11 IP datagram fields VER - version numbers, 4 and 6
HLEN - header length in 4-byte words. Value of 5 means 20 byte header DS (differentiated services or Service type ) - CPEG512 11/11/2014

12 IP datagram fields cont.
Precedence bits - never used. Similar to PRI bits in IPv6. TOS (Type of Service) bits - If you want to send a packet with a special type of service, use one of the 5 bit sets. CPEG512 11/11/2014

13 IP datagram fields cont.
If we call these 8 bits Differentiated Services (and not the older Service Type), then the first six bits are called code- points CPEG512 11/11/2014

14 IP datagram fields cont.
The total length field defines the total length of the datagram Including the header. Total length field is 16 bits, or 65,535 bytes. Of which 20 to 60 bytes are the header. CPEG512 11/11/2014

15 IP datagram fields cont.
Identification, Flags, and Fragmentation offset are all used to perform fragmentation. Time to Live - 8-bit field, so Time to Live can be set to 255. As it passes thru a router, the router decrements the counter. When counter hits 0, the datagram is deleted (and ICMP sends an error message back to the source). CPEG512 11/11/2014

16 IP datagram fields cont.
The Protocol field (8 bits) identifies the upper layer protocol that is using IP for transmission of its data. CPEG512 11/11/2014

17 IP datagram fields cont.
These are some common values that are used in the Protocol field CPEG512 11/11/2014

18 IP datagram fields cont.
Header Checksum: Over the IP header only. Each 16-bit separated, then all added using one’s complement. Then taking the one’s complement of the result. Answer should be 1s. Upon checksum error, datagram is dropped and no indication is sent back. Options: Security and handling restrictions CPEG512 11/11/2014

19 IP Addressing IP Address Total: 232 = 4,294,967,296
Logical address used in TCP/IP networking Unique 32-bit number Divided into four groups of octets (8-bit bytes) that are separated by periods. E.g., ( Total: 232 = 4,294,967,296 CPEG512 11/11/2014

20 IP Addressing cont. Loopback address
IP address reserved for communicating from a node to itself (localhost) Value of the loopback address is always Internet Corporation for Assigned Names and Numbers (ICANN) Non-profit organization to maintain and assign IP addresses CPEG512 11/11/2014

21 Why IP Addresses? CPEG512 11/11/2014

22 Why IP Addresses? Cont. Unique addressing allows communication between end stations Unicast (one-to-one) Broadcast (one-to-all) Multicast (one-to-many) Path choice is based on location Location is represented by an address CPEG512 11/11/2014

23 IP Addresses Classful Addressing
8 bits 8 bits 8 bits 8 bits Class A: Class B: Class C: Class D: Multicast Class E: Research Network Host Network Host Network Host CPEG512 11/11/2014

24 IP CPEG512 11/11/2014

25 4.2 CLASSFUL ADDRESSING CLASSFUL ADDRESSING
IP addresses, when started a few decades ago, used the concept of classes. This architecture is called classful addressing. In the mid-1990s, a new architecture, called classless addressing, was introduced and will eventually supersede the original architecture. However, part of the Internet is still using classful addressing, but the migration is very fast. CPEG512 11/11/2014

26 Address Space Class A addresses cover ½ the address space!!
Millions of class A addresses are wasted! CPEG512 11/11/2014

27 Addresses per class CPEG512 11/11/2014

28 Finding the class in binary notation
CPEG512 11/11/2014

29 Netid and hostid CPEG512 11/11/2014

30 Note In classful addressing, the network address (the first address in the block) is the one that is assigned to the organization. The range of addresses can automatically be inferred from the network address. CPEG512 11/11/2014

31 Masking concept Given an address from a block of addresses, we can find the network address by ANDing with a mask. CPEG512 11/11/2014

32 AND operation CPEG512 11/11/2014

33 Default masks CPEG512 11/11/2014

34 Note The network address is the beginning address of each block. It can be found by applying the default mask to any of the addresses in the block (including itself). It retains the netid of the block and sets the hostid to zero. CPEG512 11/11/2014

35 MULTIHOMED A computer that is connected to different networks is called a multihomed computer and will have more than one address, each possibly belonging to a different class. Routers are multihomed too. CPEG512 11/11/2014

36 Special addresses CPEG512 11/11/2014

37 Network address CPEG512 11/11/2014

38 Example of direct broadcast address
CPEG512 11/11/2014

39 Example of limited broadcast address
CPEG512 11/11/2014

40 Examples of “this host on this network
Example: starting a dial-up connection with DHCP. CPEG512 11/11/2014

41 Example of “specific host on this network”
CPEG512 11/11/2014

42 Addresses for private networks
CPEG512 11/11/2014

43 Classless Addressing Classless addressing, announced in 1996, allows an ISP to assign as few or as many IP addresses as requested The entire 2^32 address space is divided into variable-sized blocks, which are multiples of powers of 2 CPEG512 11/11/2014

44 Mask In classful addressing, the mask for each block is implicit
/8 /16 /24 In classless addressing, we need the address and the mask to find the block the address belongs to CPEG512 11/11/2014

45 Format of classless addressing address
An address in classless addressing usually has this format: The n after the slash defines the number of bits that are the same in every address in the block. So if n is 20, it means the twenty leftmost bits are identical in each address. CPEG512 11/11/2014

46 Prefix and Prefix Length
Two terms often used in classless addressing Prefix – another name for the common part of the address range (netid) Prefix length – the length of the prefix CPEG512 11/11/2014

47 Prefix lengths The addresses in color are the default masks for classes A, B, and C. Thus, classful addressing is a special case of classless addressing. CPEG512 11/11/2014

48 Address Resolution Protocol (ARP)
CPEG512 11/11/2014

49 Position of ARP and RARP in TCP/IP protocol suite
CPEG512 11/11/2014

50 ARP ARP table Layer 2 to layer 3 mapping Database that lists the associated MAC and IP addresses Contains two types of entries: Dynamic ARP table entries Static ARP table entries ARP utility provides a way of obtaining information from and manipulating a device’s ARP table CPEG512 11/11/2014

51 How does ARP work? 99:88:77:22:22:22 99:88:77:11:11:11 99:88:77:33:33:33 1. Who is ? 2a.. It is not me. 2b. It is me. 4. OK. Let us create an ARP entry :88:77:33:33:33 3. My MAC address is 99:88:77:33:33:33. CPEG512 11/11/2014

52 ARP operation CPEG512 11/11/2014

53 ARP Table 99:88:77:22:22:22 99:88:77:11:11:11 99:88:77:33:33:33 :88:77:22:22:22 :88:77:33:33:33 :88:77:11:11:11 :88:77:22:22:22 :88:77:11:11:11 :88:77:33:33:33 CPEG512 11/11/2014

54 Internet Control Message Protocol (ICMP)
ICMP is a companion protocol for IP. ICMP is an error reporting protocol. ICMP messages are encapsulated in an IP datagram PING uses ICMP message with ECHO CPEG512 11/11/2014


Download ppt "CPEG512 Advanced Computer Networks"

Similar presentations


Ads by Google