DCN | Switching in data networks

Circuit switching

Circuit switching approaches are used in traditional telephone networks

  • Frequency-Division Multiplexing (FDM)
  • Time-Division Multiplexing (TDM)

Three phases are needed for communication in a circuit-switched network:

  • Setup: dial the phone number
  • Data transfer: communication
  • Teardown

Delay in circuit-switched networks is the sum of times needed to setup the connection (connection delay, propagation delay), transfer the data and disconnect the circuit

Packet-switched networks

Definition: No dedicated communication path setup for two communicating devices.

How the packet is designed is related to the protocol and physical layer.

Datagram networks

Each packet is treated independently of all others in a datagram network, depending on the dynamics of network.

Packets in this approach are called datagrams and the switches are referred to as routers.

Resources in datagram networks are not reserved but allocated on demand typically on first-come, first-served basis. No fixed allocation.

routing and forwarding

Delays in datagram network: queuing delay. If packets arrival rate exceeds output link capacity for a period of time, packets will queue in router buffers waiting to be transmitted on output link. In this case, packets might be dropped (lost) if memory (buffer) in routers fill up.

Out of order packets:

  1. since each packet is treated independently at the routers, no reference if available to the packets that have gone before
  2. since different packets follow different routes thus arriving at their destination out of sequence and with different layers, it's also possible that some of the packets are lost or dropped due to the lack of resources

Delay in datagram networks:

  1. nodal procesisng
  2. queuing delay
  3. transmission delay: $d_{trans}=L/R$, L: packet length (bits), R: link transmission rate (bps)
  4. propagation delay: $d_{drop}=d/s$, d: length of physical link, s: propagation speed

Different routers may have different situation (buffer, etc.), thus the waiting time for different routers vary.

Statistical multiplexing

  • Packet-switched networks leverage statistical multiplexing, allowing more users to use network.

Physical layer

Physical layer is the foundation for building a data communication network and is the lowest layer in the TCP protocol.

  • it determines the network's performance with different properties of different kinds of physical channel

Background knowledge

  • Analog signal: the signal amplitude can acquire an infinite number of possible values over a period of time and digital signal: signal amplitude can only acquire a limited number of defined values
  • Signals in time and frequency domains: according to Fourier analysis, all signals are composed of a possibly infinite number of sinusoidal waves with different frequencies, amplitudes and phases
  • Bandwidth of a signal is directly related to the data rate. If I wish to transmit data quickly, which means that I want to transmit the signal faster, then higher bandwidth is needed for the signal. (rect function as an example, the narrow the window is, the wider its bandwidth has, otherwise, the wider the window is, the narrow its bandwidth has. If I want to transmit data faster, I would choose the signal with narrow window)

Transmission impairments

There is never definitely perfect transmitting media, vacuum is not an exception at all. Signals will be impaired during transmission.

Signal attenuation

While propagating in a media, signal will lose some of its energy in overcoming the resistance of the medium, this reduction in signal strength is referred as attenuation. It can be compensated by using amplifiers to boost the signal after appropriate transmission distances.

It's typically expressed in decibel (dB) which is defined as:$Attenuation (dB) = 10log_{10}(P_{out}/P_{in})$

Signal distortion

A change in the shape of the signal. As signals are comprised of various frequency components, the propagation velocity of different component differs in the transmission media. It means that different components arrive at the final destination at different times, resulting in phase difference from what they had at the transmitter. If the frequency components of one bit are delayed significantly, they will overlap with the components of the next bit (the shape of prior bit becomes wider), causing Inter symbol interference (ISI). Solution to ISI is equalization.

Noise

A random unwanted signal and is the major limiting factor in communication system performance.

There are different types of noise should be taken into consideration:

  • thermal noise (thermal agitation of electrons, which has a uniform distribution across bandwidths (spectrum) and is often referred to as white noise)
  • crosstalk (undesirable coupling between various signal paths, it can also occur when the antennas pick up unwanted signals)
  • impulse noise (irregular spikes of short duration and of relatively high amplitude, like external electromagnetic disturbance (lightning)).

Channel capacity

For a noisy channel, Shannon developed a formula to calculate the theoretical maximum data rate possible:

$C(bit/s)=Blog_2(1+SNR)$

where C is the capacity of the channel in bits/s, B is the bandwidth of the channel in Hertz and SNR is the signal-to-noise ratio defined as:

$SNR=\frac{average\ signal\ power}{average\ noise \ power}$

With this formula, for a given level of noise, the data rate can be increased by either increasing the signal strength (average signal power) or the channel bandwidth (B).

As this formula only considers the white noise (thermal noise), the data rates achieved in reality are much lower.

Transmission media

It can be anything that can carry information from a source to destination and bridges the physical path between transmitter and receiver.

When choosing a transmission media, some factors need to be considered:

  • Desired data rate (bit/s)
  • Transmission distance
  • Cost considerations
  • Ease of installation and maintenance

There are two kinds of transmission media:

  • guided media: provides a conduit from the source to the destination device, like coaxial cable or optical fiber
  • unguided media: without using a physical conductor like air (atmosphere), vacuum and sea water

Electromagnetic waves have different frequencies, whose transmission media vary. One has to chose adequate transmission media to transmit certain electromagnetic waves.

Guided media

Twisted-pair cable

A twisted-pair cable consists of two insulated copper wires arranged in a regular spiral pattern. Twisting makes it possible that both wires are equally affected by external interference (like noise or crosstalk). One of the wires transmits signal and the other is used as ground reference. The receiver uses the difference between the two.

Transmission characteristics

  • The attenuation for a twisted-pair is very strong function of frequency.
  • The limitations of twisted-pair cable are transmission distance, bandwidth and data rate.
  • It can be used to transmit both analog and digital signals.
  • To alleviate the possibility of electromagnetic interference from high frequency disturbers and to achieve better performance at higher data rates, shielded twisted-pair cables can be used.

Coaxial cable

A coaxial cable uses a stiff copper wire as the core, surrounded by an insulating material. This insulator is encased by a cylindrical conductor, often as a closely-woven braided-mesh. And the outer conductor is covered in a protective plastic sheath.

Transmission characteristics

  • It can be used for both analog and digital signals
  • The frequency characteristics are superior to those of twisted-pair cable.

Optical fiber

An optical fiber is a thin, flexible medium made up of glass. It has a core, surrounded by a cladding. In addition, a plastic jacket is needed to protect the inside structure. The reflective index of core is slightly higher than the cladding. The basic principle of optical fiber is the total internal reflection.

Optical fiber applications:

  • It is predominantly used in long-distance backbone networks due to its enormous bandwidth, low attenuation and cost-effectiveness. (It's attenuation for signal is super low)
  • Due to its continuing improvement in performance and decline in prices, together with the inherent advantages, it attracts increasingly attention for local area networking.

Transmission characteristics

  • Its bandwidth is much larger than any other existing transmission medium and its attenuation is extremely low.
  • It is not affected by the external electromagnetic fields and hence not vulnerable to noise, interference and crosstalk
  • It doesn't leak light and are inherently difficult to tap. But it also offers good security against potential wire-trappers.

Unguided media

Wireless communication: no physical connection between transmitter and receiver is built. It involves electromagnetic waves, which can be divided into four main types: radio, microwave, infrared and light-wave depending on the parts of electromagnetic spectrum used for transmitting information.

Radio transmission

Frequency range: 3kHz and 1GHz, multicast communications, easy to generate, travel long distances, narrow frequency band, low data rate.

Omnidirectional: signal waves will travel in all directions from the source. The advantage is that the transmitting and receiving antennas do not need to be aligned, but along with the interference with other signals with the same frequency band

Due to the earth's curvature, the electromagnetic waves will induce a current in the earth's surface, slowing the wavefront near the earth, causing the wavefront to tilt downward and hence follow the earth's curvature. (The reason why the tendency of radio waves follows the earth's curvature)

Microwave transmission

Frequency range: 1GHz to 300GHz. Tend to be more focused and have higher frequency. High speed. Point to point.

Line-of-sight propagation: the antennas should be aligned and directional, facing each other. But it will be affected by the free-space loss, atmospheric absorption and multi-path fading. It occurs in VHF, UHF, SHF and EHF bands.

Infrared transmission

Frequency range: 300GHz and 400THz. Unguided infrared waves cannot penetrate through walls or pass through solid objects, making them useless for long-range communication. The application of infrared communication can be seen widely in daily life like remote controls.

No government license is required to operate an infrared system.

Transmission of digital signals

Digital signals can be transmitted by baseband transmission or passband transmission.

  • Baseband transmission: a digital signal is transmitted over a channel without changing it to an analog signal in this case. It is used for a low-pass channel like a serial cable.
  • Passband transmission: on the contrary, a digital signal is first changed to an analog signal. It is used for a band-pass channel. Band-pass channels are more common in practice like wireless and optical channels.

The process of passband transmission: modulation and demodulation. Given input digital signal $s(t)$, which needs to be transmitted and looks like a window function, it's firstly modulated to a carrier signal $cos(2\pi f_c t)$, deriving $g(t)=s(t)cos(2\pi f_c t)$. According to Fourier transformation, it will lead to a frequency shift in the spectrum (from the center to both two sides).

For demodulation, the same carrier signal is needed. The received data is multiplied by the carrier signal, deriving $y(t)=g(t)cos(2\pi f_c t)=s(t)cos^2(2\pi f_c t)$. Then, using duplication formulas for trigonometric function, one can derive that $y(t)=1/2s(t)+1/2s(t)cos(4\pi f_c t)$

Multiplexing

Multiplexing is the transmission of information from more than one source to more than one destination over the same transmission medium. To achieve this, multiplexing and demultiplexing are needed.

Several ways to realize multiplexing:

  • Frequency division multiplexing (FDM)
  • Wavelength division multiplexing (WDM)
  • Time division multiplexing (TDM)
Data communication networks