experiment 1: to study about various networking commands  · web view2018. 8. 30. · because of...

51
Gujarat Technological University Government Engineering College, Sector 28 Gandhinagar B.E. SEM IV (Computer Engineering) Subject:- Computer Networks Subject Code:- 2140709 LABORATORY MANUAL List of Experiments To study about various networking commands. To study about network OS (Operating System) and to configure LAN Card (Software Component). To study about network transmission media (Hardware Component). To study about networking devices (Hardware Component). To perform error detection using CRC method. To perform Data link farming methods. To study about collision free protocols. To perform a distance vector dynamic routing algorithm. To compute a multicast spanning tree for router in the subnet. To perform the subnet for given organization. To study about routing table.

Upload: others

Post on 08-Jun-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Gujarat Technological University

Government Engineering College, Sector 28Gandhinagar

B.E. SEM IV (Computer Engineering)

Subject:- Computer NetworksSubject Code:- 2140709

LABORATORY MANUAL

List of Experiments

To study about various networking commands. To study about network OS (Operating System) and to configure LAN Card (Software

Component).

To study about network transmission media (Hardware Component).

To study about networking devices (Hardware Component).

To perform error detection using CRC method.

To perform Data link farming methods.

To study about collision free protocols. To perform a distance vector dynamic routing algorithm.

To compute a multicast spanning tree for router in the subnet. To perform the subnet for

given organization.

To study about routing table.

Page 2: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Experiment 1: To study about various networking commands

[1] ping

Ping is one of the most commonly used and known commands. Ping allows a user to ping another network IP address. This can help determine if the network is able to communicate with the network.

Sends ICMP ECHO_REQUEST packets to network hosts. Syntax

ping [t] [a] [i TTL] [r count] [s count][[j hostlist] | [k hostlist]] [w timeout] destinationlist

Options:

t Pings the specified host until stopped.

a Resolve addresses to hostnames.

i TTL Time To Live.

r count Record route for count hops.

s count Timestamp for count hops.

j hostlist Loose source route along hostlist.

k hostlist Strict source route along hostlist.

Examples1. ping localhost2. ping techflock.blogspot.com

[2] traceroute

Lets you trace packets and find if your connection is broken beyond your ip address. Also can be used to track the number of hops to get to the hostname.

The tracert command in MSDOS / Windows or the traceroute command in Unix / Linux is another commonly used network command to help determine network related issues or slowdowns. Using this command you can view a listing of how a network packet travels through the network and where it may fail or slow down. Using this information you can determine the computer, router, switch or other network device possibly causing your network issues.

Syntaxtracert [d] [h maximum_hops] [j hostlist] [w timeout] host_name

Options:

d Do not resolve addresses to hostnames. h maximum_hops Maximum number of hops to search for target.

j hostlist Loose source route along hostlist.

w timeout Wait timeout milliseconds for each reply.

Page 3: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Examples1. tracert computerhope.com2. traceroute techflock.blogspot.com.

[3] ipconfig

Find out your ip address, your network interfaces, transferred and received data information Ipconfig is a MSDOS utility which can be used from MSDOS and a MSDOS shell to display the

network settings currently assigned and given by a network. This command can be utilized to verify a network connection as well as to verify your network settings.

Syntaxipconfig [/? | /all | /release [adapter] | /renew [adapter] | /flushdns | /registerdns | /showclassid adapter |/setclassid adapter [classidtoset] ]

/all Display full configuration information.

/release Release the IP address for the specified adapter.

/renew Renew the IP address for the specified adapter.

/flushdns Purges the DNS Resolver cache.

/registerdns Refreshes all DHCP leases and reregisters DNS names

/displaydns Display the contents of the DNS Resolver Cache.

/showclassid Displays all the dhcp class IDs allowed for adapter.

Example : ipconfig

[4] netstat

The netstat command is used to display the TCP/IP network protocol statistics and information. Shows network status. Syntax

NETSTAT [a] [e] [n] [s] [r]

a Displays all connections and listening ports.e Displays Ethernet statistics. This may be combined with the s option.

n Displays addresses and port numbers in numerical form.

r Displays the routing table.

s Displays perprotocol statistics.

Example netstat

[5] telnet

Page 4: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Telnet or connect to a machine at the specified port to find out whether that machine/server is working right

Syntaxtelnet hostname

Example: telnet techflock.blogspot.com

[6] ARP

Displays, adds and removes arp information from network devices. Syntax

ARP s inet_addr eth_adr [if_addr] ARP d inet_addr [if_addr]ARP a [inet_addr] [N if_addr]

Options:a Displays current ARP entries by interrogating the current protocol data. If inet_addr is specified, the

IP and Physical addresses for only the specified computer are displayed. If more than one network interface uses ARP, entries for each ARP table are displayed.

inet_addr Specifies an Internet address.

N if addr Displays the ARP entries for the network interface specified by if_addr.

d Deletes the host specified by inet_addr.

s Adds the host and associates the Internet address inet_addr with the Physical address eth_addr. The Physical address is given as 6 hexadecimal bytes separated by hyphens. The entry is permanent.

eth_addr Specifies a physical address

if_addr If present, this specifies the Internet address of the interface whose address translation table should be modified. If not present, the first applicable interface will be used.Examplesarp aarp s 220.0.0.161 00500462F723

[7] FINGER

The finger command available in Unix / Linux variants allows a user to find sometimes personal information about a user. This information can include the last time the user logged in, when they read their email, etc... If the user creates a .PLAN or other related file the user can also display additional information.Lists information about the user.Syntaxfinger usernameExamplefinger ch Would display the following information about the user ch.

[8] hostname

Page 5: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Display the hostname of the machine the command is being run on. Additional information about the term hostname can be found on our hostname dictionary definition.Syntax

hostnameExample

hostnameRunning this command would display the hostname for the computer.[9] ftp

To connect to an FTP server, simply run the ftp(1) command and specify the host: Syntax: ftp hostname [port] If the host is running an FTP server, it will ask for a username and password. Once connected, you will be at the ftp> prompt. There are special commands for FTP, but they are

similar to other standard commands. ftp commands

Command Purpose

ls List files

cd <dirname> Change directory

bin Set binary transfer modeascii Set ASCII transfer mode get <filename>Download a file

put <filename> Upload a file

quit Log off the FTP server

[10] nslookup hostname

Find out the dns name resolves to a IP a way to test your dns server. Example: nslookup techflock.blogspot.com

[11] dig hostname Provides dns related information. Example: dig techflock.blogspot.com

[12] NET The net command is available in MSDOS / Windows and is used to set, view and determine

network settings.

[13] route This command is used to manually configure the routes in the routing table.

[14] Wget Wget(Web get) used to download files from the World Wide Web Syntax:-wget url_for_file

Page 6: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Experiment 2: To study about network OS (Operating System) and to configure LAN Card (Software Component)

To study about any type of computer network, we need to know both software and hardware component of network.

Network Software:

Networking software differs from software applications in that the software does not perform tasks that end users can see in the way word processors and spreadsheets do. Instead, networking software operates invisibly in the background, allowing the user to access network resources without the user even knowing the software is operating.

Network OS :

Operating System: Computers use lowlevel software called an operating system (O/S) to help people build and run their own programs. Operating system software runs not just on laptop computers but also on cell phones, network routers and other socalled embedded devices.

Network operating System :

A network operating system (NOS) is a computer operating system that is designed primarily to support workstation, personal computer, and, in some instances, older terminal that are connected on a local area network (LAN). Artisoft's LA

Ntastic, Banyan VINES, Novell's NetWare, and Microsoft's LAN Manager are examples of network operating systems. In addition, some multipurpose operating systems, such as Windows NT and Digital's OpenVMS come with capabilities that enable them to be described as a network operating system.

The early versions of Microsoft Windows did not provide any computer networking support. Microsoft added basic networking capability into its operating system starting with Windows 95 and Windows for Workgroups. Microsoft also introduced its Internet Connection Sharing (ICS) feature in Windows 98 Second Edition (Win98 SE). Contrast that with Unix, which was designed from the beginning with networking in view. Nearly any consumer O/S today qualifies as a network operating system due to the popularity of the Internet.

A modern O/S contains much builtin software designed to simplify networking of a computer. Typical O/S software includes an implementation of TCP/IP protocol stack and related utility programs like ping and traceroute. This includes the necessary device drivers and other software to automatically enable a device's Ethernet interface. Mobile devices also normally provide the programs needed to enable WiFi, Bluetooth, or other wireless connectivity.A network operating system provides printer sharing, common file system and database sharing, application sharing, and the ability to manage a network name directory, security, and other housekeeping aspects of a network.

Page 7: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Configuration of LAN card.

LAN Card: With the increasing use of the computers and the networking the local area network of the LAN is one such network type which links the two computers in a connection.

For this connection a Local area network card or the LAN card is required which enables the connection of the computers in a network. It is a piece of hardware which is connected inside the PC linking the computer network. The LAN Card is of both the common types which are the OSI layer 1 and 2, dealing with the physical as well as the data link layer respectively. It uses the correctly entered MAC addresses for the network to work. This then allows the computers to connect using cables or even wirelessly which then requires a special type of LAN card called the WLAN card.

With the increase in the development and technology, the local area network of the wireless type is now mostly preferred. Therefore a Wireless LAN Card is required for this purpose. The computers with the wireless LAN Card can transmit and receive data via radio waves using the special technology of SST or the SpreadSpectrum technology.

The wireless LANs are available in four basic types which include the 802.11, followed by type a, b and also g. Any sort of LAN card you use will have some of the typical features of a network card which includes the twisted pair, the AUI socket and also the BNC. It is at the AUI socket that the network cable has to be connected. The LAN cards usually are designed to support the rate transfer to be ranging from 10 to 1000 megabits per second.

Configuration of LAN card:

Network Card Driver Installation

Network card driver installation is a must! Without installing the driver, your network card just won’t work. If you plug in the network card the first time to the computer and boot up the Windows Vista, the system will detect new hardware and prompt you to install the driver, you can then use the driver installation CD or the driver downloaded from vendor website to finish the installation. You can then check the driver status to make sure it works well after the driver installation.Note: Don't forget to connect your computer's network card to router's LAN port with network cable.

1) TCP/IP ConfigurationThis is the most important part of network card configuration in Vista. You must configure the network card, so that this computer can communicate with other computers or network devices. You will need to have TCP/IP protocol and other Windows network items installed in order to make it work correctly.

I) Go to Start and right click on Network and then click Properties.

II) Net work and Sharing centre window will appear, then click Manage network connections.

Page 8: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

III) Network Connections window will appear. Here you can right click on the network card that you wish to configure and click Properties.

Iv) In the Local Area Connection Properties, you need to have following items installed and enabled:

2) Client for Microsoft Networks – Allow your computer to access resources in a Microsoft network.3) File and Printer Sharing for Microsoft Networks – Allow your computer to share files and

printers in Microsoft network.4) Internet Protocol Version 4 (TCP/IPv4) – The protocol that enables your computer to talk to other

computers in your network. You need to specify IP address, netmask, gateway and other network information for it to work correctly. Assign the IP address by following your network design, and make sure the IP is unique.

Note: Somehow the Internet Protocol Version 6 (TCP/IPv6) is still not commonly used. If your computer is in IPv6 network, you can select Internet Protocol Version 6 (TCP/IPv6) to configure IPv6 address.

5) LinkLayer Topology Discovery Mapper I/O Driver and LinkLayer Topology Discovery Responder Used to discover and display your home network map. Check this on how to enable Network Discovery in your network.

If you don’t have those specified items installed, click Install… and follow the instructions to install the items which you missed. Finally click OK to close the window.At this moment, your Vista computer should be connected to home network. Try to ping other computer or router IP.

Page 9: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Network Location Type

Once your computer is connected to home network, you are advised to set the Network Location Type toPrivate as this computer is part of home network or private network.

Also can say that your computer is connected to trusted computers with Network discovery and file sharing enabled by default. Check out this article on how to change Network Location Type.

Page 10: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Experiment 3: To study about network transmission media (Hardware Component)

Network Hardware:

1. Transmission media. Transmission media can be defined as physical path between transmitter and receiver in a data

transmission system. And it may be classified into two types as shown in Fig.

1) Guided: Transmission capacity depends critically on the medium, the length, and whether the Medium

is pointtopoint or multipoint (e.g. LAN). Examples. Coaxial cable, twisted pair, and Optical fiber.

2) Unguided: Provides a means for transmitting electromagnetic signals but do not guide them. Example.Wireless Transmission.

Characteristics and quality of data transmission are determined by medium and signal characteristics. For guided media, the medium is more important in determining the limitations of transmission. While in case of unguided media, the bandwidth of the signal produced by the transmitting antenna and the size of the antenna is more important than the medium. Signals at lower frequencies are Omnidirectional (propagate in all directions). For higher frequencies, focusing the signals into a directional beam is possible. These properties determine what kind of media one should use in a particular application. In this lesson we shall discuss the characteristics of various transmission media, both guided and unguided.

Guided transmission media

In this section we shall discuss about the most commonly used guided transmission media such as twistedpair of cable, coaxial cable and optical fiber.

I. Twisted Pair Cable:

Page 11: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

In twisted pair technology, two copper wires are strung between two points:

The two wires are typically ``twisted'' together in a helix to reduce interference between the two conductors as shown in Fig. Twisting decreases the crosstalk interference between adjacent pairs in a cable. Typically, a number of pairs are bundled together into a cable by wrapping them in a tough protective sheath.

Can carry both analog and digital signals. Actually, they carry only analog signals. However, the``analog'' signals can very closely correspond to the square waves representing bits, so we often think of them as carrying digital data.

Data rates of several Mbps common. Spans distances of several kilometers. Data rate determined by wire thickness and length. In addition, shielding to eliminate interference

from other wires impacts signaltonoise ratio, and ultimately, the data rate. Good, lowcost communication. Indeed, many sites already have twisted pair installed in offices

existing phone lines!

Typical characteristics:

Twistedpair can be used for both analog and digital communication. The data rate that can be supported over a twistedpair is inversely proportional to the square of the line length. Maximum transmission distance of 1 Km can be achieved for data rates up to 1 Mb/s. For analog voice signals, amplifiers are required about every 6 Km and for digital signals, repeaters are needed for about 2 Km. To reduce interference, the twisted pair can be shielded with metallic braid. This type of wire is known as Shielded TwistedPair (STP) and the other form is known as Unshielded TwistedPair (UTP).

Use of Twisted Pair cable:

The oldest and the most popular use of twisted pair are in telephony. In LAN it is commonly used for pointto point short distance communication (say, 100m) within a building or a room.

II. Base band Coaxial

With ``coax'', the medium consists of a copper core surrounded by insulating material and a braided outer conductor as shown in Fig. The term base band indicates digital transmission (as opposed to broadband analog).

Page 12: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Physical connection consists of metal pin touching the copper core. There are two common ways to connect to a coaxial cable:

1. With vampire taps, a metal pin is inserted into the copper core. A special tool drills a hole into the cable, removing a small section of the insulation, and a special connector is screwed into the hole. The tap makes contact with the copper core.

2. With a Tjunction, the cable is cut in half, and both halves connect to the Tjunction. A Tconnector is analogous to the signal splitters used to hook up multiple TVs to the same cable wire.

Characteristics:

Coaxial cable has superior frequency characteristics compared to twistedpair and can be used for both analog and digital signaling. In baseband LAN, the data rates lies in the range of 1 KHz to 20 MHz over a distance in the range of 1 Km. Coaxial cables typically have a diameter of 3/8". Coaxial cables are used both for baseband and broadband communication. For broadband CATV application coaxial cable of 1/2" diameter and 75 Ω impedance is used. This cable offers bandwidths of 300 to 400 MHz facilitating high speed data communication with low biterror rate. In broadband signaling, signal propagates only in one direction, in contrast to propagation in both directions in baseband signaling. Broadband cabling uses either dualcable scheme or single cable scheme with a headend to facilitate flow of signal in one direction. Because of the shielded, concentric construction, coaxial cable is less susceptible to interference and cross talk than the twistedpair. For long distance communication, repeaters are needed for every kilometer or so. Data rate depends on physical properties of cable, but 10 Mbps is typical.

Use :of Base band cable: One of the most popular use of coaxial cable is in cable TV (CATV) for the distribution of TV

signals. Another importance use of coaxial cable is in LAN

III. Broadband Coaxial

The term broadband refers to analog transmission over coaxial cable. (Note, however, that the telephone folks use broadband to refer to any channel wider than 4 kHz). The technology:

Typically bandwidth of 300 MHz, total data rate of about 150 Mbps. Operates at distances up to 100 km (metropolitan area!). Uses analog signaling.

Technology used in cable television. Thus, it is already available at sites such as universities that may have TV classes.

Total available spectrum typically divided into smaller channels of 6 MHz each. That is, to get more than 6MHz of bandwidth, you have to use two smaller channels and somehow combine the signals.

Page 13: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Requires amplifiers to boost signal strength; because amplifiers are one way, data flows in only one direction.

IV. Fiber Optics

In fiber optic technology, the medium consists of a hairwidth strand of silicon or glass, and the signal consists of pulses of light. For instance, a pulse of light means ``1'', lack of pulse means ``0''. It has a cylindrical shape and consists of three concentric sections: the core, the cladding, and the jacket as shown in Figure. The core, innermost section consists of a single solid dielectric cylinder of diameter d1 and of refractive index n1. The core is surrounded by a solid dielectric cladding of refractive index n2 that is less than n1. As a consequence, the light is propagated through multiple total internal reflection. The core material is usually made of ultra pure fused silica or glass and the cladding is either made of glass or plastic. The cladding is surrounded by a jacket made of plastic. The jacket is used to protect against moisture, abrasion, crushing and other environmental hazards.

Three components are required:

1) Fiber medium: Current technology carries light pulses for tremendous distances (e.g., 100s of kilometers) with virtually no signal loss.

2) Light source: typically a Light Emitting Diode (LED) or laser diode. Running current through the material generates a pulse of light.

3) A photo diode light detector, which converts light pulses into electrical signals.

Advantages :

Very high data rate, low error rate. 1000 Mbps (1 Gbps) over distances of kilometers common. Error rates are so low they are almost negligible.

Difficult to tap, which makes it hard for unauthorized taps as well. This is responsible for higher reliability of this medium.

Much thinner (per logical phone line) than existing copper circuits. Because of its thinness, phone companies can replace thick copper wiring with fibers having much more capacity for same volume. This is important because it means that aggregate phone capacity can be upgraded without the need for finding more physical space to hire the new cables.

Not susceptible to electrical interference (lightning) or corrosion (rust). Greater repeater distance than coax.

Disadvantages:

Difficult to tap. It really is pointtopoint technology. In contrast, tapping into coax is trivial. No special training or expensive tools or parts are required.

Page 14: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Oneway channel. Two fibers needed to get full duplex (both ways) communication.

Fiber Uses :

Because of greater bandwidth (2Gbps), smaller diameter, lighter weight, low attenuation, immunity to electromagnetic interference and longer repeater spacing, optical fiber cables are finding widespread use in longdistance telecommunications. Especially, the single mode fiber is suitable for this purpose. Fiber optic cables are also used in highspeed LAN applications. Multimode fiber is commonly used in LAN.

Longhaul trunksincreasingly common in telephone network (Sprint ads) Metropolitan trunkswithout repeaters (average 8 miles in length) Rural exchange trunkslink towns and villages Local loopsdirect from central exchange to a subscriber (business or home) Local area networks100Mbps ring networks.

Unguided transmission media

Unguided media transport electromagnetic waves without using a physical conductor. This type of communication is often referred to as wireless communication. Signals are normally broadcast through free space and thus are available to anyone who has a device capable of receiving them.In ground propagation, radio waves travel through the lowest portion of the atmosphere, hugging the earth. These lowfrequency signals emanate in all directions from the transmitting antenna and follow the curvature of the planet. Distance depends on the amount of power in the signal: The greater the power, the greater the distance. In sky propagation, higherfrequency radio waves radiate upward into the ionosphere (the layer of atmosphere where particles exist as ions) where they are reflected back to earth. This type of transmission allows for greater distances with lower output power. In lineofsight propagation, very highfrequency signals are transmitted in straight lines directly from antenna to antenna. Antennas must be directional, facing each other and either tall enough or close enough together not to be affected by the curvature of the earth. Lineofsight propagation is tricky because radio transmissions cannot be completely focused.

I. Radio Waves Although there is no clearcut demarcation between radio waves and microwaves, electromagnetic waves ranging in frequencies between 3 kHz and 1 GHz are normally called radio waves; waves ranging in frequencies between I and 300 GHz are called microwaves. However, he behavior of the waves, rather than the frequencies, is a better criterion for classification.Radio waves, for the most part, are Omnidirectional. When an antenna transmits radio waves, they are propagated in all directions. This means that the sending and receiving antennas do not have to be aligned. A sending antenna sends waves that can be received by any receiving antenna. The Omnidirectional property has a disadvantage, too. The radio waves transmitted by one antenna are susceptible to interference by another antenna that may send signals using the same frequency or band.Radio waves, particularly those waves that propagate in the sky mode, can travel long distances. This makes radio waves a good candidate for longdistance broadcasting such as AM radio.

Page 15: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Radio waves, particularly those of low and medium frequencies, can penetrate walls. This characteristic can be both an advantage and a disadvantage. It is an advantage because, for example, an AM radio can receive signals inside a building. It is a disadvantage because we cannot isolate a communication to just inside or outside a building. The radio wave band is relatively narrow, just under 1 GHz, compared to the microwave band. When this band is divided into sub bands, the sub bands are also narrow, leading to a low data rate for digital communications.Almost the entire band is regulated by authorities (e.g., the FCC in the United States). Using any part of the band requires permission from the authorities.

II. Microwaves Electromagnetic waves having frequencies between I and 300 GHz are called microwaves.

Microwaves are unidirectional. When an antenna transmits microwave waves, they can be narrowly focused. This means that the sending and receiving antennas need to be aligned. The unidirectional property has an obvious advantage. A pair of antennas can be aligned without interfering with another pair of aligned antennas. The following describes some characteristics of microwave propagation.

Microwave propagation is lineofsight. Since the towers with the mounted antennas need to be in direct sight of each other, towers that are far apart need to be very tall. The curvatures of the earth as well as other blocking obstacles do not allow two short towers to communicate by using microwaves. Repeaters are often needed for long distance communication.

Very highfrequency microwaves cannot penetrate walls. This characteristic can be a disadvantage if receivers are inside buildings.

The microwave band is relatively wide, almost 299 GHz. Therefore wider sub band scan be assigned, and a high data rate is possible

Use of certain portions of the band requires permission from authorities.

Applications Microwaves, due to their unidirectional properties, are very useful when Unicast (onetoone) communication is needed between the sender and the receiver. They are used in cellular phones, satellite networks, and wireless LANs.

III. Infrared Infrared waves, with frequencies from 300 GHz to 400 THz (wavelengths from 1 mm to 770 nm), can be used for shortrange communication. Infrared waves, having high frequencies, cannot penetrate walls. This advantageous characteristic prevents interference between one system and another; a short range communication system in one room cannot be affected by another system in the next room. When we use our infrared remote control, we do not interfere with the use of the remote by our neighbors. However, this same characteristic makes infrared signals useless for longrange communication. In addition, we cannot use infrared waves outside a building because the sun's rays contain infrared waves that can interfere with the communication.

Applications The infrared band, almost 400 THz, has an excellent potential for data transmission. Such a wide bandwidth can be used to transmit digital data with a very high data rate. The Infrared Data Association (IrDA), an association for sponsoring the use of infrared waves, has established standards

Page 16: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

for using these signals for communication between devices such as keyboards, mice, PCs, and printers. For example, some manufacturers provide a special port called the IrDA port that allows a wireless keyboard to communicate with a PC. The standard originally defined a data rate of 75 kbps for a distance up to 8 m. The recent standard defines a data rate of 4 Mbps.Infrared signals defined by IrDA transmit through line of sight; the IrDA port on the keyboard needs to point to the PC for transmission to occur.

E xperime nt 4: To study about networking devices (Hardware Component) Networking Devices:

Transceiver Repeater Hub Switch

Page 17: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Bridge Router Gateway Modem

Transceiver : A Network Transceiver, or transmitterreceiver, is a device used for transmitting and receiving analog and digital signals. A network transceiver is the component in a localarea network (LAN) that applies and detects signals transmitting through network wires.

Purpose Network transceivers are vital in the transmitting of signals in a LAN. They are designed to work within a specific network and are used for many things including on satellites, in computers and cell phones.

Features These transceivers come with three different configurations: chip, board or module style. The smallest types of network transceivers are the chip style, which are easily inserted or removed from a network system. The board style transceivers are ones built directly into a network system, and the module ones are typically standalone devices, not installed directly into the system.

Types Network transceivers come in two types: fullduplex and halfduplex. A halfduplex transceiver functions by only being able to transmit or receive a signal one at a time. A fullduplex transceiver can transmit and receive signals all at once.

Repeater :

A Repeater is a network or communications device that distributes, or propagates, electric signals from one cable to another. By doing so, the repeater amplifies the signal to restore it to full strength. Repeaters are used to counter the decrease in energy, known as attenuation, which occurs when signals travel long distances.

Purpose The purpose of a repeater is to extend the length of a local area network segment beyond the maximum length imposed by the physical transmission medium. Without repeaters, the type of Ethernet known as 10BaseT has a maximum segment length of 328 feet, the type of Ethernet known as 10Base2 has a maximum segment length of 607 feet, and the type of Ethernet known as 10BaseFL which operates over fiber optic cable – has a maximum segment length of about 6,500 feet. Repeaters are typically used to connect buildings, or floors of a building, together in

Page 18: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

situations where the distance exceeds the maximum allowable segment length.

Symbol In schematic diagrams, the standard symbol for a oneway repeater is a rectangle containing a horizontal triangle. The standard symbol for a twoway repeater is a rectangle containing two horizontal triangles, arranged apex to apex, while the standard symbol for a twoway, fourwire repeater is a rectangle containing two horizontal triangles, pointing in opposite directions and arranged one above the other.

OSI Reference Model Repeaters operate at the lowest layer of the Open Systems Interconnection (OSI) Reference Model the standard model of network architecture known as the physical layer. Repeaters can relay signals between physically independent portions of a network that share a network address, known as subnets, even if the subnets use different protocols or cable types.

Advantages of Repeater Repeaters easily extend the length of network. They require no processing over head, so very little if any performance degradation occurs. It can connect signals from the same network type that use different types of cables.

Disadvantages of Repeaters Repeaters cannot be used to connect segments of different network types. They cannot be used to segment traffic on a network to reduce congestion. Many types of network have a limit on the number of network s that can be used at once.

Hub : Network hub is a component that allows multiple computers and other devices to be connected via local area network (LAN). It makes data packets sent from one device available to other devices on the same network. A network hub uses Ethernet connections to link computers together, and is also known as an Ethernet hub.

Page 19: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

1. Passive Hub It provides no signal regeneration. They are simply cables connected together so that the Signal

is broken out to other nodes without regeneration. These are not used often today because of loss of cable length that is allowed.

2. Active Hub It acts as repeaters and regenerates the data signals to all ports. They have no real intelligence

to tell whether the signal needs to go to all ports that is blindly repeated.

3. Switch Hub Switches are multi ports bridges. They filter traffic between the ports on the switch by using

the address of computers transmitting to them. Switches can be used when data performance is needed or when collision need to be reduce.

Advantages of Hub Hubs need almost no configuration. Active hub can extend maximum network media distance.

Disadvantages of Hub Passive hubs can greatly limit maximum media distance. Hubs have no intelligence to filter traffic so all data is send out on all ports whether it is need or not.

Since hubs can act as repeaters the network using them must follow the same rules as repeaters.

Switch :

A switch is used to network multiple computers together. Switches made for the consumer market are typically small, flat boxes with 4 to 8 Ethernet ports. These ports can connect to computers, cable or

DSL modems, and other switches. Highend switches can have more than 50 ports and often are rack mounted.

Switches are more advanced than hubs and less capable than routers. Unlike hubs, switches can limit the traffic to and from each port so that each device connected to the switch has a sufficient amount of bandwidth. For this reason, you can think of a switch as a "smart hub." However, switches don't provide the firewall and logging capabilities that routers do. Routers can often be configured by software (typically via a Web interface), while switches only work the way the hardware was designed.

Page 20: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

The term "switch" can also be used to refer to a small lever or button on computer hardware. And while it has nothing to do with computers, "riding switch" means riding backwards in skateboarding and snowboarding.

Switch Advantages

Client Performance: Because any given system attached to a switch sees only information explicitly addressed to its NIC, there is less overhead time spent throwing away packets that it does not need to read.

Higher Throughput: Because only relevant traffic is sent down any given network port, each NIC gets its own packets delivered to the switch independently of each other NIC attached to that switch. This means a switch can manage a larger total volume of data in transit at any given time.

Disadvantages

Unless the switch is expensive enough to include "port mirroring" capability, a sniffer is of limited use on a switch because the switch automatically filters out the traffic the sniffer would like to get.

Bridge :

When a road needs to extend across a river or valley, a bridge is built to connect the two land masses. Since the average car cannot swim or fly, the bridge makes it possible for automobiles to continue driving from one land mass to another.

In computer networking, a bridge serves the same purpose. It connects two or more local area networks (LANs) together. The cars, or the data in this case, use the bridge to travel to and from different areas ofthe network. The device is similar to a router, but it does not analyze the data being forwarded. Because of this, bridges are typically fast at transferring data, but not as versatile as a router. For example, a bridge cannot be used as a firewall like most routers can. A bridge can transfer data between different protocols (i.e. a Token Ring and Ethernet network) and operates at the "data link layer" or level 2 of the OSI (Open Systems Interconnection) networking reference model.

Bridges operate at the data link layer (Layer 2) of the OSI model. Bridges inspect incoming traffic and decide whether to forward or discard it. An Ethernet bridge, for example, inspects each incoming Ethernet frame including the source and destination MAC addresses, and sometimes the frame size in making individual forwarding decisions. Bridges serve a similar function as switches that also operate at Layer 2. Traditional bridges, though, support one network boundary, whereas switches usually offer four or more hardware ports. Switches are sometimes called "multiport bridges"

Page 21: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

for this reason.

Advantages of Bridges Bridge extends network segments by connecting them together to make one logical network. They can affect the segment traffic between networks by filtering data if it does not need to pass. Like repeaters they can connect similar network types with different cabling.

Disadvantages of Bridges

Bridge possess information about the data they receive with can slow performance.

Router : In packetswitched networks such as the Internet, a router is a device or, in some cases, software in a computer, that determines the next network point to which a packet should be forwarded toward its destination.

The router is connected to at least two networks and decides which way to send each information packet based on its current understanding of the state of the networks it is connected to. A router is located at any gateway (where one network meets another), including each pointofpresence on the Internet. A router is often included as part of a network switch.

A router may create or maintain a table of the available routes and their conditions and use this information along with distance and cost algorithms to determine the best route for a given packet.

Typically, a packet may travel through a number of network points with routers before arriving at its destination. Routing is a function associated with the Network layer (layer 3) in the standard model of network programming, the Open Systems Interconnection (OSI) model. A layer3 switch is a switch that can perform routing functions.

An edge router is a router that interfaces with an asynchronous transfer mode (ATM) network. A brouter is a network bridge combined with a router.

For home and business computer users who have highspeed Internet connections such as cable, satellite, or DSL, a router can act as a hardware firewall. This is true even if the home or business has only one computer. Many engineers believe that the use of a router provides better protection against hacking than a software firewall, because no computer Internet Protocol address are directly exposed to the Internet. This makes port scans (a technique for exploring weaknesses) essentially impossible. In addition, a router does not consume computer resources as a software firewall does. Commercially manufactured routers are easy to install, reasonably priced, and available for hardwired or wireless networks.

Page 22: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Types of routers :

Edge RouterThis type of router are placed at the edge of the ISP network, the are normally configured to external protocol like BGP (Border gateway protocol) to another BGP of other ISP or large organisation.

Subscriber Edge RouterThis type of router belongs to an end user (enterprise) organization. It’s configured to broadcast External BGP to its provider’s AS(s)

Interprovider Border RouterThis type of router is for Interconnecting ISPs, this is a BGP speaking router that maintains BGP sessions with other BGP speaking routers in other providers' ASes.

Core RouterA router that resides within the middle or backbone of the LAN network rather than at its periphery.

In some instances, a core router provides a stepdown backbone, interconnecting the distribution routers from multiple building of a campus (LAN), or Large enterprise Location (WAN). They tend to be optimized for a high bandwidth.

Wired and Wireless Routers.Home and small office networking is becoming popular by day by the use of IP wired and wireless router. Wired and wireless routers are able to maintain routing and configuration information in their routing table. They also provide the service of filtering traffic of incoming and outgoing packets based on IP addresses.Some wireless routers combine the functions of router with those of a network switch and that of a firewall in one.

Gateway : A network gateway is an internetworking system capable of joining together two networks that use different base protocols. A network gateway can be implemented completely in software, completely in hardware, or as a combination of both. Depending on the types of protocols they

Page 23: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

support, network gateways can operate at any level of the OSI model.

A gateway is a network point that acts as an entrance to another network. On the Internet, a node or stopping point can be either a gateway node or a host (endpoint) node. Both the computers of Internet users and the computers that serve pages to users are host nodes. The computers that control traffic within your company's network or at your local Internet service provider (ISP) are gateway nodes.In the network for an enterprise, a computer server acting as a gateway node is often also acting as a proxy server and a firewall server. A gateway is often associated with both a router, which knows where to direct a given packet of data that arrives at the gateway, and a switch, which furnishes the actual path in and out of the gateway for a given packet.

Modem :

Modem means modulatordemodulator. At the sending end, a modem modulates a carrier with the data (baseband signal) to prepare it for transmission. At the receiving end, the modulated carrier is demodulated (i.e. converted back to the original shape) and the data is extracted. There are many types of modulation techniques used in modem design, e.g. PCM, QPSK, QAM. A modem also performs other functions, such as digitaltoanalog/analogtodigital conversion, compression/decompression, error correction, and encryption/decryption.

You must connect your computer to a modem or install an internal modem inside your computer when you want to connect to the Internet. The type of modem that you need depends on the Internet access method that you choose. You may need a voice band modem, a cable modem, an ADSL modem, or a GPRS modem. Your modem will communicate with the corresponding modem at your ISP during an Internet connection, transmit your computer message to the ISP (upstream), and receive Internet content forwarded by the ISP (downstream).

Page 24: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

message bits parity bits

Experiment 5: To perform error detection using CRC method.

Cyclic Redundancy Check

We can create cyclic codes to correct errors. However, the theoretical background required is beyond the scope of this book. In this section, we simply discuss a category of cyclic codes called the cyclic redundancy check (CRC) that is used in networks such as LANs and WANs.

In the encoder, the data word has k bits (4 here); the codeword has n bits (7 here). The size of the data word is augmented by adding n k (3 here) Os to the righthand side of the word. The nbit result is fed into the generator. The generator uses a divisor of size n k + I (4 here), predefined and agreed upon. The generator divides the augmented data word by the divisor (modulo2 division). The quotient of the division is discarded; the remainder is appended to the data word to create the codeword.

The decoder receives the possibly corrupted codeword. A copy of all n bits is fed to the checker which is a replica of the generator. The remainder produced by the checker is a syndrome of n k (3 here) bits, which is fed to the decision logic analyzer. The analyzer has a simple function. If the syndrome bits are all as, the 4 leftmost bits of the codeword are accepted as the data word (interpreted as no error); otherwise, the 4 bits are discarded (error).

The Cyclic Redundancy Check (CRC)

Consider a message having many data bits which are to be transmitted reliably by appending several check bits as shown below.

The exact number of extra bits and their makeup depends on a generating polynomial. For example one such polynomial is: x16 + x12 + x5 + 1The number of CRC bits corresponds to the order of the generating polynomial. The above polynomial of order 16 generates a 16bit CRC. Typically, the CRC bits are used for error detection only.

CRC Computation : Consider a message represented by some polynomial G(x), and a generating polynomial P(x). In this example, let G(x) represent the binary message 110010, and let P(x) = x3 + x2 + 1; (binary 1101).

Page 25: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

110010 CRC

110010 100

The polynomial P(x) will be used to generate a (3bit) CRC called C(x) which will be appended to G(x). Note that P(x) is prime.

The polyomial P(x) defines the CRC bits. Step 1 Multiply the message G(x) by x3, where 3 is the number of bits in the CRC. Add 3 three zeros

to the binary G(x). Step 2 Divide the product x3 [G(x)] by the generating polynomial P(x). We wish to find "the remainder, modulo P(x)" Compute the following: 100100 (ignore this quotient)

1101) 110010000 1101

0001100 1101

000100 = remainder = C(x) Observe that if C(x) were in place of the appended zeros, the remainder would become 000. Step 3 Disregard the quotient and add the remainder C(x)to the product x3 [G(x)] to yield the code

message polynomial F(x), which is represented as: F(x) = x3 [G(x)] + C(x) Put the remainder C(x) =100 in place of the three zeros added in Step 1.

The message may now be transmitted Case:1: No Errors Upon reception, the entire received F(x) = "message + crc" can be checked simply by dividing

F(x)/P(x) using the same generating polynomial. If the remainder after division equals zero, then no error was found.

100100 (ignore this quotient)

1101) 1100101001101

00011011101

00= remainder (no error)

Page 26: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Case 2: CRC Error Checking Single Bit Error

A single bit error in bit position K in a message F(x) can be represented by adding the term E(x) =xK, (binary 1 followed by Kzeros).

sent: 110010100 = F(x)error: 000001000 = E(x) = x3

received: 110011100 = F(x) + E(x) (error in bit 3)

The above error would be detected when the CRC division is performed: 100101 (ignore this quotient)

1101) 110011100 = F(x) + E(x)1101 00011111101 0010001101

0101 = remainder (error!)

Note that division by P(x) revealed the error. On the other hand, since F(x)/P(x) = 0 by definition, the remainder is a function only of the error. An error in this same bit would give the same nonzero remainder regardless of the message bits.

F(x) + E(x) F(x) E(x) E(x)

= + = P(x) P(x) P(x) P(x)

The remainder is a function only of the errored bits E(x).

00001 (ignore this quotient)

1101) 000001000 = E(x) alone0000 0000010001101

0101 = remainder (error!)

Since E(x) = xK has no factors other than x, a single bit error will never produce a term exactly divisible by P(x). All single bit errors will be detected.

Case 3: CRC Error Checking Double Bit Error:

Page 27: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Similarly if E(x) = xK + xK+1, the error pattern includes two adjacent bits (e.g. E(x) = 000011000 for K=3).

Since this E(x) has no factors other than (x+1) and x, a double bit error will never produce a term exactly divisible by P(x). All double bit (adjacentbit) errors will be detected

The above argument can be extended to other types of errors, and the error performance can be fully described by examining E(x) independently of any data messages.

Experiment 6: To perform Data link farming methods

The following character encoding is used in a data link protocol: A: 01000111; B: 11100011; FLAG: 01111110; ESC: 11100000 Show the bit sequence transmitted (in binary) for the fourcharacter

Page 28: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

frame: A B ESC FLAG when each of the following farming methods are used:

1. Character count:

The first framing method uses a field in the header to specify the number of characters in the frame. When the data link layer at the destination sees the character count, it knows how many characters follow and hence where the end of the frame is. The header in the given frame is by default first frame size including the first field data bits are counted and considered as the first frame and the next field contains the next frame size and so on.Example:Sender side:

The number of frames you want to send:2 The frame:1234The frame:678The transmitted frame is:512344678Receiver side:Received data: 512344678frame sizes are: 5 4 frames are:frame 1: 1234frame 2: 678

Solution: 4:00000100 A: 01000111; B: 11100011; FLAG: 01111110; ESC: 11100000Character count encoding: 00000100 01000111 11100011 11100000 01111110

2. Character (byte) stuffing:

The character count framing method gets around the problem of resynchronization after an error by having each frame start and end with special bytes. The starting and ending bytes were different, but most protocols have used the same byte, called a flag byte, as both the starting and ending delimiter, as shown in as a FLAG (byte). In this way, if the receiver ever loses synchronization, it can just search for the flag byte to find the end of the current frame. Two consecutive flag bytes indicate the end of one frame and start of the next one.One way to solve this problem is to have the sender's data link layer insert a special escape byte (ESC) just before each ''accidental'' flag byte in the data. The data link layer on the receiving end removes the escape byte before the data are given to the network layer. If an escape byte occurs in the middle of the data? The answer is that it, too, is stuffed with an escape byte. Thus, any single escape byte is part of an escape sequence, whereas a doubled one indicates that a single escape occurred naturally in the data.

Solution: A: 01000111; B: 11100011; FLAG: 01111110; ESC: 11100000Character (byte) stuffing: 01111110 01000111 11100011 11100000 11100000 11100000 01111110 01111110

3. Bit Stuffing:

The new technique allows data frames to contain an arbitrary number of bits and allows character codes with an arbitrary number of bits per character. It works like this. Each frame begins and ends with a special bit pattern, 01111110 (in fact, a flag byte). Whenever the sender's data link layer encounters five consecutive 1s in the data, it automatically stuffs a 0 bit into the outgoing bit stream. This bit stuffing is analogous to byte stuffing, in which an escape byte is stuffed into the outgoing character stream before a flag byte in the data.

Page 29: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

When the receiver sees five consecutive incoming 1 bits, followed by a 0 bit, it automatically destuffs (i.e., deletes) the 0 bit. Just as byte stuffing is completely transparent to the network layer in both computers, so is bit stuffing. If the user data contain the flag pattern, 01111110, this flag is transmitted as 011111010 but stored in the receiver's memory as 01111110.

Solution: A: 01000111; B: 11100011; FLAG: 01111110; ESC: 11100000

Bit Stuffing: 01111110 01000111 110100011 111000000 011111010 01111110

Experiment 7. To study about collision free protocols

Let's imagine 3 people with very similar voices, trying to communicate. If two of them start talking at the same time, the third person would hear a mixture of their voices and not understand a thing. This person will usually say "hey, not together! One of you must wait, while the second talks!"

Page 30: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

A similar thing happens with, say, 3 computers on one LAN segment. Computer A wants to send some information to computer B, and computer C wants to communicate with computer B also. The rule is that if one device is transmitting, other devices listen, and wait for the transmission to end, before they start transmitting themselves.But it may happen, that after a period of "silence", computers A and C decide to start "talking" at the same moment, and their signals collide on the network. The procedure is, that if they sense that a collision took place (by listening to their own transmission and "hearing", that the signal gets distorted), they both stop sending signals and wait a split second. The ingenious thing is, that each one waits for a randomly chosen time length, and hence one will restart transmission sooner and will be able to finish, because the rule is "one talks, rest listens".Collision free protocols A)Multiple access Protocols

ALOHA ALOHA, the earliest random access method was developed at the University of Hawaii in early 1970. It was designed for a radio (wireless) LAN, but it can be used on any shared medium. It is obvious that there are potential collisions in this arrangement. The medium is shared between the stations. When a station sends data, another station may attempt to do so at the same time. The data from the two stations collide and become garbled.

Pure ALOHA The original ALOHA protocol is called pure ALOHA. This is a simple, but elegant protocol. The idea is that each station sends a frame whenever it has a frame to send. However, since there is only one channel to share, there is the possibility of collision between frames from different stations. Figure shows an example of frame collisions in pure ALOHA.There are four stations (unrealistic assumption) that contend with one another for access to the shared channel. The figure shows that each station sends two frames; there are a total of eight frames on the shared medium. Some of these frames collide because multiple frames are in contention for the shared channel. Figure shows that only two frames survive: frame 1.1 from station 1 and frame 3.2 from station3. We need to mention that even if one bit of a frame coexists on the channel with one bit from another frame, there is a collision and both will be destroyed.It is obvious that we need to resend the frames that have been destroyed during transmission. The pure ALOHA protocol relies on acknowledgments from the receiver. When a station sends a frame, it expects the receiver to send an acknowledgment. If the acknowledgment does not arrive after a time-out period, the station assumes that the frame (or the acknowledgment) has been destroyed and resends the frame.A collision involves two or more stations. If all these stations try to resend their frames after the time out, the frames will collide again. Pure ALOHA dictates that when the timeout period passes, each station waits a random amount of time before resending its frame. The randomness will help avoid more collisions. We call this time the backoff time TB.

Pure ALOHA has a second method to prevent congesting the channel with retransmitted frames. After a maximum number of retransmission attempts Kmax' a station must give up and try later. Figure shows the procedure for pure ALOHA based on the above strategy.

Page 31: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Slotted ALOHA Pure ALOHA has a vulnerable time of 2 x Tfr . This is so because there is no rule that defines when the station can send. A station may send soon after another station has started or soon before another station has finished. Slotted ALOHA was invented to improve the efficiency of pure ALOHA.In slotted ALOHA we divide the time into slots of Tfr s and force the station to send only at the beginning of the time slot. Figure shows an example of frame collisions in slotted ALOHA.Because a station is allowed to send only at the beginning of the synchronized time slot, if a station misses this moment, it must wait until the beginning of the next time slot. This means that the station which started at the beginning of this slot has already finished sending its frame. Of course, there is still the possibility of collision if two stations try to send at the beginning of the same time slot. However, the vulnerable time is now reduced to onehalf, equal to Tfr.Slotted ALOHA vulnerable time = Tfr.

B) CSMA (Carrier Sense Multiple Access ): To minimize the chance of collision and, therefore, increase the performance, the CSMA method was developed. The chance of collision can be reduced if a station senses the medium before trying to use it. Carrier sense multiple access (CSMA) requires that each station first listen to the medium (or check the state of the medium) before sending. In other words, CSMA is based on the principle "sense before transmit" or "listen before talk."CSMA can reduce the possibility of collision, but it cannot eliminate it. The reason for this is shown in Figure, a space and time model of a CSMA network. Stations are connected to a shared channel

Page 32: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

(usually a dedicated medium).The possibility of collision still exists because of propagation delay; when a station sends a frame, it still takes time (although very short) for the first bit to reach every station and for every station to sense it. In other words, a station may sense the medium and find it idle, only because the first bit sent by another station has not yet been received.At time tI' station B senses the medium and finds it idle, so it sends a frame. At time t2 (t2> tI)' station C senses the medium and finds it idle because, at this time, the first bits from station B have not reached station C. Station C also sends a frame. The two signals collide and both frames are destroyed.

Persistence Methods

What should a station do if the channel is busy? What should a station do if the channel is idle? Three methods have been devised to answer these questions: the Ipersistent method, the nonpersistent method, and the ppersistent method. Figure shows the behavior of three persistence methods when a station finds a channel busy.

I Persistent :

The Ipersistent method is simple and straightforward. In this method, after the station finds the line idle, it sends its frame immediately (with probability I). This method has the highest chance of collision because two or more stations may find the line idle and send their frames immediately. We will see in Chapter 13 that Ethernet uses this method.

Non persistent :

In the nonpersistent method, a station that has a frame to send senses the line. If the line is idle, it sends immediately. If the line is not idle, it waits a random amount of time and then senses the line again. The nonpersistent approach reduces the chance of collision because it is unlikely that two or more stations will wait the same amount of time and retry to send simultaneously. However, this method reduces the efficiency of the network because the medium remains idle when there may be stations with frames to send.

p Persistent :

The ppersistent method is used if the channel has time slots with a slot duration equal to or greater than the maximum propagation time. The ppersistent approach combines the advantages of the other two strategies. It reduces the chance of collision and improves efficiency. In this method, after the station finds the line idle it follows these steps:

1. With probability p, the station sends its frame.2. With probability q = 1 p, the station waits for the beginning of the next time slot and checksthe line

again.a) If the line is idle, it goes to step 1.b) If the line is busy, it acts as though a collision has occurred and uses the backoff procedure

CSMA/CD(Carrier Sense Multiple Access with Collision Detection):The CSMA method does not specify the procedure following a collision. Carrier sense multiple access with collision detection (CSMA/CD) augments the algorithm to handle the collision.In this method, a station monitors the medium after it sends a frame to see if the transmission was successful. If so, the station is finished. If, however, there is a collision, the frame is sent again.To better understand CSMA/CD, let us look at the first bits transmitted by the two stations involved

Page 33: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

in the collision. Although each station continues to send bits in the frame until it detects the collision, we show what happens as the first bits collide. In Figure, stations A and C are involved in the collision.

Procedure :

Now let us look at the flow diagram for CSMAlCD in Figure. It is similar to the one for the ALOHA protocol, but there are differences.The first difference is the addition of the persistence process. We need to sense the channel before we start sending the frame by using one of the persistence processes we discussed previously (non persistent, Ipersistent, or ppersistent). The corresponding box can be replaced by one of the persistence processes shown in Figure.The second difference is the frame transmission. In ALOHA, we first transmit the entire frame and then wait for an acknowledgment. In CSMA/CD, transmission and collision detection is a continuous process. We do not send the entire frame and then look for a collision. The station transmits and receives continuously and simultaneously (using two different ports). We use a loop to show that transmission is a continuous process. We constantly monitor in order to detect one of two conditions: either transmission is finished or a collision is detected. Either event stops transmission. When we come out of the loop, if a collision has not been detected, it means that transmission is complete; the entire frame is transmitted. Otherwise, a collision has occurred.The third difference is the sending of a short jamming signal that enforces the collision in case other stations have not yet sensed the collision.

Throughput The throughput of CSMAlCD is greater than that of pure or slotted ALOHA. The maximum throughput occurs at a different value of G and is based on the persistence method and the value of p in the p persistent approach. For Ipersistent method the maximum throughput is around 50 percent when G =1. For nonpersistent method, the maximum throughput can go up to 90 percent when G is between 3 and 8.

Page 34: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Experiment 8. To perform a distance vector dynamic routing algorithm.

Consider any given subnet has a group of routers A, B, C, D, E, F uses distance vector routing algorithm. The following vectors have just come in to router C from router B: (5,0,8,12,6,2); from D: (16,12,6,0,9,10); and from E: (7,6,3,9,0,4). The measured delays to B, D, and E are 6, 3, and 5, respectively, show the C’s new routing table?

Distance vector routing, the leastcost route between any two nodes is the route with minimum distance. In this protocol, as the name implies, each node maintains a vector (table) of minimum distances to every node. The table at each node also guides the packets to the desired node by showing the next stop in the route (nexthop routing).

The table for node A shows how we can reach any node from this node. For example, our least cost to reach node E is 6. The route passes through C.

Initialization The tables in Figure are stable; each node knows how to reach any other node and the cost. At the beginning, however, this is not the case. Each node can know only the distance between itself and its immediate neighbours, those directly connected to it. So for the moment, we assume that each node can send a message to the immediate neighbours and find the distance between itself and these neighbours. Figure shows the initial tables for each node. The distance for any entry that is not a neighbour is marked as infinite (unreachable).

Sharing The whole idea of distance vector routing is the sharing of information between neighbours. Although node A does not know about node E, node C does. So if node C shares its routing table with A, node A can also know how to reach node E. On the other hand, node C does not know how to reach node D, but node A does. If node A shares its routing table with node C, node C also knows how to reach node D. In other words, nodes A and C, as immediate neighbours, can improve their routing tables if they help each other.

Page 35: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Updating

When a node receives a twocolumn table from a neighbour, it needs to update its routing table. Updating takes three steps:

1. The receiving node needs to add the cost between itself and the sending node to each value in the second column. The logic is clear. If node C claims that its distance to a destination is x mi, and the distance between A and C is y mi, then the distance between A and that destination, via C, is x + y mi.

2. The receiving node needs to add the name of the sending node to each row as the third column if the receiving node uses information from any row. The sending node is the next node in the route.

3. The receiving node needs to compare each row of its old table with the corresponding row of the modified version of the received table.

a. If the nextnode entry is different, the receiving node chooses the row with the smaller cost. If there is a tie, the old one is kept.

b. If the nextnode entry is the same, the receiving node chooses the new row. For example, suppose node C has previously advertised a route to node X with distance. Suppose that now there is no path between C and X; node C now advertises this route with a distance of infinity. Node A must not ignore this value even though its old entry is smaller. The old route does not exist anymore. The new route has a distance of infinity.

There are several points we need to emphasize here. First, as we know from mathematics, when we add any number to infinity, the result is still infinity. Second, the modified table shows how to reach A from A via C. If A needs to reach itself via C, it needs to go to C and come back, a distance of 4. Third, the only benefit from this updating of node A is the last entry, how to reach E. Previously, node A did not know how to reach E (distance of infinity); now it knows that the cost is 6 via C.Each node can update its table by using the tables received from other nodes. In a short time, if there is no change in the network itself, such as a failure in a link, each node reaches a stable condition in which the contents of its table remains the same.

Solution:Going via B gives (11, 6, 14, 18, 12, 8).Going via D gives (19, 15, 9, 3, 9, 10).Going via E gives (12, 11, 8, 14, 5, 9).Taking the minimum for each destination except C gives (11, 6, 0, 3, 5, 8).

Page 36: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Experiment 9: To compute a multicast spanning tree for router C in the following subnet for a group with members at routers A, B, C, D, E, F, I, and K.

Spanning Tree:A spanning tree is a subset of the subnet that includes all the routers but contains no loops. If each router knows which of its lines belong to the spanning tree, it can copy an incoming broadcast packet onto all the spanning tree lines except the one it arrived on. This method makes excellent use of bandwidth, generating the absolute minimum number of packets necessary to do the job. The only problem is that each router must have knowledge of some spanning tree for the method to be applicable. Sometimes this information is available (e.g., with link state routing) but sometimes it is not (e.g., with distance vector routing).

Solution: Multiple spanning trees are possible. One of them is:

Page 37: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Experiment 10: To perform the subnet for given organization.

A large number of IP address are available starting at 198.16.0.0 in SPCE organization. Suppose this organization CE, IT, ME and EC department request 4000, 2000, 4000 and 8000adresees, respectively, and in that order. For each of these find:

a) The first assigned IP address.b) The last assigned IP address.c) The mask in w.x.y.z / s notation.

A subnetwork, or subnet, is a logically visible subdivision of an IP network. The practice of dividing a network into two or more networks is called subnetting. The Subnetting is the process of designating some highorder bits from the host part and grouping them with the network mask to form the subnet mask. This divides a network into smaller subnets.

All computers that belong to a subnet are addressed with a common, identical, mostsignificant bit-group in their IP address. This results in the logical division of an IP address into two fields, a network or routing prefix and the rest field or host identifier. The rest field is an identifier for a specific host or network interface.

Solution: To start with, all the requests are rounded up to a power of two. The starting address, ending address, and mask are as follows:A: 198.16.0.0 – 198.16.15.255 written as 198.16.0.0/20B: 198.16.16.0 – 198.23.15.255 written as 198.16.16.0/21 C: 198.16.32.0 – 198.47.15.255 written as 198.16.32.0/20 D: 198.16.64.0 – 198.95.15.255 written as 198.16.64.0/19

Page 38: Experiment 1: To study about various networking commands  · Web view2018. 8. 30. · Because of this, bridges are typically fast at transferring data, but not as versatile as a

Experiment 11. To study about routing table:

A router has the following (CIDR) entries in its routing table:Address/mask Next hop

135.46.56.0/22 Interface 0

135.46.60.0/22 Interface 1

192.53.40.0/23 Router 1

Default Router 2

For each of the following IP addresses, what does the router do if a packet with that address arrives?

a. 135.46.63.10b. 135.46.57.14c. 135.46.52.2d. 192.53.40.7e. 192.53.56.7

Routing table, or routing information base (RIB), is a data table stored in a router or a networked computer that lists the routes to particular network destinations, and in some cases, metrics (distances) associated with those routes. The routing table contains information about the topology of the network immediately around it. The construction of routing tables is the primary goal of routing protocols. Static routes are entries made in a routing table by nonautomatic means and which are fixed rather than being the result of some network topology "discovery" procedure.The need to record routes to large numbers of devices using limited storage space represents a major challenge in routing table construction. In the Internet, the currently dominant address aggregation technology is a bitwise prefix matching scheme called Classless InterDomain Routing (CIDR).

Solution: The packets are routed as follows:(a) Interface 1(b) Interface 0(c) Router 2(d) Router 1(e) Router 2