Internet Protocol (IP) IP - Network Layer. IP Routing. Advantages of Connectionless. CSCE 515: Computer Network Programming ------ IP routing



Similar documents
IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Internetworking and Internet-1. Global Addresses

Network layer: Overview. Network layer functions IP Routing and forwarding

IP addressing. Interface: Connection between host, router and physical link. IP address: 32-bit identifier for host, router interface

IP Addressing. -Internetworking (with TCP/IP) -Classful addressing -Subnetting and Supernetting -Classless addressing

8.2 The Internet Protocol

Internetworking and IP Address

IP Subnetting and Addressing

Internet Addresses (You should read Chapter 4 in Forouzan)

Efficient Addressing. Outline. Addressing Subnetting Supernetting CS 640 1

Scaling the Network: Subnetting and Other Protocols. Networking CS 3470, Section 1

1. How many unique network IDs are there in class A addresses? # of unique hosts?

IP address format: Dotted decimal notation:

(Refer Slide Time: 02:17)

CE363 Data Communications & Networking. Chapter 6 Network Layer: Logical Addressing

Computer Networks. Lecture 3: IP Protocol. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

PART IV. Network Layer

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Lecture Computer Networks

Chapter 5. IPv4 Addresses. TCP/IP Protocol Suite 1 Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

Computer Network Foundation. Chun-Jen (James) Chung. Arizona State University

Classful IP Addressing (cont.)

Internet Protocols Fall Lectures 7-8 Andreas Terzis

Chapter 19 Network Layer: Logical Addressing 19.1

Savera Tanwir. Internet Protocol

Internet Protocols. Addressing & Services. Updated:

TCP/IP Basis. OSI Model

TCP/IP Network Essentials. Linux System Administration and IP Services

CS 348: Computer Networks. - IP addressing; 21 st Aug Instructor: Sridhar Iyer IIT Bombay

IP Addressing Introductory material.

IP addressing and forwarding Network layer

IP Addressing. IP Addresses. Introductory material.

Variable length subnetting

Introduction. Internet Address Depletion and CIDR. Introduction. Introduction

Lecture 8. IP Fundamentals

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

Gary Hecht Computer Networking (IP Addressing, Subnet Masks, and Packets)

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Instructor Notes for Lab 3

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

How To Make A Network Address Prefix Smaller

CS335 Sample Questions for Exam #2

RARP: Reverse Address Resolution Protocol

04 Internet Protocol (IP)

Future Internet Technologies

Interconnection of Heterogeneous Networks. Internetworking. Service model. Addressing Address mapping Automatic host configuration

Transport and Network Layer

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Tutorial (03) IP addresses & Sub netting

IP Address Classes (Some are Obsolete) Computer Networking. Important Concepts. Subnetting Lecture 8 IP Addressing & Packets

1 Data information is sent onto the network cable using which of the following? A Communication protocol B Data packet

Answers to Sample Questions on Network Layer

IP Addressing A Simplified Tutorial

Subnet + CIDR. Internet Networking recitation #1. 11: , Internet Networking,

Unix System Administration

256 4 = 4,294,967,296 ten billion = 18,446,744,073,709,551,616 ten quintillion. IP Addressing. IPv4 Address Classes

Guide to TCP/IP, Third Edition. Chapter 2: IP Addressing and Related Topics

Subnetting and Network Management Omer F. Rana. Networks and Data Communications 1

Ref: A. Leon Garcia and I. Widjaja, Communication Networks, 2 nd Ed. McGraw Hill, 2006 Latest update of this lecture was on

2. IP Networks, IP Hosts and IP Ports

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Computer Networks. Introduc)on to Naming, Addressing, and Rou)ng. Week 09. College of Information Science and Engineering Ritsumeikan University

Internet Protocol version 4 Part I

Internetworking Microsoft TCP/IP on Microsoft Windows NT 4.0

SUBNETS, CIDR, AND CLASSLESS ADDRESSING

Classful IP Addressing. Classless Addressing: CIDR. Routing & Forwarding: Logical View of a Router. IP Addressing: Basics

CIDR: Classless Interdomain Routing

Technical Support Information Belkin internal use only

We Are HERE! Subne\ng

Introduction to IP v6

CS 43: Computer Networks IP. Kevin Webb Swarthmore College November 5, 2013

Networking Test 4 Study Guide

Module 2: Assigning IP Addresses in a Multiple Subnet Network

Chapter 12 Supporting Network Address Translation (NAT)

ICS 351: Today's plan. IP addresses Network Address Translation Dynamic Host Configuration Protocol Small Office / Home Office configuration

Chapter 4 Network Layer

Mobile IP. Bheemarjuna Reddy Tamma IIT Hyderabad. Source: Slides of Charlie Perkins and Geert Heijenk on Mobile IP

Chapter 11 Network Address Translation

Chapter 11. User Datagram Protocol (UDP)

ICS 351: Today's plan

Advanced IP Addressing

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

DG Forwarding Algorithm

Algemene Theorie en Vaardigheden 2. April 2014 Theaterschool OTT-2 1

Network layer. Assignment 3

Desirable Properties Of An Internet Addressing Scheme

Dynamic Host Configuration Protocol (DHCP) 02 NAT and DHCP Tópicos Avançados de Redes

Network Layers. CSC358 - Introduction to Computer Networks

Internetworking. Problem: There is more than one network (heterogeneity & scale)

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

IP Address: the per-network unique identifier used to find you on a network

Transcription:

Process Process Process Layer CSCE 515: Computer Network Programming ------ IP routing Wenyuan Xu ICMP, AP & AP TCP IP UDP Transport Layer Network Layer Department of Computer Science and Engineering University of South Carolina 802.3 Data-Link Layer IP - Network Layer Provide delivery of packets from one host in the Internet to any other host in the Internet, even if the hosts are on different Problems: Heterogeneity (addressing, packet size and format, routing) Handling this problem and efficiently route packets across several Loops, oscillations, islands Solutions Gateways to handle communication between Gateways, routers, nodes, links, egional Network 1 Backbones egional Network 3 egional Network 2 Internet Protocol (IP) Provide unreliable and connectionless datagram delivery service Internet packets are called datagrams and may be up to 64 kilobytes in length (although they are typically much smaller e.g. 1500 bytes) Upper layer data (TCP, UDP, ICMP, IGMP, etc.) are transmitted as IP datagrams Q: What s the advantage of connectionless delivery? Advantages of Connectionless Host software is much simpler at the network layer. Transport layer already provides connection-oriented, should not repeat the work Many applications do not require sequential delivery of packets (example: packet voice). It is better to provide degraded service to everyone than to limit network access. Q: How do you get a packet from one network to another?? Server (or router) could become overloaded managing too many connections.

A: with a router (or a series of routers) Case 1: Single hop Case 2: Multi-hop Network cloud Actual routing able contains IP addresses, Flags indicating type of entries, net mask etc. Forwarding: When each packet arrives, looking up the outgoing line to use for it in the routing table Done on a hop-by-hop basis If destination is directly connected or on a shared network, send IP datagram directly to destination Otherwise send datagram to a router outing updates filling in and updating the routing tables outing Table Each entry contains following information Destination IP address IP address of next-hop router Specification of network interface Flag U: the route is up and operational. H :this is a route to a specific host (most routes are to ). G: the route uses an external gateway. Destination Gateway Flags ef Use Interface -------------------- -------------------- ----- ----- ------ ---------------- ------------ 192.168.0.0 129.252.130.203 UG 1 0 129.252.130.0 129.252.130.106 U 1 68 eri0 224.0.0.0 129.252.130.106 U 1 0 eri0 default 129.252.130.1 UG 1 135 127.0.0.1 127.0.0.1 UH 1 0 lo0 Host route determination Longest prefix match with destination address and entry in the routing table First, search for a matching host address Flag H is set Second, search for a matching network address Need to know the number of bits to use for network ID Third, search for a default entry Execute netstat rn on your machine and find the contents of the routing table Default entry allows for a single entry for a list of entries that have the same next-hop value Forward datagrams generated either on local host or on some other hosts toward their ultimate destination Static routing: when network is small, single connection point to other, no redundant route existent Dynamic routing: use routing daemon to run routing protocol in order to communicate with other routers

ifconfig Command Available at /usr/sbin Configure or query a network interface used by TCP/IP Support address families other than IP address -a option to display report of all interfaces netstat Command Available at /usr/bin Display network status -a option to display state of all sockets, all routing table entries, or all interfaces -i option to display interface information -n option to print IP addresses instead of host names -r option to display routing table -M option to display multicast routing table The four formats of IP Addresses Class A 0 NetID B C D 10 32 bits long: 129.252.138.8 NetID 110 NetID 1110 Multicast Address 8 bits 8 bits 8 bits 8 bits IP Addresses Subnet Addressing To make better use of class A and class B addresses, divide host ID into subnet ID and host ID Class B 14 16 10 NetID 14 8 8 10 NetID SubnetID Subnet Mask 32-bit value containing 1 bits for network ID and subnet ID, and 0 bits for host ID 14 8 8 B 10 NetID SubnetID 1 1 1 1 1 1 1 11 1 1 1 1 1 1 11 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 255.255.255.0 0xFFFF FF 00 Subnet Masks Assume UP addresses A and B share subnet mask M. Are IP addresses A and B on the same subnet? 1. Compute (A and M) 2. Compute (B and M) 3. if (A and M) == (B and M) then A and B are one the same subnet. Example: A and B are class B addresses A = 165.230.82.52 B = 165.230.24.93 Same network? M = 255.255.255.0 Same subnet?

Variable length subnetting outing Table Subnet masks allow power of 2 subnets Use a hierarchy of routers to allow subnets to be divided with different subnet masks Another approach: Variable length subnet masks Allow a subnet to be defined by more than two masks The router applies the masks one after another Address 221.2.3.0 221.2.3.128 Mask L1 L2 Interface mask: mask: subnet 1 subnet: 221.2.3.0 subnet: 221.2.3.128 221.2.3.129 L3 subnet 2,3 subnet: 221.2.3.192 mask: Question If an ISP has a 203.6.8.0 Network, he wants to give assign to 5 customers who need 60, 60, 60, 30, 30 hosts. What should the subnet mask be? What is the address range in each subnet? What should the routing table entries be? CID CID (classless Inter domain routing) Too many small requiring multiple class C addresses unning out of class B addresses, not enough nets in class A Assign contiguous block of class C addresses Use CID address mask to aggregate Ex 192.17.0.0, 255.255.248.0, Send it to 3 CID Original addressing schemes (class-based): 32 bits divided into 2 parts: Class A Class B 0 NetID Class C 10 NetID 110 NetID Class C address has max of 254 hosts Not enough for many organizations Too many class C addresses huge routing tables Classless Inter domain routing (CID) CID introduced to solve 2 problems: exhaustion of IP address space size and growth rate of routing table Supernetting Example: an organization needs 500 addresses. A single class C address not enough (256 hosts). Instead a class B address is allocated. (~64K hosts). a huge waste. CID allows multiple Class C addresses to be assigned to an organization but still occupy one entry in the routing table <192.5.48.0,2> this is used to specify that 2 network addresses 192.5.48.0 and 192.5.49.0 is allocated to an organization Typically the starting address with a CID mask that indicates the common most significant bits for the ranges is used to specify the block of addresses /notation 192.5.48.0/23 192.5.48.0 and 192.5.49.0 are assigned

Address Arithmetic: Address Blocks Address format <IP address/prefix P>. The prefix denotes the upper P bits of the IP address. Can be used to specify arbitrary blocks of addresses educing outing Table Size The <address/prefix> pair defines an address block: Examples: 200.15.0.0/16 => [ 200.15.0.0-200.15.255.255 ] 192.24.0.0/13 => [ 192.24.0.0-192.31.255.255 ] 192.00011000. 0000 0000. 0000 0000 13th bits fixed Variable CID: Classless Inter-Domain outing Address format <IP address/prefix P>. The prefix denotes the upper P bits of the IP address. Can be used to specify arbitrary blocks of addresses Say an ISP has 192.5.48.0, 192,5.49.0,192.5.50.0,192.5.51.0 then the IP address advertised will be 192.5.48.0/22 An ISP can obtain a block of addresses and partition this further to its customers Say an ISP has 200.8.4/24 address (256 addresses) He has another customer who needs only 4 addresses from 200.8.4.24 then that block can be specified as 200.8.4.24/30 Other Developments: NAT NAT- Network address translation Hosts need not have unique global IP address Hosts are assigned private addresses 10.0, 172.16 to 172.31 and 192.168. Are allocated for private hosts (Hmmm, what if those addresses appear on the Internet themselves?) These hosts connected to a NAT gateway which has a public IP addresses Packets from private hosts are replaced with source address of NAT gateway, use port# to uniquely do the reverse translation. Assignment & Next time eading: TI Ch 3 **; Variable Length Subnet Masking* On the Assignment of Subnet Numbers * Next Lecture: ICMP, outing Principles