Вы находитесь на странице: 1из 11

What is IP?

IP Fundamentals
Internet Protocol

IP - Generic Network Term

IP - Internet Protocol

Umbrella term Networks, Applications & Services.

Network layer protocol designed to enable routing of data across a packet network. Uses specific address schemes
IPv4: 192.168.200.2 IPv6: 69DC:8864:FFFF:FFFF:0:1280:8C0A:FFFF

Course Objectives
What is TCP/IP? IPv4 Packet Structure 32-bit Address Scheme of IPv4 Classless IP Addressing The life of an IP Packet

What is TCP/IP?

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

How are TCP/IP and IP Related?


TCP/IP is another name for the Internet Protocol Suite
A set of communication protocols for the Internet and similar networks

Layer 1 - Physical

Examples of protocols in this layer include: Ethernet IRC LDAP HTTP SMTP FTP SNMP USB SSH Bluetooth

Layer 7 -

Application

Layer 6 - Presentation Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Session Transport Network Data Link Physical

TCP

IP

UDP

IP is part of the TCP/IP Model and is the glue that makes all the other protocols work

OSI Model
Layer 7 Layer 6 Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Application Presentation Session Transport Network Data Link Physical
Interfaces directly with applications running on devices

Layer 2 Data Link

Examples of protocols in this layer include:


Converts code and reformats data Co-ordinates interaction between end-to-end application processes Provides end-to-end data integrity and quality of service Switches and routes data to the appropriate network device Transfers units of data to the other end of the physical link Transmits and receives on the network medium

Layer 7 -

Application

Ethernet Frame Relay PPP

Layer 6 - Presentation Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Session Transport Network Data Link Physical

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

Layer 3 Network
3 main features of the Network layer: 1. Logical Addressing 2. Routing 3. Path Determination Examples of protocols in this layer include: IPv4 IPv6 IPX
Layer 7 Application

Layer 5 Session

Examples of protocols in this layer include: NetBIOS SAP

Layer 7 -

Application

Layer 6 - Presentation Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Session Transport Network Data Link Physical

Layer 6 - Presentation Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Session Transport Network Data Link Physical

Layer 4 Transport

Layer 6 Presentation

Examples of protocols in this layer include: TCP UDP SCTP

Layer 7 -

Application

Examples of protocols in this layer include: MIME TLS SSL

Layer 7 -

Application

Layer 6 - Presentation Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Session Transport Network Data Link Physical

Layer 6 - Presentation Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Session Transport Network Data Link Physical

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

Layer 7 Application

TCP/IP Model Layer Communication


Application Layer

Telnet, FTP, TFTP, HTTP, SNMP, ..


Port Number 80

Examples of protocols in this layer include: FTP HTTP Telnet

Layer 7 -

Application

Layer 6 - Presentation Layer 5 Layer 4 Layer 3 Layer 2 Layer 1 Session Transport Network Data Link Physical

Transport Layer

TCP

UDP
Protocol Number 6

Internet Layer

IP

Type Code 0800H

Link Layer

Ethernet, Frame Relay, PPP,

OSI Model and TCP/IP Model


OSI Model TCP/IP Model

Transport Layer
Transport Layer Application Layer
Responsible for encapsulating application data blocks into datagrams suitable for transfer

Application Presentation Session Transport Network Data Link


Link Layer Transport Layer Internet Layer UDP
No data re-transmission capability if lost Ideal for VoIP, multiplayer gaming traffic

TCP
Flow Control & re-transmission capabilities Ideal for Email and FTP data

Physical

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

Session (TCP) vs Session-less (UDP)


TCP
Client Server
Connection setup

Important Network Functions of UDP


Server

UDP
Client

Used by Domain Name System (DNS) for simple requests and replies ?

Data transfer

Data transfer

Used by Dynamic Host Configuration Protocol (DHCP) to assign dynamic IP addresses to hosts

Connection teardown

UDP Header Explanation

TCP Header Explanation


32 bits (4 Bytes)

Source Port

Destination Port

Source Port Length DATA

Destination Port UDP Checksum


Sequence Number Acknowledgement Number OFF Reserved SET Flags Window Urgent Pointer Padding

Checksum Options DATA

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

Important Network Functions of TCP


Used by Domain Name System (DNS) for larger messages, especially zone transfers ?

IPv4 Packet Structure

Used by Border Gateway Protocol (BGP) to maintain the table of IP networks

Well-known port numbers


Port 20, 21 for FTP Port 23 for Telnet Port 53 for DNS

IPv4 Packet Structure


IPv4 is a header which is made up of a number of fields Each field in the IPv4 header has a task (e.g. Addresses, QoS, Packet Fragmentation)
1. Receive Frame

Data Port 80 for HTTP Port 143 for IMAP

TCP

IPv4

Ethernet Router

2. Analyse IPv4 Header

3. Decide Next Hop


Routing Table lookup Network Interface 192.168.1.0 E1/0 192.168.2.0 E1/1 192.168.3.0 E1/1 Next Hop direct direct 192.168.2.1

Port 161 for SNMP


Version

Header Length

Diff Serv

Source

Destination

Router examines IP header (reads the fields) and decides on the next hop by looking at the Destination IP field.

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

IPv4 Header Explanation


32 Bits
8 Versio n Header Length 8 Type of Service or DiffServ Flags 8 Total Length 8

IPv4 Addresses
32-bits long Contain:
Network part Host part
20 bytes

Identifier

Fragment Offset

Time to Live

Protocol

Header Checksum

Different ways to represent the address


Binary: 00001011011100110111001110100110 Decimal: 192115622

Source Address

Destination Address

Options

Padding

IPv4 Addresses
The binary IPv4 address:

32-bit Address Scheme of IPv4

00001011 01110011 01110011 10100110

11

115 . 115 . 166

A dotted-decimal representation of an IPv4 address

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

Classful IP Addressing
Number of Networks 128 16,384 2,097,152 Hosts per Network 16,777,214 65,534 254

Class D and E Addresses


Class D 224.0.0.0 239.255.255.255 (reserved for multicast)

Class A Class B Class C

Class A:

Big networks

Class E 240.0.0.0 254.255.255.254 (reserved)

Class B:

Medium networks

Class C:

Small networks

First Octet Rule

Rule Class A: First bit is always 0 Class B: First two bits are always 10 Class C: First three bits are always 110

Minimum and Maximum 00000000 = 0 0111111 = 127 10000000 = 128 10111111 = 191 11000000 = 192 11011111 = 223

Decimal Range 1-126 (0 and 127 are reserved) 128-191

Classless IP Addressing

192-223

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

Subnetting
Network: 192.168.1.0 Subnet Mask: 255.255.255.0
192.168.1.0 255.255.255.224

Classless Inter Domain Routing


ISP The Internet
192.168.1.64 255.255.255.224

200.25.0.0/16

200.25.16.0/20
192.168.1.32 255.255.255.224

200.25.16.0/21
192.168.1.96 255.255.255.224

Network C 192.168.1.0 has been divided into 4 smaller networks:


192.168.1.0 30 hosts 192.168.1.32 30 hosts 192.168.1.64 30 hosts 192.168.1.96 30 hosts

200.25.16.0/24 200.25.17.0/24 200.25.18.0/24 200.25.19.0/24 200.25.20.0/24 200.25.21.0/24 200.25.22.0/24 200.25.23.0/24

200.25.28.0/23 200.25.24.0/22 200.25.30.0/23

200.25.24.0/24 200.25.25.0/24 200.25.26.0/24 200.25.27.0/24

200.25.28.0/24 200.25.29.0/24

200.25.30.0/24 200.25.31.0/24

Company A

Company B

Company C

Company D

Subnet Mask
To divide our class C network 192.168.1.0 into 2 smaller networks we need to use some bits from host part as networks bits
Address: 11000000.10101000.00000001.00000000 -> 192.168.1.0 Subnet Mask: 11111111.11111111.11111111.00000000 -> 255.255.255.0 Bitcount: 192.168.1.0/24 Address: 11000000.10101000.00000001.00000000 -> 192.168.1.0 Subnet Mask: 11111111.11111111.11111111.10000000 -> 255.255.255.127 Bitcount: 192.168.1.0/25 Available subnetworks: 192.168.1.0/25 range 0-127 192.168.1.128/25 range 128-255

Private IP Address Space

10.0.0.0 - 10.255.255.255

1 Class A network

172.16.0.0 - 172.31.255.255

16 Class B networks

192.168.0.0 - 192.168.255.255

256 Class C networks

Private IP address space should not be routed to any public network.

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

Special Use IP Address Space


0.0.0.0/8 14.0.0.0/8 24.0.0.0/8 39.0.0.0/8 127.0.0.0/8 128.0.0.0/16 169.254.0.0/16 192.0.0.0/24 192.0.2.0/24 192.88.99.0/24 6to4 223.255.255.0/24 "This" Network Public-Data Networks Cable Television Networks Reserved but subject to allocation Loopback Reserved but subject to allocation Link Local Reserved but subject to allocation Test-Net Relay Anycast Reserved but subject to allocation

Running out of IP address space


In the early days of IP it was not expected we would run out of network addresses but today we know better!
Class A: 256 networks Class B: 65 535 networks Class C: 16 777 216 networks

Several steps were introduced to address this issue


Private IP addresses CIDR (IP subnets) IPv6

Reserved IP Addresses
.0 and .255

IPv6
Larger address space
IPv6 features a larger address space than that of IPv4: addresses in IPv6 are 128 bits long versus 32 bits in IPv4

Maximum number of hosts:


For IPv4 : 232 = 4.3109 (8.42 address/km2) For IPv6 : 2128 = 3.41038 (6.71017 address/km2)

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

The life of an IP Packet

The life of an IP Packet


Source Destination

HTTP

HTTP

TCP IP Ethernet

TCP IP Ethernet

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

"Disclaimer: This document is intended for internal use only (i.e. self-study) and it is not allowed to distribute in any
shape and form for external use. Furthermore, please keep in mind that this module was designed and developed for e-learning method. This might have an impact on the quality of the graphics in this document."

Вам также может понравиться