Internetting - start [kondor.etf.rs]

Download Report

Transcript Internetting - start [kondor.etf.rs]

Basic Infrastructure
for Electronic Business
on the Internet
Authors:
Miroslava Mitrovic ([email protected])
Veljko Milutinovic ([email protected])
Network



A network is
a group of computers and peripherals
connected together by some medium
The connection can be
direct (through a cable) or
indirect (through a modem)
The different devices on the network
communicate with each other
through a predefined set of rules (protocol)
Workstation
Workstation
IBM Compatible
Laser printer
Workstation
Network Hardware


Physically connects
computers in the network together
Main hardware components:
Nodes
Communication equipment
Additional components
Topology
Nodes




Network node (computer, printers, routers)
Computers in network
can be used as
work stations or servers or both
PC computers need
NIC (Network Interface Card)
to be able to be part of
LAN (Local Area Network)
Different standards, different network cards!
(Ethernet, Token Ring, ARC net)
Communication equipment





Cables :
(coaxial cables, fiber-optic cables, twisted pairs)
Wiring centers :
(HUB , concentrator,
MAU (Multi station Access Units))
Intranetwork links :
(connectors, transceivers, repeaters)
Internetwork links :
(bridges, gateways, routers, switches)
Wireless components
Additional Components



Peripherals :
(printers, fax machines, modems, cd readers)
Safety devices :
UPS (Uninterruptible Power Supply),
SPS (Standby Power Supply)
Network tools
Topology




Defines rules for connecting network nodes
Logical topology differs from physical topology!
Logical topology defines rules for
transmitting information's (bus, ring, star)
Physical topology defines rules for
electrical connection components in network
Topology
Workstation
Workstation
Workstation
Workstation
IBM Compatible
Star
Topology
Workstation
Workstation
Token
Ring
Workstation
Ring
IBM Compatible
Network Software


Enables using hardware
for communication and exchanging information
Protocols (set of rules) give formulas
for passing messages,
specifying the details of message formats,
and for describing how to handle error conditions
Internetting


Connecting many disparate physical networks
and make them function
as a coordinate unit
Internet technology hides
the details of network hardware and
permits computers to communicate
independent of their physical network connection
Internetting
Mac II
Workstation
Internet
IBM Compatible
IBM Compatible
Laptop computer
Internet





Internet is network of all networks
Interconnected computer networks
that communicate,
usually via TCP/IP
Internet and internet
Set of application programs
that use the network to carry out
useful communication tasks (user’s point of view)
No one owns the Internet!
Internet architecture


How are networks interconnected
to form a internet work?
Computers that interconnect two networks
and pass packets from one to the other
are called internet gateways or internet routers
Internet architecture
Net1
G
Two networks interconnected
by G, a gateway (router)
Net 2
Internet architecture
Net1
G1
Net 2
Three networks
interconnected by two
gateways
G2
Net 3
Internet architecture



Gateways provide all interconnections
among physical networks
Usually minicomputers
Gateways route packets based on destination
network, not on destination host!
Internet architecture
hosts
Internet
Users point of view
Internet architecture
hosts
Structure of physical network
and gateways that provide interconnection
Open Systems





Architecture is not secret
The definition applies equally well
to software and hardware
UNIX-classic example for
an open software platform
Open system networking:
network based on well-known and
understood protocol
Three most popular services:
File Transfer
Electronic mail
Remote login
The ISO OSI-RM
International Organization for Standardization
Open System Interconnection Reference Model

ISO has developed an architecture that defines
seven layers of network protocol
Application
Presentation
Session
Transport
Network
Data Link
Physical
Grouping of OSI Layers
Application
Presentation
Upper Layers
Session
Transport
Middle Layer
Network
Data Link
Physical
Lower Layers
Upper Layers
Application/Presentation/Session



Applications oriented
Presents the interface to the user
Don’t care how data gets to the application!
Middle Layer
Transport

Separate application oriented upper layers from
network oriented lower layers
Lower Layers
Network/Data Link/Physical




Oriented toward data transmission
Packages, routes, verifies and transmits datagrams
Type of data for application doesn't matter
Has no application dependencies !
Communication in OSI-RM
Application
Application
Presentation
Presentation
Session
Session
Transport
Transport
Network
Internet
Data Link
Data Link
Physical
Physical
Application Layer




Highest layer in the OSI reference model
Concerned with the user’s view of the network
Handles network transparency, resource allocation
and problem partitioning
Sends data and program tasks
to the presentation layer,
which is responsible
for coding data from application layer
in the appropriate form
Presentation Layer




The second highest layer in the OSI reference model
Converts network data to application format
Performs function as
text compression , code or format conversion
to try to smooth out differences between hosts
Serves application layer, uses session layer
Session Layer








The third highest layer in the OSI reference model
Synchronized data exchange
between upper and lower layers
Manages the current connection, or session,
between two computers
Handles security and creation of the session
Establishing connection
Closes connection
Uses the transport layer to establish a connection
between processes on different hosts
Used by the presentation layer
Transport Layer





The middle layer in the OSI reference model
Uses the network layer to provide a
virtual, error-free, point-to-point connection
so that host A can send messages to host B
and they will arrive uncorrupted and in the correct
order
Hides details necessary to actually
make a connection between two computers
Establishes and dissolves connections between
hosts
Used by the session layer
Network Layer





The third lowest layer in the OSI reference model
Determines addresses
Responsible for routing packets across the network
Establishing logical link between two nodes
Used by the transport layer, uses the data link layer
Data Link Layer






The second lowest layer in the OSI reference model
Splits data into frames for sending
on the physical layer
Receives acknowledgment frames
Performs error checking and retransmission
Provides an error free virtual channel
to the network layer
Split into
an upper sublayer Logical Link Control (LLC)
and lower sublayer Media Access Control (MAC)
Physical Layer





The lowest layer in OSI model
Transmits data
How bits are passed over the network medium,
what control signals are used,
and the mechanical properties of the network itself
(cable size, connector, and so on)
Only layer in which actual communication occur
Used by the data link layer
Data Transfer over the Internet
Computer A
Computer B
Application
Application
Presentation
Presentation
Session
Session
Transport
Gateway
Gateway
Transport
Network
Network
Network
Internet
Data Link
Data Link
Data Link
Data Link
Physical
Physical
Physical
Physical
Subnetwork
Subnetwork
OSI vs. TCP/IP
Application
Presentation
Application
Session
Transport
Transport
Network
Internet
Data Link
Physical
Physical
The TCP/IP protocol family










TCP
UDP
IP
ICMP
RIP
OSPF
ARP
DNS
RARP
BOOTP











FTP
Telnet
EGP
GGP
IGP
BGP
NFS
NIS
RPC
SMTP
SNMP
Transport


Transmission Control Protocol (TCP):
connection-based services
User Datagram Protocol (UDP):
connectionless services
Routing




Internet Protocol (IP):
handles transmission of information
Internet Control Message Protocol (ICMP):
handles status messages for IP
Routing Information Protocol (RIP):
determines routing
Open Shortest Path First (OSPF):
alternate protocol for determining routing
Network Addresses



Address Resolution Protocol (ARP):
determines addresses
Domain Name System (DNS):
determines addresses from machine names
Reverse Address Resolution Protocol (RARP): determines addresses
User Services



Boot Protocol (BOOTP):
starts up a network machine
File Transfer Protocol (FTP):
transfers files
Telnet:
allows remote logins
Gateway Protocols




Exterior Gateway Protocol (EGP):
transfers routing information for external networks
Gateway-to-Gateway Protocol (GGP):
transfers routing information between gateways
Interior Gateway Protocol (IGP):
transfers routing information for internal networks
Border Gateway Protocol (BGP)
newer than EGP, used within an autonomous
network
Others





Network File System (NFS):
enables directories on one machine to be mounted
on another
Network Information Service (NIS):
maintains user accounts across networks
Remote Procedure Call (RPC):
enables remote applications to communicate
Simple Mail Transfer Protocol (SMTP):
transfers electronic mail
Simple Network Management Protocol (SNMP):
sends status messages about the network
Datagram





Basic unit of data send thought an internet
Moving packets between routers and/or hosts
Consists of a header followed by the data
Header:
information necessary to move the packet
across the Internet
Connectionless transport mechanism
Datagram
Datagram
Field
ver
Function
The version of the IP protocol that created
the datagram.
IHL
The length of the IP header in 32-bit words
(the minimum value is 5).
Type of The quality of service (precedence, delay,
service throughput, and reliability) desired for the
datagram.
Total
The length of the datagram (both header
length
and user data), in octets.
Identific A 16-bit value assigned by the originator of
ation
the datagram, used during reassembly.
Datagram
Flags
Control bits indicating whether the
datagram may be fragmented, and if so,
whether other later fragments exist.
Fragment The offset in the original datagram of the
offset
data being carried in this datagram, for
fragmented datagrams.
Time to
The time in seconds the datagram is
live
allowed to remain in the internet system.
Protocol The high level protocol used to create the
message (analogous to the type field in an
Ethernet packet).
Header
A checksum of the header.
checksum
Datagram
Source IP
32-bit IP address of the sender.
address
Destination 32-bit IP address of the recipient.
IP address
Options
An optional field primarily used for
network testing or debugging.
Padding
All bits set to zero - used to pad the
datagram header to a length that is a
multiple of 32 bits.
User data
The actual data being sent.
Internet Addresses





Globally accepted method of identifying computers
Each host on a TCP/IP internet is assigned
a unique 32-bit address that is used
in all communication with that host
Must not be confused with physical addresses!
Each address is a pair (netid, hostid),
where netid identifies a network,
and hostid identifies a host on that network
In practice, each IP address must have
one of the first three forms shown
in the picture that follows
Internet Addresses
Class
A
B
C
D
E
Maximum number
Maximum number
of
of
possible networks
hosts per network
127
16,777,216
16,384
65,536
2,097,152
255
Reserved Class
Reserved Class
Internet Addresses
Internet Addresses

The IP address is expressed
in dotted decimal notation (DDN)
by taking the 32 binary bits and
forming 4 groups of 8 bits, each separated by a dot
- 10.4.8.2 is a class A address
- 10 is the DDN assigned network number
- .4.8 are (possibly) user assigned subnet numbers
- .2 is the user assigned host number
- 172.16.9.190 is a class B address
- 172.16 is the DDN assigned network number
- .9 is the user assigned subnet number
- .190 is the user assigned host number
Internet Addresses





Host: any attached device on a subnet,
including PC’s, mainframes and routers
Most hosts are connected to only one network,
and they have a single IP address
Routers are connected to more than one network
and they can have multiple IP addresses
Problem: IP type of addressing defines connection,
not host!
Problem: what when an organization
which has a class C address
finds that they (.org) need to upgrade to class B
DNS – The Domain Name System





Converts symbolic node name to IP address
Uses distributed database
Network Information Center (NIC) maintains names
and network gateway addresses
Name Resolver on each network
tries to complete address from own database
Examines Name Server for full NIC database
if unsuccessful resolution
ARP - Address Resolution Protocol




Allows host to find
the physical address of a target host
on the same physical network,
given only the target’s IP address
It does this by sending out an ARP broadcast packet
containing both the source
and destination IP address
The broadcast is media-dependant
For Ethernet LANs the broadcast address
is a packet whose destination address bits are all `1'
ARP - Address Resolution Protocol


All stations on the LAN receive this address,
but only one host is able to recognize
its own IP address
It replies, thereby giving the original host
its physical address.
ARP - Address Resolution Protocol
A
X
B
Host A broadcasts an ARP request containing IB to all machines
Y
ARP - Address Resolution Protocol
A
X
B
Host B responds with an ARP reply that contains the pair (Ib, Pb)
Y
RARP - Reverse Address Resolution Protocol


How does the diskless machine,
one without access to secondary storage,
determines its IP address at system startup?
A diskless machine uses RARP to obtain
its IP address from a server
RARP - Reverse Address Resolution Protocol
A
B
C
Machine A broadcasts a RARP request specifying itself as a target
D
RARP - Reverse Address Resolution Protocol
A
B
C
Those machines authorized to supply the RARP service (C i D) reply
directly to A
D
IP - Internet Protocol


Defines unreliable, connectionless delivery
mechanism
IP provides three important definitions:
- Defines the basic unit of data transfer
used throughout a TCP/IP internet
- Performs routing function,
choosing a path over which data will be sent
- Includes a set of rules that embody
the idea of unreliable packet delivery
ICMP - Internet Control Message Protocol





Integral part of IP
Allows gateways to send error or control messages
to other gateways or hosts
Provides communication between
the Internet Protocol software on one machine
and the Internet Protocol Software on another
Only reports error conditions to the original source!
ICMP message is encapsuled in an IP datagram
ICMP-The Internet Control Message Protocol
ICMP-The Internet Control Message Protocol
Type field
Value
Description
0
Echo Reply
3
Destination Not Reachable
4
Source Quench
5
Redirection Required
8
Echo Request
11
Time to Live Exceeded
12
Parameter Problem
13
Timestamp Request
14
Timestamp Reply
15
Information Request (now obsolete)
16
Information Reply (now obsolete)
17
Address Mask Request
18
Address Mask Reply
UDP - User Datagram Protocol






Connectionless protocol
Provides the primary mechanism that application
programs use to send datagrams
to other application programs
Provides protocol ports used to
distinguish among multiple programs
executing on a single machine
Uses IP to transport a message
from one machine to another
Does not use acknowledgements to make sure
messages arrive
UDP message is called a user datagram
UDP - User Datagram Protocol
UDP - User Datagram Protocol




Source port:
An optional field with the port number
If a port number is not specified, the field is set to 0
Destination port:
The port on the destination machine
Length:
The length of the datagram,
including header and data
Checksum:
A 16-bit one's complement
of the one's complement sum of the datagram,
including a pseudo header similar to that of TCP
UDP - User Datagram Protocol
Conceptual Layering
Application
User
Datagram(UDP)
Internet (IP)
Physical
TCP - Transmission Control Protocol







TCP is a communication protocol,
not a piece of software!
Provides reliable stream service
Positive acknowledgement with retransmission
Specifies the format of the data and
acknowledgements that two computers exchange
to achieve a reliable transfer
Specifies the procedures the computers use
to ensure that the data arrives correctly
Specifies how TCP software distinguishes
among multiple destinations on given machine
Specifies how communicating machines recover
from errors like lost or duplicated packets
TCP - Transmission Control Protocol






Specifies how two computers initiate
a TCP stream transfer and
how they agree when it is complete
Does not dictate the details of the interface
between an application program and TCP
Does not specify the exact application programs
to access these operations
Reason: flexibility
TCP uses the connection, not the protocol port,
as its fundamental abstraction
Connections are identified by a pair of endpoints
TCP - Transmission Control Protocol



TCP port number can be shared
by a multiple connection on the same machine
The basic unit of transfer used by TCP is a segment
Segments are used
to pass control information or data
TCP - Transmission Control Protocol
Server Site
Network Messages
Receiver Site
Send Packet 1
Receive Packet 1
Send ACK 1
Receive ACK1
Send Packet 2
Receive Packet 2
Send ACK2
Receive ACK2
Sender awaits an acknowledgement for each packet sent
TCP - Transmission Control Protocol
Server Site
Send Packet1
Start Timer
Network MessagesReceiver Site
Packet lost
Packet should arrive
ACK should be sent
ACK would normally
Arrive at this time
Timer Expires
Retransmit Packet1
Start Timer
Receive Packet1
Receive ACK1
Cancel Timer
Send ACK1
Timeout and retransmission that occurs when a packet is lost
TCP - Transmission Control Protocol





A simple positive acknowledgement protocol
wastes a substantial amount of network bandwidth
Delays sending a new packet until it receives
an acknowledgement for the previous packet
Sliding window protocol
Keeps the network completely saturated with packets
Higher throughput than
a simple positive acknowledgment protocol
TCP - Transmission Control Protocol
Sender Site
Network Messages
Receiver Site
Send Packet1
Send Packet2
Send Packet3
Receive ACK1
Receive ACK2
Receive Packet1
Send ACK1
Receive Packet2
Send ACK2
Receive Packet3
Send ACK3
Receive ACK3
Three packet transmitted using a sliding window protocol
TCP - Transmission Control Protocol
Conceptual Layering
Application
TCP
UDP
Internet (IP)
Physical
Telnet – remote login protocol
Allows user at one site
to establish a TCP connection
to a login server at another site,
and then it passes keystrokes
from the user’s terminal
directly to the remote machine
as if they had been typed at
a terminal on the remote machine
 Carries output from the remote machine
back to the user’s terminal

Telnet – remote login protocol




1.
2.
1.
The service is called transparent
Telnet client software
User specifies a remote machine
either by giving its domain name or IP address
Telnet offers three basic services
Defines a network virtual terminal (NVT)
Includes a mechanism that allows
the client and server to negotiate options
Treats both ends of the connection symmetrically
Telnet – remote login protocol
server sends to
pseudo terminal
client reads
from terminal
client sends
to server
TELNET
client
TELNET
server
server receives
from terminal
operating system
operating system
User's terminal
TCP/IP
internet
FTP – File Transfer Protocol






Manages files across machines
without remote Telnet session
Transfers files, manages directories, accesses e-mail
Does not enable access
to remote machine for program execution
Uses two channels
for simultaneous transfer
of commands and data
Conducts all transfers in foreground
Does not use queues or spoolers
so you are watching the transfer process in real time
FTP – File Transfer Protocol



Relies on TCP to provide connection management
Protocol Interpreter PI transfers instructions
using TCP port 21
Data Transfer Process DTP transfers files
using TCP port 20
FTP – File Transfer Protocol
FTP channel connections
FTP – File Transfer Protocol



Login
Verifies user ID and password
Anonymous FTP allows access without login account
Access and file transfer requires
proper permissions on the remote side
Define directory
Identifies starting directory
Local and remote file system
Define File Transfer Mode
Text uses ASCII characters separated by CR and NL
Binary transfers without conversion or formatting
FTP – File Transfer Protocol


Start Data Transfer
Enables user commands
Stop Data Transfer
Closes connection
TFTP – Trivial File Transfer Protocol




Does not log on to remote machine
Uses UDP connectionless transport
TFTP transfer identifiers (TID’s)
set ends of connection
Support basic error messages
Any kind of error can result in transfer failure
Uses to boot diskless terminals and load applications
Small executable size and memory requirements
Cannot execute FTP until loaded with OS
Lax access regulations pose security risks
Electronic Mail






The most widely used application service
Differs fundamentally from other uses of network
Usually timeout and retransmission
if no acknowledgement
Sender don’t want to wait for
the remote machine to become available
before continuing work!
User don't want to have transfer abort merely
because communication with the remote machine
becomes temporary unavailable!
Spooling
Conceptual components of an electronic mail system
user sends
mail
outgoing mail
spool area
TCP connection
client
(background
for outgoing mail
transfer)
user
interface
user reads
mail
mailboxes for
incoming mail
server (to
TCP connection
accept mail)
for incoming mail
SMTP - Simple Mail Transfer Protocol





Standard for the exchange of mail
between machines
Focuses specifically on
how the underlying mail delivery system
passes messages across a link
from one machine to another
Messages transferred as 7-bit ASCII
Uses spools or queues
Does not specify
how the mail system accepts mail from a user
or how the user interface presents the user
with incoming mail
SMTP - Simple Mail Transfer Protocol



Does not specify
how mail is stored or
how frequently the mail system
attempts to send messages
Mail command identifies sender and provides
message information
Response is acknowledgment with identification of
recipient
Example of SMTP Transfer
S: 220 Beta.gov Simple Mail Transfer Service Ready
C: HELO Alpha.edu
S: 250 Beta.gov
C: MAIL FROM: <[email protected]>
S: 250 OK
C: RCPT TO: <[email protected]>
S: 550 No such user here
Example of SMTP Transfer
C: RCPT TO: <[email protected]>
S: 250 OK
C: DATA
S: 354 Start mail input; end with <CR><LF>.<CR><LF>
C: …sends body of mail message…
C: …continues for as many lines as message contains
C: <CR><LF>. <CR><LF>
S: 250 OK
C: QUIT
S: 221 Beta.gov Service closing transmission channel
References





The Internet Unleashed, SAMS Publishing
Internetworking With TCP/IP, Douglas Comer
Teach yourself TCP/IP in 14 days, Tim Parker
Novell’s Complete Encyclopedia of Networking,
Werner Feibel
http://www.ieee-occs.org
Conclusion