98
Assignment No.-A-1 Problem Statement: Implementation of Packet Sniffer. Program should identify header of each protocol. Use multi-core programming 1.1 Prerequisite: 1. Socket Programming. 2. Header Formats. 3. TCP/IP and OSI. 1.2 Learning Objectives: Understand the working of Packet Sniffing Tool Implementation of Tool for analyzing traffic. 1.3 New Concepts: a. Packet Analyzer b. Python networking related functions 1.4 Theory: 1.4.1 Introduction Have you ever thought about how your computer talks with others on a network? Would you like to listen to, or sniff, the conversation? Net- work engineers, system administrators, security professionals and, unfor- tunately, crackers have long used a tool that allows them to do exactly that. This nifty utility, known as a sniffer, can be found in the arsenal of every network guru, where it is likely used every day for a variety of tasks. This article will offer a brief overview of sniffers, including what they do, how they work, why users need to be aware of them, and what users can do to protect themselves against the illegitimate use of sniffers.

Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

Assignment No.-A-1

Problem Statement:

Implementation of Packet Sniffer. Program should identify header ofeach protocol. Use multi-core programming

1.1 Prerequisite:

1. Socket Programming.

2. Header Formats.

3. TCP/IP and OSI.

1.2 Learning Objectives:

Understand the working of Packet Sniffing Tool

Implementation of Tool for analyzing traffic.

1.3 New Concepts:

a. Packet Analyzer

b. Python networking related functions

1.4 Theory:

1.4.1 Introduction

Have you ever thought about how your computer talks with otherson a network? Would you like to listen to, or sniff, the conversation? Net-work engineers, system administrators, security professionals and, unfor-tunately, crackers have long used a tool that allows them to do exactly that.This nifty utility, known as a sniffer, can be found in the arsenal of everynetwork guru, where it is likely used every day for a variety of tasks. Thisarticle will offer a brief overview of sniffers, including what they do, howthey work, why users need to be aware of them, and what users can do toprotect themselves against the illegitimate use of sniffers.

Page 2: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 2

1.4.2 What is a Sniffer?

A packet sniffer can be a computer program or a piece of computerhardware that can intercept and log traffic passing over a digital networkor part of a network. A sniffer program which targets packets of data trans-mitted over the Internet. Packet sniffing may sound like the latest streetdrug craze but it’s far from it. Packet sniffers or protocol analyzers are toolsthat are commonly used by network technicians to diagnose network-relatedproblems. A packet analyzer (also known as a network analyzer, protocolanalyzer or packet sniffer, or for particular types of networks, an Ethernetsniffer or wireless sniffer) is a computer program or a piece of computerhardware that can intercept and log traffic passing over a digital networkor part of a network. Packet capture is the process of intercepting and log-ging traffic.

Figure 1: Packet sniffer

PVGCOE,Nashik.

Page 3: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 3

1.4.3 How Does a Sniffer Work?

Packet sniffers work by intercepting and logging network traffic thatthey can ’see’ via the wired or wireless network interface that the packetsniffing software has access to on its host computer.

On a wired network, what can be captured depends on the structureof the network. A packet sniffer might be able to see traffic on an entirenetwork or only a certain segment of it, depending on how the networkswitches are configured, placed, etc. On wireless networks, packet snifferscan usually only capture one channel at a time unless the host computerhas multiple wireless interfaces that allow for multichannel capture.

Once the raw packet data is captured, the packet sniffing softwaremust analyze it and present it in human-readable form so that the personusing the packet sniffing software can make sense of it. The person analyz-ing the data can view details of the ’conversation’ happening between twoor more nodes on the network. Network technicians can use this infor-mation to determine where a fault lies, such as determining which devicefailed to respond to a network request.

Figure 2 shows the structure of a packet sniffer. At the right of Fig-ure 1 are the protocols (in this case, Internet protocols) and applications(such as a web browser or ftp client) that normally run on your computer.The packet sniffer, shown within the dashed rectangle in Figure 1 is an ad-dition to the usual software in your computer, and consists of two parts.The packet capture library receives a copy of every link-layer frame that issent from or received by your computer. Messages exchanged by higherlayer protocols such as HTTP, FTP, TCP, UDP, DNS, or IP all are eventuallyencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media isan Ethernet, and so all upper layer protocols are eventually encapsulatedwithin an Ethernet frame. Capturing all link-layer frames thus gives you allmessages sent/received from/by all protocols and applications executingin your computer.

PVGCOE,Nashik.

Page 4: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 4

Figure 2: Packet sniffer structure

1.5 Header Formats:

1.5.1 IP Header Format:

PVGCOE,Nashik.

Page 5: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 5

1.5.2 TCP Header Format:

1.6 Need of Sniffer:

On a normal LAN there are thousands of packets exchanged by multi-ple machines every minute, ample supply for any attacker.Anything trans-mitted in plaintext over the network will be vulnerable - passwords, webpages, database queries and messaging to name a few.

A sniffer can easily be customized to capture specific traffic liketelnet sessions or e-mail. Once traffic has been captured, crackers canquickly extract the information they need - logins, passwords and the textof messages.And the users will likely never know they were compromised- sniffers cause no damage or disturbance to a network environment.

1.7 Sniffer Tools Examples:

1.7.1. Wireshark :

Wireshark is a network packet analyzer. A network packet analyzerwill try to capture network packets and tries to display that packet data asdetailed as possible.

PVGCOE,Nashik.

Page 6: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 6

You could think of a network packet analyzer as a measuring de-vice used to examine whats going on inside a network cable, just like avoltmeter is used by an electrician to examine whats going on inside anelectric cable (but at a higher level, of course).In the past, such tools wereeither very expensive, proprietary, or both. However, with the advent ofWireshark, all that has changed.Wireshark is perhaps one of the best opensource packet analyzers available today.

1.7.2. 2. TCPDUMP:

TCPDUMP is a common packet analyzer that runs under the com-mand line. It allows the user to intercept and display TCP/IP and otherpackets being transmitted or received over a network to which the com-puter is attached. Distributed under the BSD license,tcpdump is free soft-ware.

Tcp dump works on most Unix-like operating systems: Linux, Solaris,BSD, OS X, HP-UX and AIX among others. In those systems, tcp dump uses

PVGCOE,Nashik.

Page 7: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 7

the libpcap library to capture packets. The port of tcp dump for Windowsis called Win Dump; it uses Win Pcap, the Windows port of libpcap.

Uses of TCPDUMP:

Tcp dump prints the contents of network packets. It can read packetsfrom a network interface card or from a previously created saved packetfile. Tcpdump can write packets to standard output or a file.It is also possi-ble to use tcpdump for the specific purpose of intercepting and displayingthe communications of another user or computer. A user with the neces-sary privileges on a system acting as a router or gateway through whichunencrypted traffic such as Telnet or HTTP passes can use tcpdump toview login IDs, passwords, the URLs and content of websites being viewed,or any other unencrypted information. The user may optionally apply aBPF-based filter to limit the number of packets seen by tcpdump this ren-ders the output more usable on networks with a high volume of traffic.

1.8 Multicore Programming:

A multi-core processor is a single computing component with twoor more independent actual central processing units called "cores", whichare the units that read and execute program instructions.[1] The instruc-tions are ordinary CPU instructions such as add, move data, and branch,but the multiple cores can run multiple instructions at the same time, in-creasing overall speed for programs amenable to parallel computing.

Conclusion:

Hence we Conclude when we run these program different packets areanalyzed by extracting Headers Fields different fields of captured packet.

PVGCOE,Nashik.

Page 8: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 8

Assignment No.-A-2

Problem Statement:

Consider the network id 192.168.4.0 or such relevant IP and cre-ate four subnets namely A, B, C, D. Assign the subnet mask. Write a PythonC++ program to perform the following operations (use overloading if ap-plicable).

1) Ping the machine of same subnet.

2) Ping the machine in subnet A from machine of subnet B.

3) Analyze the output of the above sub assignments.

2.1 Prerequisite:

Network layer working and IPV4 basics2.2 Learning Objectives:

To understand how subnet works.

To learn basic LAN commands

2.3 Theory

2.3.1 Introduction to IPv4 :

The identifier used in the IP layer of the TCP/IP protocol suite to iden-tify each device connected to the Internet is called the Internet addressor IP address. An IP address is a 32-bit address that uniquely and uni-versally defines the connection of a host or a router to the Internet. IPaddresses are unique. They are unique in the sense that each address de-fines one, and only one, connection to the Internet. Two devices on theInternet can never have the same address. The address space of IPv4 is232or 4,294,967,296.

Network classes:

Internet addresses are allocated by the InterNIC, the organizationthat administers the Internet. These IP addresses are divided into classes.

PVGCOE,Nashik.

Page 9: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 9

The most common of these are classes A, B, and C. Classes D and E exist,but are not generally used by end users. Each of the address classes hasdifferent default subnet mask. You can identify the class of an IP addressby looking at its first octet. Following are the ranges of Class A, B, and CInternet addresses, each with an example address:

Class A networks use a default subnet mask of 255.0.0.0 and have 0-127 as their first octet. The address 10.52.36.11 is a class A address. Its firstoctet is 10, which is between 1 and 126, inclusive.

Class B networks use a default subnet mask of 255.255.0.0 and have128-191 as their first octet. The address 172.16.52.63 is a class B address.Its first octet is 172, which is between 128 and 191, inclusive.

Class C networks use a default subnet mask of 255.255.255.0 andhave 192 - 223 as their first octet. The address 192.168.123.132 is a class Caddress. Its first octet is 192, which is between 192 and 223, inclusive.

Figure 1: IPv4 Classes and ItâAZs Range

PVGCOE,Nashik.

Page 10: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 10

Figure 2: Distribution of NetId and HostId

Figure 3: Special IP Address

PVGCOE,Nashik.

Page 11: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 11

Figure 4: Addresses for Private Networks

The network address is the beginning address of each block. It canbe found by applying the default mask to any of the addresses in the block(including itself). It retains the netid of the block and sets the hostid tozero.

2.3.2 Need of Subnetting.

Specifically, the network addresses available for assignment to or-ganizations are close to depletion. This is coupled with the ever-increasingdemand for addresses from organizations that want connection to the In-ternet.

PVGCOE,Nashik.

Page 12: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 12

There are 4 of the major reasons for subnetting or segmenting net-work?

1. To divide a large network into smaller segments to reduce trafficand speed up the sections of your network.

2. To connect networks across geographical areas.

3. To connect different topologies such as Ethernet, Token Ring,and FDDI together via routers.

4. To avoid physical limitations such as maximum cable lengths orexceeding the maximum number of computers on a segment.

In this section we briefly discuss solution: subnetting. A Class A,B, or C TCP/IP network can be further divided, or subnetted, by a systemadministrator.

Example

A service provider has given you the Class C network range 209.50.1.0.Your company must break the network into 20 separate subnets.

Step 1) Determine the number of subnets and convert to binary

- In this example, the binary representation of 20 = 00010100.

Step 2) Reserve required bits in subnet mask and find incrementalvalue

The binary value of 20 subnets tells us that we need at least 5 net-work bits to satisfy this

- requirement (since you cannot get the number 20 with any lessthan 5 bits -10100)

- Our original subnet mask is 255.255.255.0 (Class C subnet) - Thefull binary representation of the subnet mask is as follows:

PVGCOE,Nashik.

Page 13: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 13

255.255.255.0 = 11111111.11111111.11111111.00000000- We must convert 5 of the client bits (0) to network bits (1) in order to

satisfy the requirements:

New Mask = 11111111.11111111.11111111.11111000

- If we convert the mask back to decimal, we now have the subnetmask that will be used on all the new networks -

255.255.255.248 - Our increment bit is the last possible network bit,converted back to a binary number

New Mask = 11111111.11111111.11111111.1111(1)000 - bit with theparenthesis is your increment bit. If you convert this bit to a decimal num-ber, it becomes the number 8

Step 3) Use increment to find network ranges

- Start with your given network address and add your increment tothe subnetted octet:

209.50.1.0 209.50.1.8 209.50.1.16...etc

- You can now fill in your end ranges, which is the last possible IPaddress before you start the next range

209.50.1.0 -209.50.1.7 209.50.1.8 -209.50.1.15 209.50.1.16 - 209.50.1.23...etc

- You can then assign these ranges to your networks! Rememberthe first and last addressfrom each range (network / broadcast IP) are un-usable

2.3.4 Networking commands

1.finding host/domain name and IP address - hostname2.test network connection - ping3.getting network configuration -ifconfig4.Network connections, routing tables, interface statistics - netstat

PVGCOE,Nashik.

Page 14: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 14

5.query DNS lookup name - nslookup6.communicate with other hostname - telnet7.outing steps that packets take to get to network host - traceroute8.view user information finger9.checking status of destination host - telnet10. 1>ping Command

Ping uses the ICMP protocols mandatory ECHO-REQUEST data-gram to elicitanICMP ECHO-RESPONSE from a host or gateway. ECHO-REQUEST datagrams have an IP and ICMP header, followed by a "struct-timeval" and then an arbitrary number of pad bytes used to fill out thepacket. The options are as follows:

Syntax:Ping <hostname/IP address> [option]

Options: ping[-c count] [-i wait] [-l preload] [-p pattern][-s pack-etsize] -c count

Stop after sending (and receiving) count ECHO_RESPONSE pack-ets.

-i wait

Wait wait seconds between sending each packet. The default isto wait for one second between each packet. This option is incompatiblewith the -f option.

-l preload

If preload is specified, ping sends that many packets as fast as pos-sible before falling into its normal mode of behavior.

-p pattern

You may specify up to 16 bytes to fill out the packet you send. Thisis useful for diagnosing data-dependent problems in a network. For ex-ample, "-p ff" will cause the sent packet to be filled with all ones.

PVGCOE,Nashik.

Page 15: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 15

Conclusion:

Consider the network id 192.168.4.0 or such relevant IP and createfour subnets namely A, B, C, D. Assign the subnet mask. Write a PythonC++ program to perform the following operations (use overloading if ap-plicable).

PVGCOE,Nashik.

Page 16: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 16

Assignment No.-A-3

Problem Statement:

Write C++ Program with GUI to capture using remotely placed cam-era and read uncompressed TIFF Image to perform following functions(Menu Driven) . Use of Overloading and Morphism is expected. ImageFrame1 is used for displaying Original Image and Image Frame 2 is usedfor displaying the action performed.

3.1 Objective:

To understand the image as a signalTo understand image processing

3.2 Theory:

3.2.1 What is an Image:

Digital images are composed of pixels (short for picture elements).Each pixel represents the color (or gray level for black and white photos)at a single point in the image, so a pixel is like a tiny dot of a particularcolor. By measuring the color of an image at a large number of points, wecan create a digital approximation of the image from which a copy of theoriginal can be reconstructed.

Pixels are a little like grain particles in a conventional photographicimage, but arranged in a regular pattern of rows and columns and storeinformation somewhat differently. A digital image is a rectangular array ofpixels sometimes called a bitmap.

Figure 1: An image - an array or a matrix of pixels arranged in columnsand rows.

PVGCOE,Nashik.

Page 17: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 17

In a (8-bit) greyscale image each picture element has an assignedintensity that ranges from 0 to 255. A grey scale image is what people nor-mally call a black and white image, but the name emphasizes that such animage will also include many shades of grey.

Some greyscale images have more greyscales, for instance 16 bit =65536 greyscales. In principle three greyscale images can be combined toform an image with 281,474,976,710,656 greyscales. There are two generalgroups of ’images’: vector graphics (or line art) and bitmaps (pixel-basedor ’images’). Some of the most common file formats are:

GIF : An 8-bit (256 colour), non-destructively compressed bitmap

format. Mostly used for web. Has several sub-standards one of which isthe animated GIF.

JPEG : A very efficient (i.e. much information per byte) destructively

compressed 24 bit (16 million colours) bitmap format. Widely used, espe-cially for web and Internet (bandwidth-limited).

PS: Postscript, a standard vector format. Has numerous sub-standards

and can be difficult to transport across platforms and operating systems.

PSD: A dedicated Photoshop format that keeps all the information

in an image including all the layers.

TIFF: TIFF stands for Tagged Image File Format and was developed

by the Aldus Corporation in the 1980s. It was later supported by Microsoft.TIFF files are often used with scanned images. Science a TIFF file does notcompress an image file, hence images are often large but the quality is pre-served. It can handle multiple images and data in a single file through theinclusion of ’tags’ in the file header. Tags can include the basic geometryof the image, such as its size, or define how the image data is arrangedand whether various image compression options are used, and uses a file-name extension of TIFF or TIF. The TIFF format is often used to exchangefiles between applications and computer platforms. Within TIFF, a loss-less compression routine known as LZW is available. This reduces the sizeof the stored file without perceptible loss in quality. The goals of the TIFF

PVGCOE,Nashik.

Page 18: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 18

specification include extensibility, portability, and reversibility.TIFF has emerged as the standard archiving image file format for libraryuse. Its strengths are that the format is extensible – new image types canbe introduced without invalidating older typesâATand portable – it is in-dependent of hardware and operating system types.

There are many types of TIFF files; the most common ones are de-scribed below.

1. Uncompressed:

Uncompressed TIFF images are stored in an uncompressed raw format.This is the basic format for archival images because the data is left un-changed.

2. LZW Compressed:

This lossless format works the same as GIF; however, LZW compression inTIFF supports more than 8 bits per pixel. This is a good choice for archivalimages because it offers compression without any loss of data. Each bit isidentical to the uncompressed version.

3. JPEG Compressed:

This type uses JPEG compression and stores it in a TIFF file.

Advantages of TIFF File Format:

The advantages of TIFF file format is that it can support any range of imageresolution, size, and colour depth and different compression techniques.

Disadvantages of TIFF File Format:

The weakness of TIFF is its larger file size that limits its use in the Interneteducational Environment. Due to the same reason TIFF images are rarelyutilized in web applications.

3.2.2 Histogram:

In statistics, a histogram is a graphical representation of the distribu-tion of data. It is an estimate of the probability distribution of a continu-ous variable. Histograms are used to plot the density of data, and often fordensity estimation estimating the probability density function of the un-

PVGCOE,Nashik.

Page 19: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 19

derlying variable. The total area of a histogram used for probability densityis always normalized to 1. If the length of the intervals on the x-axis is all1, then a histogram is identical to a relative density plot. The histogram ofa digital image with grey values r0, r1, . . . rL-1 is the discrete function

P(rk) = nkn

nk = Number of pixels with grey value rk. n = Total number of pixels inan image.

The function p(rk) represents the fraction of the total number ofpixels with grey value rk. Histogram provides a global description of theappearance of image.

HISTOGRAM EQUALIZATION:

It is an approach to enhance a given image. The approach is to designa transformation T(.) such that the gray values in the output is uniformlydistributed in [0,1]. Equalization is process that attempts to spread outthe gray levels in an image so that they are evenly distributed across theirrange. Histogram equalization reassigns the brightness values of pixel basedon the image histogram. Histogram equalization is a technique where the

PVGCOE,Nashik.

Page 20: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 20

histogram of the resultant image is as flat as possible. Histogram equaliza-tion provides more visually pleasing results across a wider range of image.

Procedure to perform Histogram Equalization

1. Find the running sum of the histogram values.

2. Normalize the values from step 1 by dividing by the total number ofpixels.

2. Multiply the values from step 2 by the maximum gray-level valuesand round.

3. Map the gray level values to the results from step 3 using a one-to-one correspondence.

3.2.3 Contrast

Contrast can be simply explained as the difference between maxi-mum and minimum pixel intensity in an image.

Contrast Enhancements

Contrast enhancements improve the perceptibility of objects in thescene by enhancing the brightness difference between objects and theirbackgrounds. Contrast enhancements are typically performed as a con-trast stretch followed by a tonal enhancement, although these could bothbe performed in one step. A contrast stretch improves the brightness dif-ferences uniformly across the dynamic range of the image, whereas tonalenhancements improve the brightness differences in the shadow (dark),midtone (grays), or highlight (bright) regions at the expense of the bright-ness differences in the other regions.

3.2.4 Brightness:

Brightness is a relative term. It depends on your visual perception.Since brightness is a relative term , so brightness can be defined as theamount of energy output by a source of light relative to the source we arecomparing it to. In some cases we can easily say that the image is bright ,and in some cases, its not easy to perceive.FOR EXAMPLE: Just have a look at both of these images , and compare

PVGCOE,Nashik.

Page 21: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 21

which one is brighter.

Conclusion:

Hence we studied about how to capture using remotely placed cam-era and read uncompressed TIFF Image to perform following functions(Menu Driven) . Use of Overloading and Morphism is expected. ImageFrame1 is used for displaying Original Image and Image Frame 2 is usedfor displaying the action performed.

PVGCOE,Nashik.

Page 22: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 22

Assignment No.-A-4

Problem Statement:

Write a program in C++ /Python to analyze HTTP header.

4.1 Prerequisite:

Application Layer Protocols4.2 Learning Objective:

1. To understand how Request and Responses are Handled Sender toReceiver.

2. To Understand Request-Response related Parameter?

4.3 Prerequisite:

4.3.1 Introduction

The Hypertext Transfer Protocol (HTTP) is an application-level proto-col for distributed, collaborative, hypermedia information systems. This isthe foundation for data communication for the World Wide Web (ie. inter-net) since 1990. HTTP is a generic and stateless protocol which can beused for other purposes as well using extension of its request methods, er-ror codes and headers.

Basically, HTTP is an TCP/IP based communication protocol, whichis used to deliver data (HTML files, image files, query results etc) on theWorld Wide Web. The default port is TCP 80, but other ports can be used.It provides a standardized way for computers to communicate with eachother. HTTP specification specifies how clients request data will be con-structed and sent to the serve, and how servers respond to these requests.

Basic Features

There are following three basic features which make HTTP a simplebut powerful protocol

HTTP is connectionless: The HTTP client i.e. Browser initiates anHTTP request and after a request is made, the client disconnects from theserver and waits for a response. The servers process the request and re-establish the connection with the client to send response back.

HTTP is media independent: This means, any type of data can be sentby HTTP as long as both the client and server know how to handle the datacontent. This is required for client as well as server to specify the content

PVGCOE,Nashik.

Page 23: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 23

type using appropriate MIME-type.HTTP is stateless: As mentioned above, HTTP is a connectionless and

this is a direct result that HTTP is a stateless protocol. The server and clientare aware of each other only during a current request. Afterwards, both ofthem forget about each other. Due to this nature of the protocol,neitherthe client nor the browser can retain information between different re-quest across the web pages. HTTP/1.0 uses a new connection for eachrequest/response exchange whereas HTTP/1.1 connection may be usedfor one or more request/response exchanges.

4.3.2 Basic Architecture:

Following diagram shows a very basic architecture of a web applicationand depicts where HTTP sits:

The HTTP protocol is a request/response protocol based on client/serverbased architecture where web browser, robots and search engines, etc. actlike HTTP clients and Web server acts as:

PVGCOE,Nashik.

Page 24: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 24

CLIENT

The HTTP client sends a request to the server in the form of a requestmethod, URI, and protocol version, followed by a MIME-like message con-taining request modifiers, client information, and possible body contentover a TCP/IP connection.

SERVER

The HTTP server responds with a status line, including the message’sprotocol version and a success or error code, followed by a MIME-likemessage containing server information, entity meta information, and pos-sible entity-body content.

4.3.3 HTTP Protocol Parameters:

HTTP Protocol Parameters and their syntax in a way they are used inthe communication. For example, format for date, format of URL etc. Thiswill help you in constructing your request and response messages whilewriting HTTP client or server programs. You will see complete usage ofthese parameters in subsequent chapters while explaining message struc-ture for HTTP requests and responses.

HTTP Version

HTTP uses a < major>.< minor> numbering scheme to indicate ver-sions of the protocol. The version of an HTTP message is indicated by anHTTP Version field in the first line. Here is the general syntax of specifyingHTTP version number:EXAMPLEHTTP/1.0 or HTTP/1.1

Uniform Resource Identifiers (URI):

Uniform Resource Identifiers (URI) is simply formatted, case-insensitivestring containing name, location etc to identify a resource, for example awebsite, a web service etc. A general syntax of URI used for HTTP is as fol-lows:URI = "http:" "//" host [ ":" port ] [ absp ath["?"quer y]]

Date/Time Formats:

All HTTP date/time stamps MUST be represented in Greenwich Mean-

PVGCOE,Nashik.

Page 25: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 25

Time (GMT), without exception. HTTP applications are allowed to use anyof the following three representations of date/time stamps:Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123

Character Set:

You use character set to specify the character sets that the client prefers.Multiple character sets can be listed separated by commas. If a value is notspecified, the default is US-ASCII.EXAMPLE US-ASCII or ISO-8859-1 or ISO-8859-7

Content Encodings:

A content ecoding values indicate an encoding algorithm has beenused to encode the content before passing it over the network. Contentcodings are primarily used to allow a document to be compressed or oth-erwise usefully transformed without losing the identity.

All content-coding values are case-insensitive. HTTP/1.1 uses content-coding values in the Accept-Encoding and Content-Encoding header fieldswhich we will see in subsequent chapters.

Media Types:

HTTP uses Internet Media Types in the Content-Type and Accept headerfields in order to provide open and extensible data typing and type negoti-ation. All the Media-type values are registered with the Internet AssignedNumber Authority ((IANA). Following is a general syntax to specify mediatype:media-type = type "/" subtype *( ";" parameter )The type, subtype, and parameter attribute names are case- insensitive.EXAMPLEAccept: image/gif

Language Tags:

HTTP uses language tags within the Accept-Language and Content-Language fields. A language tag is composed of 1 or more parts: A pri-mary language tag and a possibly empty series of subtags: language-tag =primary-tag *( "-" subtag )White space is not allowed within the tag and all tags are case- insensitive.EXAMPLEExample tags include:

PVGCOE,Nashik.

Page 26: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 26

en, en-US, en-cockney, i-cherokee, x-pig-latinWhere any two-letter primary-tag is an ISO-639 language abbreviation andany two-letter initial sub tag is an ISO-3166 country code.

HTTP âAS Messages:

HTTP is based on client-server architecture model and a stateless re-quest/response protocol that operates by exchanging messages across areliable TCP/IP connection.

An HTTP "client" is a program (Web browser or any other client) thatestablishes a connection to a server for the purpose of sending one ormore HTTP request messages. An HTTP "server" is a program ( generallya web server like Apache Web Server or Internet Information Services IISetc. ) that accepts connections in order to serve HTTP requests by sendingHTTP response messages.

HTTP makes use of the Uniform Resource Identifier (URI) to identifya given resource and to establish a connection. Once connection is es-tablished, HTTP messages are passed in a format similar to that used byInternet mail [RFC5322] and the Multipurpose Internet Mail Extensions(MIME) [RFC2045]. These messages are consisted of requests from clientto server and responses from server to client which will have following for-mat:

HTTP-message = <Request> | <Response> ; HTTP/1.1 messages

HTTP request and HTTP response use a generic message format of RFC822 for transferring the required data. This generic message format con-sists of following four items.A Start-line Zero or more header fields followed by CRLFAn empty line (i.e., a line with nothing preceding the CRLF) indicating theend of the header fields Optionally a message-body

Header Fields:

HTTP header fields provide required information about the request or re-sponse, or about the object sent in the message body. There are followingfour types of HTTP message headers:

General-header:

These header fields have general applicability for both request and re-sponse messages.

PVGCOE,Nashik.

Page 27: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 27

Request-header:

These header fields are applicability only for request messages.Response-header:

These header fields are applicability only for response messages.Entity-header:

These header fields define meta information about the entity-body or, ifno body is present.All the above mentioned headers follow the same generic format and eachof the header field consists of a name followed by a colon (:) and the fieldvalue as follows:

message-header = field-name ":" [ field-value ]

Following are the examples of various header fields:

User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3

Host: www.example.com

Accept-Language: en, mi

Date: Mon, 27 Jul 2009 12:28:53 GMT

Server: Apache

Last-Modified: Wed, 22 Jul 2009 19:15:56 GMTETag: "34aa387-d-1568eb00"

Accept-Ranges: bytes

Content-Length: 51

Vary: Accept-Encoding

Content-Type: text/plain

PVGCOE,Nashik.

Page 28: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 28

Message Body:

The message body part is optional for an HTTP message but if it isavailable then it is used to carry the entity-body associated with the re-quest or response. If entity body is associated then usually Content-Typeand Content-Length headers lines specify the nature of the body associ-ated.

A message body is the one which carries actual HTTP request data(including form data and uploaded etc.) and HTTP response data fromthe server ( including files, images etc). Following is a simple content of amessage body:

<html><body><h1>Hello, World!</h1></body></html>

4.3.3 HTTP - Methods:

The set of common methods for HTTP/1.1 is defined below and this setcan be expanded based on requirement. These method names are casesensitive and they must be used in uppercase.

GET:The GET method is used to retrieve information from the given serverusing a given URI. Requests using GET should only retrieve data and shouldhave no other effect on the data.HEAD:Same as GET, but only transfer the status line and header section.POST:A POST request is used to send data to the server, for example cus-tomer information, file upload etc using HTML forms.PUT:Replace all current representations of the target resource with the up-loaded content.DELETE:Remove all current representations of the target resource givenby URI.CONNECT:Establish a tunnel to the server identified by a given URI.OPTIONS:Describe the communication options for the target resource.TRACE:Perform a message loop-back test along the path to the target re-source.

PVGCOE,Nashik.

Page 29: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 29

4.3.4 HTTP - Status Codes:

The Status-Code element in a server response, is a 3-digit integer wherefirst digit of the Status-Code defines the class of response and the last twodigits do not have any categorization role. There are 5 values for the firstdigit:

1. 1xx: Informationalr:

This means request received and continuing process.2. 2xx: Success:

This means the action was successfully received, understood, and accepted.3. 3xx: Redirection:

This means further action must be taken in order to complete the request.4. 4xx: Client Error:

This means the request contains bad syntax or cannot be fulfilled5. 5xx:ServerError r:

The server failed to fulfill an apparently valid requestHTTP - Message Examples:

HTTP request to fetch hello.htm pagefrom the web server runningotutorialspoint.com

CLIENT REQUEST:

GET /hello.htm HTTP/1.1User-Agent: Mozilla/4.0 (compatible;MSIE5.01; Windows NT)Host: www.tutorialspoint.comAccept-Language: en-usAccept-Encoding: gzip, deflat

SERVER RESPONCE:

HTTP/1.1 200 OKDate: Mon, 27 Jul 2009 12:28:53 GMTServer: Apache/2.2.14 (Win32)Last-Modified: Wed, 22 Jul 2009 19:15:56 GMTContent-Length: 88

PVGCOE,Nashik.

Page 30: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 30

Content-Type: text/htmlConnection: Closed<html><body><h1>Hello,World!</h1></body>

Conclusion:

Hence we Studied that how HTTP Request and Responses works amongServe and Client.

PVGCOE,Nashik.

Page 31: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 31

Assignment No.-A-5

Problem Statement:

Installing and configure DHCP server and write a program (C++) toinstall the software on remote machine

5.1 Prerequisite:

Knowledge about IP and Subnets.Linux basic commands.

5.2 Prerequisite:

Understand the concept DHCP.Configuring DHCP and installation of software.

5.3 New Concepts:

Install software on remote machine.Installation in Linux using commands.

5.4 Theory :

5.4.1 Introduction:

DHCP (Dynamic Host Configuration Protocol) is a protocol that letsnetwork administrators manage centrally and automate the assignmentof IP (Internet Protocol) configurations on a computer network. When us-ing the Internet’s set of protocols (TCP/IP), in order for a computer sys-tem to communicate to another computer system it needs a unique IPaddress.Without DHCP, the IP address must be entered manually at eachcomputer system. DHCP lets a network administrator supervise and dis-tribute IP addresses from a central point.The purpose of DHCP is to pro-vide the automatic (dynamic) allocation of IP client configurations for aspecific time period (called a lease period) and to eliminate the work nec-essary to administer a large IP network.When connected to a network, ev-ery computer must be assigned a unique address

However, when adding a machine to a network, the assignment andconfiguration of network (IP) addresses has required human action.Thecomputer user had to request an address, and then the administrator wouldmanually configure the machine. Mistakes in the configuration processare easy for novices to make, and can cause difficulties for both the admin-istrator making the error as well as neighbors on the network. Also, whenmobile computer users travel between sites, they have had to relive thisprocess for each different site from which they connected to a network.In

PVGCOE,Nashik.

Page 32: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 32

order to simplify the process of adding machines to a network and assign-ing unique IP addresses manually, there is a need to automate the task.Theintroduction of DHCP alleviated the problems associated with manuallyassigning TCP/IP client addresses. Network administrators have quicklyappreciated the importance, flexibility and ease-of-use offered in DHCP.

5.4.2 Advantages of DHCP:

DHCP has several major advantages over manual configurations. Eachcomputer gets its configuration from a "pool" of available numbers auto-matically for a specific time period (called a leasing period), meaning nowasted numbers. When a computer has finished with the address, it isreleased for another computer to use. Configuration information can beadministered from a single point. Major network resource changes (e.g. arouter changing address), requires only the DHCP server be updated withthe new information, rather than every system.

5.4.3 DHCP message types:

DHCPDISCOVERDHCPOFFERDHCPREQUESTDHCPDECLINEDHCPACKDHCPNAKDHCPRELEASEDHCPINFORM

1. DHCP Discover:

PVGCOE,Nashik.

Page 33: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 33

2. DHCP Offer:

3. DHCP Discover :At this time, the DHCP client can start to use the IP

address

PVGCOE,Nashik.

Page 34: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 34

4. DHCP Release:At this time, the DHCP client has released the IP

address

5.4.4 Installing DHCP in Ubuntu:

Open terminal and type following commands:-1. sudo apt-get install isc-dhcp-server2. sudo gedit /etc/dhcp/dhcpd.conf then make changes in file.

default-lease-time 600; max-lease-time 7200;option subnet-mask 255.255.255.0; option broadcast-address 10.1.32.255;subnet 192.168.1.0 netmask 255.255.255.0 range 10.1.32.10 10.1.32.20;

3.save file and close4. again on terminal give following commands.sudo service isc-dhcp-server restart sudo service isc-dhcp-server start5.On another PC in Internet properties change toObtain IP address automatically and then check the IP address

Conclusion:

Hence we Installed and Configured DHCP and studied Installation ofSoftware on Remote Machine.

PVGCOE,Nashik.

Page 35: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 35

Assignment No.-A-6

Problem Statement:

Design and Setup LAN with Star topology to access Storage Area Net-work (SAN). The SAN must have DSP data, Text Data, Multimedia Dataavailable for the access..

6.1 Prerequisite:

Student must know the server and also installation and configurationof the server.

6.2 Objective:

Student will be able to understand Network Topologies.Students will be able to design LAN with St.ar topology.Student will be able to setup LAN with Star Topology.

Outcome:

Student will Design and Setup the LAN in Star Topology.

Hardware Requirement:

Desktop PC and Printers

Software Requirementt:

UBUNTU 14.0, gcc, g++ compiler

6.3 Theory:

6.3.1 Introduction:

Storage Area Network:

A Storage Area Network (SAN) is a dedicated high-performance sub-net that provides access to consolidated, block level data storage and isprimarily used to transfer data between computer systems and storage el-ements and among multiple storage elements, making storage devices,such as disk arrays, tape libraries, and optical jukeboxes, accessible toservers so that the devices appear like locally attached devices to the op-erating system.

PVGCOE,Nashik.

Page 36: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 36

A SAN typically has its own communication infrastructure that isgenerally not accessible through the local area network by other devices.A SAN moves data among various storage devices, allowing for the sharingdata between different servers, and provides a fast connection medium forbacking up, restoring, archiving, and retrieving data. SAN devices are usu-ally installed closely in a single room, but they can also be connected overlong distances, making it very useful to large companies.

SAN Benefits:

The primary benefits of a SAN are:High Availability: One copy of every piece of data is always accessible

to any and all hosts via multiple paths;Reliability: Dependable data transportation ensures a low error rate,

and fault tolerance capabilitiesScalability: Servers and storage devices may be added independently

of one another and from any proprietary systemsPerformance:Fibre Channel (the standard method for SAN intercon-

nectivity) has now over than 2000MB/sec bandwidth and low overhead,and it separates storage and network I/O

SAN Storage:

The storage layer is where all data resides on the SAN. This is the layerthat contains all the disk drives, tape drives, and other storage devices,like optical storage drives. The storage layers devices include some intelli-gence, such as RAID or other data-replication technologies to help protectdata in the event of a failure.

PVGCOE,Nashik.

Page 37: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 37

If you use an array of disks without any special connection betweenthem that is Just a Bunch Of Disks (also called a JBOD) all located in thesame place. But a storage array adds extra intelligence to the controllers -which allows you to do cool stuff like RAID, so it is no longer just a bunch ofstupid disks. The intelligence built into the storage controllers in the stor-age array is what enables this additional functionality and this is achievedvia some smart code called firmware that makes it more intelligent.

Network Attached Storage:

Network-attached storage (NAS) is file-level computer data storageconnected to a computer network providing data access to heterogeneousclients. A NAS is a single storage device that operates on data files, whilea SAN is a local network of multiple devices that operate on disk blocks.A NAS system has its own LAN IP address and its own software for con-figuring and mapping file locations to the network attached devices. NASsystems contain one or more hard disks, usually arranged into redundantRAID arrays and uses file-based protocols such as NFS (popular on UNIXsystems), SMB/CIFS (Server Message Block/Common Internet File Sys-tem) (used with MS Windows systems), or AFP (used with Apple Macin-tosh computers).

In short NAS is another server on the network and can in many cases,entirely replace a conventional file server with a Direct Attached StorageSystem (DAS) - particularly if the server only role has been to share files.NAS not only operates as a file server, but is specialized for this task eitherby its hardware, software, or configuration of those elements. NAS is of-ten made as a computer appliance - a specialized computer built from theground up for storing and serving files - rather than simply a general pur-pose computer being used for the role. For this reason, NAS units usuallydo not have a keyboard or display, and are controlled and configured overthe network, often using a browser.

SAN vs NAS :

At first glance NAS and SAN might seem almost identical, and in factmany times either will work in a given situation. However, there are differ-ences that can seriously affect the way your data is utilized. While a SANdeals in blocks of data, a NAS operates at the file level and is accessible toanyone with access rights, so it needs also to manage user privileges, filelocking and other security measures. The processing and control of this

PVGCOE,Nashik.

Page 38: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 38

data is performed in large enterprise systems by a NAS head, physicallyseparated from the storage system.

In contrast, SANs allow multiple servers to share a pool of stor-age, making it appear to the server as if it were local or DAS, and it cannotbe accessed by individual users. A SAN commonly utilizes Fibre Channelwiring connections and encapsulated SCSI as protocol while a NAS typi-cally makes use of Ethernet links and TCP/IP with NFS/CIFS/AFP as com-munication protocols.

A SAN typically has its own communication infrastructure that isgenerally not accessible through the local area network by other devices.A SAN moves data among various storage devices, allowing for the sharingdata between different servers, and provides a fast connection medium forbacking up, restoring, archiving, and retrieving data. SAN devices are usu-ally installed closely in a single room, but they can also be connected overlong distances, making it very useful to large companies.

SAN versus LAN :

Since the original TCP/IP network protocols used in LANs were devel-oped to move and share files, they had no built-in way to directly accessdisk drives. As a result, very high-performance applications needed directaccess to block-based disk drives to move and store data very fast as datais stored as blocks on a disk drive.

A SAN differs from a LAN in two main ways:Storage Protocol :

A LAN uses network protocols that send small blocks of data with in-creased communication overhead due to addressing and protocol encap-sulation and this reduces data throughput. A SAN uses storage protocols(SCSI) that sends larger blocks of data with reduced overhead and datathroughput.

Server Captive Storage :

LAN based systems connect servers to clients, with each server own-ing and controlling access to its own storage resources. Storage must beadded to a server rather than directly to the LAN. A SAN allows storage re-sources to be added to the network enabling any server to directly accessthem.

PVGCOE,Nashik.

Page 39: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 39

STAR TOPOLOGY :

Star topologies are implemented via a common switching node whichroutes data from one connected node to another as if it were configuredas a point to point topology. From the nodes transmitting and receivingdata, there is no practical distinction between a star network and a pointto point network, however the inclusion of the central switch allows a net-work to grow to N nodes, where N is the number of leaf nodes attached tocentral switch. From a logical perspective N can be arbitrarily high, how-ever from a physical perspective N is limited to the number of physicalconnection ports available on the switch.

Combining more than one star topology results in a tree topology andis known as daisy-chaining which is a very common practice. It is theoret-ically possible to connect star networks into a ring or mesh topology, how-ever from a physical topological perspective most common hardware willfail to handle these cases, and either fail to function entirely or degrade toa tree topology.

Setting Up a Simple LAN :

Imagine that an ISP has just set up an Internet connection for yourtelecentre. Whats next? Probably the telecentre manager will want to setup a simple LAN and then use it to connect the computers to the Internet.This is can be done simply, as explained below, and does not need to in-volve a server computer since the router can direct Internet traffic.

PVGCOE,Nashik.

Page 40: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 40

The telecentre manager will need to determine in advance whetherto make the network wired, wireless or a combination of the two. Wire-less networks are simpler to set up but more attention needs to be paidto security with wireless networks. In addition, not all desktop comput-ers come with wireless adapters. Imagine that a broadband Internetconnection has just been installed at your telecentre. Here are the stepsfor setting up a small LAN to connect computers to the Internet.

Step 1 :

Install a router. This is as simple as plugging it into an electrical outlet, andthen using a CAT-5 cable to connect it to the Internet source. The Internetsource will vary with the type of connection. For a WiMax connection, forexample, you might be connecting directly to an antenna or to a modemconnected to the antenna.

Step 2 :

Connect wired computers to the router. If the router has enough ports onthe back for all of the computers on your network, you can attach themdirectly using CAT-5 cable. The router will act as the center of a star net-work. If the router does not have enough ports, move on to step 3. Youmay also need to install the software that came with the router onto one ofthe networked computers and use it to complete the initial setup for therouter.

Step 3 :

Connect a switch to the router. This should be done if the router does nothave enough ports for all the computers on your network, or if a group ofcomputers is in another room. The switch connects to one of the portsin the router via a CAT-5 cable, and also will require an electrical outlet.Computers then connect to the switch, forming a star network.

Step 4 :

Connect wireless computers to the router. If you have a wireless routerand computers with wireless adapters, connect each computer individu-ally to the router by using the tools in their operating systems for networkconnections (for Windows computers these can be found in the controlpanel). If the router (or the switch) is not wireless or if wireless access isneeded in a different location, move on to step 5.

PVGCOE,Nashik.

Page 41: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 41

Step 5 :

Connect a wireless access point to the router. If additional wireless accessis needed, scout out the best location for this access (so that as many com-puters as possible are in range). Then connect the wireless access point toone of the ports in the router via a CAT-5 cable.

Conclusion:

In this way I can Design and Setup LAN with Star topology to accessStorage Area Network (SAN).

PVGCOE,Nashik.

Page 42: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 42

Assignment No.-B-1

Problem Statement:

Write a Python program to grab the image from Camera and apply theedge detection algorithm(overloaded with Sobel variants, Others) to findthe edges use BBB / ARM Cortex A5/A9/M4 Mobile Boards. Store the Im-ages in SAN (for BIGDATA analytics)

1.1 Theory:

Image processing is important in modern data storage and data trans-mission especially in progressive transmission of images, video coding (tele-conferencing), digital libraries, and image database, remote sensing. Ithas to do with manipulation of images done by algorithm to produce de-sired images (Milan et al., 2003). Digita l Signal Processing (DSP) improvethe quality of images taken under extremely unfavourable conditions inseveral ways: brightness and contrast ad- justment, edge detection, noisereduction, focus adjustment, motion blur reduction etc (Gonza lez,2002).The advantage is that image processing allows much wider range of algo-rithms to be applied to the input data in order to avoid problems such asthe build-up of noise and signa l distortion during processing (Baker Na-yar, 1996).

Many of the techniques of digita l image processing were developedin the 1960’s at the Jet Propulsion Laboratory, Massachusetts Institute ofTechnology (MIT), Bell laboratory and few other places. But the cost ofprocessing was fairly high with the computing equipments of that era.With the fast computers and signal processors available in the 2000’s, digi-tal image processing became the most common form of image processingand is general used because it is not only the most versatile method butalso the cheapest. The process allows the use of much more complex algorithms for image processing and hence can offer both more sophisti-cated performanceat simple tasks, and the implementation of methodswhich would be impossible by analog means ( Micheal, 2003). Thus, im-ages are stored on the computers as collection of bits representing pixelor points forming the picture elements (Vincent, 2006). Firstly, images area measure of parameter over space, while most signa ls are measures ofparameter over time. Secondly, they contain a great deal of information(Guthe Strasser, 2004); image processing is any form of information pro-cessing for which the input is an image , such as frames of video; the out-put is not necessarily an image, but can be for instance be a set of features

PVGCOE,Nashik.

Page 43: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 43

of the image (Yuval, 1996).

Edge Detection:

Edge detection is a process of locating an edge of an image. Detectionof edges in an image is a very important step towards understanding im-age features. Edges consist of meaningful features and contain significantinformation. It significantly reduces the image size and filters out infor-mation that may be regarded as less relevant, thus preserving the impor-tant structural properties of an image. Most images contain some amountof redundancies that can sometimes be removed when edges are detectedand replaced during reconstruction. This is where edge detection comesinto play. Also, edge detection is one of the ways of making images nottake up too much space in the computer memory. Since edges often oc-cur at image locations representing object boundaries, edge detection isextensively used in image segmentation when images are divided into ar-eas corresponding to different objects. boundaries, edge detection is ex-tensively used in image segmentation when images are divided into areascorresponding to different objects.

Image edge detection is a process of locating the edge of an imagewhich is important in finding the approximate absolute gradient magni-tude at each point of an input grayscale image. The problem of gettingan appropriate absolute gradient magnitude for edges lies in the methodused. The Sobel operator performs a 2-D spatial gradient measurement onimages. Transferring a 2-D pixel array into statistically uncorrelated dataset enhances the removal of redundant data, as a result, reduction of theamount of data is required to represent a digital image. The Sobel edgedetector uses a pair of 3 x 3 convolution masks, one estimating gradient inthe

x-direction and the other estimating gradient in y- direction. The So-bel detector is incredibly sensitive to noise in pictures, it effectively high-light them as edges. Hence, Sobel operator is recommended in massivedata communication found in data transfer.

Sobel Edge Detection:

The Sobel operator performs a 2-D spatial gradient measurement onan image. Typically it is used to find the approximate absolute gradientmagnitude at each point I of an input grayscale image. The Sobel edgedetector uses a pair of 3 x 3 convolution masks, one estimating gradient

PVGCOE,Nashik.

Page 44: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 44

in the x - direction and the other estimating gradient in y - direction. Itis easy to implement than the other operators. Transferring a 2-D pixelarray into statistically uncorrelated data s et enhances the removal of re-dundant data, as a result, reduction of the amount of data required to rep-resent a digital image. Considering data communication especially the in-ternet, massive data transfer causes serious problems for interactive net-work users. Edge detection helps in optimizing network bandwidth h andit is needed to keep track of data flowing in and out of the network. It helpsto extract useful features for pattern recognition.

Although the Sobel operator is slower to compute, its large r convolu-tion kernel smoothes the input image to a greater extent and so makes theoperator less sensitive to noise. The larger the width of the mask, the lowerits sensitivity to noise and the operator also produces considerably higheroutput values for similar edges. Sobel operator effectively highlights noisefound in real world pictures as edges though, the detected edges could bethick.

The Sobel operator is used in image processing, particularly withinedge detection algorithms. Technically, it is a discrete differentiation op-erator, computing an approximation of the gradient of the image intensityfunction. At each point in the image, the result of the Sobel operator iseither the corresponding gradient vector or the norm of this vector. TheSobel operator is based on convolving the image with a small, separable,and integer valued filter in horizontal and vertical direction and is there-fore relatively inexpensive in terms of computations. On the other hand,the gradient approximation that it produces is relatively crude, in particu-lar for high frequency variations in the image.

Sobel operator effectively highlights noise found in real world pic-tures as edges though, the detected edges could be thick. The Canny edgedetector and similar algorithm solve these problems by first blurring theimage slightly then applying an algorithm that effectively thins the edgesto one pixel. Transferring a 2-D pixel array into a statistically uncorrelateddata set enhances the removal of redundant data, which leads to the re-duction of the amount of data required to represent a digital image. Con-sidering data communication these days, especially the internet, massivedata transfer causes serious problems for interactive network users andtechniques such as these go a long way to enable faster data transfer andsolve, to a certain extent, the memory consumption problem.

PVGCOE,Nashik.

Page 45: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 45

Connecting the BeagleBone Black (BBB) with the PC:

Now open a linux terminal on your PC. On the prompt give the commandssh [email protected] press enterkey 192.168.7.2 is the default ip ad-

dress of the BBB Ethernet over USB interface (USB0) The BBB will get re-motely connected with the PC and the terminal will now show the Beagle-Bone prompt

root@beaglebone:.Copying the files from the PC to BBB:

scp filename [email protected]:/home press enterkeyhere scp is the Linux command, filename is the name of the file and theremote connection name is [email protected] and the remote location is/home directory.

Copying the files from the BBB to PC:

scp filename [email protected]:/dir press enterkeyhere scp is the Linux command, filename is the name of the file and theremote connection name is [email protected] and the remote location di-rectory is / directory, user is the login name of your PC linux. e.g: if your PClogin is root@localhost: then you should use root as login name To trans-fer multiple file use the command

scp file1,file2...fileN [email protected]:/homescp [email protected]:/home/*.jpg /home press enterkey

Conclusion:

Hence we studied about how to grab the image from Camera and ap-ply the edge detection algorithm(overloaded with Sobel variants, Others)to find the edges use BBB / ARM Cortex A5/A9/M4 Mobile Boards. Storethe Images in SAN (for BIGDATA analytics).

PVGCOE,Nashik.

Page 46: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 46

Assignment No.-B-4

Problem Statement:

Study and perform Linux networking commands emulation using Pythonor C++

1.1 Prerequisite:

Ping commands

1.2Learning Objective:

To understand how data is transferred reliable and in-order.

1.3 Theory:

1.3.1 Introduction:

In computing, Trace routeis a computer network diagnostic tool fordisplaying the route (path) and measuring transit delays of packets acrossan Internet Protocol (IP) network. The history of the route is recorded asthe round-trip times of the packets received from each successive host (re-mote node) in the route (path); the sum of the mean times in each hop in-dicates the total time spent to establish the connection. Trace route pro-ceeds unless all (three) sent packets are lost more than twice, then the con-nection is lost and the route cannot be evaluated. Ping, on the other hand,only computes the final round-trip times from the destination point.

The Trace route command is available on a number of modern oper-ating systems. On Apple Mac OS, it is available by opening "Network Util-ities" and selecting "Trace route" tab, as well as by typing the "trace route"command in the terminal. On other Unix systems, such as FreeBSD orLinux, it is available as a trace route(8) command in a terminal. On Mi-crosoft Windows, it is named tracert. Windows NT-based operating sys-tems also provide Path Ping, with similar functionality. For Internet Proto-col Version 6 (IPv6) the tool sometimes has the name traceroute6 or trac-ert6.

The Trace route utility is one of the most commonly used, not to men-tion useful, diagnostic tools available to any network operator. Trace routeallows you to examine the path a packet takes across the Internet, show-ing you each of the individual routers that handle the packet, as well asmeasuring the time (network latency) it takes to deliver the packet to each

PVGCOE,Nashik.

Page 47: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 47

router. Looking at a Trace route is similar to having a birds eye view of a cardrive from one location to another, showing you each of the roads (paths)and intersections (routers) encountered along the way.

Using the data provided in a Trace route, network operators can ver-ify that packets are being routed via optimal paths, as well as troubleshootnetwork issues like packet loss and excessive latency. Trace route toolscome built in to most operating systems, allowing end users to submitTrace route information to their Internet providers when there is a rout-ing issue. There are also a wide variety of websites (known as "lookingglasses") on the Internet which allow you to run a Trace route from a re-mote location on someone else’s network, making the tool widely accessi-ble.

1.3.2 The Basics of Trace route:

The following is an example of a simple Trace route, directed to www.ntt.net. Each numbered line represents one router "hop", and shows the paththat the packet takes from the source to the specified destination. By de-fault, most classic Trace route applications will send three probes per routerhop, resulting in three latency measurements to each hop. These mea-surements are reported on the right hand side, and are generally given inmilliseconds (ms). In some instances, such as in hops 6 and 7, the threeprobes will traverse different paths, resulting in the multiple lines of out-put for a single hop.

Trace routeto www.ntt.net (130.94.58.116), 64 hops max, 52 byte pack-ets

1) ge0-34.aggrFZ155-2.ord6.us.scnet.net (204.93.176.73) 4.558 ms 2.030 ms2.730 ms2) ge9-47.ar1.ord6.us.scnet.net (75.102.0.65) 0.405 ms 0.297 ms 0.265 ms3) 61.po4.ar1.ord1.us.scnet.net (75.102.3.225) 1.305 ms 1.249 ms 1.232 ms4) ae0-81.cr1.ord1.us.nlayer.net (69.31.111.1) 1.135 ms 59.441 ms 1.144 ms5) ae1.ar2.ord1.us.nlayer.net (69.31.111.146) 1.419 ms 2.249 ms 1.452 ms6) as2914.xe-6-0-3.ar2.ord1.us.nlayer.net (69.31.111.233)

1.450 ms as2914.xe-6-0-2.ar1.ord1.us.nlayer.net(69.31.111.209) 1.608 ms as2914.xe-6-0-3.ar2.ord1.us.nlayer.net (69.31.111.233)1.497 ms7 ) ae-7.r21.chcgil09.us.bb.gin.ntt.net (129.250.4.201) 9.476 ms ae-6.r21.

PVGCOE,Nashik.

Page 48: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 48

chcgil09.us.bb.gin.ntt.net (129.250.2.26) 1.389 ms 9.325 ms8) ae-5.r20.snjsca04.us.bb.gin.ntt.net (129.250.3.107) 52.695 ms 54.304 ms57.892 ms9) ae-1.r06.snjsca04.us.bb.gin.ntt.net (129.250.5.13) 54.316 ms 54.275 ms52.426 ms10) 130.94.58.116 (130.94.58.116) 52.211 ms 58.061 ms 54.065 ms

1.3.3 How Trace route Works :

The high level theory behind Trace route is relatively straight-forward.Within each IP packet, there is a field known as the Time To Live (TTL)value. This field records the remaining lifespan of the packet, measured innumber of router hops, and functions to prevent routing loops from con-suming an infinite amount of network resources by setting a finite limiton the number of hops that a packet can be routed through. As part ofthe IP routing process, each router which handles a packet will decrementthe value of the TTL field by 1. If the TTL value ever reaches 0, the packetis dropped, and an ICMP TTL Exceed message is returned to the originalsender letting it know that the packet was dropped. Trace route exploitsthis inherent behavior of the IP routing process to map out each routerthat a packet if forwarded through, by sending out a series of probe pack-ets which are intended to expire before reaching their final destination,and capturing the resulting ICMP TTL Exceed messages

PVGCOE,Nashik.

Page 49: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 49

Every Trace route probe follows this basic pattern:1. Trace route launches a probe packet towards the final destination, withan initial TTL value of2. Each router that handles the packet along the way decrements the TTLby 1, until the TTL reaches 0.3. When the TTL value reaches 0, the router which discarded the packetsends an ICMP TTL Exceed message back to the original sender, along withthe first 28 bytes of the original probe packet.4. The Trace route utility receives this ICMP TTL Exceed packet, and usesthe time difference between the original probe packet and the returnedICMP packet to calculate the round-trip latency for this router "hop".5. This process again from step 1, with a new initial TTL value of N+1, un-til...6. The final destination receives the Trace route probe packet, and sendsback a reply packet other than an ICMP TTL Exceed. The Trace route util-ity uses this to know that the Trace route is now complete, and ends theprocess.

1.3.4 What Hops Are You Seeing In Trace route?

When a router drops a packet because the TTL value has reached 0, itgenerates an ICMP TTL Exceed message with the source address set to theIP of the ingress interface over which it received the original packet. Whenthe Trace route utility later receives this ICMP reply, it uses the source ad-dress to represent the router hop as reported to the end-user. Thus, Traceroute only allows you to see the IPs of the ingress interface on each routerhop.

In the example above, the Trace route that will be returned is:1. 172.16.2.12. 10.3.2.2It is important to remember that Trace route does not provide any vis-

ibility into the egress interfaces, or the return paths of the ICMP TTL Ex-ceed message. This fact will become increasingly important in later sec-tions, as we talk about how to accurately diagnose network issues withTrace route.

Random Factoid: This behavior is actually not standards compliant.RFC1812 specifies that the source address of the ICMP message generatedby the routers should be that of the egress interface over which the ICMP

PVGCOE,Nashik.

Page 50: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 50

message will return to the original sender. If this standard was actuallyfollowed in practice, it would completely change the Trace route results,effectively rendering it useless. As of this writing, no new RFC has offi-cially obsoleted this standard

1.3.5Trace route Implementation Details:

Trace route probe packets can take many forms. In fact, essentiallyany IP packet can be used in a Trace route probe, since the only abso-lute requirement is that the packet has an incrementing TTL field witheach probe. Two other practical considerations are that the probe packetshould not be blocked by firewalls, and that the final destination should re-turn a reply to the probe packet so the Trace route implementation knowsit has reached the end. Some of the most common Trace route implemen-tations include:

Classic UNIX Trace route, which uses UDP packets with desti-nation ports starting at 33434, and incrementing by 1 with each probe.Typical defaults are 3 probes per hop (or TTL increment), but this is usu-ally configurable. The UDP destination port number is used to identifywhich probe the ICMP response is talking about. When the probe packetreaches the final destination, the host will return an ICMP DestinationUnreachable packet (assuming no application is listening on those UDPports, which is not common), denoting the end of the Trace route. Many

PVGCOE,Nashik.

Page 51: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 51

modern Trace route implementations allow the user to specify UDP, ICMP,or TCP probe packets.

Random Factoid: The value of 33434 as the starting port for Traceroute comes from adding the numbers 32768 (215, or half of the maximumvalue of the UDP port range) and 666 (the mark of Satan). Windows Traceroute(or more specifically, tracert.exe) is notable for its use of ICMP EchoRequest probes, rather than the UDP probes of classic UNIX Trace routeimplementations. When the probe packet reaches the final destination, anICMP Echo Reply packet is returned, indicating the end of the Trace route.

MTR is another popular program which also uses ICMP probepackets. The most notable difference between MTR and other programs isthat it performs its Trace route probes in an infinite loop, using a curses-style interface to update the results. MTR is extremely good at finding mul-tiple parallel paths, since it sends so many probes over a long period oftime, but it is also known to overload the ICMP TTL Exceed generation ca-pacity of some routers if multiple copies are left running.

1.4 Ping:

Ping is a computer network administration software utility used totest the reachability of a host on an Internet Protocol (IP) network and tomeasure the round-trip time for messages sent from the originating hostto a destination computer. The name comes from active sonar terminol-ogy which sends a pulse of sound and listens for the echo to detect objectsunderwater. Ping operates by sending Internet Control Message Protocol(ICMP) echo request packets to the target host and waiting for an ICMPresponse. In the process it measures the time from transmission to recep-tion (round-trip time) and records any packet loss. The results of the testare printed in the form of a statistical summary of the response packetsreceived, including the minimum, maximum, and the mean round-triptimes, and sometimes the standard deviation of the mean.

Depending on actual implementation, the ping utility may be exe-cuted with various command-line switches to enable special operationalmodes. For example, options include specifying the packet size of theprobe, automatic repeated operation for sending a specified count of probes,and time stamping. Many operating systems provide a companion utility,ping6, for probing Internet Protocol version 6 (IPv6) hosts, but some sys-tems may include this capability within the ping utility. A simple denial-of-service attack may be performed in the form of a ping flood, in which

PVGCOE,Nashik.

Page 52: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 52

the attacker overwhelms the victim with ICMP echo request packets.

1.4.1 Sample Ping Test:

The following is the output of running ping under Linux with www.example.comas the target:§ping www.example.comPING www.example.com (93.184.216.119): 56 data bytes64 bytes from 93.184.216.119: icmp_seq=0 ttl=56 time=11.632 ms64 bytes from 93.184.216.119: icmp_seq=1 ttl=56 time=11.726 ms64 bytes from 93.184.216.119: icmp_seq=2 ttl=56 time=10.683 ms64 bytes from 93.184.216.119: icmp_seq=3 ttl=56 time=9.674 ms— www.example.com ping statistics —

4 packets transmitted, 4 packets received, 0.0 % packet lossround-trip min/avg/max/stddev = 9.674/10.929/11.726/0.831 ms

1.4.2 How Ping was invented:

The original PING command stood for "Packet Internet Groper", andwas a package of diagnostic utilities used by DARPA personnel to test theperformance of the ARPANET. However, the modern Internet Ping com-mand refers to a program was written by Mike Muuss in December, 1983,which has since become one of the most versatile and widely used diag-nostic tools on the Internet. Muuss named his program after the sonarsounds used for echo-location by submarines and bats; just like in oldmovies about submarines, sonar probes do sound something like a metal-lic "ping".

1.4.3 How Ping works:

The Internet Ping program works much like a sonar echo-location,sending a small packet of information containing an ICMP ECHO_REQUESTto a specified computer, which then sends an ECHO_REPLY packet in re-turn. The IP address 127.0.0.1 is set by convention to always indicate yourown computer. Therefore, a ping to that address will always ping yourselfand the delay should be very short. This provides the most basic test ofyour local communications.

1.5 How to use Ping:

You can use the Ping command to perform several useful Internet network

PVGCOE,Nashik.

Page 53: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 53

diagnostic tests, such as the following:

1.5.1 Access :

You can use Ping to see if you can reach another computer. If you cannotping a site at all, but you can ping other sites, then it is a pretty good signthat your Internet network is working and that site is down. On the otherhand, if you cannot ping any site, then likely your entire network connec-tion is down due to a bad connection.

1.5.2 Time distance :

You can use the Ping command to determine how long it takes tobounce a packet off of another site, which tells you its Internet distancein network terms. For example, a web site hosted on your neighbor’s com-puter next door with a different Internet service provider might go throughmore routers and be farther away in network distance than a site on theother side of the ocean with a direct connection to the Internet backbone.

If a site seems slow, you can compare ping distances to other Internetsites to determine whether it is the site, the network, or your system thatis slow. You can also compare ping times to get an idea of which sites havethe fastest network access and would be most efficient for downloading,chat, and other applications.

1.5.3 Domain IP address :

You can use the Ping command to probe either a domain name oran IP address. If you ping a domain name, it helpfully displays the corre-sponding IP address in the response.

You can run the ping command on a Windows computer by openinga command prompt window and then typing "ping" followed by the do-main name or IP address of the computer you wish to ping. You can listthe available options for the Windows ping command with "ping -"

Conclusion:

Hence we studied that Linux networking commands emulation usingPython or C++.

PVGCOE,Nashik.

Page 54: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 54

Assignment No.-B-5

Problem Statement:

Write FTP/Telnet program using socket programming for TCP usingC++.

1.1 Prerequisite:

FTP, Telnet TCP

1.2 Learning Objective:

To learn and understand socket programming using TCP

1.3 Theory:

1.3.1 TCP Introduction :

TCP is a transport layer host-to-host communication protocol, whichis a reliable and provides connection-oriented communication over IP net-work. Following are the services of TCP

1. Process-to-Process Communication :

The TCP is responsible for process-to-process delivery of the packetsfrom one process to another, packets is a part of a message.

2. Stream Delivery Service:

TCP is a stream-oriented protocol. TCP allows the sending process todeliver data as a stream of bytes and allows the receiving process to obtaindata as a stream of bytes. Stream is nothing but a virtual tube or pipe ofbytes created between sender and receiver at the data transmission time.This virtual environment is shown in Figure 5.3.1. The sending processproduces the stream of bytes, and the receiving process consumes them.

PVGCOE,Nashik.

Page 55: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 55

Figure 1. Stream Delivery Service with Sending and Receiving Buffers

3. Sending and Receiving Buffers :

Buffer means a temporary memory provided by the system at thesending and the receiving processes. The speed of sending process andreceiving process may not same;it may lead to loss of data. For handlingthis problem TCP needs buffers for intermediate storage. So, two buffersare requires, the sending buffer and the receiving buffer, one for each di-rection. One way to implement a buffer is to use a circular array of n-bytelocations as shown in Figure 2.

Figure 2. Sending and receiving buffers

PVGCOE,Nashik.

Page 56: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 56

4. Full-Duplex communication:

TCP supports full-duplex communication, in which data can flow inboth directions at the same time.

5. Connection-Oriented Service:

TCP supports connection-oriented service, in which a session con-nection is established before any data can be sent between sender and re-ceiver. This method is often called a reliable network service. It can guar-antee that data will be delivered.

1.3.2 Socket Programming Using TCP :

While establishing a TCP connection using socket between two Clientand Server following steps occurs,

1.The server creates an instance it is called ServerSocket, denoting whichport number communication is to occur on.

2.The server invokes accept () method of the ServerSocket class. Thisfunction waits until a client connects to the server on the particular port.

3.When server went into waiting state, client instantiates a Socket ob-ject, denotes the server name and port number.

4.The constructor of the Socket class attempts to connect the client tothe specified server and port number. Once communication established,then the client Socket object capable of communicating with the server.On the server side, accept () method returns a reference to a new socketon the server that is connected to the client’s socket.

1.3.3 TCP Client Server :

Figure 3 shows TCP Client Server Communication,

As shown in the Figure 3, the steps for establishing a TCP socket on theclient side are the following:1.Connect the socket to the server using the connect() function.2.Send and receive data by using the read () and write () functions.3.Close the connection by using the close () function.

The steps involved in establishing a TCP socket on the server side areas follows:1.Create a socket with the socket() function.

PVGCOE,Nashik.

Page 57: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 57

2.Bind function responsible for bind the socket to an address using thebind() function3.Listen for connections with the listen() function4.Accept a connection with accept() function system call.5.Send and receive data by using send() and receive().6.Close the connection by using the close() function.

1.The socket() Function :

It is a first socket function, specifying the type of communication protocoli.e. TCP (IPv4 or IPv6) or UDP.

The function is defined as follows:#include <sys/socket.h>int socket (int family, int type, int protocol);

PVGCOE,Nashik.

Page 58: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 58

The protocol family type constant described family like IPv4 orIPv6, the type of socket means stream or datagram and protocol definestype of protocol such as UDP or TCP. The function returns a non-negativeinteger number, similar to a file descriptor, that we define socket descrip-tor or -1 on error.

2. The connect() Function :

The connect() function is used by a TCP client to establish a connec-tion with a TCP server.

3. The bind() Function :

The bind() assigns a local protocol address to a socket. With the In-ternet protocols, the address is the combination of an IPv4 or IPv6 address(32-bit or 128-bit) address along with a 16 bit TCP port number.

4. The listen() Function :

The listen() function converts an unconnected socket into a passivesocket, indicating that the kernel should accept incoming connection re-quests directed to this socket.

5. The accept() Function :

The accept() is used to retrieve a connect request and convert thatinto a request.

6. The send() Function :

The send() is similar to write() but allows to specify some options.

7. The receive() Function :

This function is similar to read(), but allows to specify some optionsto control how the data are received.

8. The close() Function :

The normal close() function is used to close a socket and terminate aTCP socket.

PVGCOE,Nashik.

Page 59: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 59

1.3.4 ALGORITHM :

ALGORITHM: CLIENT

1. Start the program2. Include necessary package in java3. To create a socket in client to server.4. The client establishes a connection to the server.5. The client accept the connection and to send the data from client toserver and vice versa6. The client communicate the server to send the end of the message7. Stop the program.

ALGORITHM: SERVER

1. Start the program2. Include necessary package in java3. To create a socket in server to client 4. The server establishes a connec-tion to the client.5. The server accept the connection and to send the data from server toclient and vice versa6. The server communicate the client to send the end of the message7. Stop the program.

Conclusion:

Hence we studied that FTP/Telnet program using socket program-ming for TCP.

PVGCOE,Nashik.

Page 60: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 60

Assignment No.-B-7

Problem Statement:

Create TCP/IP packet using standard TCP/IP include files and send itto the server using C++.

1.1 Prerequisite:

Knowledge about IP and TCP.

1.2 Learning Objectives:

Understand the concept of IP TCP.

1.3 Theory:

1.3.1 Introduction

Transport layer offers end-to-end connection between two processeson remote hosts. It is responsible for process to process delivery of mes-sage. Transport layer takes data from upper layer and then breaks it intosmaller size segments and sends to lower layer for delivery. This layer pro-vides source to destination means not only from one computer to anothercomputer but also from one process to another process running on par-ticular port.

Figure 1. End-to-end Communication

PVGCOE,Nashik.

Page 61: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 61

This Layer provides logical communication between processes run-ning on different computers. This layer protocols are implemented in theend systems but not in network routers. All transport layer protocols pro-vides an applications like multiplexing/demultiplexing, including reliabledata transfer, bandwidth management and delay management.

1.3.2 Transport layer Responsibilities/duties and Services:

Figure 2. shows the transport layer duties i.e. packetizing, connectioncontrol, addressing and providing reliability.

Figure 2. Transport Layer Duties

1. Process-to-process delivery:

The transport layer is responsible for process-to-process delivery ofthe packets from one process to another, as we know packet is a part of amessage.

PVGCOE,Nashik.

Page 62: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 62

Figure 3.Types of Data Deliveries

Processes on two hosts communicate with each other by sending and re-ceiving packets to each other.

For sending and receiving into the network is possible through itssocket.

A socket is an interface between the application layer and the trans-port layer within a host, used to build network application over the inter-net. Whenever we need to send something to the destination require anaddress. As we know data link layer require an MAC address.

Network layer require IP address same way in transport layer workson an address it is called port number. It is use to choose specific pro-cess among the multiple processes running on host. The port number isa 16-bit integer in between the 0 to 65,535. The IANA(Internet AssignedNumber Authority) is an organization handle all the issues related to portnumber. It has divided all port numbers in three classes are given below,

PVGCOE,Nashik.

Page 63: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 63

Figure 4. Well known port

Well-known ports:

The port numbers are between 0 to 1023 assigned and controlled byIANA. All well-known ports come under this category. Example of well-known port is port 20 and 21 used for FTP.

Registered ports:

These port numbers are register. The ranging from 1024 to 49,151,these ports are not assigned and controlled by IANA. But they can be reg-istered with IANA to avoid port duplication.

Dynamic ports:

The remaining port called dynamic ports. The ranging from 49,152 to65,535. These ports are not assigned or controlled by IANA. These portsalso called ephemeral ports.

2. Multiplexing and Demultiplexing :

The multiplexing and demultiplexing mechanism is shown in Figure5. The multiplexer and Demultiplexer works in peer. The multiplexer isrequires at one side and the demutiplexer require at other side

PVGCOE,Nashik.

Page 64: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 64

Figure 5. Multiplexing and demultiplexing

Multiplexing :

Multiplexing is a process always performed at the sending node. Atthe sender site, there may be several processes that need to send pack-ets. But there is only TCP protocol used at a time. So, the situation isa many-to-one relationship that requires multiplexing. The TCP acceptsmessages from different processes, differentiated them by their port num-bers. Then add headers, once header added the transport layer sends thepacket to the network layer. The process of encapsulating data messagesfrom different applications sockets with the header information and passthe segments to the network layer. The next task is gathering data fromdifferent sockets, encapsulating each data with header information (laterit will used for demultiplexing) to create segments and sending the seg-ments to the network layer is called multiplexing.

Demultiplexing :

Demultiplexing is a process always performed at the receiving node.At the receiving end the transport layer examines these fields to identifythe receiving (at socket), then directs the segment to that socket. Thistask used to delivering the data in a transport layer segment to the cor-rect socket is called demultiplexing. At the receiver site, the situation islike one-to-many for handling this requires demultiplexing. The transportlayer receives datagrams from the network layer. After finding out the er-rors and dropping of the header of packets, the transport layer has to de-livers each message to the appropriate process based on the port number.

PVGCOE,Nashik.

Page 65: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 65

3. Connection-Oriented Service:

In Connection-oriented service, a session connection is to be estab-lished before any data send between sender and receiver. This method isoften called a reliable network service. It can guarantee that data will bedelivered. Connection-oriented services create imaginary paths betweenend systems, as shown in Figure 6. TCP and SCTP are the connection-oriented protocols

In the Figure 6. shows end-to-end communication. It has created avirtual path which is represented by VP1.

Figure 6. Connection-Oriented Service

4. Connectionless Service:

In connectionless service, does not require a session connection be-tween sender and receiver before data transmission. The sender simplystarts sending packets (called datagrams) to the destination. This serviceis an unreliable as compare to the connection-oriented method. UDP is aconnectionless protocol used in transport layer

1.3.3 TCP Connection:

TCP is a connection-oriented protocol that’s why it always establishesa virtual path between the source and destination. For this connection-oriented transmission requires three phases such as connection establish-ment, data transfer and connection termination. 1. TCP Connection Establishment:

Two TCP machines are able to send data each other simultaneouslyonly when they got connected. This mode is called full-duplex mode. This

PVGCOE,Nashik.

Page 66: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 66

implies that each party must initialize communication and get approvalfrom the other party before any data are transferred. The connection es-tablishment in TCP is called three-way handshaking. In Figure 7 shows theclient server application, client wants to make a connection with server,using TCP as the transport layer protocol. The process starts with theserver and readies to accept a connection that is called passive open. Theclient has to make request first, that’s why it is called active open. To showthe process, uses time lines: one for client and other for server.

Figure 7. Connection Establishment using three-way handshaking

There are three steps in this phase are as follows.

1. The client sends the first segment i.e. SYN segment, in whichonly the SYN flag is set. This segment is consisting of sequence numbers.It requires one sequence number; once data transfer starts the sequencenumber is incremented by 1. SYN segment can’t carry data, but it as con-taining 1 imaginary byte.

2. When the server sends reply the second segment it consist of aSYN and ACK segment (2 flag bits set: SYN and ACK). This segment hastwo purposes. It is a SYN segment for communication in the other direc-tion and serves as the acknowledgment for the SYN segment. SYN requiresonly one sequence number. 3. The client sends the last means third segment; this is just anACK segment. It acknowledges the receipt of the second segment with the

PVGCOE,Nashik.

Page 67: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 67

ACK flag and acknowledgment number field. It doesn’t consume any se-quence number. Once the connection established data transfer can takeplace. The client and server can able to send data and acknowledgmentssignals. In Figure 8 shows that, after connection is established the clientsends 2000 bytes of data in two segments. The server has sent 2000 bytesin one segment. After that, the sending one more segment. Here, we cansee first three segments carry both data and acknowledgment but the lastsegment not require any other information, only an acknowledgment re-quire because after that no more data to be sent.

Figure 8. Data Transfer

PVGCOE,Nashik.

Page 68: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 68

3. Connection Termination:

Client or Server anyone can close the connection. Most implemen-tations today allow three-way handshaking for connection termination.Three-Way Handshaking as shown in Figure 9.

Figure 9. Connection termination using three-way handshaking

1. Afte receiving a close command from the client process, theclient TCP may send a FIN segment in which the FIN flag is set. It is justa control segment as shown in Figure 9. Because of control, it consumesonly one sequence number.

2. After receiving the FIN segment from client TCP, the server informsits process and sends the second segment, a FIN +ACK segment, to con-firm the receipt of the FIN segment from the client and at the same time

PVGCOE,Nashik.

Page 69: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 69

to announce the closing of the connection in the other direction. If it doesnot carry data, it consumes only one sequence number.

3. Final state at client, TCP sends the last ACK segment to confirmthe receipt of the FIN segment from the TCP server. This segment cannotcarry data and consumes no sequence numbers.

Conclusion:

Hence we studied that how to Create TCP/IP packet using standeredTCP/IP include files and send it to the server using C++.

PVGCOE,Nashik.

Page 70: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 70

Assignment No.-B-13

Problem Statement:

Implementation of sliding window protocol using C++/Java.

1.1 Prerequisite:

Data Link layer working1.2 Learning Objectives:

To understand how data is transferred reliable and in-order.1.3 Theory:

1.3.1 Introduction

The Sliding Window method is not to wait for an acknowledgmentfor individual frames, but to send a few frames and then get an acknowl-edgment that acknowledges several frames at the same time. It works byhaving the sender and receiver have a window of frames. The sender cansend as many frames as would fit into a window. The receiver can receiveas many as the buffer size, upon receiving, receiver will respond with anacknowledgment of all frames up to a certain point in the window. Thewindow it then said to âAIJslideâAI and the whole thing starts again. Eachframe has to be numbered in relation to the sliding window. For a windowof size N, frames get a number from 0 to N-1. Subsequent frames get anumber mod N

Sender Sliding Window:

Figure 1. shows the sender sliding in TCP. Window is an imaginarybox of size 2m −1.

Figure 1: a) Before Sliding b) After Sliding two frame

PVGCOE,Nashik.

Page 71: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 71

The send window can slide one or more slots when a valid ac-knowledgment arrives.

At the sending site, sender has to hold the outstanding frames untilthey are acknowledged. It uses the concept of a window.

The size of the window is at most 2m -1 where m is the number of bitsfor the sequence number.

Size of the window not fixed, e.g. TCP.The window slides have to include new unsent frames when the cor-

rect ACKs are received.Receiver Sliding Window :

The receiver window is an abstract concept defining an imaginary boxof size 1. The window slides when a correct frame has arrived; sliding oc-curs one slot at a time. Figure 2 shows receiver sliding window.

Figure 2: a) Before Sliding b) After Sliding two frame

Size of the window always 1 at the receiving side for this protocol.Receiver is always collecting the frame in a specific order.Any frame coming out of order is discarded and needs to be resent.Receiver window slides as shown in Figure2 (a), receiver is waiting for

frame 0, Figure2. (b), after getting it is increasing by 1

PVGCOE,Nashik.

Page 72: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 72

1.3.2Working of Sliding window Protocol:

Sliding Window Protocols assumes two-way communication (full du-plex). It uses two types of frames:DataAck (sequence number of last correctly received frame)

The basic idea of sliding window protocol is that both sender and re-ceiver keep a “window” of acknowledgment. The sender keeps the value ofexpected acknowledgment; while the receiver keeps the value of expectedreceiving frame. When it receives an acknowledgment from the receiver,the sender advances the window.

Figure 3: Example of sliding windows

In sliding window method, multiple frames are sent by sender at atime before needing an acknowledgment. The term "window" on the trans-mitter side represents the logical boundary of the total number of packets

PVGCOE,Nashik.

Page 73: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 73

yet to be acknowledged by the receiver. The receiver informs the transmit-ter in each acknowledgment packet the current maximum receiver buffersize (window boundary). The TCP header uses a 16 bit field to report thereceive window size to the sender. Therefore, the largest window that canbe used is 216 = 64 kilobytes. Sliding windows usually start out with agiven size, however, more sophisticated protocols will dynamically adaptthe window size, trying to find an agreed-upon size between sender andreceiver. The characteristics of sliding windows used at the sender and re-ceiver usually involve

error correction (by retransmission)

flow control and

message ordering by sender (FIFO).

ALGORITHM:

Start the program.Get the frame size from the userTo create the frame based on the user request.To send frames to server from the client side.If your frames reach the server it will send ACK signal to client other-

wise it will send NACK signal to client.Stop the program.

Conclusion:

We have successfully implemented sliding window protocol and an-alyze results.

PVGCOE,Nashik.

Page 74: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 74

Assignment No.-B-14

Problem Statement:

Implementation of distance vector routing algorithm using C++.1.1 Prerequisite:

Routing Algorithms1.2 Learning Objectives:

To learn and understand distance vector routing protocol1.3 Theory:

1.3.1 Introduction of Distance Vector Routing:

The name itself indicates the purpose of this protocol; it is used tofind the minimum distance between any two nodes. Each and every nodeconsists of a vector table. In Figure 1, show a system of five nodes withtheir corresponding tables. All nodes share their information with its im-mediate neighbors periodically and when there is a change.

PVGCOE,Nashik.

Page 75: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 75

Figure 1:Distance Vector Routing Tables

Following are some operations that require performing Distance VectorRouting:-

Initialization:

Initialization is a process performs at the beginning stage of protocol.In Figure 1 table shows the initial information. Each node sends a mes-sage to its immediate node and finds the distance between itself and theseneighbors.

Sharing :

In distance vector routing, each node share its routing table informa-tion with its immediate neighbor periodically.

Updating :

This process used to update the table information of each node. There aredifferent steps require for table updating,

Update table second column consist of the cost between two neigh-boring node and name of sending node in third column (routing table).

Next operation is at receiving node needs to compare each row of itsold table with the corresponding row of the modified of the received table.

If the new and old information is same then need not to update.If the new value is smaller to old one, kept new one. Otherwise keep

old one.Suppose that now there is no path between. The new route has a dis-

tance of infinity.In periodic update a node sends its routing table, normally every 30 s, ina periodic update. The period depends on the protocol that is using dis-tance vector routing.

Distance Vector Routing Protocols :

Most routing protocols fall into one of two classes: distance vector orlink state. The basics of distance vector routing protocols are examinedhere; the next section covers link state routing protocols. Distance vectoralgorithms are based on the work done of R. E. Bellman, L. R. Ford, and D.R. Fulkerson and for this reason occasionally are referred to as Bellman-Ford or Ford-Fulkerson algorithms.

The name distance vector is derived from the fact that routes areadvertised as vectors of (distance, direction), where distance is defined interms of a metric and direction is defined in terms of the next-hop router.

PVGCOE,Nashik.

Page 76: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 76

For example, "Destination A is a distance of 5 hops away, in the directionof next-hop router X." As that statement implies, each router learns routesfrom its neighboring routers’ perspectives and then advertises the routesfrom its own perspective. Because each router depends on its neighborsfor information, which the neighbors in turn may have learned from theirneighbors, and so on, distance vector routing is sometimes facetiously re-ferred to as "routing by rumor."

Distance vector routing protocols include the following:Routing Information Protocol (RIP) for IPXerox Networking System’s XNS RIPNovell’s IPX RIPCisco’s Internet Gateway Routing Protocol (IGRP)

DEC’s DNA Phase IVAppleTalk’s Routing Table Maintenance Protocol (RTMP)

Common Characteristics :

A typical distance vector routing protocol uses a routing algorithm inwhich routers periodically send routing updates to all neighbors by broad-casting their entire route tables. The preceding statement contains a lot ofinformation. Following sections consider it in more detail.

Periodic Updates :

Periodic updates means that at the end of a certain time period, up-dates will be transmitted. This period typically ranges from 10 seconds forAppleTalk’s RTMP to 90 seconds for Cisco’s IGRP. At issue here is the factthat if updates are sent too frequently, congestion may occur; if updatesare sent too infrequently, convergence time may be unacceptably high.

Neighbors :

In the context of routers, neighbors always means routers sharing acommon data link. A distance vector routing protocol sends its updates toneighboring routers and depends on them to pass the update informationalong to their neighbors. For this reason, distance vector routing is said touse hop-by-hop updates.

Broadcast Updates :

When a router first becomes active on a network, how does it findother routers and how does it announce its own presence? Several meth-ods are available. The simplest is to send the updates to the broadcast

PVGCOE,Nashik.

Page 77: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 77

address (in the case of IP, 255.255.255.255). Neighboring routers speakingthe same routing protocol will hear the broadcasts and take appropriateaction. Hosts and other devices uninterested in the routing updates willsimply drop the packets.

Full Routing Table Updates :

Most distance vector routing protocols take the very simple approachof telling their neighbors everything they know by broadcasting their en-tire route table, with some exceptions that are covered in following sec-tions. Neighbors receiving these updates glean the information they needand discard everything else.

1.3.2 Routing by Rumor:

Figure 2 shows a distance vector algorithm in action. In this example,the metric is hop count. At time t0, routers A through D have just becomeactive. Looking at the route tables across the top row, at t0 the only infor-mation any of the four routers has is its own directly connected networks.The tables identify these networks and indicate that they are directly con-nected by having no next-hop router and by having a hop count of 0. Eachof the four routers will broadcast this information on all links.

Figure 2:routing by rumor

PVGCOE,Nashik.

Page 78: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 78

1.3.3 Distance vector protocols converge hop-by-hop:

At time t1, the first updates have been received and processed by therouters. Look at router A’s table at t1. Router B’s update to router A saidthat router B can reach networks 10.1.2.0 and 10.1.3.0, both 0 hops away.If the networks are 0 hops from B, they must be 1 hop from A. Router A in-cremented the hop count by 1 and then examined its route table. It alreadyknew about 10.1.2.0, and the hop count (0) was less than the hop count Badvertised, (1), so A disregarded that information. Network 10.1.3.0 wasnew information, however, so A entered this in the route table. The sourceaddress of the update packet was router B’s interface (10.1.2.2) so that in-formation is entered along with the calculated hop count. Notice that theother routers performed similar operations at the same time t1. RouterC, for instance, disregarded the information about 10.1.3.0 from B and10.1.4.0 from C but entered information about 10.1.2.0, reachable via B’sinterface address 10.1.3.1, and 10.1.5.0, reachable via C’s interface 10.1.4.2.Both networks were calculated as 1 hop away. At time t2, the update periodhas again expired and another set of updates has been broadcast. Router Bsent its latest table; router A again incremented B’s advertised hop countsby 1 and compared. The information about 10.1.2.0 is again discarded forthe same reason as before. 10.1.3.0 is already known, and the hop counthasn’t changed, so that information is also discarded. 10.1.4.0 is new in-formation and is entered into the route table. The network is converged attime t3. Every router knows about every network, the address of the next-hop router for every network, and the distance in hops to every network.Time for an analogy. You are wandering in the Sangre de Cristo mountainsof northern New MexicoâATa wonderful place to wander if you aren’t lost.But you are lost. You come upon a fork in the trail and a sign pointing west,reading "Taos, 15 miles." You have no choice but to trust the sign. You haveno clue what the terrain is like over that 15 miles; you don’t know whetherthere is a better route or even whether the sign is correct. Someone couldhave turned it around, in which case you will travel deeper into the forestinstead of to safety! Distance vector algorithms provide road signs to net-works. They provide the direction and the distance, but no details aboutwhat lies along the route. And like the sign at the fork in the trail, they arevulnerable to accidental or intentional misdirection. Following are someof the difficulties and refinements associated with distance vector algo-rithms.

PVGCOE,Nashik.

Page 79: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 79

1.3.4 Example:

RIP (Routing Information Protocol):

RIP is a standardized Distance Vector protocol, designed for use onsmaller networks. RIP was one of the first true Distance Vector routingprotocols, and is supported on a wide variety of systems.RIP adheres to the following Distance Vector characteristics:

RIP sends out periodic routing updates (every 30 seconds)RIP sends out the full routing table every periodic updateRIP uses a form of distance as its metric (in this case, hopcount)RIP uses the Bellman-Ford Distance Vector algorithm to determine

the best "path"to a particular destination Other characteristics of RIP in-clude:

RIP supports IP and IPX routing.RIP utilizes UDP port 520RIP routes have an administrative distance of 120.RIP has a maximum hopcount of 15 hops.Any network that is 16 hops away or more is considered unreachable

to RIP, thus the maximum diameter of the network is 15 hops. A metricof 16 hops in RIP is considered a poison route or infinity metric. If multi-ple paths exist to a particular destination, RIP will load balance betweenthose paths (by default, up to 4) only if the metric (hopcount) is equal. RIPuses a round-robin system of load-balancing between equal metric routes,which can lead to pinhole congestion.

For example, two paths might exist to a particular destination, onegoing through a 9600 baud link, the other via a T1. If the metric (hopcount) is equal, RIP will load-balance, sending an equal amount of traf-fic down the 9600 baud link and the T1. This will (obviously) cause theslower link to become congested.

Conclusion:

Hence we studied that distance vector routing algorithm using rout-ing information protocol.

PVGCOE,Nashik.

Page 80: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 80

Assignment No.-B-19

Problem Statement:

Write a C++/ Python program to generate a Sign wave of Programmablefrequency and capture samples at programmable frequency (Max up asper Nyquist Sampling Theorem) and reconstruct the Sign wave using col-lected Samples using ARM Cortex A5/A9. Use oscilloscope to calculatesignal frequency. Write your observations. Store a Data file in SAN (BIG-DATA).1.1 Prerequisite:

Basic types of signals.1.2 Learning Objective:

To learn and understand Sign wave generation for given frequencyand amplitude.1.3 Theory:

1.3.1 Introduction :

Digital signal processing (DSP) is the mathematical manipulation ofan information signal to modify or improve it in some way. It is charac-terized by the representation of discrete time, discrete frequency, or otherdiscrete domain signals by a sequence of numbers or symbols and the pro-cessing of these signals.

The goal of DSP is usually to measure, filter and/or compress con-tinuous real-world analog signals. Usually, the first step is conversion ofthe signal from an analog to a digital form, by sampling and then digi-tizing it using an analog-to-digital converter (ADC), which turns the ana-log signal into a stream of discrete digital values. Often, however, the re-quired output signal is also analog, which requires a digital-to-analog con-verter (DAC). Even if this process is more complex than analog processingand has a discrete value range, the application of computational power tosignal processing allows for many advantages over analog processing inmany applications, such as error detection and correction in transmissionas well as data compression.

1.3.2 Different types of waves :

In Electronic Circuits we need to produce many different types, fre-quencies and shapes of Signal Waveforms such as Square Waves, Rectan-gular Waves, Triangular Waves, Saw-toothed Waveforms and a variety ofpulses and spikes. These types of signal waveform can then be used for

PVGCOE,Nashik.

Page 81: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 81

either timing signals, clock signals or as trigger pulses. All electrical wave-forms include the following three common characteristics:

1) Period :

This is the length of time in seconds that the waveform takes to repeatitself from start to finish. This value can also be called the Periodic Time ,( T ) of the waveform for sine waves, or the Pulse Width for square waves.

2)Frequency:

This is the number of times the waveform repeats itself within a onesecond time period. Frequency is the reciprocal of the time period, ( f=1/T ) with the standard unit of frequency being the Hertz, (Hz).

3)Amplitude:

This is the magnitude or intensity of the signal waveform measuredin volts or amps.

1.3.3 Periodic Waveforms :

The amount of time it takes between each individual repetition or cy-cle of a sinusoidal waveform is known as its "periodic time" or simply thePeriod of the waveform. Then this period can vary with each waveformfrom fractions of a second to thousands of seconds as it depends upon thefrequency of the waveform. So, if the length of time it takes for the wave-form to complete one full pattern or cycle before it repeats itself is knownas the "period of the wave" and is measured in seconds.

1) Sine Wave :

The sine wave or sinusoid is a mathematical curve that describes asmooth repetitive oscillation. It is named after the function sine, of whichit is the graph. It occurs often in pure and applied mathematics, as well asphysics, engineering, signal processing and many other fields.Formula: x(t)=A sin 2π f twher e

A− Ampl i tudef : f r equenc yt : T i mePer i od

2)Cosine Wave :

A cosine wave is a signal waveform with a shape identical to that of asine wave , except each point on the cosine wave occurs exactly 1/4 cycleearlier than the corresponding point on the sine wave. A cosine wave and

PVGCOE,Nashik.

Page 82: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 82

its corresponding sine wave have the same frequency, but the cosine waveleads the sine wave by 90 degrees of phase.Formula: x(t)= A cos2π f t −πW her e

A− Ampl i tudef : f r equenc yt : T i mePer i od

1.3.4 Graphical Functions Used :

1) Outtext() :

Outtext is the function used to display the given string on graphicsmode. It uses the font style set by settextstyle and the current position.The current position can be changed with moveto function. Alternativelyyou can use outtextxy function which takes xpos, ypos and string for dis-playing at a particular location. outtextxy does the work of both moveto

PVGCOE,Nashik.

Page 83: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 83

and outtext functions. In this example, the string "background: % d, fore-ground: %d, maxcolors:%d" is displayed using outtext and software andfinance.com is displayed using outtextxy.Syntax:

outtextxy(xPosition, yPosition, myStr);Example:

outtextxy(200,350,’square wave’);

2) putpixel() :

putpixel is the function used to plot of pixel in the given location (x,y)and in the given colour. getpixel is the function used to get the pixel colourin the specified location .The possible colour values are from 0 - 15 BLACK,BLUE, GREEN, CYAN, RED, MAGENTA, BROWN,LIGHTGRAY, DARKGRAY,LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTMAGENTA,YELLOW, WHITE and BLINK (128).Syntax:

voidputpixel(intx,inty,intcolor);example:

putpixel(midx,midy,15);

Connecting the BeagleBone Black (BBB) with the PC :

Now open a linux terminal on your PC. On the prompt give the com-mand ssh [email protected] press enterkey 192.168.7.2 is the default ip ad-dress of the BBB Ethernet over USB interface (USB0) The BBB will get re-motely connected with the PC and the terminal will now show the Beagle-Bone promptroot@beaglebone: #.

Copying the files from the PC to BBB :

scp filename [email protected]:/home press enterkeyhere scp is the Linux command, filename is the name of the file and

the remote connection name is [email protected] and the remote locationis /home directory.

Copying the files from the BBB to PC :

scp filename [email protected]:/dir press enterkeyhere scp is the Linux command, filename is the name of the file and

the remote connection name is [email protected] and the remote loca-

PVGCOE,Nashik.

Page 84: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 84

tion directory is / directory, user is the login name of your PC linux. e.g: ifyour PC login is root@localhost:# then you should use root as login nameTo transfer multiple file use the command;

scp file1,file2âAe.fileN [email protected]:/homescp [email protected]:/home/*.jpg /home press enterkey

Conclusion:

Hence we have studied C++/ Python program to generate a Sign waveof Programmable frequency and capture samples at programmable fre-quency (Max up as per Nyquist Sampling Theorem) and reconstruct theSign wave using collected Samples using ARM Cortex A5/A9. Use oscillo-scope to calculate signal frequency. Write your observations. Store a Datafile in SAN (BIGDATA).

PVGCOE,Nashik.

Page 85: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 85

Assignment No.-C-5

Problem Statement:

Installation and setup to control the remote machine

1.1 Theory:

Remote Maintenance, Support, Remote Access, and Home Office:

The All-In-One solution for any application:

While most competitors offer different packages for spontaneous sup-port, server administration, home office, presentations, meetings, onlinetraining, and teamwork, Team Viewer combines all of these modules intoa single, extremely affordable application. You can also find further detailsin our meeting brochure or on meeting.teamviewer.com.

Smooth operation - even behind firewalls:

The biggest problems in using remote maintenance software are gen-erally caused by firewalls, disabled ports and NAT routers for local IP ad-dresses. When you use Team Viewer, these problems no longer exist; TeamViewer finds your partner even through firewalls.

Highest security standards:

Team Viewer is an exceptionally secure solution for remote mainte-nance. Connections utilize secure data channels featuring 2048-bit RSAkey exchange and 256-bit AES session encryption. Even chats and videocalls are end-to-end encrypted.

Much more than competitively priced :

Team Viewer’s pricing is unbeatable. It is sold as an inclusive, stan-dalone package for permanent use of the purchased license. There are nomonthly or hidden costs, such as service contracts.

Simple to install and use :

Neither an installation nor administrator rights are required by thecustomer. Your customer merely runs a small program, and you are readyto go.

PVGCOE,Nashik.

Page 86: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 86

Server Administration & Home Office :

Wake-on-LAN: Wake up your computers remotely whenever you need ac-cess.

Windows system service: Install Team Viewer as a Windows systemservice to access remote computers directly after Windows starts and be-fore Windows login.

Remote reboot: Restart computers remotely - even in safe

MSI package: Operating a larger network? Distribute Team Viewer inyour domains using our MSI package.

Central device management: Policy-based settings for all your TeamViewer installations.

Windows authentication: Use Windows logins as an alternative to loginto the remote computer.

Computers & Contacts:In the Team Viewer Computers & Contacts listyou always see which colleague is available - connect with just one mouseclick.

Remote printing: Print documents from remote computers on the printernext to you - without having to transfer fi les.

Automatically log out: No one gains unintended access to the Mac orWindows computer you were just connected to. The remote computer isautomatically locked instantly if the connection is closed or interrupted.

Monitoring-Checks: Monitor your devices remotely to oversee impor-tant hardware and software status updates.

Team Viewer Management Console:

For you and your teamYou

1)Always have all the connection logs and comments on any support ses-

PVGCOE,Nashik.

Page 87: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 87

sion available, e.g. for billing2)Determine who may remotely access certain computers, without havingto reveal passwords3)Create new user accounts for new employees with individual Comput-ers Contacts lists4)Define and enforce settings for all your Team Viewer installations5)Save customized modules with your company branding6)Assign service cases to yourself or colleagues

Your team

1)Shares a database containing all of the important computers and con-tacts for your company2)Only has access to those areas to which you have granted them access(e.g. view of connection logs or passwords)3)Connects to remote computers directly from the console4)Writes comments during and after every support session to documentthe work performed Processes incoming service cases together

Features and Performance:

General Features:

1) A complete solution for all scenarios: remote maintenance, meetings,video conferences, presentations, and access to remote computers or servers.A single software solution for support, Administration, sales, teamwork,home office, and training purposes in real time2)For Windows, Mac, Linux, iPhone/ iPad, Android, and BlackBerry sys-tems, incl. cross-platform connections3) Works without configuration, even though firewalls and proxy servers4)Remote sound and video: Hear and see music, videos, or system soundsfrom the remote computer during a connection5)Recording of remote control or meeting sessions (even webcam images)with sound and Voice over IP, including conversion into the AVI video for-mat6)High-definition audio quality for Voice over IP transmissions with auto-matic noise reduction and echo cancellation7) Simple management of your connection partners via your ComputersContacts list with simple one-click connections

PVGCOE,Nashik.

Page 88: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 88

8)Enable easy access for yourself to your own devices without the need fora password9)The presence display in your Computers Contacts list indicates whichof your computers and contacts are currently online and available10)Instant messaging functionality in the Computers Contacts list - in-cluding group chat and offl ine messaging11) Chat history for all conversations and persistent chat groups for ongo-ing discussions12) Wake-on-LAN: wake up your computer via another computer usingTeam Viewer within the local network or via a router13)Instant alerts in your Computers Contacts list when notifications areavailable, e.g. service cases or new contact requests

Remote Control:

1) Installation as a system service possible at no additional cost, therebyallowing 24/7 access to remote computers. Example: remote server main-tenance or administration2)Direct LAN connections possible via TCP/ IP, even without an Internetconnection3) Transfer of special keys (e.g. Ctrl+Alt+Del)4) Clipboard synchronization5)Supports UAC (user account control)6) Remote Printing: Convenient printing of documents from the remotecomputer to your local printer. Installed printers are automatically inte-grated7) Includes a true VPN (virtual private network) channel - in addition topure desktop sharing8) Black-screen function: Switch the remote computer monitor dark, e.g.if you do not want anyone to watch while you are accessing your office PC9) Changing sides: simply reverse the viewing direction during an on-goingsession10) Drag drop functionality for fi le transfers - in both directions, to anydesired location11) Session handover: Invite any partner as an expert into a current re-mote control session and solve problems together. If necessary, the expertcan take over the session entirely12)Comprehensive fi le manager for transferring fi les to and from the re-mote computer (including a resume function)

PVGCOE,Nashik.

Page 89: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 89

13) Restart of the remote computer and subsequent automatic reconnec-tion -even in safe mode14) Remote update possible (update Team Viewer version remotely) âASincluding automatic reconnection15)The apps for I OS, Android, and BlackBerry allow both control of theremote computer and fi le transfer in both directions with mobile devices16) Multi-Monitor Support - flexible navigation between multiple moni-tors. Display multiple remote screens simultaneously on your local screens(e.g. 2 windows for 2 monitors)17)Free scaling of remote control window

Meetings / Presentations:

1) Schedule and organize meetings2) Simple scheduling of meetings with the integrated Team Viewer buttonin Microsoft Outlook3) Send invitations with corresponding session data via your email client -easy participation4) Starting meetings is possible even without participants - for optimalpreparation5) Meetings, video calls, and teleconferences can be started with a click;simple and spontaneous6) Door lock for online meetings provides additional access control of in-vited participants

Team Viewer Overview:Scope of performance1)Detailed rights management: Differentiate between presenter, organizer,and participants. Different presenters can be designated and changedduring a meeting2)All meeting participants can communicate with each other interactivelyvia VoIP, video, telephone conference, and chat3)Whiteboard for spontaneous drawings during presentations, includingseveral shapes, pens, markers and speech bubble, as well as the option ofsaving screenshots4) Make documents available for download during a meeting5)Interaction between participants can be individually set6) Individually select the applications you want to share7)An image of your local screen shows you what your participants are ac-

PVGCOE,Nashik.

Page 90: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 90

tually seeing during meetings and presentations8) Participants can also take part in meetings from their iPhone, iPad, orAndroid device9) View presentations / training sessions in the browser without installingsoftware (pure HTML and Flash) is also possible

Module:

1)Customer modules (Quick Support, Quick Join) can be used without in-stallation, no administrator rights are required2) Link the customer module (Quick Support) with your computers con-tacts list: your partners appear in your Computers Contacts list after open-ing the customer module, and you can connect to them without exchang-ing ID and password3) Exchange chat messages via the customer module (Quick Support), evenbefore a connection is established. Your customers can thereby providedetails or report problems immediately without needing to contact youvia telephone4) User-defined exclusion of liability (disclaimer) possible in the customermodule (Quick Support), which the partner must accept prior to a con-nection5)Separate customer module (Quick Join) for easy use in online presenta-tions and meetings6)Permanent access to unattended computers/servers (use the free TeamViewer host module). Add it to your Computers Contacts list (with ID andpassword) in order to connect with a Single click7) Enable a spontaneous support request and automatically generate aservice case via the Team Viewer Host module8)The customer modules (Quick Support, Quick Join, and Host) can be vi-sually modified - create modules that suit your corporate design and needs9)Customizations to customer modules are also applied to their associ-ated download sites and waiting rooms for greater personalization andadded professionalism10)Web Connector - do you have to carry out critical tasks while you are onthe road (e.g. from the hotel or an Internet cafe)? Simply control remotecomputers via the web browser without software installation (pure HTMLand Flash)11) Portable version: bring your personally configured Team Viewer alongand call up the software, e.g. directly from a USB stick at any computer

PVGCOE,Nashik.

Page 91: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 91

12)Easy distribution of the software and the settings in the domain net-work with the Team Viewer MSI package

Management Console:

1) Web-based administration2) Comprehensive user management for creating, editing, disabling, andpassword management of each Team Viewer user in your company3) Central setting policies to apply, distribute, and even enforce settingsfor all of your Team Viewer installations4) Group sharing: Contact groups can be shared with other Team Viewerusers5) Comprehensive reporting functions of all connections to serve as thebasis for your precise billing6) Web-based connections over the Computers Contacts list7) Service Queue: All service cases are collected in a service queue andidentified based on a session code. They can then be organized in yourteam. Session codes replace Team Viewer IDs and passwords8) Save customized customer modules in your Management Console andsend an individual link to your customers. You can change your designin your Console at any time. Your customer automatically receives thenewest Team Viewer version during download

Team Viewer API:

1) For integration into your applications, e.g. helpdesk, ticket system, orCRM (interface with Management Console)2)Computers and Contacts API: Integrate your computers and contactsinto any software3)Reporting API: Access the connection reporting data from the Manage-ment Console4) User Management API: Import users from your Active Directory Do-main, editing of own Team Viewer account information5) Session Management API: Create and read out session codes

Security:

1) Automatic, randomly generated passwords allow secure, one-time ac-cess

PVGCOE,Nashik.

Page 92: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 92

2)Security in home-banking quality (SSL): RSA2048 public/private key ex-change and AES 256-bit session encoding3)End-to-end encryption for all chat and video4) Program options can be protected with a password or changes can beexplicitly reserved for administrators only5) Block unwanted access via the blacklist, explicit permission is possiblevia the whitelist6)Lock the remote computer (e.g. server) automatically when closing theConnection (optional and adjustable)7) User-definable idle session timeout limits8)Remote logout of your Team Viewer user account: You can see all activeuser account logins in the Team Viewer Management Console. End themremotely, if you have forgotten to log out. This prevents unauthorized ac-cess to your account9)A master whitelist as part of setting policies to manage permissions formultiple devices at once10) A security-oriented company, certified in accordance with the QualityManagement Standard DIN EN ISO 900111) Quality seal of the Federal Association of IT Experts and Consultants(Bundesverbandes der IT-SachverstÃd’ndigen und Gutachter e.V.) (maxi-mum point score)12)The software is uniquely identify able using code signing from VeriSign13) Team Viewer has been authorized for use at banking locations basedon the security testing by Fiduciary IT AG and GAD eG14) Two Factor Authentication: generate a security code with your smartmobile device. Both the code and the password are requested during lo-gin. (Activation in the Management Console, meets HIPAA and PCI DSSrequirements)

Usability:

1)Start and use it directly, without configuration2) Automatic detection of the proxy configuration/proxy script readouts3)Should there be a temporary network failure (e.g. DSL disconnect), youdo not have to call up your customer again since the connection is auto-matically reestablished4) Permanent and distinct computer-related IDs for remote control ses-sions (just like phone numbers, they do not change with every phone call)5) Session-related IDs for meetings in order to plan and execute computer

PVGCOE,Nashik.

Page 93: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 93

independent meetings6) Automatic discovery of nearby contacts and devices7) Optional Quick Connect button in all Microsoft windows; enables spon-taneous presentations and teamwork8) International keyboard support9)Automatic installation of the latest updates to keep the software up todate. (Adjustable)10)Profitless pictures to add to your professional image and help identifyyourself to others and vice versa11) A user interface that is clearly arranged, simple, touch-friendly, andquick to operate12) Maximize your window with a double click on the top bar of the win-dow

Performance:

1)In many cases, intelligent connection enables direct and very fast point-to-point connections2)Routing servers distributed worldwide make Team Viewer very fast in in-ternational use3) Fast transmission of moving images: Show videos to your presentationparticipants in real time without delays (depending on computer perfor-mance, internet connection quality, and bandwidth)4)Intelligent routing via the closest server using delocalization5)Connections are even possible in slow environments (ISDN, modem)6) Display quality and color depth with an intelligent automatic mode

Investment security:

1) Lifetime licenses âAS use is possible without time restrictions2) Seven-day satisfaction guarantee3) Internationally and nationally renowned customers

Friendly and useful:

1)Telephone consultation and support via competent Team Viewer em-ployees; no call centers, no aggressive sales2)User manuals and online help3)The software is available in more than 30 languages and is therefore ideal

PVGCOE,Nashik.

Page 94: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 94

for international use4) Keep-it-simple approach - user-friendly software management5)Fair price model, incl. right of return6)Free version for personal use: use the software at home for personal usefree of charge7) No required registration - test the software for free, without giving anyinformation

Availability:

1) Redundant, distributed high-availability network2)Due to many millions of installations, possible problems show up im-mediately and can therefore be corrected immediately3) 24/7 monitoring of all critical components

Costs / licensing model:

1)You can support as many customer computers or servers as you like withone license. Hosts do not incur any costs2) Only one party in a connection requires a license, i.e. in a home-officeuse scenario, the licensed office computer can be accessed by any com-puter you want to use3) Single payment: no ongoing costs represent an unrivaled, attractive so-lution4) Fair update prices for major release changes to main versions - withoutany pressure to upgrade to the new version5) Free telephone support for license holders6) No hidden costs7)Delivery of the license information directly upon ordering - payment bycredit card, PayPal, invoice, or check

PVGCOE,Nashik.

Page 95: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 95

PVGCOE,Nashik.

Page 96: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 96

PVGCOE,Nashik.

Page 97: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 97

PVGCOE,Nashik.

Page 98: Problem Statementencapsulated in link-layer frames that are transmitted over physical me-dia such as an Ethernet cable. In Figure 1, the assumed physical media is an Ethernet, and

TE-COMP Programming Laboratory-IV 98

Conclusion:

Hence we have studied about Installation and setup to control the re-mote machine.

PVGCOE,Nashik.