Computer Networks - Topic 6B: Network Layer: IP Fundamentals, IP Addressing, IPv4, IPv6
Why IP Fundamentals, IP Addressing, IPv4, IPv6?
The Internet Protocol (IP) is the basis of the Internet and central to how it functions, enabling seamless data transfer across global distances and disparate networks. Understanding IP is essential.
Key functional aspects of contemporary networks depend on the operation of IP and the routing functions it enables.
Designing and coding any networked application requires an understanding of the function and especially addressing schemes used by IP
Managing any network requires an understanding of the function and especially addressing schemes used by IP
OSI Context
The OSI model is a conceptual model that describes the functions of a networking system. It's characterized by layers:
Application
Presentation
Session
Transport
Network
Data Link
Physical
The TCP/IP model is a practical implementation of the OSI model, collapsed into fewer layers:
Application
Transport
Internet
Link
Physical
The IEEE 802 reference model focuses on the Data Link layer, further dividing it into:
Logical Link Control (LLC)
Medium Access Control (MAC)
Internet Protocol Fundamentals
The Internet Protocol (IP) was designed to:
Permit traffic to be routed across a multiplicity of different networks each using their own and possibly dissimilar or disparate datalink protocols, each with their own addressing schemes, limits on packet sizes and unique flow and error control schemes
Operate across a global network regardless of the underlying datalink protocols and their specific MAC layer addressing schemes
Operate with a network of routing nodes that receive, store and forward packets to other routing nodes over datalink channels between these nodes – the earliest “routers” were general purpose computers with routing software and datalink interface hardware installed, later dedicated router devices were developed
Permit fragmentation and defragmentation of incoming packets produced by higher layer protocols. The ability to operate across datalink channels, hop by hop, with disparate frame/packet sizes.
Top 10 principles
Make sure it works
Keep it simple
Make clear choices
Exploit modularity
Expect heterogeneity
Avoid static options and parameters
Look for a good design; it need not be perfect
Be strict when sending and tolerant when receiving
Think about scalability
Consider performance and cost
Topics:
IP Version 4 Protocol
IP Addresses
IP Version 6 Protocol
Internet control protocols
Label switching and MPLS
The Internet is an interconnected collection of many networks.
Internet Protocol Addressing
The Internet Protocol (IP) was designed around an addressing model that permits operation across a global network regardless of:
underlying datalink protocol MAC layer addressing
underlying datalink protocol packet sizes
underlying datalink protocol flow control
underlying datalink protocol error control
The addressing model has evolved from IPv1 through the widely used IPv4 to the current IPv6 model
Key concepts:
Prefixes - a contiguous block of IP address space
Subnets
CIDR — Classless InterDomain Routing
Classful and special addressing
NAT — Network Address Translation
A Prefix and a Subnet Mask
A prefix and a subnet mask
Subnets
Splitting an IP prefix into separate networks with subnetting
CIDR-Classless InterDomain Routing
A set of IP address assignments example:
Cambridge: first address 194.24.0.0, last address 194.24.7.255, 2048, Prefix 194.24.0.0/21
Edinburgh: first address 194.24.8.0, last address 194.24.11.255, 1024, Prefix 194.24.8.0/22
Available: first address 194.24.12.0, last address 194.24.15.255, 1024, Prefix 194.24.12.0/22
Oxford: first address 194.24.16.0, last address 194.24.31.255, 4096, Prefix 194.24.16.0/20
Aggregation of IP prefixes
Classful and Special Addressing
IP address formats
Class | Bit | Network | Host | Range of host addresses |
|---|---|---|---|---|
A | 0 | Network | Host | 1.0.0.0 to 127.255.255.255 |
B | 10 | Network | Host | 128.0.0.0 to 191.255.255.255 |
C | 110 | Network | Host | 192.0.0.0 to 223.255.255.255 |
D | 1110 | Multicast address | 224.0.0.0 to 239.255.255.255 | |
E | 1111 | Reserved for future use | 240.0.0.0 to 255.255.255.255 |
special IP addresses
This host
Network 127
A host on this network
Broadcast on the local network
Broadcast on a distant network
Loopback
Private internets:
10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
An enterprise that decides to use IP addresses out of the address space defined in this document can do so without any coordination with IANA or an Internet registry. The address space can thus be used by many enterprises.
NAT―Network Address Translation
Placement and operation of a NAT box
NAT-Network Address Translation Example
NAT operation
IPv4 and IPv6
Packets flow down and up the protocol stack as they flow through the network
Routing nodes only care about forwarding a packet to its intended destination via a specified route
Therefore, packets are only buffered and retransmitted on another datalink interface
Fragmentation is the process of breaking a packet payload into multiple “fragments” usually of equal size, and sending them between two routers
Fragmentation is performed when the frame (packet) size of the datalink channel between two routers is too small for the received packet.
The router receiving fragments will reassemble them into the original packet – fragments must be numbered so they can be reassembled (offset)
Fragmentation allows use of arbitrary datalink channels
The IP Version 4 (IPv4) Protocol
Version (IPv4)
Internet header length - in 32 bit words - including options
Type of service
Total length of datagram, in octets
Identification - sequence number, used with addresses and user protocol to identify datagram uniquely
Flags - More bit, Don’t fragment
Fragmentation offset
Time To Live – decremented with each hop between routers
Protocol - Next higher layer to receive data field at destination
Header checksum - reverified and recomputed at each router, 16 bit ones complement sum of all 16 bit words in header, set to zero during calculation
Source Address, Destination Address, Options, Padding to fill to multiple of 32 bits
The IP Version 4 (IPv4) Protocol
Option's Description:
Option | Description |
|---|---|
Security | Specifies how secret the datagram is |
Strict source routing | Gives the complete path to be followed |
Loose source routing | Gives a list of routers not to be missed |
Record route | Makes each router append its IP address |
Timestamp | Makes each router append its address and timestamp |
IP Version 6
IPv6 major goals
Support billions of hosts
Reduce routing table size
Simplify the protocol
Provide better security
Attention to type of service
Aid multicasting
Roaming host without changing address
Allow future protocol evolution
Permit coexistence of old and new protocols for years
IP version 6 improvements
Longer addresses than IPv4
Simplification of the header
Better support for options
Big advance is in security
Quality of service
The Main IPv6 Header
IPv6 Extension Headers Description
Extension header | Description |
|---|---|
Hop-by-hop options | Miscellaneous information for routers |
Destination options | Additional information for the destination |
Routing | Loose list of routers to visit |
Fragmentation | Management of datagram fragments |
Authentication | Verification of the sender's identity |
Encrypted security payload | Information about the encrypted contents |
The hop-by-hop extension header for large datagrams (jumbograms)
The extension header for routing
Point-to-Point Protocol (PPP)
PPP provides an encapsulation protocol over both bit-oriented synchronous links and asynchronous links with 8 bits of data and no parity. These links MUST be full-duplex, but MAY be either dedicated or circuit-switched.
PPP uses HDLC as a basis for the encapsulation.
PPP has been carefully designed to retain compatibility with most commonly used supporting hardware.
The PPP encapsulation also provides for multiplexing of different network-layer protocols simultaneously over the same link. It is intended that PPP provide a common solution for easy connection of a wide variety of hosts, bridges and routers.
Some protocols expect error free transmission, and either provide error detection only on a conditional basis, or do not provide it at all. PPP uses the HDLC Frame Check Sequence for error detection. This is commonly available in hardware implementations, and a software implementation is provided.
PPP is comprised of three main components:
A method for encapsulating datagrams over serial links.
A Link Control Protocol (LCP) for establishing, configuring, and testing the data-link connection.
A family of Network Control Protocols (NCPs) for establishing and configuring different network-layer protocols.
The Point-to-Point Protocol uses the principles, terminology, and frame structure of the International Organization For Standardization's (ISO) High-level Data Link Control (HDLC) procedures (ISO 3309-1979 [2]), as modified by ISO 3309:1984/PDAD1 "Addendum 1: Start/stop transmission" [5]. ISO 3309-1979 specifies the HDLC frame structure for use in synchronous environments. ISO 3309:1984/PDAD1 specifies proposed modifications to ISO 3309-1979 to allow its use in asynchronous environments.
PPP has very wide range of configuration options for different payload protocol types with Unique LCP and NCP options.
Internet Control Protocols
ICMP — RFC 792/4443 Internet Control Message Protocol
ARP — RFC 826 Address Resolution Protocol
DHCP — RFC 2131 Dynamic Host Configuration Protocol
These protocols are used to manage nodes in a local network, but some also collect in some instances status information from network nodes
Utilities are usually available to permit administrators to use these protocols from the command line
These protocols and utilities are widely used
ICMP-The Internet Control Message Protocol Types
Message type | Description |
|---|---|
Destination unreachable | Packet could not be delivered |
Time exceeded | Time to live field hit 0 |
Parameter problem | Invalid header field |
Source quench | Choke packet |
Redirect | Teach a router about geography |
Echo and echo reply | Check if a machine is alive |
Timestamp request/reply | Same as Echo, but with timestamp |
Router advertisement/solicitation | Find a nearby router |
Internet Control Message Protocol
RFC 792 (get it and read it)
Transfer of (control) messages from routers and hosts to hosts
Feedback about problems
e.g. time to live expired
Encapsulated in IP datagram
Not reliable
ping - the ICMP echo Utility
ICMP Echo —The Internet Control Message Protocol Echo type
The ping utility sends an echo command and measures the round trip delay
Used for status monitoring, testing and debugging of network installations
RFC 826 ARP-The Address Resolution Protocol
Two switched Ethernet LANs joined by a router
The arp utility displays and modifies the Internet-to-Ethernet address translation tables used by the address resolution protocol (arp(4)).
With no flags, the program displays the current ARP entry for hostname.
The host may be specified by name or by number, using Internet dot notation
-aThe program displays or deletes all of the current ARP entries.-dA super-user may delete an entry for the host called hostname with the -d flag.-nShow network addresses as numbers-s hostname ether_addrCreate an ARP entry for the host called hostname with the Ethernet address ether_addr.
RFC 2131 DHCP—The Dynamic Host Configuration Protocol
“The Dynamic Host Configuration Protocol (DHCP) provides a framework for passing configuration information to hosts on a TCPIP network.
DHCP is based on the Bootstrap Protocol (BOOTP), adding the capability of automatic allocation of reusable network addresses and additional configuration options.”
“There are two primary differences between DHCP and BOOTP. First, DHCP defines mechanisms through which clients can be assigned a network address for a finite lease, allowing for serial reassignment of network addresses to different clients.
Second, DHCP provides the mechanism for a client to acquire all of the IP configuration parameters that it needs in order to operate.”
Often network routers or modem-router devices have embedded DHCP servers
DHCP-The Dynamic Host Configuration Protocol
DHCP servers can be run as daemons on host systems, or be embedded in other devices such as routers, or modem-routers
ADSL and other home user modem-routers are usually supplied with embedded DHCP server software designed to autonomously build and maintain a DHCP table across the network
Typically a DHCP server installation includes, usually proprietary, management utilities to assign static IP address mappings so users can control which IP addresses are assigned to which devices
A typical DHCP management utility allows the specification of IP addresses and lease durations (in the case of static assignments for as long as the user intends)
Reading Materials
Tanenbaum, Feamster, Wetherall, Computer Networking, 6th Edition, Pearson Education, Chapter 5
Stallings, Data and Computer Communications, International Edition, 10th edition, Chapter 15
Kreyszig, Advanced Engineering Mathematics, 10th Ed, Chapter 23