Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

UDP TCP AND MULTICASTING, Study notes of Network Technologies and TCP/IP

BCA TCP IP Unit 3 Notes USER datagram protocol

Typology: Study notes

2018/2019

Uploaded on 12/15/2019

raghavendra-gs
raghavendra-gs 🇮🇳

2 documents

1 / 17

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Principles of TCP/IP – Unit1
Introduction
Internet communications has become a fundamental part of life. The WWW contains information about such
diverse subjects as atmospheric conditions, crop production, stock prices, and airline traffic.
Most network technologies are designed for a specific purpose. Each enterprise chooses hardware technology
appropriate for specific communication needs and budget.
A new technology has evolved that makes it possible to interconnect many disparate physical networks and
make them function as a coordinated unit. The technology, called internetworking, accommodates multiple,
diverse underlying hardware technologies by providing a way to interconnect heterogeneous networks and a
set of communication conventions that makes them interoperate.
An internetwork is a collection of individual networks, connected by intermediate networking devices, that
functions as a single large network. Internetworking refers to combining the networks with the industry,
products, and procedures that meet the challenge of creating and administering internetworks.
The internet technology hides the
details of networks hardware, and
permit computer to
communicate independent of their
physical network connections.
The internet technology is called open
system interconnection because the communication systems available from one specific vendor to another
vary, the specifications are publicly available. Thus, anyone can build the software needed to communicate
across an internet.
Principles and ideas underlying the internet technology that has resulted from research funded by the Defense
Advanced Research Projects Agency (DARPA) The DARPA technology includes a set of network standards that
specify the details of how computers communicate, as well as a set of conventions for interconnecting
networks and routing traffic. Officially named the TCP IP Internet Protocol Suite and commonly referred to as
TCP/IP, it can be used to communicate across any set of interconnected networks.
Internet services:
Internet services will focus on standards called Protocols. Protocols like TCP and IP provide the syntactic and
semantic rules for communication. They contain the details of message formats, describe how a computer
responds when a message arrives, and specify how a computer handles errors or other abnormal conditions.
There are two levels of services i) application level services and ii) network level services.
The application level Services include World Wide Web, Electronic mail, File transfer, Remote Login and
Remote desktop
The network level services include Connnectionless Packet Delivery Service, Reliable Stream Transport Service.
Evolution of open Networks/ History and Scope of the internet:
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download UDP TCP AND MULTICASTING and more Study notes Network Technologies and TCP/IP in PDF only on Docsity!

Principles of TCP/IP – Unit Introduction Internet communications has become a fundamental part of life. The WWW contains information about such diverse subjects as atmospheric conditions, crop production, stock prices, and airline traffic. Most network technologies are designed for a specific purpose. Each enterprise chooses hardware technology appropriate for specific communication needs and budget. A new technology has evolved that makes it possible to interconnect many disparate physical networks and make them function as a coordinated unit. The technology, called internetworking, accommodates multiple, diverse underlying hardware technologies by providing a way to interconnect heterogeneous networks and a set of communication conventions that makes them interoperate. An internetwork is a collection of individual networks, connected by intermediate networking devices, that functions as a single large network. Internetworking refers to combining the networks with the industry, products, and procedures that meet the challenge of creating and administering internetworks. The internet technology hides the details of networks hardware, and permit computer to communicate independent of their physical network connections. The internet technology is called open system interconnection because the communication systems available from one specific vendor to another vary, the specifications are publicly available. Thus, anyone can build the software needed to communicate across an internet. Principles and ideas underlying the internet technology that has resulted from research funded by the Defense Advanced Research Projects Agency (DARPA) The DARPA technology includes a set of network standards that specify the details of how computers communicate, as well as a set of conventions for interconnecting networks and routing traffic. Officially named the TCP IP Internet Protocol Suite and commonly referred to as TCP/IP, it can be used to communicate across any set of interconnected networks. Internet services: Internet services will focus on standards called Protocols. Protocols like TCP and IP provide the syntactic and semantic rules for communication. They contain the details of message formats, describe how a computer responds when a message arrives, and specify how a computer handles errors or other abnormal conditions. There are two levels of services i) application level services and ii) network level services. The application level Services include World Wide Web, Electronic mail, File transfer, Remote Login and Remote desktop The network level services include Connnectionless Packet Delivery Service, Reliable Stream Transport Service. Evolution of open Networks/ History and Scope of the internet:

DARPA began working towards an internet technology in the mid 1970s, with the architecture and protocols taking their current form around 1977-79. At that time, DARPA was known as the primary funding agency for packet-switched network research and had pioneered many ideas in packet switching with its well-known ARPANET. The ARPANET used conventional point-to-point leased line interconnection, but DARPA had also funded exploration of packet switching over radio networks and satellite communication channels. DARPA scheduled informal meeting of researchers to share ideas and discuss results of experiments. Informally, the group was known as the Internet Research Group (IRG). By 1979, so many researchers were involved in the TCP/IP effort that DARPA created an informal committee to coordinate and guide the design of the protocols and architecture of the emerging Internet. Called the Internet Control and configuration Board (ICCB) the group met regularly until 1983, when it was reorganized. The success of the TCP/IP technology and the Internet among computer science researchers led other groups to adopt it. National Science Foundation (NSF) took an active role in expanding the TCPAP Internet to reach as many scientists as possible. In the late 1970s, NSF funded a project known as the Computer Science NETwork (CSNET), which had as its goal connecting all computer scientists. In 1986 it expanded networking efforts by funding a new wide area backbone network, called the NSFNET that eventually reached all its supercomputer centers and tied them to the ARPANET. Finally, in 1986 NSF provided seed money for many regional networks, each of which now connects major scientific research institutions in a given area. All the NSF-funded networks use TCP/IP protocols, and all are part of the global Internet. By late 1987, it was estimated that the growth had reached 15% per month. By 2005, the global Internet reached over 300 million computers in 209 countries. Layering of communication process: Complex data communication systems do not use a single protocol to handle all transmission tasks. Instead, they require a set of cooperative protocols, sometimes called a protocol family or protocol suite. We think of the modules of protocol software on each machine as being stacked vertically into layers Each layer takes responsibility for handling one task. Conceptually, sending a message from an application program on one machine to an application program on another means transferring the message down through successive layers of protocol software on the sender's machine, forwarding the message across the network, and transferring the message up through successive layers of protocol software on the receiver's machine. Each layer makes decisions about the correctness of the message and chooses an appropriate action based on the message type or destination address. For example, one layer on the receiving machine must decide whether to keep the message or forward it to another machine. Another layer must decide which application

The IS0 model, built to describe protocols for a single network, does not contain a specific layer for internetwork routing in the same way TCP/IP protocols do. TCP/IP Layering The second major layering model did not arise from a standards committee, but came instead from research that led to the TCPIIP protocol suite. The TCP/IP protocol becomes popular, proponents of the older ISO model. The original ISO model did not provide for internetworking standard. TCP/IP protocols are organized into five conceptual layers – four new layers that build on a fifth layer of conventional hardware. Figure shows the conceptual layers of TCP/IP and the form of data it passes between them. Application Layer At the highest layer, users invoke application programs that access services available across a TCP/IP internet. An application interacts with one of the transport layer protocols to send or receive data. Each application program chooses the style of transport needed, which can be either a sequence of individual messages or a continuous stream of bytes. The application program passes data in the required form to the transport layer for delivery. Transport Layer The primary duty of the transport layer is to provide communication from one application program to another. Such communication is often called end-to-end. The transport layer may regulate flow of information. It may also provide reliable transport, ensuring that data arrives without error and in sequence. To do so, transport protocol software arranges to have the receiving side send back acknowledgements and the sending side retransmit lost packets. The transport software divides the stream of data being transmitted into small pieces (packets) and passes each packet along with a destination address to the next layer for transmission.

Internet Layer The Internet layer handles communication from one machine to another. It accepts a request to send a packet from the transport layer along with an identification of the machine to which the packet should be sent. It encapsulates the packet in an IP datagram, fills in the datagram header, uses the routing algorithm to know whether to deliver the datagram directly or send it to a router, and passes the datagram to the appropriate network interface for transmission. The Internet layer also handles incoming datagram, checking their validity, and uses the routing algorithm to decide whether the datagram should be processed locally or forwarded. For datagram addressed to the local machine, software in the internet layer deletes the datagram header, and chooses from among several transport protocols the one that will handle the packet. Finally, the Internet layer sends and receives ICMP error and control messages as needed. Network Interface Layer The lowest layer TCP/IP software comprises a network interface layer, responsible for accepting IP datagram and transmitting them over a specific network. A network interface may consist of a device driver or a complex subsystem that uses its own data link protocol. TCP/IP protocols place much of the network intelligence in host-routers in the internet forward datagrams, but do not participate in the higher layer services. Layer in a TCP/IP Internet Environment Independent of the particular layering scheme used or the functions of the layers, the operation of layered protocols is based on a fundamental idea known as called the layering principle, “Layered protocols are designed so that layer n at the destination receives exactly the same object sent by layer n at the source” The following fig illustrates showing the path of a message sent from an application program on one host to an application on another through a router. The message delivery uses two separate network frames, one for the transmission from host A to router R, and another from router R to host B. The network layering principle states that the frame delivered to R is identical to the frame sent by host A. By contrast, the application and transport layers deal with end-to-end issues and are designed so the software at the source communicates with its peer at the ultimate destination.

Designers have taken two different approaches to hiding network details, using application programs to handle heterogeneity or hiding details in the operating system. Early heterogeneous network interconnections provided uniformity through application level programs called application gateways. In such systems, an application-level program, executing on each computer in the network, understands the details of the network connections for that computer, and interoperates across those connections with application programs on other computers. Users who are experienced with networking understand that once the interconnections grow to hundreds or thousands of networks, no one can possibly build all the necessary application programs. Network level Interconnection: A network-level interconnection provides a mechanism that delivers small packets of data from their original source to their ultimate destination without using intermediate application programs. The key to designing universal network-level interconnection can be found in an abstract communication system concept known as internetworking. We begin with two fundamental observations about the design of communication systems:  No single network hardware technology can satisfy all constraints.  Users desire universal interconnection. The first observation is an economic as well as technical one. Inexpensive Local Area Networks that provide high speed communication only cover short distances; wide area networks that span long distances cannot supply local communication cheaply. Because no single network technology satisfies all needs, we are forced to consider multiple underlying hardware technologies. The second observation is self-evident. Ultimately, users would like to be able to communicate between any two points. In particular, we desire a communication system that is not constrained by the boundaries of physical networks. The goal is to build a unified, cooperative interconnection of networks that supports a universal communication service. Internetwork Architecture: Physically, two networks can only be connected by a computer that attaches to both of them. To have a viable internet, we need special computers that are willing to transfer packets from one network to another. Computers that interconnect two networks and pass packets from one to the other are called internet gateways or internet routers. Consider an example consisting of two physical networks shown in figure, A router R connects to both network 1 and network 2. For R to act as a router, it must capture packets on network 1 that are bound for machines on network 2 and transfer them. Similarly, R must capture packets on network 2 that are destined for machines on network 1 and transfer them. Each network can be a LAN or a WAN, and each may have many computers attached or a few computers attached.

Interconnection through IP routers: In an actual internet that includes many networks and routers, each router needs to know about the topology of the internet beyond the networks to which it connects. In above fig router R must transfer from network 1 to network 2 all packets destined for computers on either network 2 or network 3. For a large internet composed of many networks, the router's task of making decisions about where to send packets becomes more complex. The idea of a router seems simple, but it is important because it provides a way to interconnect networks, not just computers. In fact, we have already discovered the principle of interconnection used throughout an internet. “In a TCP/IP internet, special computers called IP routers or IP gateways provide interconnections among physical networks.” In general, routers used with TCP/IP internets are usually small computers. They often have little disk storage and modest main memories. The trick to building a small internet router lies in the following concept: “Routers use the destination network, not the destination computer, when forwarding a packet.” If packet forwarding is based on networks, the amount of information that a router needs to keep is proportional to the number of networks in the internet, not the number of computers. All Networks are equals: The fundamental concept: from the internet point of view, any communication system capable of transferring packets counts as a single network, independent of its delay and throughput characteristics, maximum packet size, or geographic scale. The user's view of TCP/IP internet in which each computer appears to attach to a single large network and the structure of physical networks and routers that provide interconnection. The TCP/IP internet protocols treat all networks equally. A Local Area Network like an Ethernet, a Wide Area Network used as a backbone or a point-to-point link between two computers each count as one network TCPAP defines an abstraction of "network” that hides the details of physical networks; we will learn that such abstractions help make TCPIIP extremely powerful.

IP Address Class Total # Of Bits For Network ID / Host ID First Octet of IP Address

Of

Network ID Bits Used To Identify Class Usable # Of Network ID Bits

of Possible

Network IDs

Of Host IDs Per Network ID

Class A 1- 8 / 24 0xxx xxxx 1 8-1 = 7 27 -2 = 126 224 - 2 = 16,277, Class B 128- 16 / 16 10xx xxxx 2 16-2 = 14 214 = 16,384 216 -2 = 65, Class C 192- 24 / 8 110x xxxx 3 24-3 = 21 221 =2,097,152 28 -2 = 254 Class D 224-

  • 1110 xxxx INVALID Reserved for multicast groups. Class E 240-
  • 1111 xxxx INVALID Reserved for future use, or Research and Development Purposes. Ranges 127.x.x.x are reserved for the loopback or local host, for example, 127.0.0.1 is the common loopback address. Range 255.255.255.255 broadcasts to all hosts on the local network. Addresses Specify Network Connection: When conventional computers have two or more physical connections they are called multi-homed hosts. Multi-homed hosts and routers require multiple IP addresses. Each address corresponds to one of the machine's network connections. “Because IP addresses encode both a network and a host on that network, they do not specify an individual computer, but a connection to a network.” A router connecting n networks has n distinct IP addresses, one for each network connection. Network and Directed Broadcast Addresses: The major advantage of encoding network information in internet addresses: it makes efficient routing possible. Another advantage is that internet addresses can refer to networks as well as hosts. By convention, hostid 0 is never assigned to an individual host. Instead, an IP address with hostid portion equal to zero is used to refer to the network itself. “Internet addresses can be used to refer to networks as well as individual hosts. By convention, an address that has all bits of the hostid equal to 0 is reserved to refer to the network.” Another advantage of the internet addressing scheme is that it includes a directed broadcast address that refers to all hosts on the network. According to the standard, any address with the hostid consisting of all 1s is reserved for directed broadcast address. When a packet is sent to such an address, a single copy of the packet is transferred across the internet from the source. Routers along the path use the netid portion of the address when choosing a path; they do not look at the host portion. Once the packet reaches a router attached to the final network, that router examines the host portion of the address to determine how to deliver the packet. If it finds all 1s, the router broadcasts the packet to all hosts on the network. On many network technologies (e.g., Ethernet), broadcasting is as efficient as unicast transmission; on others, broadcasting is supported by the network software, but requires substantially more delay than single transmission. Some network hardware does not support broadcast at all. Thus, having an IP directed broadcast address does not guarantee the availability or efficiency of broadcast delivery.

“IP addresses can be used to specify a directed broadcast in which a packet is sent to all computers on a network; such addresses map to hardware broadcast, if available. By convention, a directed broadcast address has a valid netid and has a hostid with all bits set to 1.” Limited broadcast address (255.255.255.255) The broadcast address is known as directed because it contains both a valid network ID and the broadcast hostid. A directed broadcast address can be interpreted unambiguously at any point in an internet because it uniquely identifies the target network in addition to specifying broadcast on that network. From an addressing point of view, the chief disadvantage of directed broadcast is that it requires knowledge of the network address. The broadcast address, called a limited broadcast address or local network broadcast address provides a broadcast address for the local network independent of the assigned IP address. The local broadcast address consists of 32 bits 1s (hence, it is sometimes called the "all 1s" broadcast address). A host may use the limited broadcast address as part of a startup procedure before it learns its IP address or the IP address prefix for the local network. The All-0s Address: An address that consists of 32 zero bits is reserved for cases where a host needs up to communicate, but does not yet know its IP address(during the startup). To obtain an IP address a host sends a datagram to limited broadcast address and uses address 0.0.0.0 to identify itself. The receiver understands that host does not yet have an IP address. Subnet and Classless extensions: An addressing extension was developed to conserve network prefixes. Known as subnet addressing, the scheme allows multiple physical networks to share a prefix. In the 1990s, a second extension was devised that ignored the classful hierarchy and allowed the division between prefix and suffix to occur at an arbitrary point called classless addressing or supernetting, the scheme allows more complete utilization of the address space. IP multicasting: In addition to unicast delivery, in which a packet is delivered to a single computer, and broadcast delivery, in which a packet is delivered to all computers on a given network, the IP addressing scheme supports a special form of multipoint delivery known as multicasting, in which a packet is delivered to a specific subset of hosts. IP multicasting is especially useful for networks where the hardware technology supports multicast delivery. Dotted Decimal Notation: When communicated to humans, either in technical documents or through application programs, IP addresses are written as four decimal integers separated by decimal points, where each integer gives the value of one octet of the IP address Thus, the 32-bit internet address

hardware supplies. Suppose machine A wants to send a packet to machine B across a physical network to which they both attach, but A has only B's internet address IB. The question arises: how does A map that address to B's physical address, PB? Address mapping must be performed at each step along a path from the original source to the ultimate destination. In particular, two cases arise. First, at the last step of delivering a packet, the packet must be sent across one physical network to its final destination. The computer sending the packet must map the final destination's Internet address to the destination's physical address. Second, at any point along the path from the source to the destination other than the final step, the packet must be sent to an intermediate router. Thus, the sender must map the intermediate router's Internet address to a physical address. The problem of mapping high-level addresses to physical addresses is known as the address resolution problem and has been solved in several ways. Some protocol suites keep tables in each machine that contain pairs of high-level and physical addresses. Others solve the problem by encoding hardware addresses in high- level addresses. Using either approach exclusively makes high-level addressing awkward at best. Two Types of Physical Addresses: There are two basic types of physical addresses, exemplified by the Ethernet, which has large, fixed physical addresses, and proNET, which has small, easily configured physical addresses. Address resolution is difficult for Ethernet-like networks, but easy for networks like proNET. Address Resolution through Direct Mapping: proNET uses small integers for physical addresses and allows the user to choose a hardware address when installing an interface board in a computer. The key to making address resolution easy with such network hardware lies in observing that as long as one has the freedom to choose both IP and physical addresses, they can be selected such that parts of them are the same. Typically, one assigns IP addresses with the hostid portion equal to 1, 2, 3, and so on, and then, when installing network interface hardware, selects a physical address that corresponds to the IP address. For example, the system administrator would select physical address 3 for a computer with the IP address 192.5.48.3 because 192.5.48.3 is a class C address with the host portion equal to 3. For networks like proNET, computing a physical address from an IP address is trivial. The computation consists of extracting the host portion of the IP address. Extraction is computationally efficient on most architecture because it requires only a few machine instructions. The mapping is easy to maintain because it can be performed without reference to external data. Finally, new computers can be added to the network without changing existing assignments or recompiling code. IEEE & MAC (Media Access Control) addresses: At the MAC sublayer, Ethernet peers communicate by exchanging frames, which encapsulate (link Layer encapsulation) the Internet layer datagram. Ethernet frames are transmitted in the network using globally unique 48-bit physical layer addresses. The MAC address comes programmed into an Ethernet device by the manufacturer. Ethernet defines a 48-bit addressing scheme. Each computer attached to an Ethernet network is assigned a unique 48-bit number known as its Ethernet address. To assign an address, Ethernet hardware manufacturers

purchase blocks of Ethernet addresses and assign them in sequence as they manufacture Ethernet interface hardware. A portion of the MAC address is a manufacturer identifier, assigned by the IEEE registration authority. The remaining portion is assigned by the manufacturer. Generally speaking, any device directly connected to an Ethernet LAN must have a MAC address, particularly if it operates above the physical sublayer. This includes computers, routers, network printers, network attached storage devices, and so forth. Thus, no two hardware interfaces have the same Ethernet address. Usually, the Ethernet address is fixed in machine readable form on the host interface hardware. Because each Ethernet address belongs to a hardware device, they are sometimes called hardware addresses, physical addresses; media access (MAC) addresses, or layer 2 addresses. The host interface hardware examines packets and determines the packets that should be sent to the host. A 48-bit Ethernet address can do more than specify a single destination computer. An address can be one of three types:  The physical address of one network interface (a unicast address)  The network broadcast address  A multicast address The broadcast address (all 1s) is reserved for sending to all stations simultaneously. Multicast addresses provide a limited form of broadcast in which subsets of the computers on a network agree to listen to a given multicast address. The set of participating computers is called a multicast group. Resolution through Dynamic Binding (Address Resolution Protocol) Each Ethernet interface is assigned a 48-bit physical address when the device is manufactured. Because the Ethernet address is 48 bits long, there is no hope it can be encoded in a 32-bit IP address. Designers of TCP/IP protocols found a creative solution to the address resolution problem for networks like the Ethernet that have broadcast capability. The solution allows new hosts or routers to be added to the network without recompiling code, and does not require maintenance of a centralized database. To avoid maintaining a table of mappings, the designers chose to use a low-level protocol to bind addresses dynamically known as Address Resolution Protocol (ARP), the protocol provides a mechanism that is both reasonably efficient and easy to maintain. (a) Host A broadcasts an ARP request containing IB to all machines on the net, and (b) Host B responds with an ARP reply that contains the pair (IB, PB)

Whenever address binding information is placed in an ARP cache, the protocol requires a timer to be set, with a typical timeout being 20 minutes. When the timer expires, the information must be removed. After removal there are two possibilities. If no further packets are sent to the destination, nothing occurs. If a packet must be sent to the destination and there is no binding present in the cache, the computer follows the normal procedure of broadcasting an ARP request and obtaining the binding. If the destination is still reachable, the binding will again be placed in the ARP cache. If not, the sender will discover that the destination is off-line. RARP (Reverse Address Resolution Protocol): Overview The TCP/IP protocol that allows a computer to obtain its IP address from a server is known as the Reverse Address Resolution Protocol (RARP). RARP is essential protocol used to bootstrap systems that did not have stable storage or diskless servers. RARP allows a system to obtain an IP address at startup. When system boots, the system broadcasts a RARP request and waits for response. Another computer on network must be configured to listen for RARP requests and generate a RARP reply that contains a requester’s IP address. Once the reply arrives, the system continues to boot, and uses IP for all communication. When it makes a RARP request, a system must identify itself so the computer receiving the request can place the correct IP address and in the reply. RARP uses an obvious ID: the systems MAC address. A booting System places its MAC address in RARP request, and receives its IP address in the RARP reply. RARP operations Reverse Address Resolution Protocol is used to get the 32 bits Source IP address, knowing the 48 bits hardware address. It is reverse of ARP, hence named Reverse Address Resolution Protocol. A diskless workstation broadcasts RARP Request to find its IP Address at the time of boot up. Primary and Backup RARP Servers: The advantage of having several computers function as RARP servers is that it makes the system more reliable. If one server is down or too heavily loaded to respond, another answers the request. Thus, it is highly likely that the service will be available. The disadvantage of using many servers is that when a machine broadcasts a RARP request, the network becomes overloaded because all servers attempt to respond. Each machine that makes RARP requests is assigned a primary server. Under normal circumstances, only the machine's primary server responds to its RARP request. All non primary servers receive the request but merely record its arrival time. If the primary server is unavailable, the original machine will timeout waiting for a

response and then rebroadcast the request. Whenever a non-primary server receives a second copy of a RARP request within a short time of the fist, it responds. Each non primary machine that receives a request computes a random delay and then sends a response. Under normal circumstances, the primary server responds immediately and successive responses are delayed, so there is low probability that several responses arrive at the same time. When the primary server is unavailable, the requesting machine experiences a small delay before receiving a reply. RARP uses the same packet format as ARP. A RARP request is formed by filling in the target protocol address field, changing the message type from request to reply, and sending the reply back directly to machine making the request.