Sunteți pe pagina 1din 15

Assignment # 4

Assigned Date: - 27-05-2020


Submission Date:-31-05-2020

Summer Semester 2020

Degree:BS(CS)

NAME: ABDULLAH NOOR

Roll Number: 2K15BSCS204

Course Name:Computer Communication & Networks

Course Code:CS-311

Instructor:Assistant Professor Muhammad NamanChaudhry

NFC-Institute of Engineering and Technology, Multan


Assignment no.3 (Theory)

Note: Attempt all questions. Any type of plagiarism strictly prohibited.


If any found, according to institute policy necessary actions will be
taken. At least punishment is carrying zero marks in Sessional.
Q1: Define framing and the reason for its need.
ANSWER:
 Bits are packed into frames of manageable size
 Framing in the data link layer adds sender address and destination address, as well as other
control bits
 A message can be packed in one or multiple frames
 Frame size is kept such that flow and error control become efficient

Q2: Compare and contrast byte-oriented and bit-oriented protocols. Which categoryhas been
popular in the past (explain the reason)? Which category is popular now(explain the reason)?
Byte-oriented protocol
 Data to be carried are 8-bit characters from a coding system, e.g., ASCII code
 Character-oriented protocols were popular when only text was exchanged by the data link
layers

Bit-oriented protocol

 Data section of a frame is a sequence of bits


 More popular today, because, we need to send text, graphic, audio, and video which can be
better represented by a bit pattern than a sequence of characters

Q3: Compare and contrast byte-stuffing and bit-stuffing. Which technique is used inbyte-oriented
protocols? Which technique is used in bit-oriented protocols?

Byte stuffing –
A byte (usually escape character(ESC)), which has a predefined bit pattern is added to the data section of the frame
when there is a character with the same pattern as the flag. Whenever the receiver encounters the ESC character,
it removes from the data section and treats the next character as data, not a flag.
But the problem arises when the text contains one or more escape characters followed by a flag. To solve this
problem, the escape characters that are part of the text are marked by another escape character i.e., if the escape
character is part of the text, an extra one is added to show that the second one is part of the text.
Example:
Note – Point-to-Point Protocol (PPP) is a byte-oriented protocol.
Bit stuffing –
Mostly flag is a special 8-bit pattern “01111110” used to define the beginning and the end of the frame.
Problem with the flag is the same as that was in case of byte stuffing. So, in this protocol what we do is, if we
encounter 0 and five consecutive 1 bits, an extra 0 is added after these bits. This extra stuffed bit is removed from
the data by the receiver.
The extra bit is added after one 0 followed by five 1 bits regardless of the value of the next bit. Also, as the sender
side always knows which sequence is data and which is flag it will only add this extra bit in the data sequence, not
in the flag sequence.
Example:

Note – High-Level Data Link Control(HDLC) is a bit-oriented protocol .

Q4: Compare and contrast flow control and error control.

Basic Flow control is meant for the Error control is meant for delivering the error-free data to the

proper transmission of the data receiver.

from sender to the receiver.

Approac Feedback-based flow control and Parity checking, Cyclic Redundancy Code (CRC) and checksum are

h rate-based flow control are the the approaches to detect the error in data. Hamming code,
approaches to achieve the proper Binary Convolution codes, Reed-Solomon code, Low-Density

flow control. Parity Check codes are the approaches to correct the error in

data.

Impact avoid overrunning of receivers Detects and correct the error occurred in the data.

buffer and prevents the data loss.

Q5: Compare and contrast the Go-Back-NARQ Protocol with Selective-RepeatARQ.


Go-Back-NARQ Selective-RepeatARQ

In Go-Back-N Protocol, if the sent frame In selective Repeat protocol,

are find suspected then all the frames are only those frames are re-

1 re-transmitted from the lost packet to transmitted which are found

. the last packet transmitted. suspected.

2 Sender window size of Go-Back-N Sender window size of selective

. Protocol is N. Repeat protocol is also N.

3 Receiver window size of Go-Back-N Receiver window size of

. Protocol is 1. selective Repeat protocol is N.

4 Selective Repeat protocol is

. Go-Back-N Protocol is less complex. more complex.

In selective Repeat protocol,

5 In Go-Back-N Protocol, neither sender receiver side needs sorting to

. nor at receiver need sorting. sort the frames.

Efficiency of selective Repeat

Efficiency of Go-Back-N Protocol is protocol is also


6
N/(1+2*a) N/(1+2*a)
.

7 In Go-Back-N Protocol, type of In selective Repeat protocol,

. Acknowledgement is cumulative. type of Acknowledgement is


individual.

Q6: Compare and contrast HDLC with PPP. Which one is byte-oriented; which one isbit-oriented?

1. The HDLC is a bit-oriented protocol while PPP is byte-oriented as well as bit oriented because it can be
sent over the dial-up modem lines and also true bit-oriented HDLC.
2. Only synchronous media can be used in HDLC. In contrast, PPP can work with synchronous and
asynchronous media.
3. No link authentication is provided in HDLC, whereas it is provided in PPP.
4. PPP can dynamically assign and frees up the IP address according to the use. As against, this not the case
in HDLC.
5. Interoperability between the non-cisco devices in HDLC is not achievable. However, this limitation of
HDLC is eliminated from the PPP protocol.

Q7: Define piggybacking and its usefulness.

A technique called piggybacking is used to improve the efficiency of the bidirectional protocols.
When a frame is carrying data from A to B, it can also carry control information about arrived (or
lost) frames from B; when a frame is carrying data from B to A, it can also carry control information
about the arrived (or lost) frames from A.

 The major advantage of piggybacking is better use of available channel bandwidth.


 The major disadvantage of piggybacking Additional complexity  and If the data link layer
waits too long before transmitting the acknowledgement, then re-transmission of frame
would take place.

Q8: How is the preamble field different from the SFD field?
ANSWER

1. The preamble is a 56-bit field that provides an alert and timing pulse. It is added to the frame at
the physical layer and is not formally part of the frame.

2. SFD is a one byte field that serves as a start of frame. SFD is not serving as the synchronization
but preamble does this between source and receiver.
Q9: What is the purpose of an NIC?
ANSWER
A network interface card (NIC) is a hardware component without which a computer cannot be
connected over a network. It is a circuit board installed in a computer that provides a dedicated network
connection to the computer. It is also called network interface controller, network adapter or LAN
adapter.
Purpose
 NIC allows both wired and wireless communications.
 NIC allows communications between computers connected via local area network (LAN) as well
as communications over large-scale network through Internet Protocol (IP).
 NIC is both a physical layer and a data link layer device, i.e. it provides the necessary hardware
circuitry so that the physical layer processes and some data link layer processes can run on it.

Q10: What is the difference between a unicast, multicast, and broadcast address?
ANSWER

The cast term here signifies some data(stream of packets) is being transmitted to the recipient(s) from
client(s) side over the communication channel that help them to communicate. Let’s see some of the
“cast” concepts that are prevailing in the computer networks field.

1. Unicast –

This type of information transfer is useful when there is a participation of single sender and single
recipient. So, in short you can term it as a one-to-one transmission. For example, a device having IP
address 10.1.2.0 in a network wants to send the traffic stream (data packets) to the device with IP
address 20.12.4.2 in the other network, then unicast comes into picture. This is the most common form
of data transfer over the networks.
2. Broadcast –

Broadcasting transfer (one-to-all) techniques can be classified into two types :


 Limited Broadcasting –
Suppose you have to send stream of packets to all the devices over the network that you reside,
this broadcasting comes handy. For this to achieve,it will append 255.255.255.255 (all the 32 bits of
IP address set to 1) called as Limited Broadcast Address in the destination address of the datagram
(packet) header which is reserved for information tranfer to all the recipients from a single client
(sender) over the network.

 Direct Broadcasting –
This is useful when a device in one network wants to transfer packet stream to all the devices over
the other network.This is achieved by translating all the Host ID part bits of the destination address
to 1,referred as Direct Broadcast Address in the datagram header for information transfer.

This mode is mainly utilized by television networks for video and audio distribution.
One important protocol of this class in Computer Networks is Address Resolution Protocol (ARP) that is
used for resolving IP address into physical address which is necessary for underlying communication.
3. Multicast –

In multicasting, one/more senders and one/more recipients participate in data transfer traffic. In this
method traffic recline between the boundaries of unicast (one-to-one) and broadcast (one-to-all).
Multicast lets server’s direct single copies of data streams that are then simulated and routed to hosts
that request it. IP multicast requires support of some other protocols like IGMP (Internet Group
Management Protocol), Multicast routing for its working. Also in Classful IP addressing Class D is
reserved for multicast groups.

Q11: What are the advantages of dividing an Ethernet LAN with a bridge?
ANSWER:
The Advantages of a Network Bridge. A network bridge, or a layer 2 switch, connects two
different local area networks (LAN) or segments of the same LAN. A bridge is used to segregate data
by dividing it into two streams. This way it effectively reduces the traffic flow over a LAN
A bridge can raise the bandwidth and separate collision domains. "There are many varieties
of Ethernet ironware now available. Such net gear involves modems, changes, hubs as well
as bridges. "

Q12: What is the relationship between a switch and a bridge?

BASIS FOR
BRIDGE SWITCH
COMPARISON

Basic A bridge can connect fewer LAN. A switch can connect more

networks compared to the bridge.

Buffer Bridges do not have buffers. Switch has a buffer for each link

connected to it.

Types Simple bridge, multiport bridge Store-and-forward switch and cut-

and transparent bridge. through switch.

Error Bridges do not perform error Switches perform error checking.

checking.
Q13: Why is there no need for CSMA/CD on a full-duplex Ethernet LAN?
ANSWER:
Everyone can send and receive signals by connecting each and every station to switch using different
cables. In CSMA/CD full duplex the link is the link is point to point dedicated between the stations.
 for a full duplex transmission the chance for collision as well as contention is less compared to half duplex.
 it is because, everyone can send and recieve datas independantly.
 so there is no chance for carrier sensing and collision detection.
 it makes no need for CSMA/CD on a full-duplex Ethernet LAN.

Q14: Compare the data rates for Standard Ethernet, Fast Ethernet, Gigabit Ethernet, andTen-Gigabit
Ethernet.
ANSWER:

Ethernet are several types:


1. Fast Ethernet
2. Gigabit Ethernet
3. Switch Ethernet
Fast Ethernet is the Successor of 10-Base-T Ethernet. It is more popular than Gigabit Ethernet because
its congiguration and implementation is simple. It is faster than its successors. Its variants are:
1. 100Base-T4
2. 100Base-Tx
3. 100Base-Fx
The coverage limit of Fast Ethernet is up to 10 km and its round-trip delay in Fast Ethernet is 100 to 500
bit times.

Gigabit Ethernet is the successor of Fast Ethernet. It can produces upto 1 Gbps speed. It is less popular
than Fast Ethernet because its configuration and implementation is complicated than Fast Ethernet. The
coverage limit of Gigabit Ethernet is up to 70 km.
S.N

O FAST ETHERNET GIGABIT ETHERNET

Fast Ethernet provides 100 Mbps Gigabit Ethernet offers 1 Gbps

1. speed. speed.

Fast Ethernet is simple While Gigabit Ethernet is more

2. configured. complicated than Fast Ethernet.

Fast Ethernet generate more Gigabit Ethernet generate less

3. delay comparatively. delay than Fast Ethernet.

The coverage limit of Fast While the coverage limit of

4. Ethernet is up to 10 km. Gigabit Ethernet is up to 70 km.

While the round-trip delay in

The round-trip delay in Fast Gigabit Ethernet is 4000 bit

5. Ethernet is 100 to 500 bit times. times.

Fast Ethernet is the Successor of While Gigabit Ethernet is the

6. 10-Base-T Ethernet. successor of Fast Ethernet

Q15: How is a repeater different from an amplifier?


ANSWER:
Both Repeater and Amplifier are an electronic devices.
Repeater:
Repeater is used for regenerating the signal and then transmit, if the previously transmit signal is found
weak. Repeater takes high input power and provides low output power. The noise of signal can also be
reduced by regenerating the signal.
Amplifier:
Amplifier is used for increases the amplitude or strength of the signal, if the previously transmit signal is
found weak. It takes low input power and provides high output power.

Difference Between Repeater and Amplifier:


The main difference between repeater and amplifier is that repeater is used as a regenerate the signal
and amplifier just increases the amplitude of the signal.

REPEATER AMPLIFIER
Repeater regenerates the signal, if Amplifier increases the

1. the provided original signal is weak. amplitude of the signal.

Amplifier takes low input

Repeater takes high input power power and provides high

2. and provides low output power. output power.

Amplifier is generally used in

Repeater is generally used in Mobile and Remote area

3. static(stationary) environment. network.

Repeater regenerates the signal so Amplifier increases the

that the noise can be reduced or amplitude of the signal with

4. eliminated. the noise.

Repeater works on the physical Generally Amplifier is used in

5. layer of OSI model. wireless communication

Q16: What do we mean when we say that a bridge can filter traffic? Why is filtering important?
ANSWER:
Bridge is used to connect 2 networks using different protocols Bridge checks the MAC addresses contained in
the frame. A bridge has an ability of filtering traffic. It can check the destination address of a frame and decide
if the frame has to be forwarded or dropped. if the frame has to be forwarded it links the port number with
the address. Filtering is very important in network point of view because it can block unwanted traffic that can
harm the network. 

Q17: What is a transparent bridge?


ANSWER:
Transparent bridges are devices which connects more than one network segments with other bridges to
make all routing decisions. A transparent bridge is essentially used to learn the MAC addresses of
all nodes and their associated port, to filter incoming frames whose destination MAC addresses are
located on the same incoming port, and to forward incoming frames to the destination MAC through
their associated port
There are two types of Transparent Bridge Modes:
 Store-and-Forward: Stores the entire frame and verifies the CRC before forwarding the frame. If
a CRC error is detected, the frame is discarded.
 Cut-Through: Forwards the frame just after it reads the destination MAC address without
performing a CRC check

Q18: How does a repeater extend the length of a LAN?


ANSWER:
For a wired LAN, the signals deteriorate when they pass over a certain distance. For Ethernet this is
generally 100 metres although there are exceptions. The repeater, often an Ethernet switch, captures
the packet validates it and if it is okay it transmits it onto the next section. If the packet is corrupt it is
discarded. Each repeater introduces a delay equal to the time taken to for it to arrive and be validated.

For a wireless LAN, the signals not only deteriorate with distance, but they also can be corrupted by
interference from other wireless sources. For WiFi, 100 metres outdoors and perhaps less than 10
metres indoors may apply, but unlike a wired connection there are many factors that can affect how far
a signal can travel. A wireless repeater works in a similar manner to a wired repeater. It stores and
validates a packet and transmits it if it is still valid

Q19: What is the difference between a forwarding port and a blocking port?
ANSWER:
Port forwarding:
New connections from the outside to a certain port or port range go to a designated LAN
machine. The ports are determined by the kind of server you want to run, (e.g. 80 for a web
server) and the IP is the private LAN IP of your web server.
Blocking Port : new connections from the outside to a certain port go to whatever LAN machine
made a certain outgoing connection (as defined by destination port)

Q20: What is the difference between a bus backbone and a star backbone?
ANSWER:

 Bus backbone:
In a bus backbone, the topology of the backbone is a bus. The backbone itself can use
One of the protocols that support a bus topology such as  lOBase5 or  lOBase2.
In a bus backbone, the topology of the backbone is a bus.
Bus backbones are normally used as a distribution backbone to connect different
Buildings in an organization . Each building can comprise it her a single LAN or
Another backbone  (normally a star backbone). A good example of a bus backbone is
One that connects single-or multiple-floor buildings on a campus. Each single-floor
Building usually has a single LAN. Each multiple-floor building has a backbone (usually a star) that connec
ts each LAN on a floor. A bus backbone can interconnect these
LAN sand backbones. Figure shows an example of a bridge-based backbone with
Four LANs.

In Figure, if a station in a LAN needs to send a frame to another station in the same LAN, the correspondi
ng bridge blocks the frame; the frame never reaches the backbone. However, if a station needs to send 
a frame to a station in another LAN, the bridge passes the frame to the backbone, which is received by t
he appropriate bridge and is delivered to the destination LAN. Each bridge connected to the backbone h
as a table that shows the stations on the LAN side of the bridge. The blocking or delivery of a frame is ba
sed on the contents of this table.
Star Backbone
In a star backbone, sometimes called a collapsed or switched backbone, the topology of the backbone is 
a star. In this configuration, the backbone is just one switch (that is why it is called, erroneously, a collap
sed backbone) that connects the LANs. In a star backbone, the topology of the backbone is a star; the ba
ckbone is just one switch. Figure shows a star backbone. Note that, in this configuration, the switch does 
the job of the backbone and at the same time connects the LANs.
Star backbones are mostly used as a distribution backbone inside a building. In a multi floor building, we 
usually find one LAN that serves each particular floor. A star backbone connects these LANs. The backbo
ne network, which is just a switch, can be installed in the basement or the first floor, and separate cable
s can run from the switch to each LAN. If the individual LAN shave a physical star topology, either the hu
bs (or switches) can be installed in a closet on the corresponding floor, or all can be installed close to the 
switch. We often find a rack or chassis in the basement where the backbone switch and all hubs or switc
hes are installed.

Q21: How does a VLAN provide extra security for a network?


ANSWER:
VLANs improve network security. It’s just a layer of security. Every secure system must consist of many
layers of security.
There are also exploits that can allow VLAN hopping if your network is not configured correctly.

VLANs purpose isn’t just security. VLANs is very important for management purposes (QoS, Broadcast
domains, ..etc).

How VLANs help in securing networks?

VLANs offer the ability to keep data packets from multiple networks separated. Organizations who wish
to utilize wireless Internet in their workspace, yet still wish to maintain a private and secure network can
utilize VLANs to achieve this goal. Take the example below where two networks exist: 10.81.44.X and
192.168.1.X. The 10.81.44.X network is a private network that contains critical file servers, e-mail
servers, and potentially private data that should only be accessed by internal employees. If the company
simply attached a wireless router to this network, anyone with some computer knowledge could easily
hack into the router from within the wireless range and access this private data network. This is where
VLANs and the 192.168.1.X network come into play. On the company’s switch, a VLAN can be created
specifically for the new wireless network of 192.168.1.X. These ports on the switch associated with the
wireless VLAN would communicate only to the Internet and traffic would never pass between the two
networks. A router would need to be placed in the middle of these two networks in order for the two to
communicate. As a switch does not function as a router, the packets pass only to those ports associated
with the same VLAN and function as if there are two physical networks in place.
Q:22 What is the basis for membership in a VLAN?
ANSWER:
VLAN Membership A virtual LAN (VLAN) is an administratively defined broadcast domain logically
segmented by function, team, or application that enhances performance by limiting traffic to stations in
the same VLAN; traffic to other VLANs is blocked. By default, a switch is configured with a single VLAN
that contains only static-access ports.

Assigning Static-Access Ports to VLANs

By default, all ports are static-access ports assigned to VLAN 1. If you change the VLAN ID, use
VLAN IDs in the range of 1 to 1001. Four VLAN IDs are reserved, 1002 to 1005. Static access
ports cannot be assigned to multiple VLANs, so if you plan to move a port connection from one
switch to another, configure the port for dynamic VLAN membership or as a trunk port to avoid
reconfiguring it.

Assigning Dynamic-Access Ports to VLANs

Dynamic-access ports function as the VLAN Query protocol (VQP) client that queries the
VLAN Membership Policy Server (VMPS). Assign dynamic-access ports to only one VLAN and
connect them only to end stations. Be sure to configure the network so that STP does not
put the dynamic-access port into an STP blocking state

S-ar putea să vă placă și