LESSON 4 by vkmanchanda


									Introduction to Protocols
 In information technology, a protocol is the special set of
  rules that end points in a telecommunication connection use
  when they communicate.
 Protocols exist at several levels in a telecommunication
 For example, there are protocols for the data interchange at
  the hardware device level and protocols for data interchange
  at the application program level.
Introduction to Protocol
 The OSI model, and any other network communication models,
  provided only a conceptual framework for communication
  between computers, but the model itself does not provide specific
  methods of communication.
 Actual communication is defined by various communication
 a network protocol is a formal set of rules, conventions and data
  structure that governs how computers and other network devices
  exchange information over a network.
 In other words, protocol is a standard procedure and format that
  two data communication devices must understand, accept and use
  to be able to talk to each other
Need for protocols
 Protocols are a set of rules and conventions. By enforcing
  that communicating parties adhere to a common protocol,
  communication is made possible.
 HTTP stands for Hypertext Transfer Protocol. It is an
  TCP/IP based communication protocol which is used to
  deliver virtually all files and other data, collectively called
  resources, on the World Wide Web. These resources could be
  HTML files, image files, query results, or anything else.
 A browser is works as an HTTP client because it sends
  requests to an HTTP server which is called Web server. The
  Web Server then sends responses back to the client. The
  standard and default port for HTTP servers to listen on is 80
  but it can be changed to any other port like 8080 etc.
Three things about HTTP
 HTTP is connectionless: After a request is made, the client
  disconnects from the server and waits for a response. The server
  must re-establish the connection after it process the request.
 HTTP is media independent: Any type of data can be sent by
  HTTP as long as both the client and server know how to handle
  the data content. How content is handled is determined by the
  MIME specification.
 HTTP is stateless: This is a direct result of HTTP's being
  connectionless. The server and client are aware of each other only
  during a request. Afterwards, each forgets the other. For this
  reason neither the client nor the browser can retain information
  between different request across the web pages.
 HTTP is an application layer protocol

 The Web client and the Web server are application programs
 Application layer programs do useful work like retrieving Web pages,
  sending and receiving email or transferring files
 Lower layers take care of the communication details
 The client and server send messages and data without knowing anything
  about the communication network
Communication between browser
and server using HTTP
 The navigator makes a HTTP request
 The server processes the request then sends a HTTP
 In reality, the communication is conducted in more stages if
  you consider the processing of the request by the server.
 Whenever you send a piece of e-mail, your e-mail client
  interacts with the SMTP server to handle the sending. The
  SMTP server on your host may have conversations with other
  SMTP servers to deliver the e-mail.
 Let's assume that I want to send a piece of e-mail. My e-mail ID is
  brain, and I have my account on howstuffworks.com. I want to
  send e-mail to jsmith@mindspring.com. I am using a stand-alone
  e-mail client like Outlook Express.
 When I set up my account at howstuffworks, I told Outlook
  Express the name of the mail server -- mail.howstuffworks.com.
  When I compose a message and press the Send button, here's what
 1. Outlook Express connects to the SMTP server at
  mail.howstuffworks.com using port 25.
 2. Outlook Express has a conversation with the SMTP server,
  telling the SMTP server the address of the sender and the address
  of the recipient, as well as the body of the message.
 3. The SMTP server takes the "to" address (jsmith@mindspring.com) and breaks it into
   two parts: the recipient name (jsmith) and the domain name (mindspring.com). If the
   "to" address had been another user at howstuffworks.com, the SMTP server would
   simply hand the message to the POP3 server for howstuffworks.com (using a little
   program called the delivery agent). Since the recipient is at another domain, SMTP
   needs to communicate with that domain.
 4. The SMTP server has a conversation with a Domain Name Server,
   or DNS (see How Web Servers Work for details). It says, "Can you give me the IP
   address of the SMTP server for mindspring.com?" The DNS replies with the one or more
   IP addresses for the SMTP server(s) that Mindspring operates.
 5. The SMTP server at howstuffworks.com connects with the SMTP server at
   Mindspring using port 25. It has the same simple text conversation that my e-mail client
   had with the SMTP server for HowStuffWorks, and gives the message to the Mindspring
   server. The Mindspring server recognizes that the domain name for jsmith is at
   Mindspring, so it hands the message to Mindspring's POP3 server, which puts the
   message in jsmith's mailbox.
 If, for some reason, the SMTP server at HowStuffWorks
 cannot connect with the SMTP server at Mindspring, then
 the message goes into a queue. The SMTP server on most
 machines uses a program called sendmail to do the actual
 sending, so this queue is called the sendmail queue.
 Sendmail will periodically try to resend the messages in its
 queue. For example, it might retry every 15 minutes. After
 four hours, it will usually send you a piece of mail that tells
 you there is some sort of problem. After five days, most
 sendmail configurations give up and return the mail to you
SMTP Commands
 The SMTP server understands very simple text commands
    like HELO, MAIL, RCPT and DATA. The most common
    commands are:
   HELO - introduce yourself
   MAIL FROM: - specify the sender
   RCPT TO: - specify the recipient
   DATA - specify the body of the message (To, From and
    Subject should be the first three lines.)
   RSET - reset
   QUIT - quit the session
   HELP - get help on commands
 Simple Network Management Protocol (SNMP) is a widely
  used protocol designed to facilitate the management of
  networked devices from a central location.
 . Designed originally for the management of devices such as
  routers and switches, its usage has grown rapidly to
  encompass the monitoring of nearly any electronic device
  one can think of.
 SNMP is now used to monitor and manage television
  broadcast studios, automated fare collection systems,
  airborne military platforms, energy distribution systems,
  emergency radio networks, and much more.
SNMP Architecture
 The SNMP architecture is composed of three major elements:
 Managers (software) are responsible for communicating with
  (and managing) network devices that implement SNMP Agents
  (also software).
 Agents reside in devices such as workstations, switches, routers,
  microwave radios, printers, and provide information to Managers.
 MIBs (Management Information Base) describe data objects to be
  managed by an Agent within a device. MIBs are actually just text
  files, and values of MIB data objects are the topic of conversation
  between Managers and Agents.
Before we go any further, we need to introduce the concept of
Object Identifiers or OID’s. Each MIB object definition has a
unique OID, which is a dotted listed of integers. For example,
within the Host Resource MIB, the OID for data object
“hrDiskStorageCapacity”      is      “.”.

When Managers and Agents communicate, they refer to MIB data
objects                   using                      OID’s.

An OID sent with a corresponding value {OID,Value} is referred
to                        as                        “binding”.
 Managers can be viewed as Clients; and Agents, as Servers. The
  operations between Managers and Agents are quite simple:
 “get” commands are sent by a Manager to an Agent to request data
  values defined by a MIB. The Agent will respond with the
  requested values. Closely related requests are “getnext” and
 A Manager can also send “set” commands to an Agent. If the MIB
  defines a data object as read-write, then the Agent will accept the
  data value sent with the “set” command and process it
  appropriately (store it or execute appropriate action).
 Agents will send unsolicited “traps” (alarms) to Managers to alert
  them to important events.
 Widespread popularity
 Many standard MIBs available
 Agents have low impact on monitored system resources
 Well suited to monitoring
 Many products available
 Not as comprehensive as some other protocols
 Not bandwidth efficient
 Complicated message encoding rules
 Security has been on on-going concern. SNMPv3 was
  developed in response to this issue.
 UDP, or other connectionless, protocol is used, which creates
  issues regarding verification of operations: Trap-Send
  verification (did it really reach the Manager?); Verification
  (success) of any “set” operation to an Agent. However,
  cleverly designed MIBs and Manager logic can overcome
  these problems.
 Monitoring device performance
 Detecting device faults, or recovery from faults
 Collecting long term performance data
 Remote configuration of devices
 Remote device control
   A networking protocol suite
     Use several protocols, main ones are tcp and ip.
     IP stands for Internet Protocol
     TCP stands for Transmission Control Protocol.
   The native language of the Internet
   Supported by most OSs (Unix, MacOS, Windows,
    Netware, etc)
   Defines a uniform programming interface to different
    types of network hardware
       Networking Road Map
        TCP/IP components
           IP, the Internet Protocol
              routes data packets from one machine to another
           ICMP, the Internet Control Message Protocol
              Provides several kinds of low-level support for IP
                Error message
                Routing assistance
                Debugging help
           ARP, the Address Resolution Protocol
             Translates IP addresses to hardware addresses

1-24   TCP/IP networking
       Networking Road Map
           UDP, the User Datagram Protocol
             Delivers data to specific applications on the destination machine
             Provides “unverified”, “best effort” transport for individual messages
           TCP, the Transmission Control Protocol
             Delivers data to specific applications on the destination machine
             Provides reliable, flow controlled, error corrected conversation between
              processes on two hosts.

1-25   TCP/IP networking
       TCP/IP network model
Layer                       ARP   SSH, FTP, WEB         DNS, Quake       Traeroute

Transport Layer                      TCP                      UDP

Network Layer                              IP                     ICMP

Link Layer                                 ARP, Device Drivers

Physical layer                        UTP copper, fiber, radia waves

1-26    TCP/IP networking
       Packets and encapsulation
        Data travels on a network in the form of packets
        Each packet consists of
          A header – where it came from and where it’s going, protocol info,
           checksum, etc.
          A payload - data
        As a packet travels down the protocol stack
          encapsulation
               Each protocol adds its own header information
               Each protocol’s finished packet becomes the payload part of the packet generated
                 by the next protocol.
        On a receiving machine, the encapsulation is reversed as the
          packet travels back up the protocol stack.

1-27   TCP/IP networking
        Packets addressing
          Packets must be properly addressed in order to reach their destination
          Addressing schemes
               MAC (media access control) addresses for hardware
               IP addresses for software
               Hostnames for people

1-28   TCP/IP networking

To top