1 Computer Communication & Networks Lecture 19 Network Layer: IP and Address Mapping Waleed Ejaz.

Slides:



Advertisements
Similar presentations
1 IP - The Internet Protocol Relates to Lab 2. A module on the Internet Protocol.
Advertisements

Ch 20. Internet Protocol (IP) Internetworking PHY and data link layers operate locally.
Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
CE363 Data Communications & Networking Chapter 7 Network Layer: Internet Protocol.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IPv4 - The Internet Protocol Version 4
IP Fragmentation. MTU Maximum Transmission Unit (MTU) –Largest IP packet a network will accept –Arriving IP packet may be larger IP Packet MTU.
Network Layer – IPv4 Dr. Sanjay P. Ahuja, Ph.D.
1 IP - The Internet Protocol Relates to Lab 2. A module on the Internet Protocol.
Chapter 20 Network Layer: Internet Protocol Stephen Kim 20.1.
Internet Protocol (IP)
Network Layer Packet Forwarding IS250 Spring 2010
1 TDC TDC 365 Network Interconnections Technologies Lecture #4 Notes Spring, 2009.
TCP/IP Protocol Suite 1 Chapter 8 Upon completion you will be able to: Internet Protocol Understand the format and fields of a datagram Understand the.
IP Protocol. The Internet Protocol (IP) is a network-layer (Layer 3) protocol that contains addressing information and some control information that enables.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 7 Internet Protocol Version4.
4: Network Layer4a-1 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 5 Internet Protocol (IP) Basics.
Dr. John P. Abraham Professor UTPA
Chapter 81 Internet Protocol (IP) Our greatest glory is not in never failing, but in rising up every time we fail. - Ralph Waldo Emerson.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
ECE 4110 – Internetwork Programming IP Protocol. 2 * From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall Position of IP in TCP/IP Protocol Suite.
Network Layer: Internet Protocol.
Chapter 19 Network Layer Protocols Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
The Internet Protocol Dr. Adil Yousif. 2  IP (Internet Protocol) is a Network Layer Protocol. Orientation.
TCP/IP Protocol Suite 1 Chapter 8 Upon completion you will be able to: Internet Protocol Understand the format and fields of a datagram Understand the.
CS 4396 Computer Networks Lab
Chapter 20 Network Layer: Internet Protocol
1 Kyung Hee University Chapter 8 Internet Protocol (IP)
TCP/IP Protocol Suite 1 Chapter 8 Upon completion you will be able to: Internet Protocol Understand the format and fields of a datagram Understand the.
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
Chapter 8 Internet Protocol (IP)
Internet Protocol Version 4 VersionHeader Length Type of Service Total Length IdentificationFragment Offset Time to LiveProtocolHeader Checksum Source.
THE CLASSIC INTERNET PROTOCOL (RFC 791) Dr. Rocky K. C. Chang 20 September
Net7: IP 協定 Internet Protocol 授課教師:雲林科技大學 張慶龍 老師.
Network Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University.
IP Fragmentation. Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on rcving side,
Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 7 Internet Protocol Version4.
IPv4 IPv4 The Internet Protocol version 4 (IPv4) is the delivery mechanism used by the TCP/IP protocols. Datagram Fragmentation Checksum Options Topics.
Lecture 13 IP V4 & IP V6. Figure Protocols at network layer.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 19 Network Layer Protocols
IP - The Internet Protocol
IP - The Internet Protocol
Internet Protocol Version4
Chapter 20 Network Layer: Internet Protocol
Internet Protocol Version4
IP - The Internet Protocol
Dr. John P. Abraham Professor UTPA
Chapter 20 Network Layer: Internet Protocol
Dr. John P. Abraham Professor UTRGV, EDINBURG, TX
IP - The Internet Protocol
Dr. John P. Abraham Professor UTPA
Net 323 D: Networks Protocols
IP - The Internet Protocol
Introduction to Networks
IPv4 Addressing By, Ishivinder Singh( ) Sharan Patil ( )
Internet Protocol (IP)
ITIS 6167/8167: Network and Information Security
Anjuman College of Engineering and Technology Department of Computer Science and Engineering VII Sem. TCP and IP (Elective I) Prof. Nazish Khan.
IP - The Internet Protocol
NET 323D: Networks Protocols
32 bit destination IP address
Presentation transcript:

1 Computer Communication & Networks Lecture 19 Network Layer: IP and Address Mapping Waleed Ejaz

2 Network Address Translation (NAT)

3 Addresses for private networks

4 A NAT Implementation

5 Addresses in a NAT

6 NAT Address Translation

7 Five-column translation table

8 An ISP and NAT

9 Network Layer

10 Network Layer Topics to Cover Logical Addressing Internet Protocol Address Mapping Delivery, Forwarding, Routing

11 Internetworking In this section, we discuss internetworking, connecting networks together to make an internetwork or an internet.

12 Network layer in an Internetwork

13 IPv4 The Internet Protocol version 4 (IPv4) is the delivery mechanism used by the TCP/IP protocols.

14 IPv4 datagram format

15 IP Packet Format VersionHLen TOSLength Identification FlagsFragment Offset TTL ProtocolIP Header Checksum Source IP Address Destination IP Address Options (variable) Pad (variable) Data

16 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable)Pad (variable) Current IP Protocol Version is 4, called IPv4

17 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable)Pad (variable) Length of IP Header in number of 32 bit words including options. Maximum header size is 60 bytes.

18 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) The type-of-service field is composed of a 3-bit precedence field. (Which are largely ignored in current routers). 4 TOS bits and an unused bit that must be zero.

19 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) TOS bits are: minimize delay, maximize throughput, maximize reliability, and minimize monetary cost. Only one of these bits can be turned on. All 4 bits set to 0 means normal service.

20 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) Total length of IP datagram in bytes. It is a 16 bit field. Largest size of an IP datagram is bytes. Maximum header size is 60 bytes. Link layer MTU may restrict this size further.

21 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) Identification field uniquely identifies each datagram sent by a host. It is normally incremented by one each time a host sends a datagram. Very useful for fragmentation and reassembly.

22 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable)Pad (variable) flags field also used for fragmentation and reassembly.

23 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) Fragmentation offset used for fragmentation and reassembly.

24 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) Time-to-live or TTL field sets an upper limit on how man routers a datagram can go through. Every router decrements TTL by 1 before sending it forward. If TTL reaches 0 the datagram is dropped and an ICMP message is sent to the host application.

25 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) Identifies the protocol that sent the datagram. The protocol (today) can be ICMP, IGMP, TCP, UDP

26 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) The header checksum is calculated over the IP header only. TCP, UDP etc protect their own data and header by a checksum.

27 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) Security handling used for military purposes (remember ARPANET was funded by US Defense),

28 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) Security handling used for military purposes (remember ARPANET was funded by US Defense), record route (each router on the way adds its address),

29 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) Security handling used for military purposes (remember ARPANET was funded by US Defense), record route (each router on the way adds its address), time stamp (each router on the way adds its address and time stamp),

30 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) Security handling used for military purposes (remember ARPANET was funded by US Defense), record route (each router on the way adds its address), time stamp (each router on the way adds its address and time stamp), loose source routing, strict source routing.

31 IP Header Checksum VersionHLen TOSLength Identification FlagsFragment Offset TTL Protocol Source IP Address Destination IP Address Options (variable) Pad (variable) Options field always ends at a 32 bit boundary. Padding added as needed.

32 An IPv4 packet has arrived with the first 8 bits as shown: The receiver discards the packet. Why? Solution There is an error in this packet. The 4 leftmost bits (0100) show the version, which is correct. The next 4 bits (0010) show an invalid header length (2 × 4 = 8). The minimum number of bytes in the header must be 20. The packet has been corrupted in transmission. Example

33 In an IPv4 packet, the value of HLEN is 1000 in binary. How many bytes of options are being carried by this packet? Solution The HLEN value is 8, which means the total number of bytes in the header is 8 × 4, or 32 bytes. The first 20 bytes are the base header, the next 12 bytes are the options. Example

34 Maximum transfer unit (MTU) MTUs for some networks

35 IP Fragmentation and Reassembly ID =x offset =0 fragflag =0 length =4000 ID =x offset =0 fragflag =1 length =1500 ID =x offset =185 fragflag =1 length =1500 ID =x offset =370 fragflag =0 length =1040 One large datagram becomes several smaller datagrams Example 4000 byte datagram MTU = 1500 bytes 1480 bytes in data field offset = 1480/8

36 Example: Fragmenting a Packet A packet is to be forwarded to a network with MTU of 576 bytes. The packet has an IP header of 20 bytes and a data part of 1484 bytes. and of each fragment. Maximum data length per fragment = = 556 bytes. We set maximum data length to 552 bytes to get multiple of 8. Total Length IdMFFragment Offset Original packet1504x00 Fragment 1572x10 Fragment 2572x169 Fragment 3400x0138