Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
IPv4 - The Internet Protocol Version 4
Network Layer – IPv4 Dr. Sanjay P. Ahuja, Ph.D.
CSE 461: IP/ICMP and the Network Layer. Next Topic  Focus:  How do we build large networks?  Introduction to the Network layer  Internetworks  Service.
TCP/IP TCP/IP architecture
Internet Control Protocols Savera Tanwir. Internet Control Protocols ICMP ARP RARP DHCP.
IP Suite© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
Chapter 5 The Network Layer.
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
Spring 2003CS 4611 Internetworking COS 461 Spring 2003.
CSE331: Introduction to Networks and Security Lecture 7 Fall 2002.
1 ELEN Lecture 13 LAN Bridges Routers, Switches, Gateways Network layer -IP Reading: 6.7,
Spring 2002CS 4611 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
CSCI-1680 Network Layer: IP & Forwarding Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
CS 6401 Efficient Addressing Outline Addressing Subnetting Supernetting.
26-Aug-154/598N: Computer Networks Recap SBC UUNET Comcast Sprint End Users Internet First mile problem Last mile problem.
TELE202 Lecture 10 Internet Protocols (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Internet Protocols (1) »Source: chapter 15 ¥This Lecture »Internet.
CS 6401 Internet Protocol Outline Introduction to Internet Protocol Header and address formats ICMP Tools.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
IP (Internet Protocol) –the network level protocol in the Internet. –Philosophy – minimum functionality in IP, smartness at the end system. –What does.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
TELE202 Lecture 9 Internet Protocols (1) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Congestion control »Source: chapter 12 ¥This Lecture »Internet.
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
13-Sep-154/598N: Computer Networks Address Translation Map IP addresses into physical addresses –destination host –next hop router Techniques –encode physical.
1 Introduction to Computer Networks University of Ilam By: Dr. Mozafar Bag-Mohammadi Internetworking.
Fall 2010CMSC 1501 Internetworking. Fall 2010CMSC 1502 Assumptions Data pipe from every machine to every other machine. –Need not be single link (and.
A Review of Evolving Network Technology Ethernet & IP J.J. Ekstrom March 2008.
Efficient Addressing Outline Addressing Subnetting Supernetting CS 640.
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.
TCOM 515 IP Routing. Syllabus Objectives IP header IP addresses, classes and subnetting Routing tables Routing decisions Directly connected routes Static.
1 IP : Internet Protocol Computer Network System Sirak Kaewjamnong.
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
Chapter 81 Internet Protocol (IP) Our greatest glory is not in never failing, but in rising up every time we fail. - Ralph Waldo Emerson.
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.
Fall, 2001CS 6401 Switching, Internet Protocol Outline Quiz 2 Solution Crossbar switch design Knockout switch design Introduction to Internet Protocol.
Spring 2010CS 3321 Chapter 4: Internetworking. Spring 2010CS 3322 Assumptions Data pipe from every machine to every other machine. –Need not be single.
CS 4396 Computer Networks Lab
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.
1 Introduction to Computer Networks University of Ilam By: Dr. Mozafar Bag-Mohammadi Internetworking.
Univ. of TehranComputer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
1 Chapter 4: Internetworking (Internet Protocol) Dr. Rocky K. C. Chang 16 March 2004.
1 Internetworking: IP Packet Switching Reading: (except Implementation; pp )
CSS432 Basic Internetworking Textbook Ch3.2
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
Basics of Computer Networks (cont.) CprE 592-YG Computer and Network Forensics Yong Guan 3216 Coover Tel: (515)
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
Packet Switch Network Server client IP Ether IPTCPData.
2002 년 2 학기인터넷통신망 년 2 학기. 인터넷통신망 2 Acknowledgement Some figures and texts are from: –Govindan –Kurose –Peterson & Davie –Huitema –Halabi –Retana,
Scaling the Network Chapters 3-4 Part 2
IP - The Internet Protocol
Scaling the Network: The Internet Protocol
IP - The Internet Protocol
CS 457 – Lecture 10 Internetworking and IP
IP - The Internet Protocol
Advanced Computer Networks
Internetworking Outline Best Effort Service Model
2. Fragmentation and Reassembly
Net 323 D: Networks Protocols
Chapter 15. Internet Protocol
IP - The Internet Protocol
Introduction to Computer Networks
Scaling the Network: The Internet Protocol
Introduction to Networks
ITIS 6167/8167: Network and Information Security
IP - The Internet Protocol
Presentation transcript:

Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Lecture 10: Internetworking

Univ. of TehranIntroduction to Computer Network2 Outline Internetworking Best Effort Service Model Segmentation and Reassembly (SAR) Global Addressing Scheme Packet forwarding.

Univ. of TehranIntroduction to Computer Network3 Internetworking Communication between networks, either directly connected or switched Problems: Different Networking technologies (Heterogeneity). So many Networks (Scaling). Surviving in case of failure. Different services etc., Some terminologies: “internetworking” refer to an arbitrary collection of connected networks. “Internet” the global internetwork.

Univ. of TehranIntroduction to Computer Network4 Goals of the DARPA project 0 Connect existing networks initially ARPANET and ARPA packet radio network 1. Survivability - ensure communication service even in the presence of network and router failures 2. Support multiple types of services 3. Must accommodate a variety of networks 4. Allow distributed management 5. Allow host attachment with a low level of effort 6. Allow resource accountability

Univ. of TehranIntroduction to Computer Network5 IP Internet Concatenation of Networks or “networks of Networks”. “R” is routers and “H” is hosts. R2 R1 H4 H5 H3 H2 H1 Network 2 (Ethernet) Network 1 (Ethernet) H6 Network 4 (point-to-point) H7R3H8 Network 3 (FDDI)

Univ. of TehranIntroduction to Computer Network6 IP Internet (cont) Protocol Stack Everything is running on top of IP, “IP over everything” R1 ETH FDDI IP IP ETH TCP R2 FDDI PPP IP R3 PPP ETH IP H1 IP ETH TCP H8

Univ. of TehranIntroduction to Computer Network7 Service Model Connectionless (datagram-based) Best-effort delivery (unreliable service) packets are lost. No recover from lost. packets are delivered out of order duplicate copies of a packet are delivered packets can be delayed for a long time Datagram format Version HLen TOS Length IdentFlagsOffset TTL ProtocolChecksum SourceAddr DestinationAddr Options (variable) Pad (variable) Data Contains all information for routing of a packet.

Univ. of TehranIntroduction to Computer Network8 Packet Headers  The current Version is 4 or IPv4.  HLen- the Header Length: from 5-15 in 32-bit words.  Length- the total length of the packet including headers. Max length is 64K.  TTL: Time To Live is expressed in second. It is to prevent packet from permanently circulating in a loop.  Protocol: specify the packet application ex. 1 for ICMP. It is for demultiplexing to higher layer protocols.  Checksum: is a 1-complement error checksum for the header only.

Univ. of TehranIntroduction to Computer Network9 Packet Headers (Cont) TOS: type of Service Precedence Specify the priority Type of Services Specify routing, for instance cheapest, fastest and more reliable D for Delay T for Throughput R for Reliability C for low cost. Note: Precedence is only for inside channel queuing. 0 2 | 3 7 Precedence Type of service DTRC

Univ. of TehranIntroduction to Computer Network10 Packet Headers (Cont) Options If C set, the option will copied to all fragments. Otherwise, only to the first one. Class 0 for control Class 2 for debugging and measurement. Options are rarely used in today except for ‘loose’ and ‘strict’ source routing parameters. ‘loose’ and ‘strict’ source option sometimes, is used for IP encapsulation in another IP or “Tunneling” CClassNumber

Univ. of TehranIntroduction to Computer Network11 Fragmentation and Reassembly 0 7|0 7|0 4 7|0 7 IdentificationFlagsFragment Offset 012 0DFMF  Flags  DF: Don’t Fragment  MF: More Fragment coming In fragmentation, IP copy the original header and only modify The length, which is the new length, and offset. Offset is used for reassembly.  Note: Fragmentation may degrade the network performance. That is why the IP packet should be the same of TCP packets Modern TCP implement “Path MTU discovery”. It start with large packet and with DF set flag, if it passed TCP keeps the same packet size, otherwise, it reduces it.

Univ. of TehranIntroduction to Computer Network12 Fragmentation and Reassembly (cont) Each network has a Maximum Transfer Unit size, MTU Strategy fragment when necessary (MTU < Datagram) try to avoid fragmentation at source host re-fragmentation is possible fragments are self-contained datagrams use CS-PDU (not cells) for ATM delay reassembly until destination host do not recover from lost fragments

Univ. of TehranIntroduction to Computer Network13 Example Packet delivery from host H1 to host H8 H1R1R2R3H8 ETHIP(1400)FDDIIP(1400)PPPIP(512) PPPIP(376) PPPIP(512) ETHIP(512) ETHIP(376) ETHIP(512)

Univ. of TehranIntroduction to Computer Network14 Example (cont) Ident = xOffset = 0 Start of header 0 Rest of header 1400 data bytes Ident = xOffset = 0 Start of header 1 Rest of header 512 data bytes Ident = x Offset = 512 Start of header 1 Rest of header 512 data bytes Ident = xOffset = 1024 Start of header 0 Rest of header 376 data bytes The packets are fragmented as:

Univ. of TehranIntroduction to Computer Network15 Addressing Each host in the network is identified by an address having the following property. globally unique hierarchical: network + host Address Classes Class D for Multicasting Class E for experiments Address Notation Network Host A: Network Host B: Network Host C:

Univ. of TehranIntroduction to Computer Network16 IP Addresses Example: Class “A” addresswww.mit.edu (18 Class A) Class “B” addressmekong.stanford.edu (128 Class C)

Univ. of TehranIntroduction to Computer Network17 Addressing in IP IP addresses are names of interfaces Domain Name System (DNS) names are names of hosts DNS binds host names to interfaces Routing binds interface names to paths

Univ. of TehranIntroduction to Computer Network18 How to assign IP Addresses? Manually Uniqueness Too much and tedious job Dynamically: use DHCP: Dynamic Host Configuration Protocol.

Univ. of TehranIntroduction to Computer Network19 Making a Forwarding Decision Class AClass BClass CD Class A Class B Class C Port 4 Exact Match Routing Table: IP Address Space

Univ. of TehranIntroduction to Computer Network20 Forwarding Datagrams Every datagram contains a destination address. “Network ID” uniquely identifies a physical network. All hosts and routers sharing a Network ID share same physical network.

Univ. of TehranIntroduction to Computer Network21 Forwarding an IP Router Lookup packet DA in forwarding table. –If known, forward to correct port. –If unknown, drop packet. Decrement TTL, update header Checksum. Forward packet to the outgoing interface. Transmit packet onto link.

Univ. of TehranIntroduction to Computer Network22 Address Translation Map IP addresses into physical addresses destination host next hop router Techniques encode physical address in host part of IP address table-based ARP table of IP to physical address bindings broadcast request if IP address not in table target machine responds with its physical address table entries are discarded if not refreshed

Univ. of TehranIntroduction to Computer Network23 ARP Details Request Format HardwareType: type of physical network (e.g., Ethernet) ProtocolType: type of higher layer protocol (e.g., IP) HLEN & PLEN: length of physical and protocol addresses Operation: request or response Source/Target-Physical/Protocol addresses Notes table entries timeout in about 10 minutes update table with source when you are the target update table if already have an entry do not refresh table entries upon reference

Univ. of TehranIntroduction to Computer Network24 ARP Packet Format TargetHardwareAddr (bytes 2–5) TargetProtocolAddr (bytes 0–3) SourceProtocolAddr (bytes 2 –3) Hardware type = 1ProtocolType = 0x0800 SourceHardwareAddr (bytes 4 –5) TargetHardwareAddr (bytes 0 –1) SourceProtocolAddr (bytes 0 –1) HLen = 48PLen = 32 Operation SourceHardwareAddr ( bytes 0 – 3) HLen = Hardware Address Length PLen = Protocol Address Length

Univ. of TehranIntroduction to Computer Network25 Internet Control Message Protocol (ICMP) Echo (ping) Redirect (from router to source host) Destination unreachable (protocol, port, or host) TTL exceeded (so datagrams don’t cycle forever) Checksum failed Reassembly failed Cannot fragment

Univ. of TehranIntroduction to Computer Network26 Tunneling Big companies having different networks want to connect them together. Virtual Private Network (VPN) Use leased line to connect networks. Use Internet (Shared line). Sloution Encapsulate packets in R1 in IP packets for destination R2. Network 1 Network 2 R1 R2 Internet Virtual line

Univ. of TehranIntroduction to Computer Network27 IP Address Problem (1991) Inefficient use of Hierarchical Address Space class C with 2 hosts (2/255 = 0.78% efficient) class B with 256 hosts (256/65535 = 0.39% efficient) Address space depletion In danger of running out of classes A and B Class C too small for most domains Very few class A – IANA (Internet Assigned Numbers Authority) very careful about giving Class B – greatest problem

Univ. of TehranIntroduction to Computer Network28 IP Address Utilization (‘98)

Univ. of TehranIntroduction to Computer Network29 Solutions for IP Address Better utilize address space Subnetting Supperneting Locally use unofficial IP addresses (NATing) Use wider IP addresses New version of IP, IPv6.

Univ. of TehranIntroduction to Computer Network30 Subnetting Add another level to address/routing hierarchy: subnet Subnet masks define variable partition of host part Subnets visible only within site Network number Host number Class B address Subnet mask ( ) Subnetted address Network numberHost IDSubnet ID

Univ. of TehranIntroduction to Computer Network31 Subnet Example Forwarding table at router R1 Subnet # Subnet Mask Next Hop interface interface R2 Subnet mask: Subnet number: H1 R Subnet mask: Subnet number: R2 H Subnet mask: Subnet number: H3 111….1.0xxx….x Net host Subnet

Univ. of TehranIntroduction to Computer Network32 Forwarding Algorithm D = destination IP address for each entry (SubnetNum, SubnetMask, NextHop) D1 = SubnetMask & D if D1 = SubnetNum if NextHop is an interface deliver datagram directly to D else deliver datagram to NextHop Use a default router if nothing matches Not necessary for all 1s in subnet mask to be contiguous Can put multiple subnets on one physical network Subnets not visible from the rest of the Internet

Univ. of TehranIntroduction to Computer Network33 Supernetting Assign block of contiguous network numbers to nearby networks Called CIDR: Classless Inter-Domain Routing Represent blocks with a single pair (first_network_address, count) Restrict block sizes to powers of 2 Use a bit mask (CIDR mask) to identify block size All routers must understand CIDR addressing

Univ. of TehranIntroduction to Computer Network34 Classless Addressing CIDR ABCD / /19 65/8 Classless: Class-based:

Univ. of TehranIntroduction to Computer Network35 Classless Addressing CIDR / / / / /24 Most specific route = “longest matching prefix”

Univ. of TehranIntroduction to Computer Network36 Forwarding Datagrams 128.9/ / / / / /19 65/8 PrefixPort Next-hop R1 R2 R3 R e.g => Port 1

Univ. of TehranIntroduction to Computer Network37 Default Routing R1 R2R3R4R5 Default Routing Requires Routing Table Default Routing

Univ. of TehranIntroduction to Computer Network38 Inside a Router Forwarding Decision Forwarding Decision Forwarding Decision Forwarding Table Forwarding Table Forwarding Table Interconnect Output Scheduling

Univ. of TehranIntroduction to Computer Network39 NAT: Network Address Translation IP addresses need to be unique when we are going outside of our network. We can use whatever IP address as long as we are functioning inside our own network. Translate to a valid IP address when going out. Do reverse when coming in.

Univ. of TehranComputer Network40 Mobile IP: Motivation Connectivity everywhere Overlapping, heterogeneous networks Small, portable devices Maintaining ongoing connections as the user moves Why maintain connectivity? Avoid restarting applications/networks Avoid losing “distributed state”

Problems? The IP address associated with a mobile host is network dependent! When user connects to another network, IP address needs to change Packets belonging to ongoing connections somehow need to be delivered to the mobile host Solutions? Any solution should be transparent

Intuitive Solution Take up the analogy of you moving from one apartment to another What do you do? Leave a forwarding address with your old post-office! The old post-office forwards mails to your new post-office, which then forwards them to you

Univ. of TehranComputer Network43 Basic Mobile IP MH = mobile host CH = correspondent host HA = home agent FA = foreign agent (We’ll see later that FA is not necessary or even desirable) MH registers new “care-of address” (FA) with HA HA tunnels packets to FA FA decapsulates packets and delivers them to MH HA CH Home network Foreign network FAMH

Univ. of TehranComputer Network44 Packet Tunneling Source address = address of CH Destination address = home IP address of MH Payload Source address = address of HA Destination address = care-of address of MH Source address = address of CH Destination address = home IP address of MH Original payload Packet from CH to MH Home agent intercepts above packet and tunnels it

Univ. of TehranComputer Network45 host moves again HA CH Home network Foreign network #1 FA #1MH Foreign network #2 FA #2MH MH registers new address (FA #2) with HA & FA #1 HA tunnels packets to FA #2, which delivers them to MH Packets in flight can be forwarded from FA #1 to FA #2

Univ. of TehranComputer Network46 Basic Mobile IP (cont) HA CH Home network Foreign network FAMH Mobile hosts also send packets Mobile host uses its home IP address as source address -Lower latency -Still transparent to correspondent host -No obvious need to encapsulate packet to CH This is called a “triangle route”

Univ. of TehranComputer Network47 Mobile IP (RFC 2002) Leaves Internet routing fabric unchanged Does assume “foreign Agent ” exist everywhere Simple Correspondent hosts don’t need to know about mobility Works both for changing domains and network interfaces

Univ. of TehranIntroduction to Computer Network48 IP Version 6 Features 128-bit addresses (classless) multicast real-time service authentication and security autoconfiguration Any cast address protocol extensions Header 40-byte “base” header extension headers (fixed order, mostly fixed length) No fragmentation source routing authentication and security other options

Univ. of TehranIntroduction to Computer Network49 IPV6: Packet format Next header: IP option and protocol fields in IPv4. If options (i.e. fragmentation) indicated by this field, otherwise, it is protocol fields. VersionTrafficClass FlowLabel PayloadLen NextHeaderHopLimit SourceAddr (16 bytes) DestinationAddr (16 bytes) Next header/ Data … …