The document discusses several TCP/IP protocols:
- FTP is used for file transfer between clients and servers over TCP ports 20 and 21.
- HTTP is used for accessing resources like web pages over TCP port 80.
- SMTP is used for email transmission over TCP port 25.
- DNS is used to translate between domain names and IP addresses over UDP and TCP port 53.
- Telnet is used for remote terminal access sessions over TCP port 23.
- SSH is a secure replacement for Telnet for encrypted command-line access over TCP port 22.
2. 2
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Temas a tratar
Unidad de aprendizaje 2
Tema 7:
ALGUNOS PROTOCOLOS TCP/IP
3. 3
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Protocolos TCP/IP
FTP File Transfer Protocol
HTTP HyperText Transfer Protocol
SMTP Simple Mail Transfer Protocol
DNS Domain Name System
TFTP Trivial File Transfer Protocol http://www.iana.org/assignments/port-numbers
4. 4
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
File Transfer Protocol -FTP
RFC 959 (1985)
Actualizaciones: RFCs 2228, 2428, 2640, 2773, 3659
20/TCP DATA Port
21/TCP Control Port
The objectives of FTP are 1) to promote sharing of files
(computer programs and/or data), 2) to encourage indirect or
implicit (via programs) use of remote computers, 3) to shield a
user from variations in file storage systems among hosts, and 4)
to transfer data reliably and efficiently. FTP, though usable
directly by a user at a terminal, is designed mainly for use by
programs.
The attempt in this specification is to satisfy the diverse needs of
users of maxi-hosts, mini-hosts, personal workstations, and
TACs, with a simple, and easily implemented protocol design.
This paper assumes knowledge of the Transmission Control
Protocol (TCP) [2] and the Telnet Protocol [3].
5. 5
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Modelo de funcionamiento
PI Protocol interpreter
DTP Data transfer process
6. 6
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Esquema de conexión activo
testbox1: {/home/p-t/slacker/public_html} % ftp -d
testbox2
Connected to testbox2.slacksite.com.
220 testbox2.slacksite.com FTP server ready.
Name (testbox2:slacker): slacker
---> USER slacker
331 Password required for slacker.
Password: TmpPass
---> PASS XXXX
230 User slacker logged in.
---> SYST
215 UNIX Type: L8
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
---> PORT 192,168,150,80,14,178
200 PORT command successful.
---> LIST
150 Opening ASCII mode data connection for file list.
drwx------ 3 slacker users 104 Jul 27 01:45
public_html
226 Transfer complete.
ftp> quit
---> QUIT
221 Goodbye.
testbox1.slacksite.com (192.168.150.80)
testbox2.slacksite.com (192.168.150.90)
Puerto=14*256+178
7. 7
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Esquema de conexión pasivo
testbox1: {/home/p-t/slacker/public_html} % ftp -d
testbox2
Connected to testbox2.slacksite.com.
220 testbox2.slacksite.com FTP server ready.
Name (testbox2:slacker): slacker
---> USER slacker
331 Password required for slacker.
Password: TmpPass
---> PASS XXXX
230 User slacker logged in.
---> SYST
215 UNIX Type: L8
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> passive
Passive mode on.
ftp> ls
---> PASV
227 Entering Passive Mode
(192,168,150,90,195,149).
---> LIST
150 Opening ASCII mode data connection for file list
drwx------ 3 slacker users 104 Jul 27 01:45
public_html
226 Transfer complete.
ftp> quit
---> QUIT
221 Goodbye.
testbox1.slacksite.com (192.168.150.80)
testbox2.slacksite.com (192.168.150.90)
9. 9
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Telnet -TELecommunication NETwork
RFC 854 (1983)
Actualizaciones: RFC 5198
Puerto: 23
The purpose of the TELNET Protocol is to provide a fairly
general, bi-directional, eight-bit byte oriented communications
facility. Its primary goal is to allow a standard method of
interfacing terminal devices and terminal-oriented processes to
each other. It is envisioned that the protocol may also be used
for terminal-terminal communication ("linking") and process-
process communication (distributed computation).
The TELNET Protocol is built upon three main ideas: first, the
concept of a "Network Virtual Terminal"; second, the principle of
negotiated options; and third, a symmetric view of terminals and
processes.
11. 11
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
SSH -Secure SHell
RFC 4251 (2006)
Puerto: 22
The SSH protocol consists of three major components: The
Transport Layer Protocol provides server authentication,
confidentiality, and integrity with perfect forward secrecy. The
User Authentication Protocol authenticates the client to the
server. The Connection Protocol multiplexes the encrypted tunnel
into several logical channels.
Secuencia de eventos de una conexión SSH
Primero, se crea una capa de transporte segura para que el cliente
sepa que está efectivamente comunicando con el servidor correcto.
Luego se cifra la comunicación entre el cliente y el servidor por
medio de un código simétrico.
Después, con la conexión segura al servidor en su lugar, el cliente
se autentica ante el servidor sin preocuparse de que la información
de autenticación pudiese exponerse a peligro.
Por último, con el cliente autenticado ante el servidor, se pueden
13. 13
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Ejemplo
$ ssh X.X.X.X
The authenticity of host 'X.X.X.X (X.X.X.X)' can't be established.
DSA key fingerprint is
d4:dd:40:fa:0d:e4:7f:45:63:d9:e4:3f:8c:70:0f:3d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'X.X.X.X' (DSA) to the list of known
hosts.
Password:
14. 14
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Hypertext Transfer Protocol -HTTP
RFC 1945 (1996)
Actualizaciones: RFC 2068, 2616, 2774
Puerto: 80
The Hypertext Transfer Protocol (HTTP) is an application-level
protocol with the lightness and speed necessary for distributed,
collaborative, hypermedia information systems. It is a generic,
stateless, object-oriented protocol which can be used for many
tasks, such as name servers and distributed object management
systems, through extension of its request methods (commands).
A feature of HTTP is the typing of data representation, allowing
systems to be built independently of the data being transferred.
HTTP has been in use by the World-Wide Web global information
initiative since 1990. This specification reflects common usage of
the protocol referred to as 'HTTP/1.0'
15. 15
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Modelo de funcionamiento
Most HTTP communication is initiated by a user agent and
consists of a request to be applied to a resource on some origin
server. In the simplest case, this may be accomplished via a
single connection (v) between the user agent (UA) and the origin
server (O).
request chain ------------------------>
UA -------------------v------------------- O
<----------------------- response chain
A more complicated situation occurs when one or more
intermediaries are present in the request/response chain. There
are three common forms of intermediary: proxy, gateway, and
tunnel. A proxy is a forwarding agent, receiving requests for a
URI in its absolute form rewriting all or part of the message, and
forwarding the reformatted request toward the server identified by
the URI. A gateway is a receiving agent, acting as a layer above
some other server(s) and, if necessary, translating the requests
to the underlying server's protocol. A tunnel acts as a relay point
between two connections without changing the messages;
tunnels are used when the communication needs to pass through
16. 16
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Simple Mail Transfer Protocol -SMTP
RFC 788 (1981)
Actualizaciones:RFCs 2821, reemplaza 821 y 974, y actualiza 1123
Puerto: 25
An important feature of SMTP is its capability to transport mail
across networks, usually referred to as "SMTP mail relaying". A
network consists of the mutually-TCP-accessible hosts on the
public Internet, the mutually-TCP-accessible hosts on a firewall-
isolated TCP/IP Intranet, or hosts in some other LAN or WAN
environment utilizing a non-TCP transport-level protocol.
Using SMTP, a process can transfer mail to another process on
the same network or to some other network via a relay or
gateway process accessible to both networks. In this way, a mail
message may pass through a number of intermediate relay or
gateway hosts on its path from sender to ultimate recipient.
20. 20
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Domain Name System -DNS
RFC 1035 (1987)
Actualizaciones: 882, 883, 973, 1034, 4033, 4035
Puerto: 53
The goal of domain names is to provide a mechanism for naming
resources in such a way that the names are usable in different
hosts, networks,protocol families, internets, and administrative
organizations. From the user's point of view, domain names are
useful as arguments to a local agent, called a resolver, which
retrieves information associated with the domain name. Thus a
user might ask for the host address or mail information
associated with a particular domain name. To enable the user to
request a particular type of information, an appropriate query
type is passed to the resolver with the domain name. To the user,
the domain tree is a single information space; the resolver is
responsible for hiding the distribution of data among name
servers from the user.
21. 21
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
DNS Domain Namespace
Jerarquía
Delegación
22. 22
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Types of DNS Domain Names
Name Type Description Example
Root domain
This is the top of the tree. When used in a DNS
domain name, it is stated by a trailing period (.)
to designate that the name is located at the root
or highest level of the domain hierarchy. In this
instance, the DNS domain name is considered
to be complete and points to an exact location
in the tree of names. Names stated this way
are called fully qualified domain names
(FQDNs).
A single period (.) or a
period used at the end of a
name, such as
“example.microsoft.com.”
Top level
domain
A name used to indicate a country/region or the
type of organization using a name.
““.com”, which indicates a
name registered to a
business for commercial
use on the Internet.
Second level
domain
Variable-length names registered to an
individual or organization for use on the
Internet. These names are always based upon
an appropriate top-level domain, depending on
the type of organization or geographic location
where a name is used.
““microsoft.com. ”, which is
the second-level domain
name registered to
Microsoft by the Internet
DNS domain name
registrar.
23. 23
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Types of DNS Domain Names
Name Type Description Example
Subdomain
Additional names that an organization
can create that are derived from the
registered second-level domain
name. These include names added to
grow the DNS tree of names in an
organization and divide it into
departments or geographic locations.
““example.microsoft.com. ”, which is
a fictitious subdomain assigned by
Microsoft for use in documentation
example names.
Host or
resource
name
Names that represent a leaf in the
DNS tree of names and identify a
specific resource. Typically, the
leftmost label of a DNS domain name
identifies a specific computer on the
network. For example, if a name at
this level is used in a host (A) RR, it
is used to look up the IP address of
computer based on its host name.
““host-a.example.microsoft.com.”,
where the first label (“host-a”) is the
DNS host name for a specific
computer on the network.
24. 24
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Descriptio
n
Class Time To Live (TTL) Type Data
Start of
Authority
Internet
(IN)
Default TTL is 60
minutes
SOA
Owner Name
Primary Name Server DNS
Name, Serial Number
Refresh Interval
Retry Interval
Expire Time
Minimum TTL
Host
Internet
(IN)
Record-specific TTL if
present, or else zone
(SOA) TTL
A
Owner Name (Host DNS
Name)
Host IP Address
Name
Server
Internet
(IN)
Record-specific TTL if
present, or else zone
(SOA) TTL
NS
Owner Name
Name Server DNS Name
Mail
Exchanger
Internet
(IN)
Record-specific TTL if
present, or else zone
(SOA) TTL
MX
Owner Name
Mail Exchange Server DNS
Name, Preference Number
Canonical
Name
(an alias)
Internet
(IN)
Record-specific TTL if
present, or else zone
(SOA) TTL
CNAME
Owner Name (Alias Name)
Host DNS Name
Common DNS Resource Records
http://www.iana.org/assignments/dns-parameters
27. 27
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Tablas DNS -partial zone for physics department
Remember
named.conf
file
32 bit time interval,
in seconds
32 bit unsignedYYYYMMDDNNN
-formatted number
28. 28
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Tablas DNS -glue records for physics department
29. 29
Ciclo 2009-IIIng.CIP Jack Daniel Cáceres Meza
jack_caceres@hotmail.com
Tablas DNS -in-addr.arpa records
Subnet 12
Network 149.76