Higher Institute for Computer & Term : Second Information ......can also retrieve their time from...

15
El-Shorouk Academy Acad. Year : 2010/ 2011 Higher Institute for Computer & Term : Second Information Technology Year : 3 rd Department of Information System No. Questions : 5 3201 Computer Networks (Final Exam) Question #1: a) Briefly describe the different types of hubs. 1- Passive Hubs - The function of a passive hub is simply to receive data from one port of the hub and send it out to the other ports. For example, an eight-port hub receives data from port 3 and then resends that data to ports 1, 2, 4, 5, 6, 7, and 8. - A passive hub contains no power source or electrical components, there is no signal processing (such as when the hub receives the electrical signal), and there is no regenerating of the signal to ensure that it is readable at the destination. - A passive hub simply attaches the ports internally and enables communication to flow through the network. Regeneration of the signal is a function of an active hub! 2- Active Hubs - An active hub provides the same functionality as a passive hub with an additional feature. - Active hubs rebuild (regenerate) the data before sending it to all of the destination ports on the hub. Using active hubs, you can increase the length of your network, because although the signal weakens with distance, when the active hub receives the signal, it rebuilds the data, allowing it once more to go a greater distance. It is important to remember that UTP cabling can be run a maximum of 100 meters. - With an active hub, you can run this type of cable 100 meters on each side of the hub. - An active hub has a power source and built-in repeaters to boost the signal. Extra electronics built into an active hub allow for signal regeneration. 3- Hybrid Hubs - A hybrid hub is a hub that can use many different types of cables in addition to UTP cabling. - A hybrid hub usually is cabled using thinnet or thicknet Ethernet along with popular cable types such as twisted-pair cabling. b) What is the function of a bridge?

Transcript of Higher Institute for Computer & Term : Second Information ......can also retrieve their time from...

Page 1: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

El-Shorouk Academy Acad. Year : 2010/ 2011

Higher Institute for Computer & Term : Second

Information Technology Year : 3rd

Department of Information System No. Questions : 5

3201 Computer Networks (Final Exam)

Question #1:

a) Briefly describe the different types of hubs.

1- Passive Hubs - The function of a passive hub is simply to receive data from one port of the hub and

send it out to the other ports. For example, an eight-port hub receives data from port 3 and then resends that data to ports 1, 2, 4, 5, 6, 7, and 8.

- A passive hub contains no power source or electrical components, there is no signal processing (such as when the hub receives the electrical signal), and there is no regenerating of the signal to ensure that it is readable at the destination.

- A passive hub simply attaches the ports internally and enables communication to flow through the network. Regeneration of the signal is a function of an active hub!

2- Active Hubs

- An active hub provides the same functionality as a passive hub with an additional feature.

- Active hubs rebuild (regenerate) the data before sending it to all of the destination ports on the hub. Using active hubs, you can increase the length of your network, because although the signal weakens with distance, when the active hub receives the signal, it rebuilds the data, allowing it once more to go a greater distance. It is important to remember that UTP cabling can be run a maximum of 100 meters.

- With an active hub, you can run this type of cable 100 meters on each side of the hub.

- An active hub has a power source and built-in repeaters to boost the signal. Extra electronics built into an active hub allow for signal regeneration.

3- Hybrid Hubs

- A hybrid hub is a hub that can use many different types of cables in addition to UTP cabling.

- A hybrid hub usually is cabled using thinnet or thicknet Ethernet along with popular cable types such as twisted-pair cabling.

b) What is the function of a bridge?

Page 2: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

- A bridge is a network connectivity device that is used to break the network down into multiple network segments.

- A bridge runs at layer 2, the data link layer, and is used to filter traffic by only forwarding traffic to the destination network segment.

c) State four features of a switch

- Spanning Tree Protocol (STP) o The Spanning Tree Protocol (STP) runs at layer 2 and is designed to prevent

loops on a network that could occur if you connect a number of switches together.

For example, a loop is created if you connect Switch1 to Switch2 and then turn around and connect Switch2 back to Switch1 using a different cable and ports on the switches.

o Having a loop on the network could cause the network to go down and creates instability in the switches. To prevent this, STP was designed.

o STP is a protocol that looks at all of the ports used to create a loop and then places one of those ports in a blocking state so that no data traffic can pass through the port.

o Once the port is in a blocking state, the loop is broken and the network becomes more stable.

o The fact that the port is in a blocking state instead of being disabled means that if one of the other links go down, then the port is transitioned into a forwarding state automatically.

o When a port is in a forwarding state, it is allowed to send and receive data on the port.

- Trunking

o Trunking is a feature on Cisco switches that allows you to connect the switches together and then assign one of the ports as a trunk port.

o The trunk port is the port that is used to carry VLAN traffic to the other switch. VLANs are allowed to contain ports as members that are from multiple switches.

o If data is destined for all systems in the VLAN, the VLAN identification information is added to the data packet and then the switch sends the packet out the trunk port.

o When another switch receives the packet, it checks the VLAN identification information and then sends the data to all of its ports that are a member of that particular VLAN.

- ISL and 802.1Q

Page 3: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

o When a switch assigns the VLAN identification information to a packet, this is known as tagging. Two popular protocols for tagging are the Inter- Switch Link (ISL) and the IEEE 802.1Q protocol.

o ISL is the Cisco proprietary protocol for tagging packets and associating them with a particular VLAN on older switches, while 802.1Q is the IEEE standard for VLAN trunking. Newer Cisco and Juniper Networks switches use 802.1Q as the tagging method.

- Port Mirroring o Port mirroring, also known as port monitoring, is a feature that allows the

switch to send a copy of data that reaches certain ports to the mirrored, or monitored, port.

o Port monitoring allows an administrator to plug his/her workstation into the port that the copy of the data is being sent to, and monitor the network traffic.

o Port mirroring is an important feature of a switch because by default the switch filters traffic by only sending the data to the port that the destination system resides on. The switch’s filtering feature will prevent the monitoring of traffic, and as a result the administrator will have to enable port mirroring (monitoring) and specify the port that receives the copy of data.

- Port Authentication

o Port authentication is another important feature of the switch that allows the administrator to associate the MAC address of the system that will connect to the port.

o The administrator can also specify that if a system with a different MAC address connects to the port, the port is to be automatically disabled.

o Port authentication will help increase the security of the network by allowing only authorized systems to connect to the network—a critical feature of any switch!

- Content Switch o A content switch is a special switch that is designed for optimizing data

delivery to clients by incorporating features to improve performance such as data caching or load balancing features on the switch. Here is an example of how the switch can load-balance traffic: if you connect two servers into the switch, the switch creates a virtual server using a virtual IP, and when a request comes in to the virtual IP, the switch then forwards the request to one of the servers connected to the switch. The result is that the load is balanced across both servers and performance is increased.

d) What is meant by the following terms: (ARP, HTTP, HTTPs, NTP, SMTP, FTP, SSH)

Address Resolution Protocol The Address Resolution Protocol (ARP) provides IP address–to–physical address resolution on a TCP/IP network. To accomplish this feat, ARP sends out a broadcast message with an

Page 4: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

ARP request packet that contains the IP address of the system it is trying to find. All systems on the local network see the message, and the system that owns the IP address for which ARP is looking replies by sending its physical address to the originating system in an ARP reply packet. The physical/IP address combo is then stored in the ARP cache of the originating system for future use. All systems maintain ARP caches that include IP address–to–physical address mappings. The ARP cache is always checked for an IP address–to–physical address mapping before initiating a broadcast. You can learn more about the ARP utility and other related TCP/IP utilities.

HTTP and HTTPS - The Hypertext Transfer Protocol (HTTP) is the protocol used on the Internet to allow

clients to request web pages from web servers and to allow client interaction with those web servers.

- HTTP is a stateless protocol, meaning that the web servers are not aware of what a client has or has not requested and cannot track users who have requested specific content. This system does not allow for good interaction with the web server but does allow for retrieving the HTML pages stored on web sites. To aid in tracking client requests, we use cookies—small files stored on the client computer that allow the web server to store data on the client that the client will send back with each request to the server.

- The Hypertext Transfer Protocol, Secure (HTTPS) allows you to connect to a web site and receive and send content in an encrypted format using the Secure Sockets Layer (SSL).

- HTTPS is most commonly used on e-commerce sites to allow you to send personal information without worrying that an Internet hacker is viewing this information, especially credit card numbers and other confidential data. You can determine when HTTPS is being used because the address of the web site starts with https:// and not http://, which marks the regular HTTP protocol. Another sign that HTTPS is in use: In Internet Explorer, a lock appears in the status bar of a page; the lock is either closed or locked.

- Normally, HTTPS is not used for an entire e-commerce site, because the encryption and decryption processes slow the connection time, so only the part of the site that requests personal information uses HTTPS.

Network Time Protocol (NTP) - The Network Time Protocol (NTP) is used to synchronize the clocks of PCs on a

network or the Internet. This is accomplished by configuring a server to be the time server, which then is the server from which all other PCs on the network On earlier Windows networks, you can manage time synchronization by placing a command in a logon script to synchronize the time on the client with the time server.

- Use the following command: NET TIME \\computername /SET

- Newer Microsoft networks, such as Active Directory networks, have the PDC emulator provide the time to all servers and clients automatically, so there is no need to create a logon script for the clients to synchronize the time with the time server. PDC emulators can also retrieve their time from Internet NTP servers. Time servers on the Internet allow you to synchronize your PC’s clock with the exact time kept by atomic clocks.

Page 5: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

The time synchronization takes into account time zone settings of your operating system and allows you to synchronize with a time server even if it is not set for your local time zone.

Simple Mail Transfer Protocol (SMTP) - The Simple Mail Transfer Protocol (SMTP) is used to send or route mail over a

TCP/IP network such as the Internet. Most e-mail server products support SMTP in order to send e-mail out of the corporation and onto the Internet.

File Transfer Protocol (FTP)

- The File Transfer Protocol (FTP) is a TCP/IP protocol that exists to upload and download files between FTP servers and clients. Like Telnet and Ping, FTP can establish a connection to a remote computer using either the hostname or the IP address and must resolve hostnames to IP addresses to establish communication with the remote computer.

- When TCP/IP is installed on the system, there is an FTP utility available, but there are also a number of third-party graphical user interface (GUI) FTP clients available for all operating systems. If you use FTP a great deal, a GUI FTP client could save you a lot of time and frustration in dealing with FTP commands.

Secure Shell (SSH) - The Secure Shell (SSH) is a program used to create a shell, or session, with a remote

system. Once the remote session is established, the client can execute commands within this shell and copy files to the local system. SSH has a major purpose in life, and that is to support remote shells with support for secure authentication and encrypted communication.

Page 6: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

Question #2:

a) Explain the different types of channel allocation techniques 1- Static Channel Allocation:

The traditional way of allocating a single channel, such as a telephone trunk,

among multiple competing users is Frequency Division Multiplexing (FDM). If

there are N users, the bandwidth is divided into N equal-sized portions, each user

being assigned one portion. Since each user has a private frequency band, there is

no interference between users. When there is only a small and constant number of

users each of which has a heavy (buffered) load of traffic (e.g., carriers' switching

offices), FDM is a simple and efficient allocation mechanism.

2- Dynamic Channel Allocation:

Station Model: The model consists of N independent stations (e.g., computers,

telephones, or personal communicators), each with a program or user that

generates frames for transmission. Stations are sometimes called terminals. Once

a frame has been generated, the station is blocked and does nothing until the

frame has been successfully transmitted.

Single Channel Assumption: A single channel is available for all communication. All stations can transmit on it and all can receive from it.

Collision Assumption: If two frames are transmitted simultaneously, they overlap in time and the resulting signal is garbled. This event is called a collision. All stations can detect collisions. A collided frame must be transmitted again later.

4a. Continuous Time: Frame transmission can begin at any instant. There is no master clock dividing time into discrete intervals.

4b. Slotted Time: Time is divided into discrete intervals (slots). Frame transmissions always begin at the start of a slot. A slot may contain 0, 1, or more frames, corresponding to an idle slot, a successful transmission, or a collision, respectively.

Page 7: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

5a. Carrier Sense: Stations can tell if the channel is in use before trying to use it. If the channel is sensed as busy, no station will attempt to use it until it goes idle.

5b. No Carrier Sense: Stations cannot sense the channel before trying to use it. They just go ahead and transmit. Only later can they determine whether the transmission was successful.

b) Explain meaning of terms , T, a and write the vulnerable time of ALOHA, CSMA/CD

Ƭ : end to end propagation delay , Ƭ = ( )

( )

T: time of packet transmission , T = ( )

(

)

a : normalized end to end propagation delay , a=

write the vulnerable time of ALOHA, CSMA/CD

Pure ALOHA = 2T

ALOHA

Slotted ALOHA = T

CSMA/CD vulnerable time = 2 T

c) Drive the equation of the throughput for the slotted ALOHA and draw its G-S curve The throughput for the slotted ALOHA :-

Pk(t) = ( )

S=Throughput = InputRate * prob. Of success = p0(t) T=1

P0(t)=e-G

S=Ge-G

Page 8: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

To get max throughput

Ds/dG = G (-1) e-G+e-G(1)=0

Gmax=1

Smax= e-1 = 1/e = 0.36

d) Define the term channel capacity and draw its curve against number of users N

channel capacity = maximum Throughput

Channel capacity

0.96 CSMA/CD

0.76 CSMA

0.36 Slotted ALOHA

And the best technique is hub polling which has the maximum throughput

Page 9: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

e) Explain the protocol CSMA/CD

CSMA / CD Protocol:

if two stations sense the channel to be idle and begin transmitting

simultaneously, they will both detect the collision almost immediately. Rather

than finish transmitting their frames, which are irretrievably garbled anyway,

they should abruptly stop transmitting as soon as the collision is detected.

Quickly terminating damaged frames saves time and bandwidth.

At the point marked t0, a station has finished transmitting its frame. Any other

station having a frame to send may now attempt to do so. If two or more stations

decide to transmit simultaneously, there will be a collision. Collisions can be

detected by looking at the power or pulse width of the received signal and

comparing it to the transmitted signal.

After a station detects a collision, it aborts its transmission, waits a random

period of time, and then tries again, assuming that no other station has started

transmitting in the meantime.

Question #3: a) write a pseudo code for the one-bit sliding window protocol, Explain, the term

piggybacking.

A) Pseudo code for the one bit sliding window protocol

S1 : send seq =0

Rec seq = 0

S2 : From host (Buffer)

S3 : generate Frame to be sent having

S.Info= Buffer

S.seq=sendseq

S.ack=1- recseq

S4 : F(S)

S5 : start timer (S.seq)

S6 : wait ( event ={ Frame arrival| ChkSumErr|Timeout})

S7 : event <> frame Arrival S12 | S4

S8 : get F( r )

Page 10: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

S9 : if r.seq= rec.seq then ( toHost ( r.Info); rec.seq=rec.seq )

S10 : if r.ack=send.seq then ( fromHost ( Buffer); sendseq=sendseq )

S11 : S.info = buffer

S.seq=send.seq

S13 : startTimer ( s.seq )

S14 : goto S6

Explain the term piggybacking: when data frame arrive at an IMP ,instead of immediately sending a separate control ( ack ) frame .the IMP at the reciver wait until the host has data message to be send to and the acknowledge is attached to the outgoing data frame ( using ack field ) in the frame header.

Piggybacking:

When a data frame arrives, instead of immediately sending a separate control frame, the

receiver restrains itself and waits until the network layer passes it the next packet. The

acknowledgement is attached to the outgoing data frame (using the ack field in the

frame header). In effect, the acknowledgement gets a free ride on the next outgoing data

frame. The technique of temporarily delaying outgoing acknowledgements so that they

can be hooked onto the next outgoing data frame is known as piggybacking.

b) Write the normal scenario where you have two terminals A and B interchange

packets between them. A starts first, stop when B gets 5 successful packets.

A gets(1,1,B3) A sends(0,1,A4)

B gets(0,1,A4)

Page 11: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

c) Write the abnormal scenario where both sides A & B simultaneously send an initial packet. Stop after each side receives three successful packets.

A gets(0,1,B2) A sends(0,1,A2) B sends(1,0,B3)

B gets(0,1,A2)

Question #4 a) Write briefly the ISO-OSI reference model and state the objective of the

different layers.

ISO-OSI Reference model: the OSI reference model is based on a proposal of develop by ISO

(international standard organization ) of the first stop toward. The OSI (open system

interconnection ) because it deal with open system that system is open for communication with

other systems.

-ISO-OSI model has 7 layers which implement the following:

1- physical layer: transmit stream of bits over communication channel.

2- Data link layer: create and recognize frame boundaries.

3- network layer : determine routing stratigies between IMPs.

4-Transport layer: which may be one of two main types:

- Virtual circuit: deliver packets inorder.

- Datagram: deliver packets randomly

5-session layer: user interface with the network

Page 12: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

6- presentation layer: (text compression-encryption-incompatible formats or files of different

hosts).

7-Application layer: manages the distributed DB or distributed processing.

b) What is the essential difference between message and packet switching?

- Circuit Switching:

The switching equipment within the telephone system seeks out a physical path all the

way from your telephone to the receiver's telephone

- Message Switching:

When this form of switching is used, no physical path is established in advance between sender and receiver. Instead, when the sender has a block of data to be sent, it is stored in the first switching office (i.e., router) and then forwarded later, one hop at a time. Each block is received in its entirety, inspected for errors, and then retransmitted. A network using this technique is called a store-and-forward network,

- Packet Switching:

There is no limit at all on block size, which means that routers (in a modern system) must have disks to buffer long blocks. It also means that a single

Page 13: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

c) State the difference between the computer networks and distributed system.

d) What is meant by reliable and unreliable connection and when you can use one of them,

Reliable means data never lost ,its done through acknowledge sent from the receiver to the

sender.

- Acknowledge process introduces overheads and delayes

- Some times acknowledge not accepted such as digitized voice traffic

Unreliable : means ( no acknowledge) connectionless services are often called datagram

service.

Question #5: a) Write down the law to determine the maximum bit rate to transmit binary

data for noiseless and noise channels. For noiseless channel

For noisy channel

Page 14: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow

b) Calculate the maximum bit rate for a noiseless 6-KHz channel. a noiseless 6-kHz channel cannot transmit binary (i.e., two-level) signals at a rate exceeding 12000 bps.

c) Calculate the max. bit rate for a noise 3-KHz channel with a signal to noise ratio of 30 dB. A channel of 3-KHz bandwidth with a signal to thermal noise ratio of 30 dB (typical parameters of the analog part of the telephone system) can never transmit much more than 30,000 bps, no matter how many or how few signal levels are used and no matter how often or how infrequently samples are taken.

d) Compare between INTERNET, ITRANET and EXTRANET. o Internet:

An Internet application is build if the information is exposed to everyone

in the world.

Uses Internet protocols such as ―HTTP, FTP, or SMTP‖ & is

available to persons anywhere on the Internet

Is a way to extend who the application can reach

o Intranet:

Applications are on Intranet if it is using Internet protocols such as

―HTTP & FTP‖ but the application is available only within the company

Information would not be accessible to persons on the Internet because it

is not for public use.

o Extranet:

Application that has been built for the company’s intranet & used by

internal employees will need to be extended to select business partners or

customers.

Page 15: Higher Institute for Computer & Term : Second Information ......can also retrieve their time from Internet NTP servers. Time servers on the Internet Time servers on the Internet allow