0% found this document useful (0 votes)
12 views42 pages

2a Spectrum Encoding Framing

Uploaded by

ronaldodutra777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views42 pages

2a Spectrum Encoding Framing

Uploaded by

ronaldodutra777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

COMPSCI 311 – Computer Network Architecture

Spectrum
Network from an end-user’s point of view
• Different access
technologies
• Cable
• DSL
• Fiber
• WiFi
• 4G
• 5G
• Radio
• Satellite
Spectrum allocation and properties
Spectrum allocation and properties

Better propagation Higher bandwidth


Spectrum allocation
COMPSCI 311 – Computer Network Architecture
Encoding
Encoding/decoding
• Given a link, we need a way to signal bits from one end to another
Encoding/decoding
• Given a link, we need a way to signal bits from one end to another
• Different voltages in copper link
• Different power levels in optical link
• Different amplitudes in radio transmission
Non-Return to Zero (NRZ)
Non-Return to Zero (NRZ)

• Problems with NRZ


• Baseline wander → adaptor might lose track of what is a change in the signal
Non-Return to Zero (NRZ)

• Problems with NRZ


• Baseline wander → adaptor might lose track of what is a change in the signal
• No clock recovery → adaptor might lose synchronization with remote adaptor
Non-Return to Zero Inverted (NRZI)

• NRZI inverts the signal on 1 bit, keeps signal unchanged during 0 bit
Non-Return to Zero Inverted (NRZI)

• NRZI inverts the signal on 1 bit, keeps signal unchanged during 0 bit
• Prevents baseline wander and enforces clock synchronization
during long sequences of ones, but not zeros
Manchester encoding

• Exclusive or (XOR) between clock and bits


Manchester encoding

• Exclusive or (XOR) between clock and bits


• Prevents baseline wander and enforces clock synchronization
Manchester encoding

• Exclusive or (XOR) between clock and bits


• Prevents baseline wander and enforces clock synchronization
• Requires double the number of signal transitions
Manchester vs NRZ: signal efficiency
Manchester vs NRZ: signal efficiency

16 bits,
16 transitions

32 bits,
32 transitions

16 bits,
32 transitions
Manchester vs NRZ: signal efficiency

16 bits,
16 transitions

32 bits,
32 transitions

16 bits,
32 transitions

50%
efficiency
Data Transmission
4b/5b encoding 0000 11110
0001 01001
0010 10100
• Encode 4 bits into 5 bits 0011 10101
• Remove sequences of 5 bits with many repetitions 0100 01010
• NRZI encoding 0101 01011
• At most 1 zero at the beginning and 2 zeros at end 0110 01110
• Guarantees transitions 0111 01111
• Prevents baseline wander 1000 10010
• Enforces clock synchronization 1001 10011
• Achieves better efficiency (80%) 1010 10110
1011 10111
1100 11010
1101 11011
1110 11100
1111 11101
Data Transmission
4b/5b encoding 0000 11110
0001 01001
0010 10100
• Encode 4 bits into 5 bits 0011 10101
• Remove sequences of 5 bits with many repetitions 0100 01010
• NRZI encoding 0101 01011
• At most 1 zero at the beginning and 2 zeros at end 0110 01110
• Guarantees transitions 0111 01111
• Prevents baseline wander 1000 10010
• Enforces clock synchronization 1001 10011
• Achieves better efficiency (80%) 1010 10110
1011 10111
1100 11010
• 64b/66b: 97% efficiency (10G Ethernet) 1101 11011
• 128b/130b: 98.5% efficiency (PCI-e 3) 1110 11100
1111 11101
Modulation
• Previously assumed adaptors that differentiate between two signals
• “High” and “low”
• Adaptors may modulate and recognize more signals
• Allows transmission of multiple bits per clock cycle
• For example, differentiating between 4 signals allows transmission of 2 bits

00 01 10 11
COMPSCI 311 – Computer Network Architecture
Framing
Framing: grouping bits
• Bits flow between adaptors, frames flow between hosts
Sentinel-based framing
• BISYNC

• PPP

01111110 01111110
Sentinel-based framing
• Problem:
• Special framing bytes may appear in payload!

Data DLE A ETX B


Sentinel-based framing
• Problem:
• Special framing bytes may appear in payload!

Data DLE A ETX B

Frame with sentinels STX DLE A ETX B ETX


Sentinel-based framing
• Problem:
• Special framing bytes may appear in payload!

Data DLE A ETX B

Frame with sentinels STX DLE A ETX B ETX

Not the end


of the text!
Sentinel-based framing
• Problem:
• Special framing bytes may appear in payload!

Data DLE A ETX B

Frame with sentinels STX DLE A ETX B ETX

Decoded data DLE A


(missing 2 bytes)
Sentinel-based framing
• Problem:
• Special framing bytes may appear in payload!

Data DLE A ETX B

Frame with sentinels STX DLE A ETX B ETX

Frame with escapes STX DLE DLE A DLE ETX B ETX


Sentinel-based framing
• Problem:
• Special framing bytes may appear in payload!

Data DLE A ETX B

Frame with sentinels STX DLE A ETX B ETX

Frame with escapes STX DLE DLE A DLE ETX B ETX

Decoded data DLE A ETX B


Escapes work just like in strings
• In many languages some characters have special meaning in strings
• Quotes
• \n
•%
• How do we add special characters in strings? We escape them!
Count-based framing
• DDCMP

Number of bytes in body


Count-based framing
• Problem:
• Byte count can be corrupted during transmission
• Packet reception will be misaligned, and resynchronization is necessary

5 1 2 3 4 5 6 7 8 9 8 0 1 2 3 4 5 6 8 7 8 9 0 1 2 3
Frame 1 Frame 2 Frame 3 Frame 4
Count-based framing
• Problem:
• Byte count can be corrupted during transmission
• Packet reception will be misaligned, and resynchronization is necessary

5 1 2 3 4 5 6 7 8 9 8 0 1 2 3 4 5 6 8 7 8 9 0 1 2 3
Frame 1 Frame 2 Frame 3 Frame 4

Error Now a byte count

5 1 2 3 4 7 6 7 8 9 8 0 1 2 3 4 5 6 8 7 8 9 0 1 2 3
Frame 1 Frame 2, corrupted Possibly many corrupted frames
Count-based framing
• This is why we have the SYN bytes

SYN bytes allows adaptor to find


where the next packet starts
Bitwise Sentinel Framing
• Sequence of bits marks the beginning and end of frames
• HDLC

01111110 01111110
Bitwise Sentinel Framing
• Sequence of bits marks the beginning and end of frames
• HDLC

01111110 01111110

• Special sequence of bits can appear in the middle of the body


Bit stuffing
• Special sequence: 0111 1110
• Transmitter: stuffs 0 after five consecutive 1s
• Receiver after receiving five consecutive 1s:
• If sixth bit is 0, it is stuffed: discard and continue receiving
• If sixth bit is 1, then we are receiving the special sequence
• If seventh bit is 0, then we have received the special sequence
• If seventh bit is 1, then we have encountered a transmission error
Bit stuffing

Original bits 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0

Transmitted bits 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 0 0 1 0

Decoded bits 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0
Clock-based framing
• Frames have known size
• After synchronization we know where the next frame starts
• Requires high-precision clocks and synchronization phase
• Higher efficiency
• No stuffing
• No sentinels
• No byte counts
• Corruption impacts
single frame only
COMPSCI 311 – Computer Network Architecture
Error Detection

You might also like