Lecture 21: Network Primer 7/9/2003 CSCE 590 Summer 2003.

Slides:



Advertisements
Similar presentations
Network and Application Attacks Contributed by- Chandra Prakash Suryawanshi CISSP, CEH, SANS-GSEC, CISA, ISO 27001LI, BS 25999LA, ERM (ISB) June 2006.
Advertisements

CSCI 4550/8556 Computer Networks Comer, Chapter 23: An Error Reporting Mechanism (ICMP)
Network Layer Packet Forwarding IS250 Spring 2010
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Internet Control Message Protocol (ICMP)
1 TDC TDC 365 Network Interconnections Technologies Lecture #4 Notes Spring, 2009.
The Network Layer Chapter 5. The IP Protocol The IPv4 (Internet Protocol) header.
Internet Control Message Protocol (ICMP). Introduction The Internet Protocol (IP) is used for host-to-host datagram service in a system of interconnected.
Chapter 5 The Network Layer.
Internet Control Message Protocol (ICMP)
1 CCNA 2 v3.1 Module 8. 2 TCP/IP Suite Error and Control Messages CCNA 2 Module 8.
Internet Command Message Protocol (ICMP) CS-431 Dick Steflik.
1 K. Salah Module 5.3: Internet Control Message Protocol Why need ICMP? IP and ICMP ICMP Message Format ICMP Error Reporting messages ICMP Query messages.
1 Internet Control Message Protocol (ICMP) RIZWAN REHMAN CCS, DU.
CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College
ITIS 6167/8167: Network Security Weichao Wang. 2 Contents ICMP protocol and attacks UDP protocol and attacks TCP protocol and attacks.
1 CMPT 471 Networking II ICMP © Janice Regan, 2012.
TCP/IP Protocol Suite 1 Chapter 9 Upon completion you will be able to: Internet Control Message Protocol Be familiar with the ICMP message format Know.
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.
Internet Control Message Protocol ICMP. ICMP has two major purposes: –To report erroneous conditions –To diagnose network problems ICMP has two major.
Petrozavodsk State University, Alex Moschevikin, 2003NET TECHNOLOGIES Internet Control Message Protocol ICMP author -- J. Postel, September The purpose.
Guide to TCP/IP, Third Edition
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.
ICMP : Internet Control Message Protocol. Introduction ICMP is often considered part of the IP layer. It communicates error messages and other conditions.
1 Version 3.1 modified by Brierley Module 8 TCP/IP Suite Error and Control Messages.
Page 19/13/2015 Chapter 8 Some conditions that must be met for host to host communication over an internetwork: a default gateway must be properly configured.
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
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.
TCOM 515 IP Routing Lab Lecture 1. Class information Instructor: Wei Wu –Lecture and Lab session 2 – Instructor:
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 2 Module 8 TCP/IP Suite Error and Control Messages.
CCNA 2 Week 8 TCP/IP Suite Error Control Messages.
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.
Hour 4 The Internet Layer 1. What You'll Learn in This Hour: IP addresses The IP header ARP ICMP 2.
© Jörg Liebeherr (modified by M. Veeraraghavan) 1 ICMP: A helper protocol to IP The Internet Control Message Protocol (ICMP) is the protocol used for error.
TCOM 515 IP Routing. Syllabus Objectives IP header IP addresses, classes and subnetting Routing tables Routing decisions Directly connected routes Static.
1 Internet Control Message Protocol (ICMP) Used to send error and control messages. It is a necessary part of the TCP/IP suite. It is above the IP module.
CS4550 Computer Networks II IP : internet protocol, part 2 : packet formats, routing, routing tables, ICMP read feit chapter 6.
Internet Protocols. Address Resolution IP Addresses are not recognized by hardware. If we know the IP address of a host, how do we find out the hardware.
1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology.
4: Network Layer4a-1 13: Intro to IP and ICMP Last Modified: 11/9/2015 7:16:06 PM.
Error and Control An IP datagram travels from node to node on the way to its destination Each router operates autonomously Failures or problems may occur.
Chapter 23 Internet Control Message Protocol used to report information and errors IP uses ICMP when it sends an error message ICMP uses IP to transport.
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.
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
Cisco 2 - Routers Perrine. J Page 112/19/2015 Chapter 8 TCP/IP Error Message Some of the conditions that must be met in order for host to host communication.
ICMPv6 Error Message Types Informational Message Types.
1 Chapter 4: Internetworking (Internet Protocol) Dr. Rocky K. C. Chang 16 March 2004.
© Jörg Liebeherr (modified by M. Veeraraghavan) 1 ICMP The PING Tool Traceroute program IGMP.
Packet Switch Network Server client IP Ether IPTCPData.
CCNA 2 Router and Routing Basics Module 8 TCP/IP Suite Error and Control Messages.
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Dr. Richard Spillman Fall 2006
Internet Control Message Protocol (ICMP)
21-2 ICMP(Internet control message protocol)
Chapter 9 ICMP.
Error and Control Messages in the Internet Protocol
Byungchul Park ICMP & ICMPv DPNM Lab. Byungchul Park
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
ITIS 6167/8167: Network Security
Advanced Computer Networks
Internet Control Message Protocol (ICMP)
Internet Control Message Protocol (ICMP)
Internetworking Outline Best Effort Service Model
Internet Control Message Protocol
Fred Kuhns Applied Research Laboratory
32 bit destination IP address
Presentation transcript:

Lecture 21: Network Primer 7/9/2003 CSCE 590 Summer 2003

IP Header Total Length in Bytes Fragment Offset (13 bits) Header Checksum IP Identification Number (Frag ID) Source IP Address Destination IP Address TTLIP Protocol Type of ServiceVersion Options (Variable Length 0-40 bytes, padded with 0’s) R DFDF MFMF Hdr Len

IP Header Fields: TTL TTL: Time To Live, 8 bits, maximum number of hops a packet can take. –Each router along the way decrements it –If it reaches zero, that router returns an ICMP time- exceeded packet to the source –This keeps lost and looping packets from wandering the Internet forever Can be used for evasion and reconnaissance –Insert a packet with a TTL that expires into a stream to break up signature an IDS may see, but it times out before it ever gets to the host

TTL Example 10/01-12:45: :1310 -> :80 TCP TTL:111 TOS:0x0 ID:51149 IpLen:20 DgmLen:48 DF ******S* Seq: 0xDAE61E12 Ack: 0x0 Win: 0x4000 TcpLen: 28 TCP Options (4) => MSS: 1460 NOP NOP SackOK =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= 10/01-12:45: :1310 -> :80 TCP TTL:109 TOS:0x0 ID:51149 IpLen:20 DgmLen:48 DF ******S* Seq: 0xDAE61E12 Ack: 0x0 Win: 0x4000 TcpLen: 28 TCP Options (4) => MSS: 1460 NOP NOP SackOK =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= 10/01-12:45: :1310 -> :80 TCP TTL:107 TOS:0x0 ID:51149 IpLen:20 DgmLen:48 DF ******S* Seq: 0xDAE61E12 Ack: 0x0 Win: 0x4000 TcpLen: 28 TCP Options (4) => MSS: 1460 NOP NOP SackOK =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= 10/01-12:45: :1310 -> :80 TCP TTL:105 TOS:0x0 ID:51149 IpLen:20 DgmLen:48 DF ******S* Seq: 0xDAE61E12 Ack: 0x0 Win: 0x4000 TcpLen: 28 TCP Options (4) => MSS: 1460 NOP NOP SackOK

TTL Example 10/01-12:45: :1310 -> :80 TCP TTL:3 TOS:0x0 ID:51149 IpLen:20 DgmLen:48 DF ******S* Seq: 0xDAE61E12 Ack: 0x0 Win: 0x4000 TcpLen: 28 TCP Options (4) => MSS: 1460 NOP NOP SackOK =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= 10/01-12:45: :1310 -> :80 TCP TTL:1 TOS:0x0 ID:51149 IpLen:20 DgmLen:48 DF ******S* Seq: 0xDAE61E12 Ack: 0x0 Win: 0x4000 TcpLen: 28 TCP Options (4) => MSS: 1460 NOP NOP SackOK =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= 10/01-12:45: :1310 -> :80 TCP TTL:111 TOS:0x0 ID:51332 IpLen:20 DgmLen:48 DF ******S* Seq: 0xDAE61E12 Ack: 0x0 Win: 0x4000 TcpLen: 28 TCP Options (4) => MSS: 1460 NOP NOP SackOK =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= 10/01-12:45: :1310 -> :80 TCP TTL:109 TOS:0x0 ID:51332 IpLen:20 DgmLen:48 DF ******S* Seq: 0xDAE61E12 Ack: 0x0 Win: 0x4000 TcpLen: 28 TCP Options (4) => MSS: 1460 NOP NOP SackOK

IP Header Fields IP Protocol: 8 bits, what type of header follow the IP header (which IP protocol is being used) –ICMP = 1 –TCP = 6 –UDP = 17 –And others Header Checksum: 16 bits, checksum of the IP header

IP Header Fields: Addresses Source IP address: 32 bits, IP address of the sending system – can be spoofed (faked) Destination IP address: 32 bits, IP address of the destination machine Addresses typically represented in dotted decimal notation –A decimal number between for each byte of the 4 byte address –0 and 255 are broadcast addresses (0 is legacy) –Ex:

IP Addressing Classes of addresses –Splits an address into a network ID and a host ID –Class A: (24 bits for the host ID) >16 million hosts > –Class B: (16 bits for the host ID) hosts, > –Class C: (8 bits for the host ID) 255 hosts, – USC has a Class B network –Network ID = –Host IDs range from >

Network Masks We don’t want to just enumerate all of the hosts of Use netmasks (subnet masks) to carve it up into smaller networks Netmasks tell hosts how much of the address to mask off as the Network ID –Ex = first 24 bits are 1s. Given , it masks off and leaves the last byte for host Ids between (really 1-254)

Variable Length Network Masks Common masks are 16 ( ) and 24 ( ) bits Variable length masks are like 25 bits = and splits a Class C in half. –For a network ID of /25, addresses range from Broadcast addresses = and –The other half is represented /25 and addresses range from Broadcast addresses = and The more you split it, the more addresses you lose to broadcast and network addresses.

Directed Broadcasts Ping either the network (.0) or broadcast address (.255) and a router amplifies (broadcasts) the ping out to every machine on that network –Pinging will send a ping to all the hosts in –This capability should be turned off on routers Smurf (ICMP) –Spoof your source address to be your victims address, send an ICMP echo request to a bunch of broadcast addresses, and the victim is flooded with the echo replies Fraggle (UDP) –Same idea, but with UDP port 7 (echo port)

IP Header Fields: Options Rarely used –Security - IPSec –Stream identification –Internet Timestamp (records timestamp at each hop) –Record Route –Loose Source Routing –Strict Source Routing

IP Route Options Codes: –0x07 = Record Route Option –0x83 = Loose Source Routing –0x89 = Strict Source Routing Length = determone # of IP addresses in list Pointer (ptr) = pointer to current IP address in option list codelengthptrIP address 1IP address 2…IP address 5

Record Route Option Like a one packet traceroute except it really does say the route it took Records addresses of all routers packet travels through Source must set the option, and destination must process the list to extract the data Source makes an empty list of IP addresses, so it must allocated enough space for the entire path Could be used for reconnaissance

Loose Source Routing Gives a list of required nodes a packet must travel through in its route It is loose because it can go through other nodes than the ones in the list Example: Loose Source Route through 4.

Strict Source Routing Specifies the exact path a packet must go for up to the first 9 hops It is strict because it must go through this path or not at all. Ex: Strict Source Route through 1,4,3

Source Routing Bad? Could redirect packets to an eavesdroppers machine Could be used to bypass ACL (Access Control Lists), firewalls, or IDSs

Internet Control Message Protocol ICMP used to relay problems and for testing No port number like TCP or UDP Message Types and Codes instead No concept of client or server (no ICMP services listening on a machine) Like UDP, delivery isn’t guaranteed Most ICMP messages do not expect a response Broadcast ICMP traffic possible

ICMP Queries Ping –Echo Request (8,0) (type,code) –Echo Reply (0,0) Timestamp –Timestamp request (13,0) –Timestamp reply (14,0) Information: Obsoleted by bootp, RARP, DHCP –Information Request (15,0) –Information Reply (16,0) Address Mask –Address Mask Request (17,0) –Address Mask Reply (18,0)

ICMP Error Messages Destination Unreachables (Type 3) –Network Unreachable (Code 0) – routers return this when a machine tries to access a network that isn’t available –Host Unreachable (Code 1) - routers return this when a machine tries to access a host that isn’t available –Protocol Unreachable (Code 2) – host can return this when a remote machine tries to access a protocol that isn’t active –Port Unreachable (Code 3) - host can return this when a remote machine tries to access a port that isn’t active –Fragmentation Required, DF flag set (Code 4) – router sends this when fragmentation is needed and DF bit is set

ICMP Error Messages More Destination Unreachables (Type 3) –Source Route Failed (Code 5) - router sends this router when a packet can’t be forwarded to the next hop specified in the its Source Route option –Destination Network Unknown (Code 6) - Should use Network Unreachable instead –Destination Host Unknown (Code 7) – if router can verify destination host does not exist, else use Host Unreachable –Source Host Isolated (Code 8) – Use Network Unreachable or Host Unreachable instead

ICMP Error Messages More Destination Unreachables (Type 3) –Network Administratively Prohibited (Code 9) – routers, firewalls may send if packets aren’t allowed to that network –Host Administratively Prohibited (Code 10) – routers, firewalls may send if packets aren’t allowed to that host –Network Unreachable for TOS (Code 11) – if route to a destination network is not available for the Type of Service specified in packet –Host Unreachable for TOS (Code 12) - if route to the destination host is not available for the Type of Service specified in the packet –Communication Administratively Prohibited (Code 13) - routers, firewalls may (optional) send if packets aren’t allowed by filtering policy

ICMP Error Messages Source Quench (4,0) – If a router or host does not have enough resources to handle packets, sends this to get sender to back off a bit Time Exceeded (Type 11) –Time to Live Exceeded in Transit (Code 0) – the TTL field has reached zero –Fragment Reassembly Time Exceeded (Code 1) – took too long getting all fragments Parameter Problem (Type 12) - problem with the parameters of a packet header –Pointer Indicates the Error (Code 0) – pointer to problem byte –Missing a Required Option (Type 1) –Bad Length (Type 2)

ICMP Error Messages Redirect (type 5) –Redirect Datagram for the Network (Code 0) –Redirect Datagram for the Host (Code 1) –Redirect Datagram for the TOS & Network (Code 2) –Redirect Datagram for the TOS & Host (Code 3) A router receives a packet from a host and it identifies from its routing tables that the next hop to the packet’s destination is on the same network that the packet just came from, then a redirect message is sent to the source host –Router forwards packet to the correct next hop –When source gets the redirect, it modifies its route table accordingly

ICMP Routing Router Advertisement (9,0) – routers can advertise their interfaces for hosts updating their route tables dynamically Router Solicitation (10,0) – hosts broadcasting, looking for routers on their subnet

ICMP Header Message Type Checksum Message Code

References Chapter 6