NPIChapter2(TCPIP)x

doctorheavenlyΔίκτυα και Επικοινωνίες

24 Οκτ 2013 (πριν από 4 χρόνια και 2 μήνες)

98 εμφανίσεις

Chapter 2

TCP/IP Protocol

Contents


What Is TCP/IP (ok)


The Birth of TCP/IP(ok)


Design Goals of TCP/IP (ok)


Moving Data across the Network(ok)


What Are Protocols(ok)


The OSI Reference Model (ok)


TCP/IP and the
DoD

Model (ok)


The Network Interface Layer(ok)


The Internet Layer (ok)


The Transport Layer(ok)


The Application Layer(ok)


IP Addressing(ok)


Addressing IP Hosts(ok)


Subnet Masks (ok)


Custom Subnet Masks(ok)


Supernetting

and CIDR(ok)


IP Version 6

What Is TCP/IP



TCP/IP is a set of
protocols
that enable communication
between computers.


Features of TCP/IP


Support from Vendors
: TCP/IP receives support from many
hardware and software vendors.


Interoperability
:

it can be installed and used on virtually
every platform.


Flexibility
: An administrator can automatically or manually
assign an IP address to a host, and a TCP/IP host can convert
easy
-
to
-
remember names.


Routability
: TCP/IP is exceptionally well adapted to the
process of routing data from one segment of the network to
another, or from a host on a network in one part of the world
to a host on a network in another part of the world.

The Birth of TCP/IP

1969

1974

-
NCP Protocol

-
Birth
TCP to
replace NCP

-
host
-
to
-
host
portion of a
communication

1978

-
TCP/IP birth

1982

-
it was
decided that
TCP/IP
would
replace
NCP as the
standard
language

of the
ARPAnet
.

1983

-
ARPAnet

switched
over to
TCP/IP.

1990

-
TCP/IP
has
evolved
to meet
the
changing
requireme
nts of

the
Internet

Design Goals of TCP/IP


Hardware independence
:
A protocol suite that could be used on a
Mac, PC, mainframe, or any other computer.


Software independence
:
A protocol suite that could be used by
different software vendors and applications.


Failure recovery and the ability to handle high error rates
:
A
protocol suite that featured automatic recovery from any dropped or
lost data.


Efficient protocol with low overhead
:
A protocol suite that had a
minimal amount of “extra” data moving with the data being
transferred.


Ability to add new networks to the internetwork without service
disruption
:
A protocol suite that enabled new, independent networks
to join this network of networks without bringing down the larger
internetwork.


Routable Data
:
A protocol suite on which data could make its way
through an internetwork of computers to any possible destination.

Moving Data across the Network


Moving Data on a Circuit
-
Switched
Network:
data communication moves along a
single, established route.


Moving Data on a Packet
-
Switched
Network:
On a packet
-
switched network, the
computer that is sending the data fragments the
data into smaller, more manageable
chunks(Packet).


Moving Data across the Network

Moving Data on a Circuit
-
Switched Network

Moving Data on a Packet
-
Switched Network

What Are Protocols


A protocol is a rule or a set of rules and
standards for communicating that computers
use when they send data back and forth.


Protocols Move Packets of Data


Why We Need Protocols and Standards

The OSI Reference Model


The OSI model is made up of seven distinct layers:


Application
: is to manage communications between
applications


Presentation
: is to ensure that the message gets transmitted in
a language or syntax that the receiving computer can
understand.


Session
: It controls the dialog during communications.


Transport
: can guarantee that packets are received.


Network
: is responsible for routing the packet based on its
logical address.


Data
-
Link
: which is where the data is prepared for final
delivery to the network.


Physical
: determine how the sending and receiving bits of
data move along the network’s wire.

TCP/IP and the
DoD

Model


TCP/IP was developed using the
Department of Defense
(
DoD
)
reference model.


Department of Defense (
DoD
)
reference model has four
layers:


The four layers of the
DoD

model are:


Application
:

Covers the same topics as the Application,
Presentation, and Session layers in the OSI model.


Transport
:

Covers the topics of Transport from the OSI
model.


Internet
:

Covers the topics of Network from the OSI model.


Network Interface Layer
: Covers the topics of Data
-
Link and
Physical from the OSI model.

DoD

and OSI Model

The Network Interface Layer


Network Interface layer
: is to define how a computer connects to a network.


Feature of Network Interface Layer:


The TCP/IP Network Interface layer does not regulate the type of network that the
host is on.


Host can be on an Ethernet, Token Ring, or Fiber Distributed Data Interface
(FDDI), or on any other network topology
.


At the Network Interface layer, a header is applied that contains addressing
information(hardware address).


TCP/IP packet to be delivered, it must contain the destination’s hardware address.


A broadcast packet contains the target hardware address of FF:FF:FF:FF:FF:FF.


Feature of Hardware Address


It is a 12
-
character hexadecimal address


The first six of these hexadecimal characters represent the manufacturer.


The last six characters form a unique serial number that the card’s manufacturer
has assigned to it.


00:A0:C9:0F:92:A5

The Internet Layer


The Internet layer contains the protocols that are
responsible for addressing and
routing
of packets.


The Internet layer contains several protocols, including:


Internet Protocol (IP)


Address Resolution Protocol (ARP)


Internet Control Message Protocol (ICMP)


Internet Group Message Protocol (IGMP)


Feature of Internet layer:


The packet moves up to the Internet layer must contain an
IP
address .


The Internet layer provides the necessary protocols to
determine the hardware address for routing the packet to the
destination.

Internet Protocol (IP)


The Internet Protocol:

is the primary protocol at the Internet
layer of the TCP/IP stack that is responsible for determining
the source and destination IP addresses of every packet.


A default gateway
, also called a
router
, is the address of a
host on the network that offers a route off of the network.


ARP

is a protocol that can
resolve
an IP address to a
hardware address.


ICMP

is a protocol used primarily for sending error
messages, performing diagnostics, and controlling the flow
of data.


IGMP

is a protocol that enables one host to send one
stream
of data to many
hosts at the same time.




The protocols at the Internet layer

The Transport Layer


Transport layer: is a Host
-
to
-
Host layer.


The Transport layer of the TCP/IP protocol
suite consists of only two protocols:


TCP
: provides connection
-
oriented, reliable
communication


UDP
: provides connectionless, unreliable
communication


TCP and UDP Header

The Application Layer


The Application layer
:

is the part of the TCP/IP
where requests for data or services are
processed.


Feature of Application Layer:


Application layer uses
port
to listening for requests
to process.


TCP and UDP have use of 65,536 ports each.


A socket:

combines three pieces of information: the
IP address, TCP or UDP, and the port number

Host sending a request to the Web
Server

IP Addressing


IP address: is used to identify network and host address for sending data.


Feature of IP address:


IP address uniquely identifies every host on a network.


IP address divides in two part are Network and Host number.


IP addresses are based on 32
-
bit addresses


IP address has 2 version are IPV4 and IPV6


IP address has Classless Inter
-
Domain Routing (CIDR)


IP addresses are divided into five classes:


Class A : 1 to 127 and use the first octet to represent the unique network address and leave three
octets to develop unique host addresses on that network.


Class B: 128 to 191 and use the first two octets to represent the unique network address and leave
only two octets to develop unique host addresses on that network.


Class C : 192 to 223 and use the first three octets to represent the unique network address and
leave only one octet to develop unique host addresses on that network.


Class D : 224 to 239 and is used as
multicast addresses
(
No one host) in this class


Class E : 240 to 255 are reserved addresses and are invalid host addresses.

How to obtain IP Address


We have two ways to obtain IP Address to host:


Manual IP Address Configuration


Obtaining an IP Address from a DHCP Server


Subnet Masks


A subnet mask:
is a number that looks like an IP
address that shows TCP/IP how many bits are used
for the network portion of the IP address.


Feature of Subnet mask:


TCP/IP uses the subnet mask to determine whether the
destination of a packet is a host on the local network or a
host on a remote network.


Bit 1s represent network ID and Bit 0s represent host ID


Standard subnet mask


Class A: 255.0.0.0


Class B: 255.255.0.0


Class C: 255.255.255.0

Custom Subnet Masks


Custom subnet mask: is the subnet mask that is created by network
administrator.


The rules for
subnetting
:


The subnet bits in the IP address cannot be all 1s.


The subnet bits in the IP address cannot be all 0s.


The host bits in the IP address cannot be all 1s.


Creating a Custom Subnet Mask:


Determine how many subnets are needed


Determine the maximum number of hosts on each network


Determine the subnet mask


Determine the valid network addresses


Determine the range of valid host IP addresses on each subnet


Confirm that you met the requirements for the number of networks and
maximum number of hosts

Supernetting

and CIDR


Supernetting
: is used in routing tables to
compact contiguous Class C networks.


CIDR addresses
: replace the subnet mask and
state the number of bits that IP should use to
determine the network portion of an IP address.


To create the right
supernetted

subnet mask
, an
administrator must look at the binary and
determine the last bit where all of the networks
are the same.

IP Version 6


Features Of IPv6


Larger Addresses
:
use 128bits address


Extended Address Hierarchy
:
IPv6 uses the larger address space to create
additional levels of addressing hierarchy.


Flexible Header Format
:
IPv6 uses an entirely new and incompatible datagram
format by using set of optional headers


Improved Options
:
IPv6 allows a datagram to include optional control
information.


Provision For Protocol Extension
:
The extension capability has the potential to
allow the IETF to adapt the protocol to changes in underlying network hardware
or to new applications.


Support For
Autoconfiguration

And Renumbering
:
IPv6 provides facilities that
allow computers on an isolated network to assign themselves addresses and begin
communicating without depending on a router or manual configuration.


Support For Resource Allocation. IPv6 has two facilities that permit
preallocation

of network resources: a flow abstraction and a differentiated service
specification.

General Form Of An IPv6
Datagram


The Fields in the IPv6 Header


Version
:
containing the version of the
protocol.


Traffic Class
:
for

sending nodes and
forwarding routers can use it to
identify and distinguish between
different classes or priorities of IPv6
packets.


Flow Label
:


Payload Length
:
the
length of data
carried after the IP header.


Next Header
:
this field is called the
Protocol Type field.


Hop Limit
:
The value in this field
now expresses a number of hops.


Source Address
:
contains the IP
address of the originator of the packet.


Destination Address
:
This field
contains the IP address of the intended
recipient of the packet.



Extension Headers


Hop
-
by
-
Hop Options Header
:
carries optional information that
must be examined by every node
along the path of the packet.


Routing Header
:
is used to give
a list of one or more intermediate
nodes that should be visited on
the packet's path to its
destination.


Fragment Header
:
IPv6 host
that wants to send a packet to an
IPv6 destination uses Path MTU
discovery to determine the
maximum packet size that can be
used on the path to that
destination.

IPv6 Addressing Notation


Address Notation:


An IPv6 address has 128 bits, or 16 bytes. The address is
divided into eight 16
-
bit hexadecimal blocks separated by
colons. Ex
2001:DB8:0000:0000:0202:B3FF:FE1E:8329


A double colon can replace consecutive zeros or leading or
trailing zeros within the address. Ex
2001:DB8::202:B3FF:FE1E:8329


colon hex notation incorporates dotted decimal suffixes
during the transition from IPv4 to IPv6. ex
0:0:0:0:0:0:192.168.0.2


IPv6 extends CIDR
-
like notation by allowing an address to
be followed by a slash and an integer that specifies a
number of bits.
2001:DB8::56/64




IPv6 Address Types


IPv6 has three types of addresses, which can be categorized
by type and scope:


Unicast

addresses:

A packet is delivered to one interface.


Multicast addresses:


A packet is delivered to multiple interfaces.


Anycast

addresses:


A packet is delivered to the nearest of
multiple interfaces (in terms of routing distance).


IPv6 does not use broadcast messages.


Unicast

and
anycast

addresses in IPv6 have the following
scopes (for multicast addresses, the scope is built into the
address structure):


Link
-
local:
The scope is the local link (nodes on the same subnet).


Site
-
local:
The scope is the organization (private site addressing).


Global:
The scope is global (IPv6 Internet addresses)



Unicast

IPv6 Addresses


IPv6 has several major
unicast

address types:


Unicast

global addresses:
IPv6
unicast

global addresses are
similar to IPv4 public addresses



Unicast

site
-
local addresses:
IPv6
unicast

site
-
local addresses are
similar to IPv4 private addresses.


Unicast

link
-
local addresses:
u
se these automatically configured
addresses to communicate with each other.


Unicast

unspecified
address:
The

IPv6 unspecified address is
0:0:0:0:0:0:0:0:, or a double colon (::).


Unicast

loopback address:
The IPv6
unicast

loopback address is
equivalent to the IPv4 loopback address.


Unicast

6to4 addresses:
IPv6 uses 6to4 addresses to communicate
between two IPv6/IPv4 nodes over the IPv4 Internet.


Unicast

ISATAP addresses:
IPv6 uses ISATAP addresses to
communicate between two IPv6/IPv4 nodes over an IPv4 intranet.


Unicast

global addresses


IPv6
unicast

global addresses are similar to IPv4 public addresses. Also known as
aggregatable

global
unicast

addresses
, global addresses are globally routable. The
structure of an IPv6
unicast

global address creates the three
-
level topology shown in
the following illustration.


Fields in a
Unicast

Global Address:


001

: Identifies the address as an IPv6
unicast

global address.


TLA

ID
:
Identifies the highest level in the routing hierarchy. TLA

IDs are administered by IANA,
which allocates them to local Internet registries, which then allocate a given TLA

ID to a global
ISP.


Res
:
Reserved for future use (to expand either the TLA

ID or the NLA

ID).


NLA ID
:
Identifies a specific customer site.


SLA ID
:
Enables as many as 65,536 (216) subnets within an individual organization’s site. The
SLA

ID

is assigned within the site; an ISP cannot change this part of the address.


Interface ID
: Identifies the interface of a node on a specific subnet.




Unicast

site
-
local addresses


IPv6
unicast

site
-
local addresses are similar to IPv4
private addresses. The scope of a site
-
local address is the
internetwork of an organization’s site. (You can use both
global addresses and site
-
local addresses in your
network.) The prefix for site
-
local addresses is
FEC0::/48
.


Example:


FEC0:0:0:1::1


FEC0:0:0:1::2


FEC0:0:0:2::1


FEC0:0:0:3::2


The same Network in the site local with
different interface ID

The Different Network in the site local with
different interface ID

Unicast

link
-
local addresses
(FE80::/64)


IPv6
unicast

link
-
local addresses are similar to IPv4
APIPA addresses used by computers running Microsoft
Windows. Hosts on the same link (the same subnet) use
these automatically configured addresses to
communicate with each other. Neighbor Discovery
provides address resolution. The prefix for link
-
local
addresses is FE80::/64. The following illustration shows
the structure of a link
-
local address.

Unicast

6to4 addresses (2002::/16)


IPv6 uses 6to4 addresses to communicate between two
IPv6/IPv4 nodes over the IPv4 Internet. A 6to4 address
combines the prefix 2002::/16 with the 32 bits of the
public IPv4 address of the node to create a 48
-
bit prefix


2002:
WWXX
:
YYZZ
::/48, where
WWXX
:
YYZZ

is the
colon
-
hexadecimal representation of
w
.
x
.
y
.
z
, a public
IPv4 address.


Example:
157.60.91.123


2002:9D3C:5B7B::/48


Unicast

ISATAP addresses


IPv6 uses ISATAP addresses to communicate between two IPv6/IPv4 nodes
over an IPv4 intranet. An ISATAP address combines a 64
-
bit
unicast

link
-
local, site
-
local, or global prefix (a global prefix might be a 6 to 4 prefix)
with a 64
-
bit suffix constructed of the ISATAP identifier 0:5EFE, followed
by the IPv4 address assigned to an interface of the host. The prefix is known
as the
subnet prefix
. Although a 6to4 address can incorporate only a public
IPv4 address, an ISATAP address can incorporate either a public or a private
IPv4 address.


Examples of ISATAP addresses:


With link
-
local prefix:
FE80::5EFE:131.107.129.8


With site
-
local prefix:
FEC0::1111:0:5EFE:131.107.129.8


With global prefix:
3FFE:1A05:510:1111:0:5EFE:131.107.129.8


With global 6to4 prefix:
2002:9D36:1:2:0:5EFE:131.107.129.8


Well
-
Known Multicast Addresses

Interface
-
local scope


FF01:0:0:0:0:0:0:1 All
-
nodes address


FF01:0:0:0:0:0:0:2 All
-
routers address

Link
-
local scope


FF02:0:0:0:0:0:0:1 All
-
nodes address


FF02:0:0:0:0:0:0:2 All
-
routers address


FF02:0:0:0:0:0:0:3 Unassigned


FF02:0:0:0:0:0:0:4 DVMRP routers


FF02:0:0:0:0:0:0:5 OSPFIGP


FF02:0:0:0:0:0:0:6 OSPFIGP designated routers


FF02:0:0:0:0:0:0:7 ST routers


FF02:0:0:0:0:0:0:8 ST hosts


FF02:0:0:0:0:0:0:9 RIP routers


FF02:0:0:0:0:0:0:A EIGRP routers


FF02:0:0:0:0:0:0:B Mobile agents


FF02:0:0:0:0:0:0:D All PIM routers


FF02:0:0:0:0:0:0:E RSVP encapsulation


FF02:0:0:0:0:0:0:16 All MLDv2
-
capable routers


FF02:0:0:0:0:0:0:6A All snoopers


FF02:0:0:0:0:0:1:1 Link name


FF02:0:0:0:0:0:1:2 All DHCP agents


FF02:0:0:0:0:0:1:3 Link
-
local Multicast Name Resolution


FF02:0:0:0:0:0:1:4 DTCP Announcement


FF02:0:0:0:0:1:FFXX:XXXX Solicited
-
node address

Site
-
local scope


FF05:0:0:0:0:0:0:2 All
-
routers address


FF05:0:0:0:0:0:1:3 All DHCP servers


FF05:0:0:0:0:0:1:4 Deprecated


FF05:0:0:0:0:0:1:1000 to FF05:0:0:0:0:01:13FF Service location
(SLP) Version 2