EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.

Slides:



Advertisements
Similar presentations
Discussion Monday ( ). ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live.
Advertisements

TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_b Subnetting,Supernetting, CIDR IPv6 Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 25 Introduction to Computer Networks.
CS 457 – Lecture 16 Global Internet - BGP Spring 2012.
4: Network Layer4a-1 IP Addressing: introduction r IP address: 32-bit identifier for host, router interface r interface: connection between host, router.
Introduction1-1 message segment datagram frame source application transport network link physical HtHt HnHn HlHl M HtHt HnHn M HtHt M M destination application.
Announcement r Recitation tomorrow on Project 2 r Midterm Survey at the end of this class.
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
The Network Layer Chapter 5. The IP Protocol The IPv4 (Internet Protocol) header.
Chapter 5 The Network Layer.
N/W Layer Addressing1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes.
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
11- IP Network Layer4-1. Network Layer4-2 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection.
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
IP Addressing: introduction
Network Layer4-1 Data Communication and Networks Lecture 6 Networks: Part 1 Circuit Switching, Packet Switching, The Network Layer October 13, 2005.
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Chapter 4 Queuing, Datagrams, and Addressing
Computer Networks The Network Layer
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.
Adapted from: Computer Networking, Kurose/Ross 1DT066 Distributed Information Systems Chapter 4 Network Layer.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
12 – IP, NAT, ICMP, IPv6 Network Layer.
1 Chapter 4: Network Layer r 4.4 IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP m IPv6 r 4.5 Routing algorithms m Hierarchical routing.
1 CSE3213 Computer Network I Network Layer (7.1, 7.3, ) Course page: Slides modified from Alberto Leon-Garcia.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
1 Network Layer Lecture 15 Imran Ahmed University of Management & Technology.
Network Layer4-1 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol.
Sharif University of Technology, Kish Island Campus Internet Protocol (IP) by Behzad Akbari.
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Network Layer4-1 Datagram networks r no call setup at network layer r routers: no state about end-to-end connections m no network-level concept of “connection”
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
The Internet Network layer
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
Routing. Classless Inter-Domain Routing Classful addressing scheme wasteful – IP address space exhaustion – A class B net allocated enough for 65K hosts.
Network Layer4-1 Chapter 4 Network Layer All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down.
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m network layer service models m forwarding.
IP Fragmentation. Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on rcving side,
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
IP Internet Protocol. IP TCP UDP ICMPIGMP ARP PPP Ethernet.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
Network Layer/IP Protocols 1. Outline IP Datagram (IPv4) NAT Connection less and connection oriented service 2.
Graciela Perera Department of Computer Science and Information Systems Slide 1 of 18 INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723 Graciela.
Introduction to Networks
12 – IP, NAT, ICMP, IPv6 Network Layer.
Data Communication and Networks
Computer Communication Networks
Chapter 4: Network Layer
CS 457 – Lecture 10 Internetworking and IP
EEC-484/584 Computer Networks
Internetworking Outline Best Effort Service Model
EEC-484/584 Computer Networks
EEC-484/584 Computer Networks
Wide Area Networks and Internet CT1403
Overview The Internet (IP) Protocol Datagram format IP fragmentation
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
Network Layer: Control/data plane, addressing, routers
32 bit destination IP address
Presentation transcript:

EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer Networking book)

2 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Outline Schedule Change: –Oct.31 Wed Lab#4 –Nov.5 Mon Quiz#3 –Nov.7 Wed Lecture#12 Internet protocol –Fragmentation –Classful IP address allocation –CIDR Network address translation

3 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao IP Datagram Format ver Total length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live 32 bit source IP address IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to IHL type of service “type” of data flgs fragment offset protocol 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit. How much overhead with TCP? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead

4 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao IP Fragmentation & Reassembly Network links have MTU (max.transfer size) - largest possible link-level frame. –different link types, different MTUs Large IP datagram divided (“fragmented”) within net –one datagram becomes several datagrams –“reassembled” only at final destination –IP header bits used to identify, order related fragments fragmentation: in: one large datagram out: 3 smaller datagrams reassembly

5 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao IP Addresses

6 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao IP Addresses IP address are usually written in dotted decimal notation –Each of the 4 bytes is written in decimal, from 0 to 255 –Lowest IP , highest Special IP addresses

7 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Subnets Allow a network to be split into several parts for internal use, but to act as a single network to outside world Take some bits away from host numbers Subnet mask – needed by the main router. Indicates split between network + subnet number and host –Write the address and the mask as a binary number –If mask bit is 1, then corresponding bit of address matters

8 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Subnets E.g., A class B network can be subnetted into 64 subnets –Originally 16 bits for host info. Now, 6 bits used for subnet and 10 bits for host numbers –Subnet mask can be written as or /22 Subnet 1: Subnet 2: Subnet 3: A subnet is often represented in the form of base addr/mask: /22

9 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Problems with Classful Addressing A class is obviously too large for any organization C class is too small (only 256 addresses available) B class is requested and allocated, but it is still too large for most organizations  Many IP addresses are wasted  Shortage of IP addresses

10 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao CIDR – Classless InterDomain Routing For the remaining IP addresses, classless allocation is used –Allocate remaining IP addresses in variable-sized blocks (must be power of 2), without regard to the classes –The starting address must fall on the boundary of the block size –E.g., if a site needs, say, 2000 addresses, it is given a block of 2048 addresses on a 2048-byte boundary

11 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Classless Allocation – Example Routing tables are updated with the three assigned entries. Each entry contains a base address and a subnet mask (in short: base address/subnet mask) Base addressSubnet mask C: E: O:

12 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Classless Allocation – Example For Cambridge: –Ask 2000, allocate 2 11 = 2048 IP addresses block –Start IP: because it is multiple of 2 11 ( ) –Last IP: (i.e., : ) –Mask: /21 (8+8+5=21, or 32-11=21) For Edinburgh: –Ask 1000, allocate 2 10 = 1024 IP addresses –Start IP: because it is multiple of 2 10 ( ) –Last IP: (i.e., : ) –Mask: /22

13 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Classless Allocation – Example For Oxford: –Ask 4000, allocate 2 12 = 4096 IP addresses –Start IP: is multiple of 4096? : : No. => We can’t use as the start IP for Oxford –What is the next higher IP address that is multiple of 4096? : => this is our start IP for C –Last IP: : –Mask: /20

14 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Classless InterDomain Routing Each routing table is extended by giving it a 32-bit mask The routing table contains entries of (IP address, subnet mask, outgoing line) triples When a packet comes in, its destination IP address is first extracted Then, the routing table is scanned entry by entry, masking the destination address and comparing it to the table entry looking for a match If multiple entries (with different subnet mask lengths) match, the longest mask is used –E.g., if there is a match for a /20 mask and a /24 mask, the /24 mask is used

15 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao CIDR Routing: Example If a packet is addressed to , in binary First it is Boolean ANDed with the Cambridge mask to get This value does not match the Cambridge base address, so next try Edinburgh mask, to get This value still does not match, so Oxford is tried, yielding This value matches the Oxford base. If no longer matches are found, the Oxford entry is used and the packet is sent along the line named in it Base addressSubnet mask C: E: O:

16 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Classless InterDomain Routing Aggregate entry – all three new entries can be combined into a single aggregate entry /19 with a binary address and submask ( If all of them use the same outgoing line ) as follows: By aggregating the three entries, a router has reduced its table size by two entries Aggregation is heavily used throughout the Internet C: E: O:

17 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao NAT – Network Address Translation Another workaround for the IP addresses shortage problem: network address translation –One public IP address, many private IP addresses –When a packet exits the private network and goes to the ISP, an address translation takes place Three ranges of IP addresses have been declared as private: – – (16,777,216 hosts) – – /12 (1,048,576 hosts) – – /16 (65,536 hosts)

18 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao NAT – Network Address Translation Placement and operation of a NAT box

19 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao NAT – What about the Incoming Traffic? Solution is based on the assumption all traffic is TCP/UDP TCP/UDP has two port fields, one for source port, the other for destination port, each 16 bits wide The source port is used as an index to an internal table maintained by the NAT box The internal sender ’ s private IP and original port info are stored in the table When the reply comes back, it will carry the index as the destination port, the NAT box then translates the address back For both outgoing and incoming address translations, the TCP/UDP and IP header checksums are recomputed

20 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao NAT in Action Src: :1333 Dst: : : Dst: :80 Src: : Src: :80 Dst: :1 Src: :80 Dst: : : Private Network Public Network

21 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Drawback of NAT NAT violates the architectural model of IP, which states that every IP address uniquely identifies a single machine worldwide NAT box must maintain mapping info for each connection passing through it. This changes the Internet from a connectionless network to a kind of connection-oriented network NAT violates the most fundamental rule of protocol layering: layer k may not make any assumptions about what layer k+1 has put into the payload field NAT only support UDP/TCP traffic NAT has problem supporting apps that include local IPs in payload, such as FTP and H.323 Each NAT box can support at most 65,536 (2 16 ) hosts

22 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Internet Control Message Protocol When something unexpected occurs in Internet, the event is reported by routers using ICMP Principal ICMP message types

23 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Internet Control Message Protocol ICMP messages are sent using the basic IP header The first byte of the data portion of the datagram is a ICMP type field –The type field determines the format of the remaining data Typical format: type, code plus first 8 bytes of IP datagram that has caused the error Destination Unreliable Message Format

24 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Exercise - CIDR According to Classless InterDomain Routing, the remaining IP addresses are allocated in variable-sized blocks, without regard to the classes. However, the starting address must fall on the boundary of the block size allocated. Assuming that a large number of consecutive IP address are available starting at Suppose that three organizations, A, B, and C, request 4000, 1000, and 2000 addresses, respectively, and in that order. For each of these, give the first IP address assigned, the last IP address assigned, both must be in dotted decimal form, and the mask in the w.x.y.z/s notation.

25 Fall Semester 2007EEC-484/584: Computer NetworksWenbing Zhao Exercise - CIDR A router has just received the following new IP addresses: /21, /21, /21, and /21. If all of them use the same outgoing line, can they be aggregated? If so, to what? If not, why not?