Mid term Network

Two different technologies are used in wide area switched networks: circuit switching and packet switching. These two technologies differ in the way the nodes switch information from one link to another on the way from source to destination.
Circuit-Switching technology : Driven by applications that handle voice traffic Key requirement is no transmission delay and no variation in delay ,* Efficient for analog transmission of voice signals Inefficient for digital transmission Transparent Once a circuit is established it appears as a direct connection; no special logic is needed

* Uses a dedicated path between two stations * Can be inefficient – Channel capacity dedicated for duration of connection – If no data, capacity is wasted * Set up(connection) takes time * Once connected, transfer is transparent * Has three phrases : Establish / Transfer / Disconnect

Circuit Switching Concept : Digital Switch : Provide a transperant signal path / must allow full-duplex transmission Network interface : functions and hardware needed to connect digital devices control unit : established ,maintains and tears down the connection .

Blocking network May be unable to connect stations because all paths are in use Used on voice systems because it is expected for phone calls to be of short duration and that only a fraction of the phones will be engaged at any one time.

Non-blocking network Permits all stations to connect at once Grants all possible connection requests as long as the called party is free When using data connections terminals can be continuously connected for long periods of time so nonblocking configurations are required

Space division switching : ØOriginally developed for analog, space division switching has been carried over into the digital real time ØSignal paths are physically separate from one another ØPath is dedicated solely to transfer signals ØBasic building block of switch is a metallic crosspoint or semiconductor gate

Time Division Switching : ØTDS systems uses intelligent control of space & time division elements  ØTSI ØTMS ØSoftSwitch

 Time Slot Interchange TSI : The basic building block of many time-division switches is the time- slot interchange (TSI) mechanism. A TSI unit operates on a synchronous TDM stream of time slots, or channels, by interchanging pairs of slots to achieve a full-duplex operation. 

TSI introduces a delay and produces output slots in the desired order. The output stream of slots is then demultiplexed and routed to the appropriate output line. Each channel is provided a time slot in each TDM frame, whether or not it transmits data.

Time-Multeplixed switching : To overcome the latency problems of TSI, time-division switches use multiple TSI units, each of which carries a portion of the total traffic.

Packet Switching : ØCircuit switching was designed for voice ØPacket switching was designed for data ØTransmitted in small packets (1000 bytes) ØPackets contain user data and control info * User data may be part of a larger message * Control information includes routing (addressing) ØPackets are received, stored briefly (buffered) and passed on to the next node

Advantages : ØLine efficiency * Single link shared by many packets over time * Packets queued and transmitted as fast as possible ØData rate conversion * Stations connect to local node at own speed * Nodes buffer data if required to equalize rates ØPackets accepted even when network is busy ØPriorities can be used

 

Switching Techniques : Station breaks long message into packets Packets sent one at a time to the network Packets can be handled in two ways: Datagram : Each packet is treated independently with no reference to previous packets. Virtual Circuit : A preplanned route is established before any packets are sent

Virtual circuit vs Diagram : ØVirtual circuits * Network can provide sequencing and error control * Packets are forwarded more quickly * Less reliable ØDatagram * No call setup phase  * lMore flexible * More reliable

Comparison between circuit & Packet switching : three types of delay to be considered in the comparison:  • Propagation delay: The time it takes a signal to propagate from one node to the next. This time is generally negligible. The speed of electromagnetic signals through a wire medium, for example, is typically 2 * 10^8 m/s.  • Transmission time: The time it takes for a transmitter to send out a block of data. For example, it takes 1 s to transmit a 10,000-bit block of data onto a 10-kbps line.  • Node delay: The time it takes for a node to perform the necessary processing as it switches data. 

For circuit switching: First, a Call Request signal is sent through the network, to set up a connection to the destination.  If the destination station is not busy, a Call Accepted signal returns. Note that a processing delay is incurred at each node during the call request; this time is spent at each node setting up the route of the connection. On the return, this processing is not needed because the connection is  already set up. After the connection is set up, the message is sent as a single block, with  no noticeable delay at the switching nodes.

A virtual circuit is requested using a Call Request packet. The call experiences node delays, even though the virtual circuit route is established.  A packet at each node is queued and must wait its turn for transmission.   

Datagram packet switching does not require a call setup. For short messages, it will be faster than virtual circuit packet switching and perhaps circuit switching. For long messages, the virtual circuit technique is superior.

 



Data Link Control ProtocolsØ Requirements and objectives for effective data communication between two directly connected transmitting-receiving stations: Error control / Addressing / Control and data / Link management  /Frame Sychronization  / Flow Control

Flow Control ØTechnique for assuring that a transmitting entity does not over-whelm a receiving entity with data * The receiving entity typically allocates a data buffer of some maximum length for a transfer * When data are received, the receiver must do a certain amount of processing before passing the data to the higher-level software ØIn the absence of flow control, the receiver’s buffer may fill up and overflow while it is processing old data

The time it takes for a station to emit all of the bits of a frame onto the medium is the transmission time; this is proportional to the length of the frame. 

The propagation time is the time it takes for a bit to traverse the link between source and destination.  For this section, we assume that all frames that are transmitted are

successfully received; no frames are lost and none arrive with errors. Furthermore, frames arrive in the same order in which they are sent. However, each transmitted frame suffers an arbitrary and variable amount of delay before reception. 

Define the bit length of a link as follows:

B = R *d/V                                    (7.1)

where B =   length of the link in bits;  B is the maximum number of bits that a link can take. R = data rate of the link, in bps (transmission speed) d = length of the link in meters V = velocity of propagation, in m/s 

For a normalized transmission time (1µs), The propagation delay is expressed as the variable a:  a =B/L  //where L is the number of bits in the frame (length of the frame in

bits). When a is less than 1,  L> B è the propagation time is less than the  transmission time. In this case, the frame is sufficiently long that the first bits of the frame have arrived at the destination before the source has completed the transmission of the frame. 

When  a is greater than 1,  B>L è the propagation time is greater than the transmission time. In this case, the sender completes transmission  of the entire frame before the leading bits of that frame arrive at the receiver.  

Sliding Windows Flow Control Ø Allows multiple numbered frames to be in transit * Receiver has buffer W long * Transmitter sends up to W frames without ACK *ACK includes number of next frame expected *Sequence number is bounded by size of field (k) • Frames are numbered modulo 2^k •  If k=3, will provide 8 frames from F0 to F7 • Giving max window size of up to 2^k – 1 *Receiver can ACK frames without permitting further transmission (Receive Not Ready=RNR) *Must send a normal  acknowledge (RR) to resume  Ø If have full-duplex link, it uses piggyback ACKs 

If a station has data to send and an acknowledgment to send, it sends both together in one frame, saving communication capacity. If a station has an acknowledgment to send but no data to send, it sends a separate acknowledgment frame, such as RR or RNR. If a station has data to send but no new acknowledgment to send, it must repeat the last acknowledgment sequence number that it sent.  This is because the data frame includes a field for the acknowledgment number, and some value must be put into that field. When a station receives a duplicate acknowledgment, it simply ignores it.



Error Control based on : Error Detection / positive acknowledgment / retransmission after timeout / negative acknowledgment and retransmission

Types of error : Lost frames : a frame fail to arrive at the other side / Damaged frame : frame arrives but some of the bit have an error.

Error detection: The destination detects frames that are in error, using the certain techniques and discards those frames. • Positive acknowledgment: The destination returns a positive acknowledgment to successfully received, error-free frames. • Retransmission after timeout: The source retransmits a frame that has not been acknowledged after a predetermined amount of time. • Negative acknowledgment and retransmission: The destination returns a negative acknowledgment to frames in which an error is detected. The source retransmits such frames.

Stop and wait ARQ:source transmit single frame / wait for ACK : no other data can be send until the distination reply arrives./If frame received is damaged discard it :transmitter has timout , if no ACK within timout retransmit /if ACK damaged ,transmitter will not recognize:transmitter will retransmit , receiver get two copies of the frame , use alternate numbering and ACK0/ACK1

Go back N ARQ: most commonly used , based on sliding windows , While no errors occur, the destination will acknowledge incoming frames as usual ,If the destination station detects an error in a frame, it may send a negative acknowledgment ,Destination will discard that frame and all future frames until the frame in error is received correctly and then transmitter will retransmit the damaged frame and all susequent frame ,

Selective Reject ARQ :called selective retransmission ,only reject frames are retransmitted and subsequent frame will be accepted by the receiver and buffered , receiver must maintain large enough buffer , rarly used ,



 Traditional Ethernet  Earliest was ALOHA • Developed for packet radio networks • Station may transmit a frame at any time  • If frame is determined invalid, it is ignored

• Maximum utilization of channel about 18% Next came slotted ALOHA • Organized slots equal to transmission time  • Increased utilization to about 37% 

CSMA/CD Precursors ØCarrier Sense Multiple Access (CSMA) *  Station listens to determine if there is another transmission in progress  * If idle, station transmits * Waits for acknowledgment * If no acknowledgment, collision is assumed and station retransmits * Utilization far exceeds ALOHA 

Nonepresistant CSMA : If the medium is idle,transmit; otherwise, go to step 2 —–> If the medium is busy,wait an amount of time drawn from a probability distribution and repeat step 1 ………………….Step 1 Disadvantage: Capacity is wasted because the medium will generally remain idle following the end of a transmission even if there are one or more stations waiting to transmit

1-Persistent CSMA Ø Avoids idle channel time Ø Rules:  1. If medium is idle, transmit 2. If medium is busy, listen until idle; then transmit immediately Ø Stations are selfish Ø If two or more stations are waiting, a collision is guaranteed

P-Persistent CSMA Ø A compromise to try and reduce collisions and idle time Ø P-persistent CSMA rules:  1. If medium is idle, transmit with probability p, and delay one time unit with probability (1–p) 2. If medium is busy, listen until idle and repeat step 1 3. If transmission is delayed one time unit, repeat step 1 Ø Issue of choosing effective value of p to avoid instability under heavy load  

Value of p? Ø Have n stations waiting to send Ø At end of transmission, expected number of stations is np * If np>1 on average there will be a collision Ø Repeated transmission attempts mean collisions are likely Ø Eventually all stations will be trying to send, causing continuous collisions, with throughput dropping to zero Ø To avoid catastrophe np<1 for=”” expected=”” peaks=””>1>of n * If heavy load expected, p must be small * Smaller p means stations wait longer

 Rules for CSMA/CD (collision detection) 1.If the medium is idle, transmit; otherwise, go to step 2. 2.If the medium is busy, continue to listen until the channel is idle, then transmit immediately. 3.If a collision is detected during transmission, transmit a brief jamming signal to assure that all stations know that there has been a collision and then cease transmission. 4.After transmitting the jamming signal, wait a random amount of time, referred to as the backoff, then attempt to transmit again (repeat from step 1).

Which Persistence Algorithm? ØIEEE 802.3 uses 1-persistent ØBoth nonpersistent and p-persistent have performance problems 1-persistent seems more unstable than p-persistent  • Because of greed of the stations • Wasted time due to collisions is short  • With random backoff unlikely to collide on next attempt to send

Binary Exponential Backoff Ø IEEE 802.3 and Ethernet both use binary exponential backoff Ø A station will attempt to transmit repeatedly in the face of repeated collisions * On first 10 attempts, mean random delay doubled * Value then remains the same for 6 further attempts * After 16 unsuccessful attempts, station gives up and reports error Ø 1-persistent algorithm with binary exponential backoff is efficient over wide range of loads Ø Backoff algorithm has last-in, first-out effect

Collision Detection : On baseband bus : Collision produces higher signal voltage , Collisiondetected if cable signal is greater than signal station signal , signal is attenuated over distance , limit to 500m (10Base5) of 200m (10Base2) On twisted pair (star – topology) Activity on more than port is collision , use special collision presence signal 

 

IEEE 802.3 defines three types of MAC frames. The basic frame  is the original frame format. In addition, to support data link layer protocol encapsulation within the data portion of the frame, two additional frame types have been added. A Q-tagged frame supports 802.1Q VLAN capability, as described in Section 12.3. An envelope frame  is intended to allow inclusion of additional prefixes and suffixes to the data field required by higher-layer encapsulation protocols such as those defined by the IEEE 802.1 working group (such as Provider Bridges and MAC Security), ITU-T, or IETF (such as MPLS). 

Figure 12.4 depicts the frame format for all three types of frames; the differences are contained in the MAC Client Data field. Several additional fields encapsulate the  frame to form an 802.3 packet. The fields are as follows: • Preamble:  A 7-octet pattern of alternating 0s and 1s used by the receiver to establish bit synchronization. • Start Frame Delimiter (SFD):  The sequence 10101011, which that delimits the actual start of the frame and enables the receiver to locate the first bit of the frame. 

• Source Address (SA):  Specifies the station that sent the frame. • Length/Type:  Takes on one of two meanings, depending on its numeric value. If the value of this field is less than or equal to 1500 decimal, then the Length/Type field indicates the number of MAC Client Data octets contained in the subsequent MAC Client Data field of the basic frame (length interpretation). If the value of this field is greater than or equal to 1536 decimal then the Length/Type field indicates the nature of the MAC client protocol (Type interpretation). The Length and Type interpretations of this field are mutually exclusive. • MAC Client Data:  Data unit supplied by LLC. The maximum size of this field is 1500 octets for a basic frame, 1504 octets for a Q-tagged frame, and 1982 octets for an envelope frame.• Pad:  Octets added to ensure that the frame is long enough for proper CD operation.• Frame Check Sequence (FCS):  A 32-bit cyclic redundancy check, based on all fields except preamble, SFD, and FCS. • Extension:  This field is added, if required for 1-Gbps half-duplex operation. The extension field is necessary to enforce the minimum carrier event duration on the medium in half-duplex mode at an operating speed of 1 Gbps. 

Full Duplex Operation Ø Traditional Ethernet half duplex  Ø Using full-duplex, station can transmit and receive simultaneously Ø 100-Mbps Ethernet in full-duplex mode, giving a theoretical transfer rate of 200 Mbps Ø Stations must have full-duplex adapter cards Ø And must use switching hub *Each station constitutes separate collision domain *CSMA/CD algorithm no longer needed *802.3 MAC frame format used 

Mixed Configurations Ø Fast Ethernet supports mixture of existing 10Mbps LANs and newer 100-Mbps LANs Ø Supporting older and newer technologies ** Stations attach to 10-Mbps hubs using 10BASE-T  **Hubs connected to switching hubs using 100BASE-T ** High-capacity workstations and servers attach directly to 10/100 switches **Switches connected to 100-Mbps hubs use 100-Mbps links ** 100-Mbps hubs provide building backbone ** Connected to router providing connection to WAN