Softpanorama
May the source be with you, but remember the KISS principle ;-)

Contents Bulletin Scripting in shell and Perl Network troubleshooting History Humor

Internet Layer of TCP/IP Protocol

(Adapted from Lecture notes for FDU students by Professor Nikolai Bezroukov)

News

Recommended Books Recommended Links RFCs Examples Classic Net tools
Internet Control Message Protocol (ICMP) Address types sniffers tcpdump snoop Solaris Networking Certification
Subnetting and VLSM Subnet Mask Cheat Sheet Link aggregation Trunking / Bonding Multiple Network Interfaces Address Resolution Protocol (ARP) IPv6
TCP/Protocol layers Transport Layer Application Layer  OSI Protocol Layers Humor Etc

Contents

Introduction

IP Datagram Header

IP Address Types

Receiving packets


Introduction

Internet protocol (IP) is implemented in most OSes like Solaris or windows in kernel. It is documented in RFC 791.  The Internet layer attempts to ensure that messages reach their destination system using the most efficient route. The Internet layer includes the Internet Protocol (IP) and Internet Control Message Protocol (ICMP).

Using a routing table, the Internet layer determines the next directly accessible node in route to the packet’s destination. This node is either the destination itself or the most immediate gateway to the destination.  In essence, the Internet layer is responsible for end to end (source to destination) packet delivery, whereas the data link layer is responsible for node to node (hop to hop) packet delivery.

The IP protocol  is responsible for fragmenting and routing data, while ICMP assists routing, and performs error detection and other network management tasks.

Internet Protocol (IP)

IP encapsulates data into IP datagrams, which in turn are encapsulated inside Network Interface layer frames.

IP datagrams are the basic units of information that are passed across a Transmission Control Protocol/Internet Protocol (TCP/IP) network. The datagram header contains information, such as the source IP address and the destination IP address. The header also contains information about which protocol will receive data from IP. These protocols are the User Datagram Protocol (UDP), the Transmission Control Protocol (TCP), and ICMP.

The IP implements two basic functions addressing (routing) of packets and  fragmentation of packets:

For the IP layer each internet datagram as an independent   entity unrelated to any other internet datagram.  There are no concepts of connections or logical circuits (virtual or otherwise) on this layer.  It uses  The uses four fields in the IP header to perform its functions:  Type of Service, Time to Live, Options, and Header Checksum. A time-to-live (TTL) field determines how many routers or hosts can process a datagram before the datagram must be discarded.

Application data must fit in the data portion of Ethernet frame (or other Network interface layer protocol) as defined by MTU.  If packet is larger it should be fragmented at the router.  On Solaris MTU of network interface can be seen by using  command ifconfig -a as a root.

ICMP

ICMP is a companion protocol to IP.  It enables systems to send control or error messages to other systems. Essentially ICMP is a communication protocol between IP protocol implementations on two connected systems.

Message types that are send include:

Additional details of ICMP protocol are provided on a separate page.


IP Datagram Header

An IP datagram is structured as whom below:
Version IHL TOS Total Length
Identification Flags Fragment Offset
TTL Protocol Header Checksum
Source IP Address
Destination IP Address
Options Padding

Payload (TCP/UDP/ICMP etc.)

The IPv4 datagram header fields.

Refer to RFC 791 for detailed information about the header fields.

IP Datagram Payload

The IP datagram payload can contain any one of the following: a UDP datagram, a TCP segment, an ICMP message, or an Internet Group Management Protocol (IGMP) message.

IP Address Types

IPv4 addresses are 32 bits in length. Each 8-bit field, or octet, is represented by a decimal number between 0 and 255 (for example, 129.150.182.31).

Each IPv4 address identifies a network and a unique interface on that network. The value of the high-order bits (first three bits) determine which portion of the IPv4 address is the network number and which portion is the host number. The network numbers are divided into three classes: Class A, Class B, and Class C. This addressing scheme is called classful IPv4 addressing.

Unicast Addresses

A system uses unicast addresses when it needs to communicate with another system. There are three classes of unicast addresses: Class A,  Class B, and Class C.


Broadcast Addresses

A broadcast address is the address that reaches all systems on the network. A broadcast means that data is simultaneously sent to all of the hosts on the local area network (LAN). The default broadcast address is an address that has a host number of all ones when represented in binary. An example of a broadcast address is 128.50.255.255. You use the ifconfig utility to configure an interface’s broadcast address.

This is similar to MAC broadcasts, in which a special address with all 1s is used for broadcast purposes (FF:FF:FF:FF:FF). In a similar manner, if all bits in the host part of the IP address are 1, it is considered a broadcast address. If you use the rightmost octet for host addressing and the remaining three octets for the network part, for example, all 1s in the rightmost octet will make this address a broadcast address. In network 192.168.2.0, the broadcast address is 192.168.2.255. If you use the two rightmost octets for the host part of the IP address, the netmask will be 255.255.0.0. If a host has an IP address 172.16.20.100 with a netmask 255.255.0.0, the network address will be 172.16.0.0 and the broadcast address will be 172.16.255.255.

Address 255.255.255.255 is a special type of broadcast, and any packet sent to this address is received by all hosts on a network. However, routers usually don't forward broadcast IP packets to avoid flooding the Internet (commonly known as a denial of service, DoS, attack).

Multicast Addresses

Multicasting is a very efficient way to send large amounts of data to many systems at the same time. A multicast address identifies interfaces that belong to a specific multicast group. Packets that are sent to a multicast address are received by all interfaces that are associated with the multicast address.

If the first four bits are 1110, which makes the first field an integer value between 224 and 239, the address is a multicast address. The remaining 28 bits comprise a group identification number for a specific multicast group. An IPv4 multicast address is a destination address for one or more hosts, while a Class A, B, or C address is an address for an individual host. The IPv4 multicast address maps to an Ethernet multicast address so that the network interface listens for a multicast traffic. The low-order 23 bits of the IPv4 multicast address are placed into the low-order 23 bits of the Ethernet multicast address. Therefore, an IPv4 multicast address of

224.0.0.1 maps to 01:00:5e:00:00:01.

Receiving packets

When the Internet  layer of any host receives an IP packet,  it compares the destination IP address with its own IP address. If the destination address is not the host's own IP address or a broadcast address, the IP layer discards it.

Recommended Links

Softpanorama Top Visited

Softpanorama Recommended

Network layer - Wikipedia, the free encyclopedia

Examples

From Wikipedia




Etc

Society

Groupthink : Understanding Micromanagers and Control Freaks : Toxic Managers : BureaucraciesHarvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Two Party System as Polyarchy : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

Skeptical Finance : John Kenneth Galbraith : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Oscar Wilde : Talleyrand : Somerset Maugham : War and Peace : Marcus Aurelius : Eric Hoffer : Kurt Vonnegut : Otto Von Bismarck : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Oscar Wilde : Bernard Shaw : Mark Twain Quotes

Bulletin:

Vol 26, No.1 (January, 2013) Object-Oriented Cult : Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks: The efficient markets hypothesis : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

 

The Last but not Least


Copyright © 1996-2014 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine. This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to make a contribution, supporting hosting of this site with different providers to distribute and speed up access. Currently there are two functional mirrors: softpanorama.info (the fastest) and softpanorama.net.

Disclaimer:

The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last Modified: February 24, 2014