CS计算机代考程序代写 scheme DHCP Lecture 3 Physical Layer Page 14 of 14

Lecture 3 Physical Layer Page 14 of 14
Physical Layer
The physical layer contains all of the electrical, mechanical and procedural interfaces to transmit over all LANs and WANs links, making it the most complex layer of the TCP/IP model. The physical layer defines the means of transmitting raw bits of the data link frame over a physical link connecting network hosts The bits are converted to a signal and the host auto-negotiate the encoding scheme for representing zeros and ones. The physical layer also determines whether to use digital or analog signals, the frequencies to broadcast on, whether the transmission is multiplexed, asynchronous or synchronous.
Signal
A signal is a form in which data is transmitted from source to destination. It describes the behavior of data. In other word signal is an electronic representation of data.

Data
Entities that convey some meaning or information. Data can have different forms like text, image, voice and video (stored or real time).

Characteristics of Signals
 All signals whether digital or analog have 3 characteristics, amplitude frequency and phase
Amplitude and Frequency
Amplitude is the height of the signal measured from the horizontal axis. The height of the wave indicates a higher voltage or amperes or watts depending on what is being measured. Frequency refers to how many periods of the signal are completed in a second, measured in Hertz. A period is the amount of time it takes to complete one cycle. Frequency and period are inverse values. In the diagram below, there are 6 completed periods, or cycles of the waveform in 1 second. This gives a frequency of 6 Hz. If the frequency is 6 Hz, then the period is 1/6 of a second. Time
Voltage
Amplitude
Period = 1/6 sec
1 second
Frequency = 6 Periods = 6 Hz

Phase
 The phase of a signal describes the position of the waveform relative to time zero. If you think of a compass with 3600 of rotation. The waveform can be manipulated to shift it forward or backward along the time axis. Phase is measured in degrees. Common phrase degrees are 1800 and 900 .
                                                 Time
Voltage
1800 Phase Shift
00 Phase Shift
900 Phase Shift Phase Shift

                                             

Types of Data
Analog
Analog data is characterized by data values that are continuous. They have indefinite number of values from continuous range.
Digital
Digital data values that are discrete. It is constructed from a finite number of symbols. Digital data is also referred as binary values of 0s and 1s.
Types of SignalsTime
Voltage

Analog
Human speech and music from your CD player are all analog waveforms with a continuous rising and falling of electromagnetic signals, usually voltage, between some given minimum and maximum value. Technically called a sine wave, there are an infinite number of values along the waveform over time. Analog signals are used for wireless communication and some highspeed Internet trunk lines.
Digital
A digital signal is represented as a square wave with two discrete states representing “0s” and “1s”. In the example below, positive voltage represents a 1 and negative voltage a 0. The discrete states combined with a square wave form make it easier to distinguish noise from the signal. Let’s look at a programming example using analog and digital signals.+5V
-5V
110001101001

The physical layer is capable of creating the following types of signals:
· Digital Data carried by a Digital Signal
· Digital Data carried by an Analog Signal
· Analog Data carried by an Analog Signal
· Analog Data carried by a Digital Signal
Digital Data carried by a Digital Signal
To transmit digital data using digital signals the 1s and 0s must be converted to the proper physical form to be transmitted over a wire or airwave. The 2 most popular schemes are NRZI and 4B/5B. NRZI stands for Non-return to zero inverted. A change in voltage at the beginning of bit period represents a 1 and no change represents a zero.110001101001

+5V

-5V

An inherent problem with digital encoding is that long strings of 0s in the data produce a signal that never changes. The receiving computer needs a signal change to reset its internal clock to keep in synch with the incoming bit stream. However, long strings of 0s keep the voltage constant and the receiving computer could “drift” out of synch. To avoid this problem, an encoding system called Manchester was developed which deliberately changed the voltage twice for each bit (Baud rate 2X bit rate). This prevented the receiving computer from drifting out of synch, but created a very inefficient scheme with the voltage changing twice per bit period. Nevertheless, Manchester was the encoding scheme for Ethernet up to 10 Mbps. Faster speeds lead to a new encoding scheme used in Gigabit Ethernet called 4B/5B which is used in fiber optic cables and in many cell phones.
This scheme tries to solve the synchronization problem by encoding 4 bits of original data in to a unique 5 bit sequence using NRZI encoding. Five bits gives 32 possibilities (25 = 32), however, only 16 combinations are used to ensure that there are no more than 2 consecutive zeros in the sequence. This ensures using NRZI encoding that signal changes will occur regularly preventing the receiving computer from drifting out of synchronization.

Original Data
New 5 bit Unique Sequence
NRZI
01011

+5V
-5V

0000
11110

0001
01001

0010
10100

0100
01010

0101
01011

0101
01011

Digital Data carried by an Analog Signal
Your cable TV and modem are examples of digital data being carried by an analog signal. Each television station and Internet access is reserved a specific frequency. Within each frequency band digital data is
sent using modulation techniques (called shift-keying). For example, the digital data “010” can be represented by analog signals. Amplitude Shift-keying is represented by two different amplitudes a low amplitude for a “0” and a high amplitude for a “1”. The amplitude is kept constant during each bit period. Or, keeping frequency constant during each bit
+5V
-5V
0 1 0
Time

Time
+5V
-5V
0 1 0
Figure 1: Amplitude Shift-keying

Figure 3: Frequency Shift-keying

period, 2 Hz could represent a “0” and 4 Hz could represent a “1”. This is called frequency shift-keying. In the example, we are showing one bit being sent per bit period. This is not necessarily always the case. Each bit period can represent more than one bit, such as 00, 01, 10, 11 that would incorporate four different amplitude levels and each level.
With Phase Shift-Keying no phase shift could represent a “0” and an 1800 shift could represent a “1”.
Phase shift-keying is the least susceptible to noise and is very accurate. The types of modulation discussed are not used in isolation but can be combined. For example, 256-QAM ( 256-Quadrapture Amplitude modulation IEEE 802.11ac) which is used commonly used in contemporary modems and in cable TV setup boxes, uses 4 phase shift keying degrees, combined with 2 different amplitudes to send 8 bits per cycle. This gives exceptional high data rates needed for high-definition TV and high speed modems
+5V
-5V
0 1 0
Time

Figure 3: Phase Shift-keying

Analog Data carried by an Analog Signal
For example, AM and FM radio is an example of analog data being carried by an analog signal. The music program produced at the 740 AM radio station is a weak analog signal. Every radio station applies for a federal license to broadcast a strong carrier signal at a specific frequency, in this case 740 kHz. Technology overlays the weak signal with the carrier wave to create a “composite signal”. To hear the program, you tune the radio dial to the 740 kHz band.1. Weak analog Signal
2. Strong Carrier Signal
3. Composite Signal
4. Radio Tuned to Carrier Signal

Analog Data carried by Digital Signals
Suppose we wanted to call a friend by telephone. When we speak into a telephone, a small diaphragm vibrates to the intensity of our voice and an electrical signal is generated which is analogous to our voice. This analog signal is sent over copper wire to the nearest telephone switching station. There the signal is “sampled” and converted into a digital signal to travel over the telephone systems trunk lines. At the other end, the digital signal is converted back to analog to travel the last link between your friend’s nearest switching station and his/her home. This conversion process is called Pulse Code Modulation which involves 3 steps.
1. Sample the Analog waveform at fixed intervals
2. Quantize the amplitude to a 7-bit binary value
3. Using PAM (Pulse Amplitude Modulation) convert the 7-bit binary value back to an electrical signal which represents the original waveform.
Sampling involves taking a snapshot of the waveform at fixed intervals. For CD quality this is 2 X the highest frequency. For example, suppose a waveform had a high frequency of 3700 Hz. We would need to sample at 7,400 times per second[endnoteRef:1] to get a good representation of that waveform. Based on the height of the wave, the amplitude is converted to a fixed binary value using a codec. The sampling is a compromise between performance and quality. Sampling more frequently will generate a closer representation of the waveform, but would require more processing power and a longer binary value (27 = 128 quantitation levels). This binary value can now be transmitted using a digital encoding format. [1: Harry Nyquist’s Theorem
Image taken from http://www.tvdictionary.com/sample_diagrams/ag_Cable_Modem_Overview_low_res.jpg
]

When the digital value needs to be converted back to an analog waveform, a special hardware chip called PAM, converts the discrete binary value back to an electrical pulse that represents the original amplitude. As you can see in the diagram below. The rebuilt waveform is like the original (most users can’t hear the difference) but is not an exact replica of the original. In fact, parts of the original waveform may be removed, and quantization noise could be introduced.
Figure 2: Pulse Code Modulation and Introduction of Errors
Time
Lost Sound
Quantization Noise
Sampling Rate

So, what is the optimal compromise between performance and sound quality. According to Nyquist, the sampling rate using pulse code modulation must be at least twice the highest frequency of the original analog waveform to ensure a reasonable reproduction. We call this reasonable reproduction CD quality today which is based on Nquist’s theorem.
Relationship between Frequency, Bit Rate and Baud Rate
Network speed is reported in bps (bits per second). But speed is greatly affected by how “efficient” the network encoding system is. For example, if a signal had to change 2 times to represent 1 bit, then this would not be as efficient as 1 signal change per bit. This is the baud rate. We saw in Lab 2 that NRZ-I (Non-Return to Zero – Inverted) was very efficient and could represent 8 bits with only 2 signal changes, depending how many 1’s were to be encoded.
When network users complain that the network is too slow, it seems easy for them to fix: “Just send the data faster”. However, getting a faster data rate can only be done in one of two ways:
· Send more bits per bit cycle at the same frequency, or
· Keep the bit rate the same and increase the frequency of the signal
For either of the solutions to work, the medium that transmits the signal must support the higher frequency. The higher the frequency, the higher the bit rate per second. For example, if an analog signal sent one bit per completed bit period, then a 6 Hz signal would send 6 bits per second. If the frequency is doubled to 12Hz then 12 bits would be sent per second. While this may seem a simple solution, increasing the frequency also increases noise and EMI and the cable could interfere with adjacent cables. For this reason, the wattage used in a cable is strictly controlled by Federal regulation.
On the other hand, if the frequency is constant and you want a faster data rate then more bits must be sent per clock cycle. In the above example, we saw that a 6 Hz signal, sending 1 bit per period would send at total of 6 bits per second. Suppose, we had 4 signal levels per second and 2 bits were sent per period, then the total would be 8 bits per second. As you divide the time interval into more discrete levels, however, you increase the potential for errors if noise of the medium is not low.
Shannon’s Theorem is used to calculate the maximum of an analog signal with any number of signal levels based on the level of the noise.
Data Rate = f X log2 (1 + S/N)

f – bandwidth of the signal
S – power of the signal in watts
N – power of the noise in watts
Bandwidth is the highest frequency of the medium – the lowest frequency of the medium. For example, the telephone system was designed for the human voice which as a frequency range of 300 Hz to 3400 Hz. Therefore, the bandwidth is 3400 – 300 = 3100 Hz. Suppose you were writing an application which will use a dial up modem. If the power of the signal was .5 watts and the noise is .0002 watts. What is the maximum bit rate in bytes per second?
= 3100 X log2 (1 + 0.5/0.0002)
= 3100 X log2 (1 + 2500)
=3100 X log2 (2501)
= 3100 X 11.289 (DIVIDE LOG10 3.98113/0.301 TO APPROXIMATE LOG2 )
= 34,996 bps / 8
=4,374.5 Bytes per second

Programming with Analog Signals: An Example
Suppose you wanted to create a software program to run an ATM machine and you decided to use analog signals. For simplicity, the ATM program will check if the user has an account using a pin, and has only one button to dispense $100 of cash based on how many times the user pushes the button. Since analog signals are a continuous rising and falling of voltage, you decide to use 2 frequency ranges. An amplitude of 2 volts will represent a “0” and an amplitude of 4 will represent a “1”. The user comes to the ATM and inserts their card. They are asked to enter their pin. Their pin is encoded in a frame that begins with “00”. This is a “flag” to the server to authenticate the user. A success message is returned to the ATM with the tag “01” and the ATM displays the message “Proceed”. The user then pushes the $100 button to get cash and a “10” signal is sent to the server to check the user’s account balance. If the user can withdraw $100 a success message “11” is returned to the ATM and $100 is dispensed.
Now with the same scenario, suppose that just after the user pushed the cash button, lightning hit the line and a spike in voltage of 8 volts travels to the server. The server would interpret this as a success message and dispense $100.00 even if the user did not have sufficient funds!
Using the same scenario, but substituting a digital signal. A digital signal is a discrete signal which allows a finite range of values. Any voltage with an amplitude less than 2 would be interpreted as a 0 and with an amplitude of 4 or greater would be interpreted as a 1. Thus, even with a spike in voltage, caused by e lightning, the message would be interpreted the same way and would not dispense any money unless the button was pushed.
The ability of digital signals to separate noise from the waveform is the main strength of digital signals. Noise is unwanted electromagnetic energy that interferes with the signal. Noise is found in all data transmission systems, from a slight hiss in the background to a complete loss of data. Therefore, all transmission systems go to great lengths to reduce noise as much as possible, but it is challenging. Especially for analog waveform, since noise is also analog waveform.

Understanding Metric Notation
Many network parameters, such as speed are measured in metric units. It is essential that you understand the metric system and write values in metric notation correctly. A metric prefix of “k” for kilo, meaning 1000 , “M” for mega, meaning 1,000,000 , “G” for giga, meaning 1,000,000,000 , “T for tera, meaning 1,000,000,000,000 and “P” for peta, meaning 1,000,000,000,000,000. Notice that all of the prefixes are capital letters, except kilo. (capital K is reversed for measuring temperate in Kelvins)
Prefix
Name
Example
Description

P
Peta
1,000,000,000,000,000
One thousand trillion

T
Tera
1,000,000,000,000
One trillion

G
Giga
1,000,000,000
One billion

M
Mega
1,000,000
One million

k
kilo
1,000
One thousand

Because the metric system is based on multiples of ten, converting within the system is simple. Here’s a shortcut: If you are converting from a smaller unit to a larger unit (moving upward in the table shown above), move the decimal place to the left in the number you are converting (dividing by 1000). If you are converting from a larger unit to a smaller unit (moving down in the table), move the decimal to the right (multiple by 1000). The number of places you move the decimal corresponds to the number of rows you are crossing in the table. For example, let’s say you want to convert 8,500,000 bps to Mbps. Mega is two rows up so the decimal should be moved six places to the left to create 8.5 Mbps.
Proper notation should always have one to three digits before the decimal point. So 8.5Mbps is good (1 place), but 8,500.0 kbps is bad (4 places.). Or, the value 0.085 Tbps is also bad (no places before the decimal) because the leading zero does not count. Since Tera is one row above mega, you would move the decimal place to the right by 3 places to properly write the speed as 8.5 Mbps.
There is one more rule in writing metric notation. You place a space between the number and the metric prefix, but not between the metric prefix and the base unit. For example, writing 8.5 Mbps is good, but writing 8.5M bps or 8.5Mbps is improper.

Types of Cables
There are 3 basic types of cable used in data communications today: UTP/STP, coaxial and fiber optic.
UTP/STP
UTP refers to “Unshielded Twisted Pair” cable. Four pairs of wires each twisted around the other, inside a PVC protective jacket. Two wires carry equal but opposite signals; with the cables twisted, the flow of electrons generates opposite electro-magnetic fields minimizing crosstalk. STP stands for “Shielded Twisted Pair” where the wires are wrapped in a shielding which protects the signal from external EMI and increases attenuation by having electrons bounce back to the center of the cable. The most popular network cables today are CAT5e and CAT6 cables which are specially designed to reduce noise so that they can send information at high speeds(CAT5e -1 Gbps,CAT6- 10G Ethernet for 55 meters) . UTPs’ popularity is a result of its ease of use and expandability using the RJ45 connector Figure 3: UTP and STP cables (htt)

Coaxial
Coaxial cable conducts electrical signal using a solid copper wire surrounded by an insulating layer and all enclosed by a shield of woven metallic braid which are soldered at the ends to the BNC connectors. The shield protects the signal from outside EMI and preventing electron leakage from the centre of the cable. This property makes coaxial cable a good choice for carrying weak signals that cannot tolerate interference from the environment or for stronger electrical signals that must not be allowed to radiate or couple into adjacent structures or circuits. Coaxial cable is commonly used in CATV and RF installations.
Fiber Optic
A single fiber optic cable can carry about 90,000 TV stations, or 3 million full duplex telephone conversations. Fiber optic cables are bundles of glass fibers, smaller than a human hair, which are combined into a single cable. If you look closely at a single optical fiber, you will see that it has the following parts:
· Core – Thin glass center of the fiber where the light travels
· Cladding – Outer optical material surrounding the core that reflects the light back into the core
· Buffer coating – Plastic coating that protects the fiber from damage and moisture
Light travels in a straight line and only in one direction at a time. Think of shining a flashlight down a hallway. If the hall way was straight, the light could be seen at the end of the hall. If the hallway had a 450 angle, however, you would have to place a mirror at the end of the hall and angle it in the direction you wanted the light to travel. If another user wanted to shine a light your way, he/she would have to wait until you finished or use an adjacent hallway to send light in the opposite direction. This is basically how fiber optic cables work. The inside of the cable is like a mirror; so that light can travel down the core. Because the cladding does not absorb any light from the core, the light wave can travel great distances. Another advantage of fiber optic cables is that it is impervious to EMI and wiretapping.

Types of Connections:
DSL
Digital Subscriber Line is a family of technologies developed by telephone companies to transmit multimedia content over the “local loop”; the latter is a pair of twisted copper wires that connects each home to the telephone companies switching station. The physical limit of copper is 3 miles; each home must be connected to the switching station within that distance due to attenuation. The DSL modem uses the extra bandwidth above 3400 Hz which is used for voice. It creates extra channels and then divides them into upstream and downstream. The most popular technology is ADSL, Asymmetric Digital Subscriber Line; it has a fast downstream transmission speed and a slower upstream transmission speed. This is ideal for an Internet connection where a small outgoing message returns a large web page. Once the channel groups have been established, the DSL modem monitors them for usability. The modem converts digital signals from the computer into discrete analog signals. Because DSL frequencies are very high, the closer you are to the switching station the faster the speed.
Figure 4: Typical DSL Setup

Head-Office

DSLAM
Multiplexed
Internet
Telephone
High Speed ATM
Filter
Filter

Users can also use the same line for the home phone, if splitters are used on each phone output to separate the phone frequency from the Internet. DSL is always on meaning that you don’t have to dial a connection. The DSL uses a permanent circuit which is setup by the service provider; the latter usually tries to sell a tiered program to the user based on download volume. On the customer side, the DSL Transceiver, or more commonly known as a DSL modem, is hooked up to a phone line converting digital computer signals to discrete analog signals. The other end of the DSL circuit is connected to a DSLAM, DSL Access Multiplexer) which concentrates a large number of individual DSL connections into a single trunk line such as ATM, Asynchronous Transfer Mode. The location of the DSLAM depends on the telco, but must be with the limits of the local loop due to attenuation;

Cable Modem
In a cable TV system, each TV channel is given a 6-MHz slice of the cable’s available bandwidth and then sent down the cable to your house. Roger’s cable uses fiber optic cable from the head office and coaxial cable from the neighbourhood switching centre to the user’s home. The broadband signal comes to the cable modem which splits of the CATV channels from the Internet channel. Like DSL, cable modems are asymmetric with fast download speeds and slower upload speeds. Unlike DSL, cable modem users in a neighbourhood share the bandwidth. As traffic increases overall throughput decreases. Each cable modem uses Ethernet to connect to the local network providing DHCP services to local hosts. The cable modem works with the service provider’s cable modem termination system (CMTS) at the head office. The CMTS is responsible for connecting a group of customers to an Internet Service Provider (ISP) for connection to the internet. Downloaded Internet content is demodulated using QAM converting the radio frequency into a unique binary value. The upstream content is modulated using Quadrapture Phase Shift-Keying (QPSK). This modulation technique moves 2 bits at a time. A zero is represented as a 90 degree shift change and a 1 is the same waveform
Upstream data flows from the modem to the CMTS, but requires only a smaller channel – 2 MHz portion of the bandwidth. The assumption is that people download far more data than they upload. The downstream channel is very fast and efficient; QAM64 provides up to 36 Mbps speed. The upstream channel, however, is tricky. This smaller channel operates in the 5 to 40Mhz range. Home appliances, loose connectors, and poor cabling can introduce noise into the channel and since cable modems bandwidth is shared, this noise is increased when other signals are combined. Due to this problem, most manufacturers will be using QPSK or a similar modulation scheme in the upstream direction, because QPSK is a more robust scheme than higher order modulation techniques in a noisy environment. The drawback is that QPSK is “slower” than QAM.

[endnoteRef:2] [2: Image taken from http://www.tvdictionary.com/sample_diagrams/ag_Cable_Modem_Overview_low_res.jpg
]

Bell Fibe
Bell began researching for a new television solution in 2004 in order to penetrate urban markets where Bell ExpressVu proved ineffective due to building owners restricting the installation of satellite dishes and the service could not be used with HD programming which was becoming increasing popular among customers. Bell Fibe officially launched in Canada in September 2013 in select areas of Quebec and Ontario and surpassed 5 million subscribers in 2015. An all-digital IPTV service, Fibe TV is powered by the award-winning Microsoft Mediaroom multimedia software platform (sold to Ericsson in 2013, now called Ericsson Mediaroom)- the most widely deployed IPTV platform in the world – and delivered on Bell’s high-speed fiber optic network. On the customer end is the IPTV modem which connects PVR which contains 1 TB hard drive for recording programs. The PVR includes an integrated TV receiver which can be connected via coaxial cable, Category 5 cable or wirelessly using 5 GHz – 802.11n.
IP multicasting
Bell Fibe is a “streaming service”. When you stream a program, you’re not downloading it like an ordinary file. Instead, you’re downloading a bit of a file, playing it, and, while it’s playing, simultaneously downloading the next part of the file ready to play in a moment or two. Many streaming clients put a large strain on server resources which could cause unacceptable delays and buffering. To avoid this problem streaming uses a different kind of downloading called IP multicasting. Using the latter, each packet leaves the server only once, but is sent simultaneously to many different destinations using the IGMP (IP Group Membership Protocol). For example, assume that a million people are watching a Rolling Stones concert in real time. This means one server can send information to many clients as easily as to a single client using the RTSP (Real-Time Streaming Protocol). So, if a million people are watching the concert, the single video packet from the server is multicasted over the Internet to the IP group. If the same TV provider is simultaneously offering an episode of the Big Bang Theory and some of the original group decide to “switch channels” to watch it, effectively they switch over from one IP multicast group to another and start receiving a different video stream.
Unlike Cable TV which sends the entire TV spectrum to the setup box which decodes appropriate channels, IP multicasting is more efficient in bandwidth because it sends only the selected channel to the appropriate IP group.
The nature of the World Wide Web, however, makes it difficult for service providers to maintain an equal and reliable service to all subscribers. To avoid latency and buffering, all streaming service providers’ partner with content providers who maintain caching server farms around the world, known as CDNs. which keep “mirror” copies of the same data; this is one of the main reasons NetFlix partnered with Amazon Services to provide reliable content worldwide. Then, people in northern Ontario might stream programs from Ottawa, while those in Europe might get them from Frankfurt, Germany.