Basics of Computer Networks (cont.) CprE 592-YG Computer and Network Forensics Yong Guan 3216 Coover Tel: (515) 294-8378

Slides:



Advertisements
Similar presentations
CSE 461: IP/ICMP and the Network Layer. Next Topic  Focus:  How do we build large networks?  Introduction to the Network layer  Internetworks  Service.
Advertisements

TCP/IP TCP/IP architecture
Internet Control Protocols Savera Tanwir. Internet Control Protocols ICMP ARP RARP DHCP.
4: Network Layer4a-1 IP Addressing: introduction r IP address: 32-bit identifier for host, router interface r interface: connection between host, router.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
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.
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.
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
11- IP Network Layer4-1. Network Layer4-2 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection.
Spring 2003CS 4611 Internetworking COS 461 Spring 2003.
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.
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,
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,
Internet Command Message Protocol (ICMP) CS-431 Dick Steflik.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Chapter 4 Queuing, Datagrams, and Addressing
IP Routing, Format, Fragmentation Chapters 20-21, 23.
26-Aug-154/598N: Computer Networks Recap SBC UUNET Comcast Sprint End Users Internet First mile problem Last mile problem.
Computer Networks The Network Layer
CS 6401 Internet Protocol Outline Introduction to Internet Protocol Header and address formats ICMP Tools.
4: Network Layer4a-1 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time.
Network Layer4-1 NAT: Network Address Translation local network (e.g., home network) /24 rest of.
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
© 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.
IP tutorial – #1 KAIST Dept. of CS NC Lab..
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_a
Internet Control Message Protocol (ICMP). Objective l IP and ICMP l Why need ICMP? l ICMP Message Format l ICMP fields l Examples: »Ping »Traceroute.
1 Introduction to Computer Networks University of Ilam By: Dr. Mozafar Bag-Mohammadi Internetworking.
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.
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.
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.
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 16 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.
Spring 2010CS 3321 Chapter 4: Internetworking. Spring 2010CS 3322 Assumptions Data pipe from every machine to every other machine. –Need not be single.
Network Layer4-1 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol.
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.
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.
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.
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.
IP Internet Protocol. IP TCP UDP ICMPIGMP ARP PPP Ethernet.
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,
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
Introduction to Networks
Computer Communication Networks
Scaling the Network: The Internet Protocol
IP - The Internet Protocol
CS 457 – Lecture 10 Internetworking and IP
IP : Internet Protocol Surasak Sanguanpong
Internetworking Outline Best Effort Service Model
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
Scaling the Network: The Internet Protocol
ECSE-4670: Computer Communication Networks (CCN)
32 bit destination IP address
Presentation transcript:

Basics of Computer Networks (cont.) CprE 592-YG Computer and Network Forensics Yong Guan 3216 Coover Tel: (515) September 4, 2003

2 Internetworking and the Internet Protocol (IP)

3 Network Layer Functions  Network Layer Objectives  Transport (switch) packet from sending to receiving hosts  Network layer protocols in every host, router  Three Necessary Functions  Path Compuation: route taken by packets from source to dest. “Routing” algorithms  Switching: move packets from router’s input to appropriate router output  Call Setup: some network architectures require router call setup along path before data flows

4 Network Service Model Q: What service model for “channel” transporting packets from sender to receiver?  guaranteed bandwidth?  preservation of inter-packet timing (no jitter)?  loss-free delivery?  in-order delivery?  congestion feedback to sender?  Virtual Circuit vs. Datagram service t0t0 t1t1 Network

5 IP (Inter-networking) Protocol Challenges at Network Layer for Internetworks Service Models –Best Effort Service Model –Global Addressing Scheme Internetworking is the effective communication among users in different networks –Heterogeneity in networking technologies; –Applications should work on different types of networks and internetworks; –Internetworks should be scalable and leverage economies of scale.

6 Challenge 1: Different Address Formats Provide one common format  map lower level addresses to a common format IPv4 address format: 32 bit length, hierarchical organization Network Host0 Network Host1 Network Host Class A Class B Class C Class D0Multicast address 111Class E1Unused0 27

7 Challenge 2: Different Packet Sizes Define a maximum packet size over all networks. Why not? Implement fragmentation/re-assembly -who is doing fragmentation? -who is doing re-assembly?

8 Other Challenges Errors  require end-to-end reliability -Add a transport layer on top of IP Different (routing) protocols  coordinate these protocols

9 IP Internets Concatenation of Networks Protocol Stack R2 R1 H4 H5 H3 H2 H1 Network 1 (Ethernet) H6 Network 3 (FDDI) Network 4 (point-to-point) H7 R3 H8 Network 2 (Ethernet) ETH FDDI IP ETH TCP FDDI PPP IP PPP ETH IP ETH TCP H1 H8 R2 R1 R3

10 Application Transport Internet Network Interface Application Transport Internet Network 1 Network 2 Machine A Machine B Router/Gateway Network Interface Network Layer on End-Points and Routers Routers (“gateways”)

11 Application TCP UDP IPICMPARPRARP Physical Network Application Network Layer IP Related Protocols

12 TCP/IP – Headers IP header  used by IP (Network Layer) for IP routing, fragmentation, error detection, etc. UDP header  used by UDP (Transport Layer) for multiplexing/demultiplexing, data error detection TCP header  used by TCP (Transport Layer) for multiplexing/demultiplexing, flow and congestion control IP TCP UDP dataTCP/UDP dataTCP/UDP IP Application Sender data IP TCP UDP Application Receiver dataTCP/UDP dataTCP/UDP IP data

13 The Internet Network Layer Host / Router network layer functions: Routing Table Routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting router “signaling” Transport Layer: TCP, UDP, OSFP, etc. Link Layer physical Layer Network Layer

14 IPv4 Service Model IPv4 [RFC 791] Datagram-switching: Connectionless model. Best-effort delivery: Unreliable service –packets can get lost –packets can be delivered out of order –duplicate copies of a packet are delivered –packets can be delayed for a long time Datagram format –64KB maximum size –IP Header (20B min) Current version IPv4 IPv6 is next generation IP All vendors support it –IP datagram data payload Version HLen TOSLength IdentFlagsOffset TTLProtocolChecksum SourceAddr DestinationAddr Options (variable/optional) Pad (variable) Data

15 Version IHL Type of Service Total Length Identification Flags Fragment Offset Time to Live Protocol Header Checksum Source IP Address Destination IP Address Options Padding IP Datagram Format: IP Header IP Header  HLen – header length in 32-bit words (5  HLen  15) -TOS (Type of Service): Reliability, Latency, Throughput. Now split in Differentiated Service (DS) Field (6 bits) other two bits used by ECN (Early Congestion Notification) -Length – the length of the entire datagram/segment; header + data -Flags: Don’t Fragment (DF); More Fragments (MF) -Fragment Offset – all fragments excepting last one contain multiples of 8 bytes -Header Checksum - uses 1’s complement (IP Checksum) Max Size = 64KB

16 IP Datagram Format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time to live 32 bit source IP address header length (words) Time-to-Leave max number remaining hops (decremented at each router) fragmentation / reassembly minimum fragment size = 576 total datagram length (bytes) Upper layer protocol to deliver payload to ICMP=1, TCP=6, UDP=17, OSPF=89, etc. head. len type of service Type of Service flgs fragment offset upper layer 32 bit destination IP address Options (if any) Options timestamp, record route taken, specify list of routers to visit, etc. IP protocol version number

17 IP Datagram Format: IP Header Fields IPversion [0.0..3] – –4 = current, 6 = next generation IP “IPng” or IPv6, 5 = ST2 (a Real-Time stream protocol) Header Length [0.4..7] – in 32bit words Type of Service [ ] – (preferences 4b, priorities 3b): –min delay, min $cost, max throughput, max reliability; –most routers ignore ToS; OSPF can use it; –DiffServ uses it as differentiated Service (DS) Field (6 bits) other two bits used by ECN (Early Congestion Notification). Total Length [ ] – in bytes  2 16 Id, Flags, Offset [ ] – used in fragmentation Time To Live (TTL) [2.0..7] – maximum number of hops DG can be forwarded.

18 IP Datagram Format: IP Header Fields Protocol [ ] – the Transport Layer user of this DG: –ICMP = 1, TCP = 6, UDP = 17, OSFP = 89, etc. Header Checksum [ ] – “IP Checksum” over the IP header fields [RFC 1071, RFC 1141] Source IP [ ] / Destination IP[ ] Addresses – –IP numbers of sending and receiving hosts Options [Variable Length] – Optional fields, requesting particular handling of current IP DG. –they complicate processing per IP DG in routers. –IPv6 allows more efficient handling of options via “extension headers”

19 Fragmentation and Reassembly Each network has some MTU –Maximum Transmission Unit (MTU) maximum packet size that can be carried by a L2 link. Path MTU := min i { MTU i } IP Strategy: –fragment when necessary (if MTU < Datagram); avoid fragmentation at source host –re-fragmentation is possible (if MTU < Fragment) –fragments are self-contained datagrams –delay reassembly until destination host –do not recover from lost fragments –ATM: use CS-PDU (not ATM cells) IP Router Networ k Source Destination IP MTU-1 MTU-2 Message

20 Fragmentation and Reassembly Example H1R1 ETHIP(1400)FDDIIP(1400)PPPIP(512) PPPIP(376) PPPIP(512) ETHIP(512) ETHIP(376) ETHIP(512) H8 R2 R3 Ident = x Offset=0 Start of header 0 Rest of header 1400 data bytes Ident = x Offset=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 Maximum Transmission Units DLLMTU (Bytes) 802.3/ Ethernet1492 FDDI (4/16)4464/17914 X PPP296 Hyperchannel65535

21 IP Addressing: Introduction IP Address: a unique 32-bit identifier for host, router interface Interface (i/f): connection between host / router and physical link –routers typically have multiple interfaces –host may have multiple interfaces –IP addresses associated with interface, not host or router =

22 IP Addressing IP Address: (Network, Host) –network part (high order bits) –host part (low order bits) What’s a network ? (from IP address perspective) –device interfaces with same network part of IP address –can physically reach each other without intervening router network consisting of 3 IP networks (for IP addresses starting with 223, first 24 bits are network address) LAN

23 IP: Global Addresses Properties –globally unique, meaningful to IP layer; –hierarchical: network + host Five classes of IP addresses “Classful Addressing” 0 Net IDHost ID Net IDHost ID 1 0 Net IDHost ID Multicast Address 1 1 Reserved for experiments Class A Class B Class C Class D Class E Bit position:

24 IP Addressing How to find the networks? Detach each interface from router, host Create “islands” of isolated networks Interconnected system consisting of six networks

25 IP Datagram: E A B misc fields source IP addr dest IP addr data Datagram remains unchanged, as it travels source to destination Addr fields of interest here Dest. Net. next router Nhops routing table in A Getting a Datagram from Source to Dest

26 Getting a Datagram from Source to Dest 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 Dest. Net. next router Nhops E A B misc fields data

27 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 link layer sends datagram to router inside link-layer frame datagram arrives at continued….. Getting a Datagram from Source to Dest E A B Dest. Net. next router Nhops misc fields data

28 Arriving at , destined for look up network address of E E on same network as router’s interface –router, E directly attached link layer sends datagram to inside link-layer frame via interface datagram arrives at !!! (hooray!) network router Nhops interface Dest. next Getting a Datagram from Source to Dest E A B misc fields data

29 Subnetting Add another level to address/routing hierarchy: subnet Subnet masks define variable partition of host part Subnets visible only within site Network numberHost number Class B address Subnet mask ( ) Subnetted address Network numberHost IDSubnet ID Original address Net IDHost ID 1 0 Subnetted address Net IDHost ID 1 0 Subnet ID Figure 8.6

30 IP Datagram Forwarding Algorithm D = destination IP address ; for each entry ( SubnetNum, SubnetMask, NextHop ) do D1 = SubnetMask & D ; if ( D1 = SubnetNum ) then if ( NextHop is an interface ) then deliver datagram directly to D ; else deliver datagram to NextHop ; Note: –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

31 ARP Address Translation DLL requires L2 (MAC/hw) address to use for DA in the L2 frame. IP does not know L2 addresses. Mechanism to map IP (32b) numbers  physical addresses (48b) –destination host –next hop router Approaches –encode physical address in host part of IP address ; –table-based.

32 H1H2H3H4 H1: ARP request “what is the MAC address of ”? H1H2H3H4 H3: ARP response “My MAC address is A-C5-3B-94” Figure 8.8 ARP Protocol ARP [RFC 826] –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 ARP Request and Response cycle

33 ARP Details arp -a UNIX command for ARP cache 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 RARP “Reverse ARP” [RFC 903] – What is the IP number of an interface with this h/w address? –Used to obtain IP numbers dynamically (BOOTP) from RARP server

34 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 = 32Operation SourceHardwareAddr (bytes 0–3) –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

35 Internet Control Message Protocol (ICMP) ICMP [RFC 792] is a “sibling” protocol with IP and it is used by hosts, routers, gateways to communicate network-level information among each other. ICMP is a Request / Reply protocol. Services: –ECHO Request / Reply ( ping ) –Timestamp Request / Reply ( ping ) –Redirect (from router to source host) –Destination unreachable (protocol, port, or host) –TTL exceeded (stop datagram endless “cycling”) –Checksum failed –Reassembly failed –Cannot fragment

36 ICMP: Internet Control Message Protocol ICMP is used by hosts, routers, gateways to communicate network-level information –error reporting: unreachable host, network, port, protocol –echo request/reply (used by ping) network-layer “above” IP: –ICMP msgs carried in IP datagrams ICMP message: type, code plus first 8 bytes of IP datagram causing error ping traceroute Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 5 x redirects 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header 13 0 timestamp request, addrmask request, +

37 Commands arp -a –The arp cache of the host; can also map IP name  IP number ifconfig -a –Lists all the interfaces of a host netstat –Very powerful command, with many parameters traceroute / ping –trace route and report RTTs from intermediate routers

38 Any Questions? See you next time.