IP tutorial – #1 KAIST Dept. of CS NC Lab..

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

4 IP Address (IPv4)  A unique 32-bit number  Identifies an interface (on a host, on a router, …)  Represented in dotted-quad notation
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.
Announcement r Recitation tomorrow on Project 2 r Midterm Survey at the end of this class.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 5-1 Internet Protocol (IP): Packet Format, Fragmentation, Options Shivkumar Kalyanaraman Rensselaer.
Network Layer Packet Forwarding IS250 Spring 2010
IP Suite© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
The Network Layer Chapter 5. The IP Protocol The IPv4 (Internet Protocol) header.
Chapter 5 The Network Layer.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar 1 ECSE-4670: Computer Communication Networks (CCN) Network Layer Shivkumar.
EEC-484/584 Computer Networks Lecture 10 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.
CS335 Networking & Network Administration Tuesday, May 11, 2010.
CSCI 4550/8556 Computer Networks Comer, Chapter 20: IP Datagrams and Datagram Forwarding.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1-1 Internetworking: addressing, forwarding, resolution, fragmentation Shivkumar Kalyanaraman Rensselaer.
Chapter 3 Review of Protocols And Packet Formats
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Winter 2004 Lecture 18 Introduction to Networks and the Internet.
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 Address 0 network host 10 network host 110 networkhost 1110 multicast address A B C D class to to
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) 건국대학교 인터넷미디어공학부 임 창 훈.
Computer Networks The Network Layer
IP (Internet Protocol) –the network level protocol in the Internet. –Philosophy – minimum functionality in IP, smartness at the end system. –What does.
1 Chapter Internetworking Part 1 (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution.
Adapted from: Computer Networking, Kurose/Ross 1DT066 Distributed Information Systems Chapter 4 Network Layer.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_a
FALL, 2005CSI Part 2.3 Internetworking & Addressing (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution Robert L. Probert, SITE,
7-1 Last time □ Wireless link-layer ♦ Introduction Wireless hosts, base stations, wireless links ♦ Characteristics of wireless links Signal strength, interference,
1 CSE3213 Computer Network I Network Layer (7.1, 7.3, ) Course page: Slides modified from Alberto Leon-Garcia.
10/13/2015© 2008 Raymond P. Jefferis IIILect 07 1 Internet Protocol.
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
Review the key networking concepts –TCP/IP reference model –Ethernet –Switched Ethernet –IP, ARP –TCP –DNS.
Chapter 81 Internet Protocol (IP) Our greatest glory is not in never failing, but in rising up every time we fail. - Ralph Waldo Emerson.
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 Chapter 4 roadmap 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol.
CS 4396 Computer Networks Lab
Network Layer4-1 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol.
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”
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.
Network Layer by peterl. forwarding table routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling.
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.
1 Internetworking: IP Packet Switching Reading: (except Implementation; pp )
1 Binding Protocol Addresses (ARP ). 2 Resolving Addresses Hardware only recognizes MAC addresses IP only uses IP addresses Consequence: software needed.
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.
Network Layer/IP Protocols 1. Outline IP Datagram (IPv4) NAT Connection less and connection oriented service 2.
Introduction to Networks
Computer Communication Networks
Introduction to Communication Networks
IP - The Internet Protocol
IP - The Internet Protocol
CS 457 – Lecture 10 Internetworking and IP
IP - The Internet Protocol
Wide Area Networks and Internet CT1403
Overview The Internet (IP) Protocol Datagram format IP fragmentation
Chapter 15. Internet Protocol
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
IP - The Internet Protocol
Introduction to Networks
ECSE-4670: Computer Communication Networks (CCN)
IP - The Internet Protocol
Presentation transcript:

IP tutorial – #1 KAIST Dept. of CS NC Lab.

Outline Internetworking problem Internet’s Architectural principles IP solution IP forwarding IP addressing IP datagram Format IP fragmentation & reassembly 인터넷이 대두된 배경과, 설계 원칙들 그리고 IP에 특징에 대해서 설명하겠습니다.

The Internetworking Problem Two nodes communicating across a “network of networks”… How to transport packets through this heterogeneous mass ? Problems: heterogeneity and scaling A B 인터넷이 대두된 원인은 여러 서로 다른 네트워크를 연결하는데 있습니다. 여러 서로 다른 네트워크를 연결할 때 가장 큰 문제는 heterogeneity와 scaling문제입니다.

Internet’s Architectural principles End-to-end principle: (Dave Clark, MIT) The network cannot be trusted Network provides minimum functionality (connectionless forwarding, routing) User must in any case check for errors Value-added functions at hosts (control functions): opposite of telephony model (phone simple, network complex) Internet이 어떻게 이 문제를 해결하는지에 앞서 설계상의 대 원칙을 설명하겠습니다. 먼저 e2e라고 하는 원칙이 있습니다. 이것은 network는 최소한의 기능만을 제공하는 것이 좋다는 원칙입니다. Network는 error가 많이 일어날수 있어서 믿을 수 없기 때문에, error recovery 나 delivery acknowledgment등 여러 가지 기능들은 end node가 하는 것이 좋다는 것입니다. Delivery ack의 경우를 들면, 전송 주체인 application이 정말로 알고 싶은 ack는 target host가 자신이 보낸 정보에 의해 어떤 행동을 했는가인데 이것은 low-level에서 처리하기가 힘듭니다. 그래서 이러한 정보를 가장 많은 application이 이것을 맡아서 처리하자는 것입니다.

Architectural principles (contd) IP over everything: (Vint Cerf, VP, MCI) An internetworking protocol which works over all underlying sub-networks and provides a single, simple service model (“best-effort delivery”) to the user. Interconnection based on IP overlay over all kinds of networks Framing or encapsulation Address resolution IP-address to network address for each transport technology Unique IP-address Interconnection based on translation Vinston Cerf에 의해서 주장된 IP over everything이란 원칙은 이기종간의 network위해 IP network를 overlay network로 만들자라는 것입니다. 이 IP network를 통해서 upper layer와 lower layer를 interfacing해주자는 것인데 종종 IP hourglass로 표현되기도 합니다.

Hourglass design

IP solution For heterogeneity, Provide new packet format and overlay it on subnets. For scalability, Uses topological addressing Implications: Hierarchical address, address resolution, fragmentation/re-assembly, packet format design, forwarding algorithm etc Protocols: IP and ARP 또한 이와 같은 전체 network를 운영하는데 2가지 protocol을 쓰는데 바로 IP와 ARP입니다.

Connecting Heterogeneous Networks(LAN-Internet) Computer system used Special-purpose Dedicated Works with LAN or WAN technologies Known as Internet router Internet gateway 서로 다른 network를 연결하는 데에는 특수한 시스템이 필요한데 바로 잘 아시는 gateway입니다.

An IP Internet – Network of Networks Network 1 (Ethernet) H7 R3 H8 H1 H2 H3 Network 4 (point-to-point) Network 2 (Ethernet) R1 R2 H4 Network 3 (FDDI) H5 H6

Protocol Stack – IP is Common to All ETH FDDI IP TCP R2 PPP R3 H1 H8

IP Features Connectionless service Data forwarding Addressing datagram/packet-based Data forwarding Addressing Fragmentation and reassembly Supports variable size datagrams Best-effort delivery: Delay, out-of-order, corruption, and loss possible. Higher layers should handle these.

What IP does NOT provide End-to-end data reliability & flow control (done by TCP or application layer protocols) Sequencing of packets (like TCP) Error detection in payload (TCP, UDP or other transport layers) Error reporting (ICMP) Setting up route tables (RIP, OSPF, BGP etc) Connection setup (it is connectionless) Address/Name resolution (ARP, RARP, DNS)

How does IP forwarding work ? A) Source & Destination in same network Recognize that destination IP address is on same network. Find the destination LAN address. Send IP packet encapsulated in LAN frame directly to the destination LAN address. Encapsulation => source/destination IP addresses don’t change

IP forwarding (contd) B) Source & Destination in different networks Recognize that destination IP address is not on same network. Look up destination IP address in a (routing) table to find a match, called the next hop router IP address. Send packet encapsulated in a LAN frame to the LAN address corresponding to the IP address of the next-hop router.

Getting a datagram from source to dest. routing table in A Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 IP datagram: misc fields source IP addr dest data 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E datagram remains unchanged, as it travels source to destination addr fields of interest here

Getting a datagram from source to dest. misc fields Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 223.1.1.1 223.1.1.3 data Starting at A, given IP datagram addressed to B: look up net. address of B find B is on same net. as A link layer will send datagram directly to B inside link-layer frame B and A are directly connected 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E

Getting a datagram from source to dest. misc fields Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 223.1.1.1 223.1.2.3 data Starting at A, dest. E: look up network address of E E on different network A, E not directly attached routing table: next hop router to E is 223.1.1.4 link layer sends datagram to router 223.1.1.4 inside link-layer frame datagram arrives at 223.1.1.4 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E

Getting a datagram from source to dest. network router Nhops interface 223.1.1 - 1 223.1.1.4 223.1.2 - 1 223.1.2.9 223.1.3 - 1 223.1.3.27 Dest. next misc fields 223.1.1.1 223.1.2.3 data Arriving at 223.1.4, destined for 223.1.2.2 look up network address of E E on same network as router’s interface 223.1.2.9 router, E directly attached link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.9 datagram arrives at 223.1.2.2!!! (hooray!) 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E

Addressing & Resolution [1] How to find if destination is in the same network ? IP address = network ID + host ID. Source and destination network IDs match => same network Splitting address into multiple parts is called hierarchical addressing [2]: How to find the LAN address corresponding to an IP address ? Address Resolution Problem. Solution: ARP, RARP

Resolving Addresses Hardware only recognizes MAC addresses IP only uses IP addresses Consequence: software needed to perform translation Part of network interface Known as address resolution

Address Resolution Layer 2 protocol Given Find Technique A locally-connected network, N IP address C of computer on N Find Hardware address for C Technique Address Resolution Protocol

Address Resolution Protocol (ARP) Key bindings in table Table entry contains pair of addresses for one computer IP address Hardware address Build table automatically as needed

ARP Table Only contains entries for computers on local network IP network prefix in all entries identical

ARP Lookup Algorithm Look for target IP address, T, in ARP table If not found Send ARP request message to T Receive reply with T’s hardware address Add entry to table Return hardware address from table

Illustration of ARP Exchange W needs Y’s hardware address Request sent via broadcast Reply sent via unicast

IP Addresses given notion of “network”, let’s re-examine IP addresses: “class-full” addressing: class A 1.0.0.0 to 127.255.255.255 network host B 128.0.0.0 to 191.255.255.255 10 network host 192.0.0.0 to 223.255.255.255 C 110 network host 224.0.0.0 to 239.255.255.255 D 1110 multicast address 32 bits

Some special IP addresses All-0s  This computer All-1s  All hosts on this net (limited broadcast: don’t forward out of this net) All-0 host suffix  Network Address (‘0’ means ‘this’) All-1 host suffix  All hosts on the destination net (directed broadcast). 127.*.*.*  Loopback through IP layer

IP Addressing Problem: Address classes were too “rigid”. For most organizations, Class C were too small and Class B too big. Led to very inefficient use of address space, and a shortage of addresses. Organizations with internal routers needed to have a separate (Class C) network ID for each link. And then every other router in the Internet had to know about every network ID in every organization, which led to large address tables. Small organizations wanted Class B in case they grew to more than 255 hosts. But there were only about 16,000 Class B network IDs.

IP Addressing Two solutions were introduced: Subnetting is used within an organization to subdivide the organization’s network ID. Classless Interdomain Routing (CIDR) was introduced in 1993 to provide more efficient and flexible use of IP address space across the whole Internet. CIDR is also known as “supernetting” because subnetting and CIDR are basically the same idea.

Subnetting CLASS “B” e.g. Company 10 Net ID Host-ID e.g. Site 2 14 16 10 Net ID Host-ID 2 14 16 2 14 16 e.g. Site 10 Net ID 0000 Host-ID 10 Net ID 1111 Host-ID Subnet ID (20) Subnet Host ID (12) Subnet ID (20) Subnet Host ID (12) 2 14 16 2 14 16 e.g. Dept 10 Net ID 000000 Host-ID 10 Net ID 1111011011 Host-ID Subnet ID (22) Subnet Host ID (10) Subnet ID (26) Subnet Host ID (6)

Subnetting Subnetting is a form of hierarchical routing. Subnets are usually represented via an address plus a subnet mask or “netmask”. e.g. stanley@kaist.ac.kr > ifconfig hme0 hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 171.64.15.82 netmask ffffff00 broadcast 171.64.15.255 Netmask ffffff00: the first 24 bits are the subnet ID, and the last 8 bits are the host ID. Can also be represented by a “prefix + length”, e.g. 171.64.15/24.

Classless Interdomain Routing The IP address space is broken into line segments. Each line segment is described by a prefix. A prefix is of the form x/y where x indicates the prefix of all addresses in the line segment, and y indicates the length of the segment. e.g. The prefix 128.9/16 represents the line segment containing addresses in the range: 128.9.0.0 … 128.9.255.255. 128.9.0.0 142.12/19 65/8 128.9/16 232-1 216 128.9.16.14

Classless Interdomain Routing Addressing 128.9.19/24 128.9.25/24 128.9.16/20 128.9.176/20 Most specific route = “longest matching prefix” 128.9/16 232-1 128.9.16.14

32 bit destination IP address IP datagram format IP protocol version number 32 bits total datagram length (bytes) header length (bytes) head. len type of service ver length for fragmentation/ reassembly “type” of data fragment offset 16-bit identifier flgs max number remaining hops (decremented at each router) time to live upper layer Internet checksum 32 bit source IP address 32 bit destination IP address upper layer protocol to deliver payload to Options (if any) E.g. timestamp, record route taken, pecify list of routers to visit. data (variable length, typically a TCP or UDP segment)

IP Datagram Format First Word purpose: info, variable size header & packet. Version (4 bits) Internet header length (4 bits): units of 32-bit words. Min header is 5 words or 20 bytes. Type of service (TOS: 8 bits): Reliability, precedence, delay, and throughput. Not widely supported Total length (16 bits): header + data. Units of bytes. Total must be less than 64 kB.

IP Header (Cont) 2nd Word Purpose: fragmentation Identifier (16 bits): Helps uniquely identify the datagram between any source, destination address Flags (3 bits): More Flag (MF):more fragments Don’t Fragment (DF) Reserved Fragment offset (13 bits): In units of 8 bytes

IP Header (Cont) Third word purpose: demuxing, error/looping control, timeout. Time to live (8 bits): Specified in router hops Protocol (8 bits): Next level protocol to receive the data: for de-multiplexing. Header checksum (16 bits): 1’s complement sum of all 16-bit words in the header. Change header => modify checksum using 1’s complement arithmetic. Source Address (32 bits): Original source. Does not change along the path.

Header Format (contd) Destination Address (32 bits): Final destination. Does not change along the path. Options (variable length): Security, source route, record route, stream id (used for voice) for reserved resources, timestamp recording Padding (variable length): Makes header length a multiple of 4 Payload Data (variable length): Data + header < 65,535 bytes

Maximum Transmission Unit Each subnet has a maximum frame size Ethernet: 1518 bytes FDDI: 4500 bytes Token Ring: 2 to 4 kB Transmission Unit = IP datagram (data + header) Each subnet has a maximum IP datagram length (header + payload) = MTU Net 1 MTU=1500 Net 2 MTU=1000 S R R

Fragmentation IP Header Original Datagram IP Hdr 1 Data 1 IP Hdr 2 Datagrams larger than MTU are fragmented Original header is copied to each fragment and then modified (fragment flag, fragment offset, length,...) Some option fields are copied (see RFC 791) IP Header Original Datagram IP Hdr 1 Data 1 IP Hdr 2 Data 2 IP Hdr 3 Data 3

Fragmentation Example MTU = 1500B MTU = 280B IHL=5, ID = 111, More = 1 Offset = 0W, Len = 276B IHL = 5, ID = 111, More = 0 Offset = 0W, Len = 472B IHL=5, ID = 111, More = 0 Offset = 32W, Len = 216B Payload size 452 bytes needs to be transmitted across a Ethernet (MTU=1500B) and a SLIP line (MTU=280B) Length = 472B, Header = 20B => Payload = 452B Fragments need to be multiple of 8-bytes. Nearest multiple to 260 (280 -20B) is 256B First fragment length = 256B + 20B = 276B. Second fragment length = (452B- 256B) + 20B = 216B

Reassembly Where to do reassembly? End nodes Dangerous to do at intermediate nodes How much buffer space required at routers? What if routes in network change? Multiple paths through network All fragments only required to go through destination