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

Similar documents
Chapter 4 Network Layer

IP addressing and forwarding Network layer

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

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Chapter 4 Network Layer

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

Transport and Network Layer

DHCP, ICMP, IPv6. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley DHCP. DHCP UDP IP Eth Phy

8.2 The Internet Protocol

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

Network Layer IPv4. Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS. School of Computing, UNF

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Internet Packets. Forwarding Datagrams

Компјутерски Мрежи NAT & ICMP

Future Internet Technologies

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

IP - The Internet Protocol

CS 78 Computer Networks. Internet Protocol (IP) our focus. The Network Layer. Interplay between routing and forwarding

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

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

IP address format: Dotted decimal notation:

Networking Test 4 Study Guide

Internet Protocols Fall Lectures 7-8 Andreas Terzis

Answers to Sample Questions on Network Layer

The Internet. Internet Technologies and Applications

CS335 Sample Questions for Exam #2

Technical Support Information Belkin internal use only

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

2. IP Networks, IP Hosts and IP Ports

Lecture Computer Networks

Lecture 8. IP Fundamentals

RARP: Reverse Address Resolution Protocol

How To Manage Address Management In Ip Networks (Netware)

How do I get to

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

Internet Control Protocols Reading: Chapter 3

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

20. Switched Local Area Networks

Internet Protocols. Addressing & Services. Updated:

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

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

NETWORK LAYER/INTERNET PROTOCOLS

Network Layer: Network Layer and IP Protocol

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

Internet Architecture and Philosophy

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

TCP/IP Basis. OSI Model

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

IP Subnetting and Addressing

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

Savera Tanwir. Internet Protocol

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

ELEC3030 (EL336) Computer Networks. How Networks Differ. Differences that can occur at network layer, which makes internetworking difficult:

ICS 351: Today's plan

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

Unix System Administration

Introduction to TCP/IP

Introduction to IP v6

Chapter 11. User Datagram Protocol (UDP)

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

Network Security TCP/IP Refresher

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

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

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

SUPPORT DE COURS. Dr. Omari Mohammed Maître de Conférences Classe A Université d Adrar Courriel : omarinmt@gmail.com

Internet Infrastructure Measurement: Challenges and Tools

Efficient Addressing. Outline. Addressing Subnetting Supernetting CS 640 1

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

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

Protocols. Packets. What's in an IP packet

ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

Ethernet. Ethernet. Network Devices

IP Addressing Introductory material.

04 Internet Protocol (IP)

IP Addressing. IP Addresses. Introductory material.

Internetworking and Internet-1. Global Addresses

Internet Protocol Version 6 (IPv6)

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

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

Introduction To Computer Networking

Internet and IP addressing

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

Access Control: Firewalls (1)

Classful IP Addressing (cont.)

The internetworking solution of the Internet. Single networks. The Internet approach to internetworking. Protocol stacks in the Internet

Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet

(Refer Slide Time: 02:17)

Introduction to IP networking

Internet Protocols. Background CHAPTER

Troubleshooting Tools

Internetworking and IP Address

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

Computer Networks CS321

PART IV. Network Layer

Transcription:

1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! Network layer" goals: "! understand principles behind layer services:" " layer service models" " forwarding versus routing" " how a router works and routing algorithms" " syntax an semantics of IP addresses" " address resolution services" " Network Layer 4-

Outline and book chapters" 4.1 introduction" 4. virtual circuit and datagram s" 4.3 what s inside a router" 4.4 IP: Internet Protocol" " datagram format" " IPv4 addressing" Network Layer 4-3 Network layer"! forwards packets from sending to receiving host "! on sending side: encapsulates transport packets into datagrams!! on receiving side: delivers packets to transport layer"! layer protocols exist in every host & router"! router examines header fields in all datagrams" application transport application transport pp 331-333" Network Layer 4-4

Two key -layer functions"! forwarding: move packets from router s input to appropriate router output"! routing: determine route taken by packets from source to dest. " " " routing algorithms" pp 334-335, 346-347" Network Layer 4-5 Interplay between routing and forwarding" routing algorithm local forwarding table header value output link 0100 0101 0111 1001 3 1 routing algorithm determines end-end-path through forwarding table determines local forwarding at this router value in arriving packet s header 0111 3 1 pp 334-335" Network Layer 4-6

Connection vs connection-less services"! datagram provides -layer connectionless service"! virtual-circuit provides -layer connection service" pp 339" Network Layer 4-7 Virtual circuits: Signaling and flow"! Signaling to setup a virtual circuit, reserve resources, e.g. line capacity and buffers at each router. Establish state."! The flow of data packets starts. "! Signaling to supervise flow (e.g. Route/link failure)"! Signaling to tear down circuit & release resources" application transport 5. data flow begins" 6. receive data" 4. call connected" 3. accept call" 1. initiate call". incoming call" application transport Pp 340-343" Network Layer 4-8

Datagram s"! no call setup at layer"! routers: no state about end-to-end connections" " no -level concept of connection "! packets forwarded using destination host address, looked up at all encountered routers." application transport 1. send datagrams. receive datagrams application transport pp 343-344" Network Layer 4-9 The Internet layer" host, router layer functions:" transport layer: TCP, UDP layer routing protocols! path selection RIP, OSPF, BGP forwarding table IP protocol! addressing conventions datagram format packet handling conventions ICMP protocol! error reporting router signaling link layer layer pp 357-358" Network Layer 4-10

IP datagram format" IP protocol version number header length (bytes) type of data max number remaining hops (decremented at each router) upper layer protocol to deliver payload to how much overhead?! 0 bytes of TCP! 0 bytes of IP! = 40 bytes + app layer overhead ver head. len 16-bit identifier time to live type of service upper layer 3 bits flgs length fragment offset header checksum 3 bit source IP address 3 bit destination IP address options (if any) data (variable length, typically a TCP or UDP segment) total datagram length (bytes) for fragmentation/ reassembly e.g. timestamp, record route taken, specify list of routers to visit. pp 358-359" Network Layer 4-11 IP fragmentation, reassembly"! links have MTU (Max.Transfer Unit) - largest possible link-level frame" " different link types, different MTUs "! large IP datagram are divided ( fragmented ) within net" " one datagram becomes several datagrams" " reassembled only at final destination" " IP header bits used to identify, order related fragments" reassembly fragmentation: in: one large datagram out: 3 smaller datagrams pp 361-364" Network Layer 4-1

IP addressing: introduction"! IP address: 3-bit identifier for host == router interface "! interface: connection between host/router and link" " router s typically have multiple interfaces" " host s typically has one or two interfaces (e.g., wired Ethernet, wireless 80.11)"! IP addresses associated with each interface! 3.1.1. 3.1.1.1 3.1.1.3 3.1.1.4 3.1..9 3.1.3.7 3.1.3.1 3.1..1 3.1.. 3.1.3. 3.1.1.1 = 11011111 00000001 00000001 00000001 3 1 1 1 pp 364-370" Network Layer 4-13 Dotted-decimal Notation 3-bit host addresses are often given in a dotted-decimal notation for convenience: The 3bits are split into four groups of 8bits. Each 8-bit value is translated into decimal form. Example: The dotted-decimal notation for 00000001 00000010 00000011 00000100 is 1..3.4 a) Translate the following addresses: 00001010 00000000 00000001 00000010 10000010 11101110 00001100 01100100 17.0.0.1 46..117.75 pp 364-370" Network Layer 4-14

Datagram forwarding table" routing algorithm local forwarding table dest address output link address-range 1 address-range address-range 3 address-range 4 3 1 4 billion IP addresses, so rather than list individual destination address" list range of addresses" (aggregate table entries)" IP destination address in arriving packet s header 1 3 pp 364-370" Network Layer 4-15 Datagram forwarding table" Destination Address Range 11001000 00010111 00010000 00000000 through 11001000 00010111 00010111 11111111 11001000 00010111 00011000 00000000 through 11001000 00010111 00011000 11111111 Link Interface 0 1 11001000 00010111 00011001 00000000 through 11001000 00010111 00011111 11111111 otherwise 3 Q: but what happens if ranges don t divide up so nicely? " pp 11-17" Network Layer 4-16

Longest prefix matching" longest prefix matching! when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address." Destination Address Range 11001000 00010111 00010*** ********* 11001000 00010111 00011000 ********* 11001000 00010111 00011*** ********* otherwise! examples: DA: 11001000 00010111 00010110 10100001 DA: 11001000 00010111 00011000 10101010 pp 11-17" Link interface 0 1 3 which interface?" which interface?" Network Layer 4-17 Subnets" 3.1.1.1! IP address: " " subnet part - high order bits" " host part - low order bits "! what s a subnet?! " device interfaces with same subnet part of IP address" " can ly reach each other without intervening router! subnet part pp 11-17" 3.1.1. 3.1..1 3.1.1.4 3.1..9 3.1.1.3 3.1.3.1 3.1.3.7 3.1.. subnet 3.1.3. consisting of 3 subnets 11011111 00000001 00000011 00000000 3.1.3.0/4 host part Network Layer 4-18

IP addresses: how to get one?" Q: How does a host get IP address?" "! hard-coded by system admin in a file" " Windows: control-panel->->configuration->tcp/ ip->properties" " UNIX: /etc/rc.config"! : Dynamic Host Configuration Protocol: dynamically get address from server" " " pp 371-375" Network Layer 4-19 : example" UDP IP Eth Phy UDP IP Eth Phy 168.1.1.1 router with server built into router! connecting laptop needs its IP address, addr of first-hop router, addr of DNS server: use "! request encapsulated in UDP, encapsulated in IP, encapsulated in 80.1 Ethernet" "! Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running server"! Ethernet demuxed to IP demuxed, UDP demuxed to " pp 371-375" Network Layer 4-0

: example" UDP IP Eth Phy UDP IP Eth Phy router with server built into router! DCP server formulates ACK containing client s IP address, IP address of first-hop router for client, name & IP address of DNS server"! encapsulation of server, frame forwarded to client, demuxing up to at client"! client now knows its IP address, name and IP address of DSN server, IP address of its first-hop router" pp 371-375" Network Layer 4-1 client-server scenario" server: 3.1..5 discover src : 0.0.0.0, 68 dest.: 55.55.55.55,67 yiaddr: 0.0.0.0 transaction ID: 654 arriving client request offer src: 0.0.0.0, 68 dest:: 55.55.55.55, 67 yiaddrr: 3.1..4 transaction ID: 655 lifetime: 3600 secs src: 3.1..5, 67 dest: 55.55.55.55, 68 yiaddrr: 3.1..4 transaction ID: 654 lifetime: 3600 secs ACK src: 3.1..5, 67 dest: 55.55.55.55, 68 yiaddrr: 3.1..4 transaction ID: 655 lifetime: 3600 secs pp 371-375" Network Layer 4-

In TCP we talked about the 3-way handshake to make sure both sender and receiver agree that a connection is established. Why does need a fourstep process? o The fourth step is needed to agree on the lifetime of the address lease. o Several servers can answer with offers; therefore an additional step to select an offer of a particular server. o There are four steps because there are four parameters to be transferred: address, subnet mask, first hop router, local DNS server. o To avoid that two hosts configure the same address. Network Layer 4-3 NAT: address translation" rest of Internet 138.76.9.7 10.0.0.4 local (e.g., home ) 10.0.0/4 10.0.0.1 10.0.0. 10.0.0.3 all datagrams leaving local" have same single source NAT IP address: 138.76.9.7,different source port numbers" datagrams with source or " destination in this " have 10.0.0/4 address for " source, destination (as usual)" pp 375-378" Network Layer 4-4

NAT: address translation" motivation: local uses just one IP address as far as outside world is concerned:" " range of addresses not needed from ISP: just one IP address for all devices" " can change addresses of devices in local without notifying outside world" " can change ISP without changing addresses of devices in local " " devices inside local net not explicitly addressable, visible by outside world (a security plus)" " pp 375-378" Network Layer 4-5 NAT: address translation" : NAT router changes datagram source addr from 10.0.0.1, 3345 to 138.76.9.7, 5001, updates table NAT translation table WAN side addr LAN side addr 138.76.9.7, 5001 10.0.0.1, 3345 S: 138.76.9.7, 5001 D: 18.119.40.186, 80 138.76.9.7 S: 18.119.40.186, 80 D: 138.76.9.7, 5001 3 3: reply arrives dest. address: 138.76.9.7, 5001 10.0.0.4 S: 10.0.0.1, 3345 D: 18.119.40.186, 80 1 S: 18.119.40.186, 80 D: 10.0.0.1, 3345 4 1: host 10.0.0.1 sends datagram to 18.119.40.186, 80 10.0.0.1 10.0.0. 10.0.0.3 4: NAT router changes datagram dest addr from 138.76.9.7, 5001 to 10.0.0.1, 3345 pp 375-378" Network Layer 4-6

NAT: address translation"! 16-bit port-number field: " " 60,000 simultaneous connections with a single LAN-side address!"! NAT is controversial:" " routers should only process up to layer 3" " violates end-to-end argument" NAT possibility must be taken into account by app designers, e.g., PP applications" " address shortage should instead be solved by IPv6" pp 375-378" Network Layer 4-7 NAT traversal problem"! client wants to connect to server with address 10.0.0.1" " server address 10.0.0.1 local to LAN (client can t use it as destination addr)" " only one externally visible NATed address: 138.76.9.7"! solution1: statically configure NAT to forward incoming connection requests at given port to server" " e.g., (13.76.9.7, port 500) always forwarded to 10.0.0.1 port 5000" client? 138.76.9.7 NAT router 10.0.0.4 10.0.0.1 pp 375-378" Network Layer 4-8