Você está na página 1de 46

CCNA

640-802

Internet Protocol

Revision no.: PPT/2K804/04


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

TCP/IP Protocol
• The Transmission Control Protocol/Internet Protocol
(TCP/IP) suit was created by the Department of Defense
(DoD).
• Later TCP/IP was included with the Berkeley Software
Distribution of UNIX.
• The Internet Protocol can be used to communicate across
any set of interconnected networks.
• TCP/IP supports both LAN and WAN communications.
• IP suite includes not only Layer 3 and 4 specifications but
also specifications for common applications like e-mail,
remote login, terminal emulation and file transfer.
• The TCP/IP protocol stack maps closely to the OSI model in
the lower layers.
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

The DoD Model


• The Process / Application Layer

• The Host-to-Host Layer

• The Internet Layer

• The Network Layer


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

The DoD & OSI


DoD Model OSI Model

Application

Application Presentation

Session

Host-to-Host Transport

Internet Network

Data Link
Network
Access
Physical
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Process/Application Layer
• The Process / Application layer defines protocols for node-
to-node application communication and also controls user-
interface specification.

• A vast array of protocols combine at this layer of DoD’s


Model to integrate the activities and duties of upper layer of
OSI.
• Examples for this layer are :

• Telnet, FTP, TFTP, NFS, SMTP, SNMP, DNS DHCP, BootP etc.
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Host-to-Host Layer
• The Host-to-Host layer parallels the functions of the OSIs

Transport layer

• It performs the following:

• Defining protocols for setting up the level of transmission service for

Applications

• It tackles issues like creating reliable end-to-end communication.

• It ensures the error free delivery of data

• It handles packet sequencing and maintains data integrity.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Internet Layer
• Internet Layer corresponds to the OSI’s Network Layer.

• It performs the following:

• Designating the protocols relating to the logical transmission of

packets over the entire network.

• It takes care of the addressing of hosts by giving them an IP address.

• It handles routing of packets among multiple networks.

• It also controls the communication flow between the two hosts.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Network Access Layer


• This layer is equivalent of the Data Link and Physical Layer of OSI

model.

• It performs the following


• It monitors the data exchange between the host and the network.

• Network Access Layer overseas hardware addressing and defines


protocols for the physical transmission of the Data.

• Lets have a look on how TCP/IP Protocol suit relates to the DoD
model layers.
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

TCP/IP Protocol Suit at DoD


DoD Model TCP/IP Protocol Suit

Telnet FTP LPD SNMP


Process /
Application
TFTP SMTP NFS X Window

Host-to-Host TCP UDP

ICMP BootP ARP RARP


Internet
IP

Network Fast Token


Ethernet FDDI
Access Ethernet Ring
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Telnet
• Telnet is used for Terminal Emulation.

• It allows a user sitting on a remote machine to access the

resources of another machine.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

F T P (File Transfer Protocol)


• It allows you to transfer files from one machine to another.

• It also allows access to both directories and files.

• It uses TCP for data transfer and hence slow but reliable.
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Network File System (NFS)

• It is jewel of protocols specializing in file sharing.

• It allows two different types of file systems to interoperate.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

T F T P (File Transfer Protocol)

• This is striped down version of FTP.

• It has no directory browsing abilities.

• It can only send and receive files.

• It uses UDP for data transfer and hence faster but not reliable.
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

LPD (Line Printer Daemon)

• The Line Printer Protocol is designed for Printer sharing.

• The LPD along with the LPR (Line Printer Program) allows

print jobs to spooled and sent to the network’s printers

using TCP/IP.
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

X Window

• X-windows defines a protocol for the writing of graphical

user interface-based client/Server application.

• It allows a program to run on one computer and have it

display on another computer.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Simple Network Management Protocol

• SNMP enable a central management of Network.

• Using SNMP an administrator can watch the entire network.

• SNMP works with TCP/IP.

• IT uses UDP for transportation of the data.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

DNS (Domain Name Service)

• DNS resolves FQDN with IP address.

• DNS allows you to use a domain name to specify and IP

address.

• It maintains a database for IP address and Hostnames.

• On every query it checks this database and resolves the IP.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Bootstrap Protocol (BootP)


• BootP stands for Bootstrap Protocol.

• BootP is used by a diskless machine to learn the following:

• Its own IP address

• The IP address and host name of a server machine.

• The boot filename of a file that is to be loaded into memory

and executed at boot-up.

• BootP is an old program and is now called the DHCP.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

DHCP (Dynamic Host Configuration Protocol)


• The DHCP server dynamically assigns IP address to hosts.
• All types of Hardware can be used as a DHCP server, even
a Cisco Router.
• BootP can also send an operating system that a host can
boot from. DHCP can not perform this function.
• Following information is provided by DHCP while host
registers for an IP address:
• IP Address
• Subnet mask
• Domain name
• Default gateway (router)
• DNS
• WINS information
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Transmission Control Protocol (TCP)


• TCP works at Transport Layer

• TCP is a connection oriented protocol.

• TCP is responsible for breaking messages into segments


and reassembling them.

• Supplies a virtual circuit between end-user application.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

TCP Segment Format


Bit 0 Bit 15 Bit 16 Bit 31
Source port (16) Destination port (16)

Sequence number (32)


Acknowledgment number (32)

Header length Reserved Code

24 bytes
Window (16)
(4) (6) bits (6)

Checksum (16) Urgent (16)

Options (0 or 32 if any)

Data (varies)
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

UDP (User Datagram Protocol)

• A connectionless and unacknowledged protocol.

• UDP is also responsible for transmitting messages.

• But no checking for segment delivery is provided.

• UDP depends on upper layer protocol for reliability.

• TCP and UDP uses Port no. to listen to a particular services.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

UDP segment
Bit 0 Bit 15 Bit 16 Bit 31
Source port (16) Destination port (16)
Length (16) Checksum (16)
Data (if any)

8 bytes
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Key Features of TCP and UDP

TCP UDP
Sequenced Unsequenced
Reliable Unreliable
Connection-oriented Connectionless
Virtual circuit Low overhead
Acknowledgments No acknowledgment
Windowing flow control No windowing or flow control
Revision no.: PPT/2K804/04

Some common services and port numbers


© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Transport layer protocol.

FTP TCP 21
Telnet TCP 23
SMTP TCP 25
DNS TCP & UDP 53
DNS uses UDP for name resolution and TCP for Server Zone
Transfers

TFTP UDP 69

POP3 UDP 110

News UDP 144

.
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Port Numbers
• Some ports are reserved in both TCP and UDP

• Port Numbers have the following assigned ranges:

• Numbers below 1024 are considered well-knows ports

• Numbers above 1024 are dynamically assigned ports

• Registered ports are those registered for vender-specific

applications. Most of them are above 1024.

• Maximum Port numbers can go upto 65,535.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

The Internet Layer Protocols

• Internet Protocol (IP)

• Internet Control Message Protocol (ICMP)

• Address Resolution Protocol (ARP)

• Reverse Address Resolution Protocol (RARP)


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Internet Protocol (IP)

• Provides connectionless, best-effort delivery routing of datagrams.

• IP is not concerned with the content of the datagrams.

• It looks for a way to move the datagrams to their destination.


Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

IP header
Bit 0 Bit 15 Bit 16 Bit 31
Priority and
Version( Header
Type of Total length (16)
4) length (4)
Service (8)
Identification (16) Flags(3) Fragment offset (13)
Time to Live (8) Protocol (8) Header checksum (16)
Source IP address (32)
Destination IP address (32)
Options (0 or 32 if any)

20 bytes
Data (varies if any)
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Layer
Layer

Internet
Transport
Revision no.: PPT/2K804/04

6
TCP

IP
The Protocol field in an IP header

17
UDP

Protocol
Numbers
Revision no.: PPT/2K804/04

Possible Protocols Found in the Protocol Field of


© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

an IP Header

Protocol Protocol Number


ICMP 1
IGRP 9
EIGRSP 88
OSPF 89
IPv6 41
GRE 47
IPX in IP 111
Layer 2 tunnel (L2TP) 115
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Internet Control Message Protocol (ICMP)


• ICMP messages are carried in IP datagrams and used to
send error and control messages.
• The following are some common events and messages that
ICMP relates to:
• Destination Unreachable
• Buffer Full
• Hops
• Ping
• Traceroute
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Address Resolution Protocol (ARP)


• ARP works at Internet Layer of DoD Model
• It is used to resolve MAC address with the help of a known IP address.
• All resolved MAC addresses are maintained in ARP cache table is maintained.
• To send a datagram this ARP cache table is checked and if not found then a
broadcast is sent along with the IP address.
• Machine with that IP address responds and the MAC address is cached.
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

RARP (Reverse ARP)


• This also works at Internet Layer.
• It works exactly opposite of ARP.
• It resolves an IP address with the help of a known MAC address.
• DHCP is the example of an RARP implementation.
• Workstations get their IP address from a RARP server or DHCP
server with the help of RARP.
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Binary to Decimal and Hexadecimal Conversion


Binary to Decimal Memorization Chart
Binary Value Decimal Value
10000000 128
11000000 192
11100000 224
11110000 240
11111000 248
11111100 252
11111110 254
11111111 255
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Binary to Decimal and Hexadecimal Conversion


(contd.)

Hex to Binary to Decimal Chart


Hexadecimal Value Binary Value Decimal Value
0 0000 0
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 8
9 1001 9
A 1010 10
B 1011 11
C 1100 12
D 1101 13
E 1110 14
F 1111 15
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

• Bits

• Octet
• Bytes
Revision no.: PPT/2K804/04

IP Addressing

• IP Terminology

• Network Address

• Broadcast Address
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

The Hierarchical IP Addressing Scheme

8 bits 8 bits 8 bits 8 bits


Class A: Network Host Host Host
Class B: Network Network Host Host
Class C: Network Network Network Host
Class D: Multicast
Class E: Research
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

The Hierarchical IP Addressing Scheme (contd.)


• Network Address Range: Class A
• The Class A range of network addresses:
00000000 = 0
01111111 = 127

• Network Address Range: Class B


• The Class B range of network addresses:
10000000 = 128
10111111 = 191
• Network Address Range: Class C
• The Class C range of network addresses:
11000000 = 192
11011111 = 223
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

The Hierarchical IP Addressing Scheme (contd.)


• Network Address Ranges: Classes D and E
• The addresses between 224 and 255 are reserved for Class D and E
networks. Class D (224–239) is used for multicast addresses and Class
E (240–255) for scientific purposes .

• Network Addresses: Special Purpose


• Some IP addresses are reserved for special purposes, so network
administrators can’t ever assign these addresses to nodes.
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Reserved IP Addresses
Address Function

Network address of all 0s Interpreted to mean “this network or segment.”

Network address of all 1s Interpreted to mean “all networks.”

Network 127.0.0.1 Reserved for loopback tests. Designates the


local node and allows that node to send a test
packet to itself without generating network
traffic.

Node address of all 0s Interpreted to mean “network address” or any


host on specified network.

Node address of all 1s Interpreted to mean “all nodes” on the specified


network; for example, 128.2.255.255 means
“all nodes” on network 128.2 (Class B address).

Entire IP address set to all 0s Used by Cisco routers to designate the default
route. Could also mean “any network.”

Entire IP address set to all 1s (same as Broadcast to all nodes on the current network;
255.255.255.255) sometimes called an “all 1s broadcast” or
limited broadcast.
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Private IP Addresses

Reserved IP Address Space

Address Class Reserved address space

Class A 10.0.0.0 through 10.255.255.255


Class B 172.16.0.0 through
172.31.255.255
Class C 192.168.0.0 through
192.168.255.255
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Broadcast Addresses

Layer 2 broadcasts These are sent to all nodes on a LAN.


Broadcasts (layer These are sent to all nodes on the network.
3)
Unicast These are sent to a single destination host.
Multicast These are packets sent from a single source,
and transmitted to many devices on different
networks.
Revision no.: PPT/2K804/04

Introduction to Network Address


© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Translation (NAT)
• In NAT terminology, the inside network is the set of networks that

are subject to translation. The outside network refers to all other

addresses—usually those located on the Internet.

• NAT operates on a Cisco router—generally only connecting two

networks together—and translates your private (inside local)

addresses within the internal network, into public (inside global)

addresses before any packets are forwarded to another network.


Revision no.: PPT/2K804/04

Introduction to Network Address


© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Translation (NAT) (contd.)


• There are different flavors of NAT:
• Static NAT:- Designed to allow one-to-one mapping between local
and global addresses. This flavor requires you to have one real
Internet IP address for every host on your network.

• Dynamic NAT:- Designed to map an unregistered IP address to a


registered IP address from out of a pool of registered IP addresses.
You don’t have to statically configure your router to map an inside to
an outside address as in static NAT, but you do have to have eno ugh
real IP addresses for everyone who wants to send packets to and from
the Internet.

• Overloading:- This is the most popular type of NAT configuration.


Overloading is a form of dynamic NAT that maps multiple unregistered
IP addresses to a single registered IP address (many-to-one) by using
different ports. Therefore, it’s also known as port address translation
Revision no.: PPT/2K804/04
© CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission.

Design & Published by:


CMS Institute, Design & Development Centre, CMS House, Plot No. 91, Street No.7,
MIDC, Marol, Andheri (E), Mumbai –400093.

Você também pode gostar