Showing posts with label Network. Show all posts
Showing posts with label Network. Show all posts

Case Study: Amazon.com

AIM: The aim of the practical is to make the students understand the issues that might occur with E-Commerce website owners. The students should be asked to make an in-depth study of the case given below and answer the questions based on the contents of the case.

In 1994, a 29-year-old financial analyst and fund manager named Jeff Bezos became intrigued by the rapid growth of the Internet. Looking for a way to capitalize on this hot new marketing tool, he made a list of 20 products that might sell well on the Internet. After some intense analysis, he determined that books were at the top of that list. Although Bezos liked the name Abracadabra,he decided to call his online bookshop Amazon.com. Today, Amazon.com has
more than 40 million customers and sells billions of dollars worth of all types of merchandise.

When he started, Bezos had no experience in the book-selling business, but he realized that books had an ideal shipping profile for online sales. He believed that many customers would be willing to buy books without inspecting them in person and that books could be impulse purchase items if properly promoted on a Web site. By accepting orders on its Web site, Bezos believed that
Amazon.com could reduce transaction costs in the sale to the customer.

To study of Different N/W Elements and Wireless N/W.


INTRODUCTION
Mobile computing can be defined as computing environment over physical mobility. The user of a mobile computing environment is able to access data, information or other logical objects from any device in any network while on the move. Mobile computing system allows a user to perform a task from anywhere using computing device in public (the Web), corporate (business information) and personal information spaces. While on the move, the preferred device is a mobile device, while back at home or in the office the device could be a desktop computer. To make the mobile computing environment ubiquitous, it is necessary that the communication bearer is spread over both wired and wireless media. Be it for the mobile workforce, holidaymakers, enterprises or rural population, the access to information and virtual objects through mobile computing are absolutely necessary for optimal use of resource and increased productivity.

The mobile computing environment should provide the functions — User mobility, network mobility, bearer mobility, device mobility, session mobility, service mobility and finally host mobility.

Mobile computing environment is made up of three main components: a computer, a network and co-ordination software that ties them together. In mobile networking, computing activities are not disrupted when the user changes the computer’s point of attachment to the internet. Instead, all the needed reconnection occurs automatically and non-interactively.



NETWORK COMPONENTS

Router
A Router is a device that transfers data from one network to another in an intelligent way. It has the task of forwarding data packets to their destination by the most efficient route.
In order to do this, it holds a table in memory that contains a list of all the networks it is connected to, along with the latest information on how busy each path in the network is, at that moment. This is called the 'routing table'.

When a data packet arrives, the router does the following:-
o   Reads the data packet's destination address
o   Looks up all the paths it has available to get to that address.
o   Checks on how busy each path is at the moment
o   Sends the packet along the least congested (fastest) path
o   Exchange Protocol information across networks
o   Filter traffic - useful for preventing hacker attacks for example
Routers operate at the network level of the OSI model.

Repeater
All signals fade as they travel from one place to another. Each type of network cable has a maximum useable length. Beyond that length, the signal becomes too weak to be useful.
Computers on a real network can easily be more than 200 meters apart. Therefore the network cable is split up into segments. Each segment is less than the maximum length allowed. Joining the segments together is a device known as a 'Repeater'.

A repeater boosts the signal back to its correct level.

Bridges
A Bridge joins two networks together so as far as data packets are concerned it looks like one large network.

A bridge is not as capable as a Router - but it is less expensive. Both networks have to be using the same protocol.

Hub
To allow the Star and Tree network topologies to work properly, each computer must be able to send data packets to any other computer on the network.
The network 'Hub' allows computers to share data packets within a network.
Each computer will be connected to a single 'port' on the hub. So in an 8 port hub, one is able to connect up to eight computers together.


Switches
A network cable can only have one data packet in it at any instant. So if two or more computers want to place a data packet on to the network at exactly the same time, then a 'data collision' will take place.
The network protocol is set up to deal with this but it can handle only a few devices. A switch is used to solve this problem.
A switch has a number of ports and it stores the addresses of all devices that are directly or indirectly connected to it on each port. As a data packet comes into the switch, its destination address is examined and a direct connection is made between the two machines

Here AE and BD need to communicate. As such, links are established only between them by the switch. This also prevents collision.

Gateway
A gateway converts the data passing between dissimilar networks so that each side can communicate with each other i.e. converts data into the correct network protocol.
The gateway is a mixture of hardware components and software. This is unlike a standard 'Bridge' which simply joins two networks together that share the same protocol.

Filters
For keeping the network secure, filtering is essential.
A filter can be set up so that it accepts data packets coming from that particular laptop. Other filtering rules would block unwanted packets trying to come in. A filter can also prevent data packets from leaving the company network.
A filter is an essential component of a 'Firewall'.

Modem
A modem converts the digital data from the computer into a continuous analog wave form that the telephone system is designed to deal with (Modulation).  The reason for this is that the telephone system was originally designed for the human voice i.e. continuous signals.  The modem also converts the analog signal from the telephone network back into digital data that the computer can understand (Demodulation).

Network Card
Network cards are required in every machine connected to the network.  They allow the signal from the network to be transmitted to the machine – this could be via a fixed cable, infra red or radio waves.



INTRODUCTION

The vision of wireless communications supporting information exchange between people or devices is the communications frontier of the next few decades, and much of it already exists in some form.
This wireless communication allows multimedia communication from anywhere in the world using a small handheld device or laptop. Wireless networks connect palmtop, laptop, and desktop computers anywhere within an office building or campus, as well as from the corner cafe.
In the home these networks enable a new class of intelligent electronic devices that can interact with each other and with the Internet in addition to providing connectivity between computers, phones and security/monitoring systems. Such smart homes can also help the elderly and disabled with assisted living, patient monitoring, and emergency response.
Video teleconferencing can take place between buildings that are blocks or continents apart, and these conferences can include travelers as well. Wireless video enable remote classrooms, remote training facilities, and remote hospitals anywhere in the world.
Wireless sensors have an enormous range of both commercial and military applications.
Commercial applications include monitoring of fire hazards, hazardous waste sites, stress and strain in buildings and bridges, carbon dioxide movement and the spread of chemicals and gasses at a disaster site. These wireless sensors self-configure into a network to process and interpret sensor measurements and then convey this information to a centralized control location.
Military applications include identification and tracking of enemy targets, detection of chemical and biological attacks, support of unmanned robotic vehicles, and counter-terrorism.



HISTORY

The first wireless networks were developed in the Pre-industrial age. These systems transmitted information over line-of-sight distances using smoke signals, torch signaling, flashing mirrors, signaling flares, or semaphore flags. Observation stations were built on hilltops and along the roads to relay these messages over large distances.
These early communication networks were replaced first by the telegraph network (invented by Samuel Morse in 1838) and later replaced by telephone.
In 1895, a few decades, after the telephone was invented, Marconi demonstrated the first radio transmission from the Isle of Wight to a tugboat 18 miles away, and radio communication was born. Radio technology advanced rapidly to enable transmissions over larger distances with better quality, less power, and smaller, cheaper devices, thereby enabling public and private radio communications television, and wireless networking.
Early radio systems transmitted analog signals. Today most radio systems transmit digital signals composed of binary bits, where the bits are obtained directly from a data signal or by digitizing an analog signal. A digital radio can transmit a continuous bit stream or it can group the bits into packets. The latter type of radio is called a packet radio and is characterized by heavy transmissions: the radio is idle except when it transmits a packet.
The first network based on packet radio, ALOHANET, was developed at the University of Hawaii in 1971. This network enabled computer sites at seven campuses spread out over four islands to communicate with a central computer on Oahu via radio transmission. The network architecture used a star topology with the central computer at its hub. Any two computers could establish a bi-directional communications link between them by going through the central hub. ALOHANET incorporated the first set of protocols for channel access and routing in packet radio systems, and many of the underlying principles in these protocols are still in use today.
The U.S. military tried to combine packet data and broadcast radio inherent to ALOHANET. Throughout the 1970’s and early 1980’s the Defense Advanced Research Projects Agency (DARPA) invested significant resources to develop networks using packet radios for tactical communications in the battlefield but the resulting networks fell far short of expectations in terms of speed and performance. These networks continue to be developed for military use. Packet radio networks also found commercial application in supporting wide-area wireless data services.
The introduction of wired Ethernet technology in the 1970’s steered many commercial companies away from radio-based networking. Ethernet’s 10 Mbps data rate far exceeded anything available using radio, and companies did not mind running cables within and between their facilities to take advantage of these high rates.
The current generation of wireless LANs, based on the family of IEEE 802.11 standards, has better performance, although the data rates are still relatively low and the coverage area is still small. Wired Ethernets today offer data rates of 100 Mbps, and the performance gap between wired and wireless LANs is likely to increase over time without additional spectrum allocation. Despite the big data rate differences, wireless LANs are becoming the preferred Internet access method in many homes, offices, and campus environments due to their convenience and freedom from wires.
By far the most successful application of wireless networking has been the cellular telephone system. The roots of this system began in 1915, when wireless voice transmission between New York and San Francisco was first established. In 1946 public mobile telephone service was introduced in 25 cities across the United States. The inefficient use of the radio spectrum coupled with the state of radio technology at that time severely limited the system capacity. A solution to this capacity problem emerged during the 50’s and 60’s when researchers at AT&T Bell Laboratories developed the cellular concept. The first analog cellular system deployed in Chicago in 1983 was already saturated by 1984, at which point the FCC increased the cellular spectral allocation from 40 MHz to 50 MHz.
The second generation of cellular systems, first deployed in the early 1990’s, were based on digital communications. The shift from analog to digital was driven by its higher capacity and the improved cost, speed, and power efficiency of digital hardware. While second generation cellular systems initially provided mainly voice services, these systems gradually evolved to support data services such as email, Internet access, and short messaging. The most compelling feature of these systems is their ubiquitous worldwide coverage, especially in remote areas or third-world countries with no landline or cellular system infrastructure.



WIRELESS NETWORK SYSTEM COMPONENTS
A wireless network consists of several components that support communications using radio or light waves propagating through an air medium. Some of these elements overlap with those of wired networks, but special consideration is necessary for all of these components when deploying a wireless network.

Users

·       A user can be anything that directly utilizes the wireless network. One of the most common types of user is a person. For example, a business traveler accessing the Internet from a public wireless LAN at an airport is a user.
·       The user initiates and terminates use of a wireless network. Typically, a user operates a computer device, which often performs a variety of application-specific functions in addition to offering an interface to the wireless network.
·       Users of wireless networks tend to be mobile, constantly moving throughout a facility, campus, or city. Mobility is one of the most prominent benefits of deploying a wireless network.

Computer Devices

·       Many types of computer devices, sometimes referred to as clients, operate on a wireless network. Some computer devices might be specifically designed for users, whereas some computer devices are end systems. In generally, any computer device might communicate with any other computer device on the same wireless network.

NICs

·       The network interface card provides the interface between the computer device and the wireless network infrastructure.
·       Wireless network standards define how a wireless NIC operates. For example, a wireless LAN NIC might implement the IEEE 802.11b standard.
·       Wireless NICs also comply with a specific form factor, which defines the physical and electrical bus interface that enables the card to communicate with the computer device.

 

Air Medium

·       Air provides a medium for the propagation of wireless communications signals, which is the heart of wireless networking. Air is the conduct by which information flows between computer devices and the wireless infrastructure.
·       Wireless information signals also travel through the air, but they have special properties that enable propagation over relatively long distances. Wireless information signals cannot be heard by humans, so it's possible to amplify the signals to a higher level without disturbing human ears.
·       The quality of transmission, however, depends on obstructions in the air that either lessen or scatter the strength and range of the signals. Rain, snow, smog, and smoke are examples of elements that impair propagation of wireless communications signals.

 

Wireless Network Infrastructures

The infrastructure of a wireless network interconnects wireless users and end systems. The infrastructure might consist of base stations, access controllers, application connectivity software, and a distribution system. These components enhance wireless communications and fulfill important functions necessary for specific applications.

Base Stations

·       The base station is a common infrastructure component that interfaces the wireless communications signals traveling through the air medium to a wired network—often referred to as a distribution system.
·       Therefore, a base station enables users to access a wide range of network services, such as web browsing, e-mail access, and database applications. A base station often contains a wireless NIC that implements the same technology in operation by the user's wireless NIC.
·       Base stations go by different names, depending on their purpose. An access point, for instance, represents a generic base station for a wireless LAN.
·       Residential gateways and routers are more advanced forms of base stations that enable additional network functions. The gateway might have functions, such as access control and application connectivity, that better serve distributed, public networks.
·       On the other hand, a router would enable operation of multiple computers on a single broadband connection. A base station might support point-to-point or point-to-multipoint communications.

Access Controllers

·       In the absence of adequate security, quality of service (QoS), and roaming mechanisms in wireless network standards, companies offer access-control solutions to strengthen wireless systems.
·       The key component to these solutions is an access controller, which is typically hardware that resides on the wired portion of the network between the access points and the protected side of the network. Access controllers provide centralized intelligence behind the access points to regulate traffic between the open wireless network and important resources.
·       Access controllers apply to a wide range of applications. In a public wireless LAN, for example, an access controller regulates access to the Internet by authenticating and authorizing users based on a subscription plan.
·       Access controllers often provide port-based access control, allowing administrators to configure access to specific applications on a per-user basis.
·       The use of an access controller reduces the need for smart access points, which are relatively expensive. These access controllers have many advantages: Lower Costs, Open Connectivity and Centralized Support. Access controllers provide following features: Authentication, Encryption, Subnet Roaming, Bandwidth Management.

 

Application Connectivity Software

·       Web surfing and e-mail generally perform well over wireless networks. All it takes is a browser and e-mail software on the client device. Users might lose a wireless connection from time to time, but the protocols in use for these relatively simple applications are resilient under most conditions.
·       Beyond these simple applications, however, special application connectivity software is necessary as an interface between a user's computer device and the end system hosting the application's software or database.

à Wireless Middleware

·       Wireless middleware software provides intermediate communications between user computer devices and the application software or database located on a server.
·       The middleware—which runs on a dedicated computer (middleware gateway) attached to the wired network—processes the packets that pass between the user computer devices and the servers.
·       The middleware software primarily offers efficient and reliable communications over the wireless network while maintaining appropriate connections to application software and databases on the server through the more reliable wired network. Sometimes this is referred to as session persistence.

 

Distribution System

·       A wireless network is seldom entirely free of wires. The distribution system, which often includes wiring, is generally necessary to tie together the access points, access controllers, and servers. In most cases, the common Ethernet comprises the distribution system.
·       The IEEE 802.3 standard is the basis for Ethernet and specifies the use of the carrier sense multiple access (CSMA) protocol to provide access to a shared medium, such as twisted-pair wiring, coaxial cable, and optical fiber.




TYPES OF WIRELESS NETWORKS

WPAN
WPAN describes an application of wireless technology that is intended to address usage scenarios that are inherently personal in nature. WPANs are short-range networks that use Bluetooth technology.
They are commonly used to interconnect compatible devices near a central location, such as a desk. A WPAN has a typical range of about 30 feet. The emphasis is on instant connectivity between devices that manage personal data or which facilitate data sharing between small groups of individuals.
An example might be synchronizing data between a PDA and a desktop computer or spontaneous sharing of a document between two or more individuals.  Wireless communication adds value for these types of usage models by reducing complexity (i.e. eliminates the need for cables).
For example, both Bluetooth radio and invisible Infrared light provides a WPAN for interconnecting a headset to a laptop. ZigBee also supports WPAN applications.

WLAN
WLAN on the other hand is more focused on organizational connectivity not unlike wire based LAN connections.
The intent of WLAN technologies is to provide members of workgroups access to corporate network resources be it shared data, shared applications or e-mail but do so in way that does not inhibit a user’s mobility.
WLAN are wireless networks that use radio waves. The backbone network usually uses cables, with one or more wireless access points connecting the wireless users to the wired network.
The range of a WLAN can be anywhere from a single room to an entire campus. The emphasis is on a permanence of the wireless connection within a defined region like an office building or campus.




WMAN
Wireless Metropolitan Area Networks are a type of wireless network that connects several Wireless LANs. WiMAX is a type of Wireless MAN and is described by the IEEE 802.16 standard

WWAN
Whereas WLAN addresses connectivity within a defined region, WWAN addresses the need to stay connected while traveling outside this boundary. Wireless wide area networks are wireless networks that typically cover large areas, such as between neighboring towns and cities, or city and suburb.
WWANs are created through the use of mobile phone signals typically provided and maintained by specific mobile phone (cellular) service providers. These networks can be used to connect branch offices of business or as a public internet access system.
The wireless connections between access points are usually point to point microwave links using parabolic dishes. A typical system contains base station gateways, access points and wireless bridging relays. Other configurations are mesh systems where each access point acts as a relay also.









Installation and Study of NS or NS-2 Simpulator.

AIM: 

How to Install

1 copy ns2-allinone....tar.gz at some folder
   /home/ns
2. Extract the tar file
      "/tar -xzvf ns-allinone2.1b8a.tar.gz“
3. Change the current directory to unzipped folder
      “cd ns-allinone-2.1b8a“
4. write "./install" and enter


How to Configure

5. after installation set path for two folders
            1. for ns folder --> "ns-2.1b8a"
            2. for nam folder --> "nam-1.0a10"
            "gedit .bash_profile" then write the following at the end of file
            PATH=$PATH:$HOME/bin:/home/ns/ns-allinone-2.1b8a/ns-2.1b8a:
                                     /home/ns/ns-allinone-2.1b8a/nam-1.0a10:
                                         /home/ns/ns-allinone-2.1b8a/xgraph-12.1
            export PATH
6. Now verify the installation by running verification script
     “./validate” 


How to How to run NS2 script

7. Write TCL script in *.tcl file by using any 
    text editor like vi or gedit
8. Run your tcl script and generate .nam or .tr files
     "ns test.tcl" or “./ns test.tcl”
9. Run Network Animator
             "nam out.nam" or “./nam out.nam”



Functionality of NS-2



Element of NS-2

        Create the event scheduler
        Turn on tracing
        Create network
        Setup routing
        Insert errors
        Create transport connection
        Create traffic
        Transmit application-level data


2)Create a script that simulates the simplest topology using NS-2 simulator.
  
                           
Objectives:

- Get a basic understanding of the way objectives interact in ns.
- Lay the foundations for more complicated simulations.

Code:

#Create a simulator object
set ns [new Simulator]
#Open the nam trace file
set nf [open out.nam w]
$ns namtrace-all $nf
#Define a 'finish' procedure
proc finish {} {
global ns nf
$ns flush-trace
#Close the trace file
close $nf
#Execute nam on the trace file
exec nam –a out.nam&
exit 0
}
#Create two nodes
set n0 [$ns node]
set n1 [$ns node]
#Create a duplex link between the nodes
$ns duplex-link $n0 $n1 1Mb 10ms DropTail
#Call the finish procedure after 5 seconds of simulation time
$ns at 5.0 "finish"

$ns run

Difference between TCP and UDP

Several Internet socket types are available:

·       Datagram sockets, also known as connectionless sockets, which use User Datagram Protocol (UDP).

·       Stream sockets, also known as connection-oriented sockets, which use Transmission Control Protocol (TCP).

The Transmission Control Protocol (TCP) is connection-oriented and transports a stream of data over a logical connection established between the sender and the receiver. As a result, data sent from a sender to a receiver is guaranteed to be received in the order they were sent.


The Connection-Oriented Sockets are based on the stream-mode I/O model of the UNIX Operating System – data is transferred using the concept of a continuous data stream flowing from a source to a destination. Data is inserted into the stream by a sender process usually called the server and is extracted from the stream by the receiver process usually called the client.     
The server process establishes a connection socket and then listens for connection requests from other processes. Connection requests are accepted one at a time. When the connection request is accepted, a data socket is created using which the server process can write or read from/to the data stream. When the communication session between the two processes is over, the data socket is closed and the server process is free to accept another connection request. Note that the server process is blocked when it is listening or waiting for incoming connection requests. This problem could be alleviated by spawning threads, one for each incoming client connection request and a thread would then individually handle the particular client.


  Program Flow in the Connection Listener (Server) and Connection Requester (Client) Processes


Connection listener(server)
Connection requester (client)


Create   connection   socket   and   listen   for
Create data socket and request a connection
connection request



Accept connection
Get an output stream for writing to the socket


Create data socket for reading from or writing
Write to stream
to socket stream



Get input stream for reading to the socket
Get input stream for reading to the socket


Read from stream
Read from stream


Get an output stream for writing to the socket
Close data socket


Write to stream



Close data socket



Close connection socket