darshan inst. of engg. & tech. computer network … layer_12112014... · 150702 – computer...

16
DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer [Prof. Rupesh G Vaishnav] Page 1 Basics Broadcast channels are sometimes referred to as multiaccess channels or random access channels Main problem is how to allocate a single broadcast channel among competing users? The protocols used to determine who goes next on a multiaccess channel belong to a sublayer of the data link layer called the MAC (Medium Access Control) sublayer. There are two types of channel allocation Static Channel Allocation and Dynamic Channel Allocation. Q-1 Explain Pure ALOHA and slotted ALOHA protocols. Pure ALOHA Pure ALOHA allows users to transmit whenever they have data to be sent. Senders wait to see if a collision occurred (after whole message has been sent). If collision occurs, each station involved waits a random amount of time then tries again. Systems in which multiple users share a common channel in a way that can lead to conflicts are widely known as contention systems. Figure: In pure ALOHA, frames are transmitted at completely arbitrary times Whenever two frames try to occupy the channel at the same time, there will be a collision and both will be garbled. If the first bit of a new frame overlaps with just the last bit of a frame almost finished, both frames will be totally destroyed and both will have to be retransmitted later. What is the efficiency of an ALOHA channel? Let the ''frame time'' denote the amount of time needed to transmit the standard, fixed-length frame. Also assume that the infinite population of users generates new frames with mean N frames per frame time. If N > 1, the user community is generating frames at a higher rate than the channel can handle, and nearly every frame will suffer a collision. For reasonable throughput we would expect 0 < N < 1. Let us further assume that the probability of k transmission attempts per frame time, old and new combined, is also Poisson, with mean G per frame time. Under all loads, the throughput, S, is just the offered load, G, times the probability, P 0 , of a transmission succeeding-that is, S = GP 0 , where P 0 is the probability that a frame does not suffer a collision. The probability that k frames are generated during a given frame time is given by the Poisson distribution: []

Upload: lamnguyet

Post on 06-Mar-2018

222 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 1

Basics Broadcast channels are sometimes referred to as multiaccess channels or random access channels

Main problem is how to allocate a single broadcast channel among competing users?

The protocols used to determine who goes next on a multiaccess channel belong to a sublayer of the data link layer called the MAC (Medium Access Control) sublayer.

There are two types of channel allocation Static Channel Allocation and Dynamic Channel Allocation.

Q-1

Explain Pure ALOHA and slotted ALOHA protocols.

Pure ALOHA Pure ALOHA allows users to transmit whenever they have data to be sent.

Senders wait to see if a collision occurred (after whole message has been sent).

If collision occurs, each station involved waits a random amount of time then tries again.

Systems in which multiple users share a common channel in a way that can lead to conflicts are widely known as contention systems.

Figure: In pure ALOHA, frames are transmitted at completely arbitrary times Whenever two frames try to occupy the channel at the same time, there will be a collision and both

will be garbled.

If the first bit of a new frame overlaps with just the last bit of a frame almost finished, both frames will be totally destroyed and both will have to be retransmitted later.

What is the efficiency of an ALOHA channel? Let the ''frame time'' denote the amount of time needed to transmit the standard, fixed-length frame.

Also assume that the infinite population of users generates new frames with mean N frames per frame time.

If N > 1, the user community is generating frames at a higher rate than the channel can handle, and nearly every frame will suffer a collision. For reasonable throughput we would expect 0 < N < 1.

Let us further assume that the probability of k transmission attempts per frame time, old and new combined, is also Poisson, with mean G per frame time.

Under all loads, the throughput, S, is just the offered load, G, times the probability, P0, of a transmission succeeding-that is, S = GP0, where P0 is the probability that a frame does not suffer a collision.

The probability that k frames are generated during a given frame time is given by the Poisson

distribution: [ ]

Page 2: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 2

The maximum throughput occurs at G = 0.5, with S = 1/2e, which is about 0.184.

Slotted ALOHA Slotted ALOHA was invented to improve the efficiency of pure ALOHA as chances of collision in pure

ALOHA are very high.

In slotted ALOHA, the time of the shared channel is divided into discrete intervals called slots.

The stations can send a frame only at the beginning of the slot and only one frame is sent in each slot.

In slotted ALOHA, if any station is not able to place the frame onto the channel at the beginning of the slot i.e. it misses the time slot then the station has to wait until the beginning of the next time slot.

Figure: Frames transmitted in Slotted ALOHA What is the efficiency of an ALOHA channel? Pure ALOHA S = Ge-2G Slotted ALOHA S = Ge-G

Figure: Throughput versus offered traffic for ALOHA systems

As seen in figure both graphs have the same shape. If G is small so is S, which means that if few frames are generated few frames will be transmitted successfully. As G increases so does S but up to a certain point. As G continues to increase S approaches to 0 which means that if more frames are generated there will be more collisions and the success rate will fall to 0.

Similarly for pure ALOHA the maximum occurs at G=0.5 for which S = 1/2e = 0.184 which means the rate of successful transmissions is approximately 18.4%.

As seen from the graph the maximum for slotted ALOHA occurs at G=1 for which S=1/e=0.368. In

other words the rate of successful transmissions is approximately 0.368 frames per slot time or 37% of the time will be spent on successful transmissions.

Page 3: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 3

Q-2 Explain following CSMA(Carrier Sense Multiple Access) Protocols a) 1-persistent CSMA b) Non persistent CSMA c) p-persistent CSMA d) CSMA/CD (CSMA with Collision Detection) e)

Protocols in which stations listen for a carrier (i.e., a transmission) and act accordingly are called

carrier sense protocols.

a) 1-persistent CSMA When a station has data to send, it first listens to the channel to see if anyone else is transmitting

at that moment.

If the channel is busy, the station waits until it becomes idle.

When the station detects an idle channel, it transmits a frame. If a collision occurs, the station waits a random amount of time and starts all over again.

The protocol is called 1-persistent because the station transmits with a probability of 1 when it finds the channel idle.

The propagation delay has an important effect on the performance of the protocol.

There is a small chance that just after a station begins sending, another station will become ready to send and sense the channel.

If the first station's signal has not yet reached the second one, the latter will sense an idle channel and will also begin sending, resulting in a collision.

The longer the propagation delay, the more important this effect becomes, and the worse the performance of the protocol.

Even if the propagation delay is zero, there will still be collisions.

If two stations become ready in the middle of a third station's transmission, both will wait politely until the transmission ends and then both will begin transmitting exactly simultaneously, resulting in a collision.

If they were not so impatient, there would be fewer collisions. b) Non persistent CSMA

In this protocol, a conscious attempt is made to be less greedy than in the previous one.

Before sending, a station senses the channel. If no one else is sending, the station begins doing so itself.

However, if the channel is already in use, the station does not continually sense it for the purpose of seizing it immediately upon detecting the end of the previous transmission.

Instead, it waits a random period of time and then repeats the algorithm. Consequently, this algorithm leads to better channel utilization but longer delays than 1-persistent CSMA

c) P-persistent CSMA

It applies to slotted channels.

When a station becomes ready to send, it senses the channel.

If it is idle, it transmits with a probability p.

With a probability q=1−p, it defers until the next slot.

If that slot is also idle, it either transmits or defers again, with probabilities p and q.

This process is repeated until either the frame has been transmitted or another station has begun transmitting.

In the latter case, the unlucky station acts as if there had been a collision (i.e., it waits a random time and starts again).

If the station initially senses the channel busy, it waits until the next slot and applies the above algorithm.

Figure shows the computed throughput versus offered traffic for all three protocols, as well as for

Page 4: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 4

pure and slotted ALOHA.

Figure: Comparison of the channel utilization versus load for various random access protocols.

d) CSMA/CD (CSMA with Collision Detection) 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.

This protocol, known as CSMA/CD (CSMA with Collision Detection) is widely used on LANs in the MAC sublayer.

CSMA/CD, as well as many other LAN protocols, uses the conceptual model of Figure.

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.

Figure: CSMA/CD can be in one of three states: contention, transmission, or idle.

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.

Therefore, model for CSMA/CD will consist of alternating contention and transmission periods, with idle periods occurring when all stations are quiet.

Page 5: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 5

Q-3 Explain following Collision free protocols a) A Bit-Map protocol b) Binary Countdown

A Bit-Map protocol It is collision-free protocol, the basic bit-map method; each contention period consists of exactly N

slots.

If station 0 has a frame to send, it transmits a 1 bit during the zeroth slot.

No other station is allowed to transmit during this slot.

Regardless of what station 0 does, station 1 gets the opportunity to transmit a 1 during slot 1, but only if it has a frame queued.

In general, station j may announce that it has a frame to send by inserting a 1 bit into slot j.

After all N slots have passed by; each station has complete knowledge of which stations wish to transmit.

At that point, they begin transmitting in numerical order.

Figure: The basic Bitmap Protocol

Consider the situation from the point of view of a low-numbered station, such as 0 or 1.

Typically, when it becomes ready to send, the ''current'' slot will be somewhere in the middle of the bit map.

On average, the station will have to wait N/2 slots for the current scan to finish and another full N slots for the following scan to run to completion before it may begin transmitting.

The prospects for high-numbered stations are brighter. Generally, these will only have to wait half a scan (N/2 bit slots) before starting to transmit. High-numbered stations rarely have to wait for the next scan.

Since low-numbered stations must wait on average 1.5N slots and high-numbered stations must wait on average 0.5N slots, the mean for all stations is N slots.

The channel efficiency at low load is easy to compute. The overhead per frame is N bits, and the amount of data is d bits, for an efficiency of d/ (N + d).

At high load, when all the stations have something to send all the time, the N bit contention period is prorated over N frames, yielding an overhead of only 1 bit per frame, or an efficiency of d/(d + 1).

The mean delay for a frame is equal to the sum of the time it queues inside its station, plus an additional N (d + 1)/2 once it gets to the head of its internal queue.

Binary Countdown A problem with the basic bit-map protocol is that the overhead is 1 bit per station, so it does not scale

well to networks with thousands of stations.

We can do better than that by using binary station addresses.

A station wanting to use the channel now broadcasts its address as a binary bit string, starting with the high-order bit. All addresses are assumed to be the same length.

The bits in each address position from different stations are BOOLEAN ORed together.

It is called binary countdown Protocol.

Page 6: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 6

Figure: The binary countdown protocol. A dash indicates silence.

To avoid conflicts, an arbitration rule must be applied: as soon as a station sees that a high-order bit position that is 0 in its address has been overwritten with a 1, it gives up.

For example, if stations 0010, 0100, 1001, and 1010 are all trying to get the channel, in the first bit time the stations transmit 0, 0, 1, and 1, respectively.

These are ORed together to form a 1. Stations 0010 and 0100 see the 1 and know that a higher-numbered station is competing for the channel, so they give up for the current round. Stations 1001 and 1010 continue.

The next bit is 0, and both stations continue.

The next bit is 1, so station 1001 gives up.

The winner is station 1010 because it has the highest address. After winning the bidding, it may now transmit a frame, after which another bidding cycle starts.

Q-4

What is limited contention protocol? Explain how it works?

As the load increases, contention becomes increasingly less attractive, because the overhead associated with channel arbitration becomes greater.

Just the reverse is true for the collision-free protocols.

At low load, they have high delay, but as the load increases, the channel efficiency improves rather than gets worse as it does for contention protocols.

A new protocol that used contention at low load to provide low delay, but used a collision-free technique at high load to provide good channel efficiency.

Such protocols, which is called limited-contention protocols.

Suppose that k stations are contending for channel access.

Each has a probability p of transmitting during each slot. The probability that some station successfully acquires the channel during a given slot is then kp(1 - p)k - 1.

To find the optimal value of p, we differentiate with respect to p, set the result to zero, and solve for p.

Doing so, we find that the best value of p is 1/k.

Page 7: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 7

Figure: Acquisition probability for a symmetric contention channel

From Figure, it is fairly obvious that the probability of some station acquiring the channel can be increased only by decreasing the amount of competition.

The limited-contention protocols do precisely that. They first divide the stations into (not necessarily disjoint) groups. Only the members of group 0 are

permitted to compete for slot 0. If one of them succeeds, it acquires the channel and transmits its frame.

If the slot lies fallow or if there is a collision, the members of group 1 contend for slot 1, etc.

Q-5

Explain Wavelength Division Multiple Access protocol.

In this protocol, WDMA (Wavelength Division Multiple Access), each station is assigned two channels.

A narrow channel is provided as a control channel to signal the station, and a wide channel is provided so the station can output data frames.

Figure: Wavelength division multiple access.

Each channel is divided into groups of time slots, as shown in Figure.

Let us call the number of slots in the control channel m and the number of slots in the data channel n + 1, where n of these are for data and the last one is used by the station to report on its status (mainly, which slots on both channels are free).

On both channels, the sequence of slots repeats endlessly, with slot 0 being marked in a special way so

Page 8: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 8

latecomers can detect it. All channels are synchronized by a single global clock.

The protocol supports three traffic classes: (1) constant data rate connection-oriented traffic, such as uncompressed video, (2) variable data rate connection-oriented traffic, such as file transfer, and (3) datagram traffic, such as UDP packets.

For the two connection-oriented protocols, the idea is that for A to communicate with B, it must first insert a CONNECTION REQUEST frame in a free slot on B's control channel. If B accepts, communication can take place on A's data channel.

Each station has two transmitters and two receivers, as follows: 1. A fixed-wavelength receiver for listening to its own control channel. 2. A tunable transmitter for sending on other stations' control channels. 3. A fixed-wavelength transmitter for outputting data frames. 4. A tunable receiver for selecting a data transmitter to listen to.

In other words, every station listens to its own control channel for incoming requests but has to tune to the transmitter's wavelength to get the data.

Let us now consider how station A sets up a class 2 communication channels with station B for, say, file transfer.

First, A tunes its data receiver to B's data channel and waits for the status slot.

This slot tells which control slots are currently assigned and which are free.

In Figure, for example, we see that of B's eight control slots, 0, 4, and 5 are free. The rest are occupied (indicated by crosses).

A picks one of the free control slots, say, 4, and inserts its CONNECTION REQUEST message there. Since B constantly monitors its control channel, it sees the request and grants it by assigning slot 4 to A.

This assignment is announced in the status slot of B's data channel. When A sees the announcement, it knows it has a unidirectional connection.

If A asked for a two-way connection, B now repeats the same algorithm with A.

It is possible that at the same time A tried to grab B's control slot 4, C did the same thing.

Neither will get it, and both will notice the failure by monitoring the status slot in B's control channel.

They now each wait a random amount of time and try again later.

At this point, each party has a conflict-free way to send short control messages to the other one.

To perform the file transfer, A now sends B a control message saying, for example, ''Please watch my next data output slot 3.

There is a data frame for you in it.'' When B gets the control message, it tunes its receiver to A's output channel to read the data frame.

Depending on the higher-layer protocol, B can use the same mechanism to send back an acknowledgement if it wishes?

Q-6

Explain wireless LAN protocols in detail.

A common configuration for a wireless LAN is an office building with base stations (also called access points) strategically placed around the building.

All the base stations are wired together using copper or fiber. We will make the simplifying assumption that all radio transmitters have some fixed range.

When a receiver is within range of two active transmitters, the resulting signal will generally be garbled and useless.

A naive approach to using a wireless LAN might be to try CSMA: just listen for other transmissions and only transmit if no one else is doing so.

The trouble is, this protocol is not really appropriate because what matters is interference at the receiver, not at the sender.

To see the nature of the problem, consider Fig. below, where four wireless stations are illustrated.

Page 9: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 9

Figure: A wireless LAN. (a) A transmitting. (b) B transmitting.

For our purposes, it does not matter which are base stations and which are notebooks.

The radio range is such that A and B are within each other's range and can potentially interfere with

one another. C can also potentially interfere with both B and D, but not with A. Hidden Station Problem: When A is transmitting to B, as depicted in Fig.(a).

If C senses the medium, it will not hear A because A is out of range, and thus falsely conclude that it can transmit to B.

If C does start transmitting, it will interfere at B, wiping out the frame from A.

The problem of a station not being able to detect a potential competitor for the medium because the competitor is too far away is called the hidden station problem.

Exposed Station Problem: B transmitting to A, as shown in Fig. (b).

If C senses the medium, it will hear an ongoing transmission and falsely conclude that it may not send to D, when in fact such a transmission would cause bad reception only in the zone between B and C, where neither of the intended receivers is located.

This is called the exposed station problem.

Q-7

What is Ethernet? Explain Switched Ethernet, Fast Ethernet and Gigabit Ethernet

Ethernet is one of the widely used local area network (LAN) technology. Switched Ethernet

Figure: A simple example of switched Ethernet Switched Ethernet gives dedicated 10 Mbps bandwidth on each of its ports.

On each of the ports one can connect either a thick/thin segment or a computer.

In Switched Ethernet, the collision domain is separated.

The hub is replaced by a switch, which functions as a fast bridge.

It can recognize the destination address of the received frame and can forward the frame to the port to which the destination station is connected.

The other ports are not involved in the transmission process.

The switch can receive another frame from another station at the same time and can route this frame

Page 10: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 10

to its own final destination.

In this case, both the physical and logical topologies are star.

The throughput can be further increased on switched Ethernet by using full-duplex technique, which uses separate wire pairs for transmitting and receiving.

Thus a station can transmit and receive simultaneously, effectively doubling the throughput to 20 Mbps on each port.

Fast Ethernet

The 802.u or the fast Ethernet, as it is commonly known, was approved by the IEEE 802

Committee.

The fast Ethernet uses the same frame format, same CSMA/CD protocol and same interface as the 802.3, but uses a data transfer rate of 100 Mbps instead of 10 Mbps.

However, fast Ethernet is based entirely on 10-Base-T, because of its advantages (Although technically 10-BASE-5 or 10-BASE-2 can be used with shorter segment length).

IEEE has designed two categories of Fast Ethernet: 100Base-X and 100Base-T4.

100Base-X uses two-wire interface between a hub and a station while 100Base-T4 uses four-wire interface.

100-Base-X itself is divided into two: 100Base-TX and 100base-FX

Table: The original fast Ethernet cabling. Upgrade the data rate to 100 Mbps.

Make it compatible with Standard Ethernet.

Keep the same 48-bit address.

Keep the same frame format.

Keep the same minimum and maximum frame lengths.

Gigabyte Ethernet

The technology is based on fiber optic cable. Multi-mode fiber is able to transmit at gigabit rate to at least 580 meters and with single-mode runs exceeding 3 km.

Fiber optic cabling is costly. In order to reduce the cost of cabling, the 802.3z working group also proposed the use of twisted pair or cable or coaxial cable for distances up to 30 meters.

At gigabit speed, two stations 200 meters apart will not detect a collision, when both simultaneously send 64-byte frames.

This inability to detect collision leads to network instability.

A mechanism known as carrier extension has been proposed for frames shorter than 512 bytes.

The number of repeater hops is also restricted to only one in place of two for 100 Base-T.

Table: Gigabit Ethernet cabling Upgrade the data rate to 1 Gbps.

Make it compatible with Standard or Fast Ethernet.

Use the same 48-bit address.

Page 11: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 11

Use the same frame format.

Keep the same minimum and maximum frame lengths.

To support auto-negotiation as defined in Fast Ethernet.

Q-8

Explain Repeaters, Hubs, Bridges, Switches, Routers, and Gateways

Repeaters The purpose of a repeater is to extend the maximum range for the network cabling.

A repeater is a network device that repeats a signal from one port onto the other ports to which it is connected.

Repeaters operate at the Physical layer.

A repeater doesn’t require any addressing information from the data frame because a repeater merely repeats bits of data.

The advantages of repeaters are that they are inexpensive and simple.

A repeater does not actually connect two LANs; it connects two segments of the same LAN. The segments connected are still part of one single LAN.

A repeater is not a device that can connect two LANs of different protocols.

A repeater can overcome the 10Base5 Ethernet length restriction. In this standard, the length of the cable is limited to 500 m.

To extend this length, we divide the cable into segments and install repeaters between segments. Note that the whole network is still considered one LAN, but the portions of the network separated by repeaters are called segments.

The repeater acts as a two-port node, but operates only in the physical layer.

When it receives a frame from any of the ports, it regenerates and forwards it to the other port.

A repeater does not amplify the signal; it regenerates the signal.

When it receives a weakened or corrupted signal, it creates a copy, bit for bit, at the original strength.

Page 12: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 12

Hubs

An Ethernet hub, active hub, network hub, repeater hub or hub is a device for connecting multiple twisted pair or fiber optic Ethernet devices together and making them act as a single network segment.

A hub works at the physical layer (layer 1) of the OSI model. The device is a form of multiport repeater. Repeater hubs also participate in collision detection, forwarding a jam signal to all ports if it detects a collision.

Passive Hub Passive hubs do not contain any electronic components and do not process the data signal in any

way.

The only purpose of a passive hub is to combine the signals from several network cable segments.

All devices attached to a passive hub receive all the packets that pass through the hub.

Because the hub doesn’t clean up or amplify the signals, the distance between a computer and the hub can be no more than half the maximum permissible distance between two computers on the network.

Often small networks use passive hubs, due to the fact that there are few machines on the LAN and small distances between them.

Active Hub Active hubs incorporate electronic components that can amplify and clean up the electronic

signals that flow between devices on the network.

This process of cleaning up the signals is called signal regeneration. Signal regeneration has the benefits: - The network is more robust (less sensitive to errors). - Distances between devices can be increased.

These advantages generally outweigh the fact that active hubs cost considerably more than passive hubs.

Because active hubs function in part as repeaters, they occasionally are called multi-port repeaters.

Intelligent Hub It can support network management protocols that enable the hub to send packets to a central

network console.

These protocols also enable the console to control the hub; for example, a network administrator can order the hub to shut down a connection that is generating network errors.

The latest development in type of hubs is the switching hub, which includes circuitry that very quickly routes signals between ports on the hub.

Instead of repeating a packet to all ports on the hub, a switching hub repeats a packet only to the port that connects to the destination computer for the packet. Many switching hubs have the capability of switching packets to the fastest of several alternative paths. Switching hubs are replacing bridges and routers on many networks.

Page 13: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 13

Bridges It is a device that connects and passes packets between two network segments.

It is more intelligent than hub.

It can analyze incoming packets and forwards based on addressing information.

Bridges can extend the maximum size of a network.

Bridge is a much more flexible device

Bridges operate at the MAC sub layer of the OSI Data Link layer.

Bridge is more selective and passes only those signals targeted for a computer on the other side.

A bridge can make this determination because each device on the network is identified by a unique physical address.

Bridges accomplish several things. First, they divide busy networks into smaller segments. If the network is designed so that most packets can be delivered without crossing a bridge, traffic on the individual network segments can be reduced.

Switches In networks, Switch is a device that filters and forwards packets between LAN segments.

Switches operate at the data link layer (layer 2) and sometimes the network layer (layer 3) of the OSI Reference Model and therefore support any packet protocol.

LANs that use switches to join segments are called switched LANs or, in the case of Ethernet networks, switched Ethernet LANs.

Switches have built-in hardware chips solely designed to perform switching capabilities, therefore they are fast and come with many ports.

Sometimes they are referred to as intelligent bridges or multiport bridges.

Routers Routers are another type of internetworking device.

These devices pass data packets between networks based on network protocol or layer-3 information.

Routers have the ability to make intelligent decisions as to the best path for delivery of data on the network.

Provide filtering and network traffic control.

Used on LANs and WANs.

Connect multiple segments and networks.

Multiple routers create an “internetwork”.

Operate at the Network layer.

Create a table to determine how to forward packets.

Filtering and traffic control base on logical addresses.

Advantages ­ Can connect networks of different architecture ­ Token Ring to Ethernet ­ Choose best path through or to a network ­ Create smaller collision domains ­ Create smaller broadcast domains

Disadvantages ­ Only work with routable protocols ­ More expensive than hubs, bridges, and switches ­ Routing table updates consume bandwidth

Gateways 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 support, network gateways can operate at any level of the

Page 14: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 14

OSI model.

A gateway generally is dedicated to a specific conversion, and the exact functioning of the gateway depends on the protocol translations it must perform.

Gateways commonly function at the OSI Application layer, but actually can operate at any level of the OSI model.

Q-9

Explain the working principle of bridges and explain following.

a) Spanning tree bridges b) Remote bridges

Spanning tree bridges

Some sites use two or more bridges in parallel between pairs of LANs, as shown in Figure.

This arrangement, however, also introduces some additional problems because it creates loops in the topology.

Figure: Two parallel bridges

The solution to this difficulty is for the bridges to communicate with each other and overlay the actual topology with a spanning tree that reaches every LAN.

For example, in Figure (a) we see nine LANs interconnected by ten bridges.

This configuration can be abstracted into a graph with the LANs as the nodes.

An arc connects any two LANs that are connected by a bridge.

The graph can be reduced to a spanning tree by dropping the arcs shown as dotted lines in Figure (b).

Figure: (a) Interconnected LANs. (b) A spanning tree covering the LANs. The dotted lines are not

part of the spanning tree Using this spanning tree, there is exactly one path from every LAN to every other LAN.

Once the bridges have agreed on the spanning tree, all forwarding between LANs follows the spanning tree.

Since there is a unique path from each source to each destination, loops are impossible.

To build the spanning tree, first the bridges have to choose one bridge to be the root of the tree. They

Page 15: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 15

make this choice by having each one broadcast its serial number, installed by the manufacturer and guaranteed to be unique worldwide.

The bridge with the lowest serial number becomes the root. Next, a tree of shortest paths from the root to every bridge and LAN is constructed.

This tree is the spanning tree. If a bridge or LAN fails, a new one is computed. Remote Bridges

Figure: Remote bridges can be used to interconnect distant LANs

A common use of bridges is to connect two (or more) distant LANs.

This goal can be achieved by putting a bridge on each LAN and connecting the bridges pairwise with point-to-point lines (e.g., lines leased from a telephone company).

A simple system, with three LANs, is illustrated in Figure. The usual routing algorithms apply here. The simplest way to see this is to regard the three point-to-point lines as host less LANs. Then we have a normal system of six LANS interconnected by four bridges.

Nothing in what we have studied so far says that a LAN must have hosts on it.

Various protocols can be used on the point-to-point lines.

One possibility is to choose some standard point-to-point data link protocol such as PPP, putting complete MAC frames in the payload field.

This strategy works best if all the LANs are identical, and the only problem is getting frames to the correct LAN.

Another option is to strip off the MAC header and trailer at the source bridge and put what is left in the payload field of the point-to-point protocol.

Page 16: DARSHAN INST. OF ENGG. & TECH. Computer Network … Layer_12112014... · 150702 – Computer Network Computer Engineering Unit 4 The ... Explain Pure ALOHA and slotted ... pure and

DARSHAN INST. OF ENGG. & TECH. 150702 – Computer Network Computer Engineering Unit 4 The Medium Access Control Sub layer

[Prof. Rupesh G Vaishnav] Page 16

Q-10 Explain in detail Virtual LANs.

A VLAN is a switched network that is logically segmented by functions, project teams, or applications without regard to the physical location of users. For example, several end stations might be grouped as a department, such as engineering or accounting. When the end stations are physically located close to one another, you can group them into a LAN segment. If any of the end stations are in different buildings (not the same physical LAN segment), you can then group them into a VLAN.

VLANs provide the following features: ­ Simplification of end-station moves, adds, and changes

• When an end station is physically moved to a new location, its attributes can be reassigned from a network management station through Simple Network Management Protocol (SNMP) or through the user interface menus.

• When an end station is moved within the same VLAN, it retains its previously assigned attributes in its new location. When an end station is moved to a different VLAN, the attributes of the new VLAN are applied to the end station.

­ Controlled traffic activity • VLANs allow ports on the same or different switches to be grouped so that traffic is

confined to members of only that group. • This feature restricts broadcast, unicast, and multicast traffic (flooding) only to ports

included in a certain VLAN. • The management domain is a group of VLANs that are managed by a single administrative

authority. ­ Workgroup and network security

• You can increase security by segmenting the network into distinct broadcast domains. • To this end, VLANs can restrict the number of users in a broadcast domain. • You can also control the size and composition of the broadcast domain by controlling the

size and composition of a VLAN.

Components Networks that have VLANs contain one or more of the following components:

Switches that logically segment connected end stations

Routers that provide VLAN communications between workgroups

Transport protocols that carry VLAN traffic across shared LAN and ATM backbones

Interoperability with previously installed LAN systems