2a Spectrum Encoding Framing
2a Spectrum Encoding Framing
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
• 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
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!
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
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
01111110 01111110
Bitwise Sentinel Framing
• Sequence of bits marks the beginning and end of frames
• HDLC
01111110 01111110
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