Top Banner
"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." IP Fundamentals Internet Protocol Course Objectives What is TCP/IP? IPv4 Packet Structure 32-bit Address Scheme of IPv4 Classless IP Addressing The life of an IP Packet "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." What is IP? IP - Internet Protocol IP - Generic Network Term • 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 What is TCP/IP?
11

63291399-IP-Fundamentals.pdf

Apr 16, 2015

Download

Documents

63291399-IP-Fundamentals.pdf
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 63291399-IP-Fundamentals.pdf

"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."

IP Fundamentals

Internet Protocol

Course Objectives

What is TCP/IP?

IPv4 Packet Structure

32-bit Address Scheme of IPv4

Classless IP Addressing

The life of an IP Packet

"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."

What is IP?

IP - Internet ProtocolIP - Generic Network Term

• 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

What is TCP/IP?

Page 2: 63291399-IP-Fundamentals.pdf

"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

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

IPTCP

HTTP

FTP

SMTP

SNMP

SSHLDAP

IRC

UDP

OSI Model

Layer 7 - ApplicationInterfaces directly with applications running on

devices

Layer 6 - Presentation Converts code and reformats data

Layer 5 - SessionCo-ordinates interaction between end-to-end

application processes

Layer 4 - TransportProvides end-to-end data integrity and quality of

service

Layer 3 - NetworkSwitches and routes data to the appropriate

network device

Layer 2 - Data LinkTransfers units of data to the other end of the

physical link

Layer 1 - Physical Transmits and receives on the network medium

"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 1 - Physical

Layer 1 - Physical

Layer 2 - Data Link

Layer 3 - Network

Layer 4 - Transport

Layer 5 - Session

Layer 6 - Presentation

Layer 7 - ApplicationExamples of protocols in this layer include:

• Ethernet

• USB

• Bluetooth

Layer 2 – Data Link

Examples of protocols in this layer include:

• Ethernet

• Frame Relay

• PPP

Layer 1 - Physical

Layer 2 - Data Link

Layer 3 - Network

Layer 4 - Transport

Layer 5 - Session

Layer 6 - Presentation

Layer 7 - Application

Page 3: 63291399-IP-Fundamentals.pdf

"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

Examples of protocols in this layer include:

• IPv4

• IPv6

• IPX Layer 1 - Physical

Layer 2 - Data Link

Layer 3 - Network

Layer 4 - Transport

Layer 5 - Session

Layer 6 - Presentation

Layer 7 - Application

3 main features of the Network layer:

1. Logical Addressing

2. Routing

3. Path Determination

Layer 4 – Transport

Examples of protocols in this layer include:

• TCP

• UDP

• SCTP

Layer 1 - Physical

Layer 2 - Data Link

Layer 3 - Network

Layer 4 - Transport

Layer 5 - Session

Layer 6 - Presentation

Layer 7 - Application

"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 5 – Session

Examples of protocols in this layer include:

• NetBIOS

• SAP

Layer 1 - Physical

Layer 2 - Data Link

Layer 3 - Network

Layer 4 - Transport

Layer 5 - Session

Layer 6 - Presentation

Layer 7 - Application

Layer 6 – Presentation

Examples of protocols in this layer include:

• MIME

• TLS

• SSL

Layer 1 - Physical

Layer 2 - Data Link

Layer 3 - Network

Layer 4 - Transport

Layer 5 - Session

Layer 6 - Presentation

Layer 7 - Application

Page 4: 63291399-IP-Fundamentals.pdf

"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

Examples of protocols in this layer include:

• FTP

• HTTP

• Telnet

Layer 1 - Physical

Layer 2 - Data Link

Layer 3 - Network

Layer 4 - Transport

Layer 5 - Session

Layer 6 - Presentation

Layer 7 - Application

OSI Model and TCP/IP Model

Physical

Data Link

Network

Transport

Session

Presentation

Application

OSI Model TCP/IP Model

Application Layer

Transport Layer

Internet Layer

Link Layer

"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."

TCP/IP Model Layer Communication

Application Layer

Transport Layer

Internet Layer

Link Layer

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

Port Number

TCP UDP

IP

Protocol Number

Type Code

Ethernet, Frame Relay, PPP, ……

‘0800’H

6

80

Transport Layer

Transport Layer

Responsible for encapsulating

application data blocks into

datagrams suitable for transfer

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

Page 5: 63291399-IP-Fundamentals.pdf

"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 UDP

Client Server Client Server

Connection setup

Data transfer

Connection teardown

Data transfer

UDP Header Explanation

Destination PortSource Port

UDP ChecksumLength

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."

Important Network Functions of UDP

› Used by Domain Name System (DNS) for simple requests

and replies

› Used by Dynamic Host Configuration Protocol (DHCP) to

assign dynamic IP addresses to hosts

?

TCP Header Explanation32 bits (4 Bytes)

Destination Port

Window

PaddingOptions

DATA

Source Port

OFF

SET

Sequence Number

Reserved

Acknowledgement Number

Flags

Urgent PointerChecksum

Page 6: 63291399-IP-Fundamentals.pdf

"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

› 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

› Port 80 for HTTP

› Port 143 for IMAP

› Port 161 for SNMP

"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 Packet Structure

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)

› Router examines IP header (reads the fields) and decides on the next hop by looking

at the ‘Destination’ IP field.

2. Analyse IPv4 Header

1. Receive Frame

3. Decide Next Hop

DestinationSource…………Diff

Serv

Header

Length

Version

EthernetIPv4TCPData

Router

Routing Table lookup

Network Interface Next Hop192.168.1.0 E1/0 direct192.168.2.0 E1/1 direct192.168.3.0 E1/1 192.168.2.1

Page 7: 63291399-IP-Fundamentals.pdf

"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

PaddingOptions

Destination Address

Source Address

Header ChecksumProtocolTime to Live

Fragment OffsetFlagsIdentifier

Total Length

Type of

Service or

DiffServ

Header

Length

Versio

n

8888

32 Bits

20 bytes

32-bit Address Scheme of

IPv4

"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 Addresses

› 32-bits long

› Contain:

– Network part

– Host part

› Different ways to represent the address

– Binary: 00001011011100110111001110100110

– Decimal: 192115622

IPv4 Addresses

› The binary IPv4 address:

00001011 01110011 01110011 10100110

11 . 115 . 115 . 166

A dotted-decimal representation of an IPv4 address

Page 8: 63291399-IP-Fundamentals.pdf

"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

Class AClass BClass C

Number of Networks

Hosts per Network

128

16,3842,097,152

16,777,21465,534

254

HNNN

� Class B:

� Class C:

� Class A:

HHNN

HHHN

Small networks

Medium networks

Big networks

First Octet Rule

192-22311000000 = 192

11011111 = 223

Class C: First three bits are

always 110

128-19110000000 = 128

10111111 = 191

Class B: First two bits are

always 10

1-126 (0 and 127 are

reserved)

00000000 = 0

0111111 = 127

Class A: First bit is always

0

Decimal RangeMinimum and

MaximumRule

"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."

Class D and E Addresses

› Class D 224.0.0.0 – 239.255.255.255 (reserved for multicast)

› Class E 240.0.0.0 – 254.255.255.254 (reserved)

Classless IP Addressing

Page 9: 63291399-IP-Fundamentals.pdf

"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

192.168.1.32255.255.255.224

192.168.1.0255.255.255.224

192.168.1.64255.255.255.224

192.168.1.96255.255.255.224

Network: 192.168.1.0

Subnet Mask: 255.255.255.0

� 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

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

"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."

Classless Inter Domain Routing

The Internet

ISP

200.25.16.0/20

200.25.16.0/21

200.25.24.0/22

200.25.28.0/23

200.25.30.0/23

200.25.0.0/16

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

Company A

200.25.24.0/24

200.25.25.0/24

200.25.26.0/24

200.25.27.0/24

Company B

200.25.28.0/24 200.25.29.0/24

Company C

200.25.30.0/24 200.25.31.0/24

Company D

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.

Page 10: 63291399-IP-Fundamentals.pdf

"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 "This" Network

14.0.0.0/8 Public-Data Networks

24.0.0.0/8 Cable Television Networks

39.0.0.0/8 Reserved but subject to allocation

127.0.0.0/8 Loopback

128.0.0.0/16 Reserved but subject to allocation

169.254.0.0/16 Link Local

192.0.0.0/24 Reserved but subject to allocation

192.0.2.0/24 Test-Net

192.88.99.0/24 6to4 Relay Anycast

223.255.255.0/24 Reserved but subject to allocation

Reserved IP Addresses

› .0 and .255

"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."

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

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.3×109 (8.42 address/km2)

– For IPv6 : 2128 = 3.4×1038 (6.7×1017 address/km2)

Page 11: 63291399-IP-Fundamentals.pdf

"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

Ethernet

IP

TCP

HTTP

Ethernet

IP

TCP

HTTP

The life of an IP PacketSource Destination

"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."