Page 1 COMP210 Network layer. Page 2 The Network Layer  The network layer is responsible for establishing, maintaining and terminating connections 

Slides:



Advertisements
Similar presentations
CPSC Network Layer4-1 IP addresses: how to get one? Q: How does a host get IP address? r hard-coded by system admin in a file m Windows: control-panel->network->configuration-
Advertisements

Transitioning to IPv6 April 15,2005 Presented By: Richard Moore PBS Enterprise Technology.
Internet Control Protocols Savera Tanwir. Internet Control Protocols ICMP ARP RARP DHCP.
Week 5: Internet Protocol Continue to discuss Ethernet and ARP –MTU –Ethernet and ARP packet format IP: Internet Protocol –Datagram format –IPv4 addressing.
IP Suite© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
1 6/14/ :27 CS575Internetworking & Routers1 Rivier College CS575: Advanced LANs Chapter 13: Internetworking & Routers.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
Introduction to TCP/IP
Subnetting.
Chapter 2 Internet Protocol DoD Model Four layers: – Process/Application layer – Host-to-Host layer – Internet layer – Network Access layer.
Extending Networks. Three Levels of Extension Physical Layer –Repeaters Link Layer –Bridges –Switches Network –Routers: “Connecting networks”
TCP/IP Protocol Suite 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand the different types of.
Institute of Technology Sligo - Dept of Computing Chapter 11 Layer 3 Protocols Paul Flynn.
TCP/IP Protocol Suite 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand the different types of.
Copyright 2003 CCNA 1 Chapter 7 TCP/IP Protocol Suite and IP Addressing By Your Name.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing.
TCP/IP Protocol Suite 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand the different types of.
Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing.
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
1 Chapter 27 Internetwork Routing (Static and automatic routing; route propagation; BGP, RIP, OSPF; multicast routing)
1 Internetworking : Internet architecture and TCP/IP Protocol TK3133 Computer Networking Technology.
IP (Internet Protocol) –the network level protocol in the Internet. –Philosophy – minimum functionality in IP, smartness at the end system. –What does.
Network Layer – Subnetting and Control Protocols Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing,
The Network Layer. Network Projects Must utilize sockets programming –Client and Server –Any platform Please submit one page proposal Can work individually.
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
Cisco – Chapter 11 Routers All You Ever Wanted To Know But Were Afraid to Ask.
1 Chapter 27 Internetwork Routing (Static and automatic routing; route propagation; BGP, RIP, OSPF; multicast routing)
1 Routing. 2 Routing is the act of deciding how each individual datagram finds its way through the multiple different paths to its destination. Routing.
Objectives: Chapter 5: Network/Internet Layer  How Networks are connected Network/Internet Layer Routed Protocols Routing Protocols Autonomous Systems.
1 Internet Protocol. 2 Connectionless Network Layers Destination, source, hop count Maybe other stuff –fragmentation –options (e.g., source routing) –error.
Copyright © Lopamudra Roychoudhuri
11 NETWORK LAYER PROTOCOLS Chapter 5 IP IPX NetBEUI AppleTalk.
CMPT 471 Networking II Address Resolution IPv4 ARP RARP 1© Janice Regan, 2012.
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012  CPSC.
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.
Delivery, Forwarding, and Routing of IP Packets
1 TCP/IP Internetting ä Subnet layer ä Links stations on same subnet ä Often IEEE LAN standards ä PPP for telephone connections ä TCP/IP specifies.
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
1 Internet Routing. 2 Terminology Forwarding –Refers to datagram transfer –Performed by host or router –Uses routing table Routing –Refers to propagation.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
TCP/IP Honolulu Community College Cisco Academy Training Center Semester 2 Version 2.1.
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing.
1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology.
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.
Internet Protocols (chapter 18) CSE 3213 Fall 2011.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing
1 Kyung Hee University Chapter 6 Delivery Forwarding, and Routing of IP Packets.
Linux Operations and Administration Chapter Eight Network Communications.
Routing Algorithms and IP Addressing Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 1 Module 10 Routing Fundamentals and Subnets.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
IP Protocol CSE TCP/IP Concepts Connectionless Operation Internetworking involves connectionless operation at the level of the Internet Protocol.
TCP/IP Protocol Suite and IP Addressing Presented By : Dupien AMS.
Computer Networks 0110-IP Gergely Windisch
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
1 Layer 3: Protocols Honolulu Community College Cisco Academy Training Center Semester 1 Version
Assignment 1  Chapter 1:  Question 11  Question 13  Question 14  Question 33  Question 34  Chapter 2:  Question 6  Question 39  Chapter 3: 
The Network Layer UNIT-4 snistforum.com. Network Layer Design Issues Store-and-Forward Packet Switching Services Provided to the Transport Layer Implementation.
1 Computer Networks Chapter 5. Network layer The network layer is concerned with getting packets from the source all the way to the destination. Getting.
Network Layer COMPUTER NETWORKS Networking Standards (Network LAYER)
IP: Addressing, ARP, Routing
Chapter 6 Delivery & Forwarding of IP Packets
NET323 D: Network Protocols
CS4470 Computer Networking Protocols
Presentation transcript:

Page 1 COMP210 Network layer

Page 2 The Network Layer  The network layer is responsible for establishing, maintaining and terminating connections  The network layer provides:  Routing  Flow and congestion control  Internetworking

Page 3 Routing  Packets originating from a source must be delivered to the destination by routing them through several intermediate nodes  Routing involves the selection of the paths for the packets  When a stream of packets need to be delivered, the network may handle them in two ways:  Virtual circuit  Datagram

Page 4  In this approach a preplanned route is established before any packets are sent  Packets are still buffered at each node and queue up to use an outgoing link Virtual Circuit

Page 5  Since all packets follow the same route, sequencing of packets is maintained  Virtual circuit is useful when two stations exchange data over an extended period of time Virtual Circuit

Page 6 Implementation of Connection-Oriented Service Routing within a virtual- circuit subnet.

Page 7  The call setup phase is avoided  It is more flexible and can respond to congestion  Packet sequencing may not be maintained  Datagram is useful when only a few packets are exchanged Datagram  Each packet is routed independently

Page 8 Implementation of Connectionless Service Routing within a diagram subnet.

Page 9 Comparison of Virtual- Circuit and Datagram 5-4

Page 10 Routing Strategies  The decision time for a route may be made either at the packet level (datagram) or at the virtual circuit establishment time  The routing decisions may be either centralized or distributed  Routing decisions are usually based on topology, traffic load and cost

Page 11 Fixed Routing  Each node needs to store only a single row of the routing directory to decide the next node to take for each destination  This strategy is simple, and works well in a reliable network, but the method is not flexible and cannot adapt to network load

Page 12 Shortest Path Routing

Page 13 Adaptive Routing  These are dynamic algorithms and react to changes in the network conditions  The routing decisions are more complex and require more processing at the nodes  The network status information needs to be exchanged among the nodes, imposing further traffic among the nodes

Page 14 Adaptive Routing Methods •Distance Vector Routing  each router exchanges routing tables with it ' s neighbours every x seconds –creates heavy network traffic –can be out of date •Link State Routing  each router broadcasts it ' s entire routing table at startup –routers broadcast subsequent updates

Page 15 Distance Vector Routing

Page 16 Distance Vector Routing (2) The count-to-infinity problem.

Page 17 Link State Routing Each router must do the following: •Discover its neighbors, learn their network address. •Measure the delay or cost to each of its neighbors. •Construct a packet telling all it has just learned. •Send this packet to all other routers. •Compute the shortest path to every other router.

Page 18 Learning about the Neighbors

Page 19 Measuring Line Cost

Page 20 Building Link State Packets (a) A subnet. (b) The link state packets for this subnet.

Page 21 Distributing the Link State Packets The packet buffer for router B in the previous slide (Fig. 5-13).

Page 22 Hierarchical Routing Hierarchical routing.

Page 23 Routing for Mobile Hosts A WAN to which LANs, MANs, and wireless cells are attached.

Page 24 Q of S Requirements How stringent the quality-of- service requirements are. 5-30

Page 25 How Networks Differ Some of the many ways networks can differ. 5-43

Page 26 Routers •Use Network and Physical (NIC card) addressing •Maintain routing tables to direct packets to correct network •Function at the network layer

Page 27 Routers •Routing terms –hop count  number of routers a message passes to get to it's destination –tick count •time required to deliver a message. One tick is 1/8 sec –TTL Time To Live •how many routers will a message pass until it is undeliverable

Page 28 Gateways •Protocol translator •Connecting two dissimilar networks •functions at the network layer and above

Page 29 IP addressing-History  1969 ARPANET used by U.S. Department of Defence  1970+TCP/IP developed and used as the common protocol  Developed to link educational an governmental agencies (military)

Page 30 IP addressing-History (cont)  1984 National Science Foundation (NSF) decided to build "network of networks" (Internet) based on TCP/IP  Million + internet users  Made up of non proprietary protocols  changed by RFC (request for comment)

Page 31 OSI Model versus TCP/IP

Page 32 Protocol layers

Page 33 Internet Protocol (IP)  defining the datagram  defining the internet addressing scheme  moving data between the Network Access Layer and the Transport Layer  routing datagrams to remote hosts

Page 34 IP (cont)  performing fragmentation and re-assembly of datagrams  connectionless protocol does not exchange control information (handshake) to establish end to end connection before transmitting data

Page 35 IP (cont)  relies on other protocols to establish connection if required  unreliable contains no error detection, does not check if message is delivered (Time To Live)  relies on other protocols for this

Page 36 Collection of Subnetworks

Page 37 OSPF – The Interior Gateway Routing Protocol (a) Autonomous system. (b) Graph representation of (a)

Page 38 The relation between ASes, backbones, and areas in OSPF.

Page 39 The five types of OSPF messages. 5-66

Page 40 BGP – The Exterior Gateway Routing Protocol (a) A set of BGP routers. (b) Information sent to F.

Page 41 The IP Protocol The IPv4 (Internet Protocol) header.

Page 42 The IP Protocol Some of the IP options. 5-54

Page 43 IP address •The IP address is a 32 bit address –identifies the network and the host on a given network –divided into two parts first part identifies the network, second part identifies the host on the network –the format is not the same for each address

Page 44 IP Address  the 32 bit number is represented in the following format  xxx.xxx.xxx.xxx  where xxx is the decimal representation of the binary bit string  Example: 

Page 45 Classes of IP Addresses IP address formats.

Page 46 Classes of IP addresses •Class A –used for small number of networks and large number of hosts –first byte (8 bits) represent the network address –last 3 bytes (24 bits) represent the host address –class A address have a first bit of 0 –class A network addresses range from 0 to 127

Page 47 Classes of IP addresses •Class B –Provide an equal number of networks and hosts –first two bytes are network address and last two bytes are host addresses –first two bits of a class B address are 10 –network addresses range from 128 to 191

Page 48 Classes of IP addresses •Class C –greater number of network addresses fewer host addresses –first three bits are 110 –network addresses range form

Page 49 Classes of IP addresses •Class D –used for special multicast addresses –first four bits 1110

Page 50 Classes of IP addresses •Class E –used for experimental purposes –first four bits 1111

Page 51 Special IP addresses.

Page 52 Subnets  subnets are used to divide a large network into smaller networks  each address allows for one network address and many hosts (ie all hosts are on the same network)  subnet masks are used to create many subnets within the same network address

Page 53 Subnet masks  a bit string applied to an address  if the bit is on the corresponding bit in the address is considered to be a network bit  the network mask is known locally only

Page 54 Subnets A class B network subnetted into 64 subnets.

Page 55 Subnet Mask for Class B address

Page 56 Subnet Example #1  IP Address   Subnet Mask     Network    Host   4

Page 57 Subnet Example #2  IP Address   Subnet Mask     Network    Host   1.132

Page 58 ROUTING EXAMPLE Script started on Mon Mar 11 15:46: ijirasek]# netstat -i eth BRU eth BRU lo LRU ijirasek]# ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:10:5A:98:02:F5 inet addr: Bcast: Mask: UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets: errors:0 dropped:0 overruns:0 frame:0 TX packets: errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 Interrupt:10 Base address:0x6800

Page 59 ROUTING EXAMPLE - CONT netstat -r Kernel IP routing table sentinel * UH eth * U eth * U eth * U lo default UG eth0 netstat -rn UH eth U eth U eth U lo UG eth0 Script done on Mon Mar 11 15:47:

Page 60 Classless InterDomain Routing - CIDR CIDR Block Prefix # Equivalent Class C # of Host Addresses /27 1/8th of a Class C 32 hosts /26 1/4th of a Class C 64 hosts /25 1/2 of a Class C 128 hosts /24 1 Class C 256 hosts /23 2 Class C 512 hosts /22 4 Class C 1,024 hosts /21 8 Class C 2,048 hosts /20 16 Class C 4,096 hosts... /13 2,048 Class C 524,288 hosts Example: Consider the following: Sidte ID: CIDR mask: / Netmask: The highest IP # of subnets: 2**6 -2 # of hosts: 2**6 - 2

Page 61 CIDR examples 5-59

Page 62 Network Address Translation (NAT) Method to connect multiple computers to Internet via one IP address Private network NAT router Internet (client) (server) |Source Address| Source Port | Dest. Address | Dest. Port| - 0 When the packet arrives from the Private Network to NAT router NAT router will: 1. Insert |Source Address| Source Port| into a table 2. Change Source address to NAT router address 3. Change Source Port to the table offset 4. Send the modified packet to destination When the response comes back NAT router replaces the modified Source info with the original source info and sends it to the client. Outside node cannot initiate the communication Reserved addresses: / – / – /16

Page 63 NAT example

Page 64 PROBLEMS WITH NAT 1.If NAT box fails all the connections are lost 2.Violates the OSI layers independency 3.Some applications insert IP address as a part of the message. Those applications will fail 4. NAT changes the content of the IP datagram. This in incompatible with the secure data communication

Page 65 NIC card address IP Address translation 1. IP address -> NIC card address Address Resolution Protocol (ARP) Each node broadcasts its IP address and NIC card address in the boot time. Other nodes on the subnet store the info. Alternatively, a node can broadcast the question: “ What NIC card has IP address .  2. NIC card address -> IP address Reverse Address Resolution Protocol (RARP) Used for diskless workstation. Diskless workstation has to be booted from remote file server. After the boot the workstation will broadcast the message  My NIC card address is  Who knows my IP address?  RARP server will know the answer 3. BOOTP: Similar to RARP. Uses UDP protocol 4. DHCP: Extension of BOOTP. Current technology

Page 66 BOOTP, DHCP functionality 1BOOTP server will provide the client with the following information: IP address and netmask IP address of default router IP address of DNS server The assignment between IP address and NIC card address is static (manual) 2. DHCP (Dynamic Host Configuration Protocol) Same functionality as BOOTP plus dynamic IP addresses assignment. DHCP server is given a block of IP addresses to choose from.

Page 67 BOOTP, DHCP functionality - cont Work station (client) creates a following UDP message: Source IP address: Destination IP address: Source Port #: 68 Destination Port #: 67 Message:  Here is my NIC address. What is my IP address?  Server answers with a following UDP message: Source IP address: Its own address Destination IP address: Source port #: 67 Destination port #: 68 Message:  Machine with NIC card address .! Your IP is ..  Routers know about it and make exception in limited broadcast forwarding

Page 68 Dynamic Host Configuration Protocol (DHCP) Operation of DHCP.

Page 69 The Main IPv6 Header

Page 70 Internet Control Message Protocol (ICMP) Used to: 1. Transmit error messages (type 3 message) 2. Pass router info (type 9, 10 message) ICMP is also used to facilitate mobile networking

Page 71 Mobile IP Design criteria: 1.Each mobile host must be able to use its home IP address anywhere 2. Software changes to fixed hosts not permitted 3. Changes to router software not permitted 4. Most packets for mobile hosts should not make detour. 5. No overheads when mobile host is at home

Page 72 Mobile IP Purpose: To provide routing for nodes which move between radio ranges of routers. Components of mobile network: Mobile node: Node on the move Home network: Network to which Mobile node belongs to Home agent: Router in Home Network which provides mobility management Foreign network: Network where Mobile node resides Foreign agent: Router in the Foreign network which provides mobility management

Page 73 Routing for Mobile Hosts A WAN to which LANs, MANs, and wireless cells are attached.

Page 74 Routing for Mobile Hosts

Page 75 Mobile IP - cont Permanent Address: IP address permanently assigned to the Mobile node Care-of address: Temporary IP address assigned to Mobile node by Foreign agent Correspondent: Node wishing to communicate with Mobile node

Page 76 Mobile IP - cont Functionality: Correspondent sends a message addressed to the Permanent address. This message will arrive to the Home agent. Home agent forwards the message to Foreign agent. Foreign agent forwards it to Mobile node. Mobile node replies directly to Correspondent.

Page 77 Mobile IP - cont Additional protocols required: Agent discovery: Mobile node finds the Foreign agent or Home agent Registration with Home agent: Foreign agent sends Home agent Care-of address Indirect routing of Correspondent’s datagrams: Rules about encapsulating datagrams forwarded to Mobile node by Home agent