Sem 5 Network
Sem 5 Network
Answer:: TCP/IP (Transmission Control Protocol / Internet Protocol) Different features of TCP/IP
• TCP/IP can recover failure; it is able to divert data immediately through other routers if one or more
parts of network failed.
• TCP/IP provides the facility to connect new subnetworks without significant interference of services.
• TCP/IP is reliable to handling high error rate with facilities for full error control.
• TCP/IP is also reliable of transmission of files, remote login, and remote execution of commands.
Every host in a network has two addresses: a hardwired MAC address and a logical IP address. TCP/IP
uses both these addresses. MAC
TCP/IP functionality is divided into four layers, each of which include specific protocols.
The application layer provides applications with standardized data exchange. Its
protocols include the Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP),
Post Office Protocol 3 (POP3), Simple Mail Transfer Protocol (SMTP) and Simple
Network Management Protocol (SNMP).
The transport layer is responsible for maintaining end-to-end communications across the
network. TCP handles communications between hosts and provides flow control,
multiplexing and reliability. The transport protocols include TCP and User Datagram
Protocol (UDP), which is sometimes used instead of TCP for special purposes.
The network layer, also called the internet layer, deals with packets and connects
independent networks to transport the packets across network boundaries. The network
layer protocols are the IP and the Internet Control Message Protocol (ICMP), which is
used for error reporting.
The physical layer consists of protocols that operate only on a link -- the network
component that interconnects nodes or hosts in the network. The protocols in this layer
include Ethernet for local area networks (LANs) and the Address Resolution Protocol
(ARP).
END USER
|
TRANSACTION SERVICES provides application services such as
distributed data base access and document interchange.
|
PRESENTATION SERVICES formats data for different presentation
media and coordinates the sharing of resources.
|
DATA FLOW CONTROL synchronizes data flow, correlates exchanges
of data, and groups related data into units.
|
TRANSMISSION CONTROL paces data exchanges to match processing
capacity and enciphers data if security is needed.
|
PATH CONTROL routes data between source and destination and
controls data traffic in the network.
|
DATA LINK CONTROL transmits data between adjacent nodes.
|
PHYSICAL CONTROL connects adjacent nodes physically and electri-
cally. Lowest level.
----------------------------------------------------------------------------
Each layer performs services for the next higher layer, requests services
from the next lower layer, and communicates with corresponding layers in
other SNSA-based products.
For example, the PHYSICAL CONTROL Layer:
- Manages the physical interface between its node and the transmission
facilities that are attached to the node
- Performs services for the data link control layer
- Communicates with physical control layers in other SNA-based products
Network Components:
Hardware and software components implement the functions of the seven
architectural layers.
Hardware components include processors, communications controllers,
cluster controllers, workstations, and printers.
Software components that implement SNA functions include telecommunication
access methods, application subsystems, and network control programs.
socket
To do network I/O, the first thing a process must do is to call the socket system call, specifying
the type of communication protocol desired.
#include <sys/types.h>
#include <sys/socket.h>
bind
1. Servers register their well-known address with the system. It tells the system "this is my
address and any messages received for this address are to be given to me." Both
connection-oriented and connectionless servers need to do this before accepting client
requests.
2. A client can register a specific address for itself.
3. A connectionless client needs to assure that the system assigns it some unique address, so
that the other end (the server) has a valid return address to send its responses to. This
corresponds to making certain an envelope has a valid return address, if we expect to get
a reply from the person we sent the letter to.
connect
listen
This system call is used by a connection-oriented server to indicate that it is willing to receive
connections.
#include <sys/types.h>
#include <sys/socket.h>
accept
These system calls are similar to the standard read and write system calls, but additional
arguments are required.
#include <sys/types.h>
#include <sys/socket.h>
close