Frames & Encoding

Download Report

Transcript Frames & Encoding

Line coding Schemes
1
1
0
1
0
0
1
BINARY DATA
(a) Punched Tape
Mark
(hole)
Mark
(hole)
space
Mark space space
(hole)
Mark
(hole)
RZ encoding:
1. Unipolar return to zero
Unipolar RZ
Volts
A
0
Tb
Time
A
Unipolar RZ
0
Half pulse 1
Binary signaling formats
1
Line coding Schemes
NRZ encoding:
1
1.
non-return to zero level
2.
return to zero inversion
Mark
(hole)
1
Mark
(hole)
0
space
1
0
0
Mark space space
(hole)
1
BINARY DATA
Mark
(hole)
A
Polar NRZ-L
0
-A
Transition on
change only
Polar NRZ-I
transition if next bit a 1
to +V or –V alternately,
no change if next bit is
zero, stays at present
level
Polar RZ Level
Half pulse then RZ
+V=1, -V=0
8B/6T +, -, 0 remapping
ESC key = 1Bhex, 00011011 binary
code= 0+- 00+
+
0
+
-
0
0
Binary signaling formats
2
Line coding Schemes
Biphase encoding:
1
Mark
(hole)
1
Mark
(hole)
0
space
1
0
0
Mark space space
(hole)
1
BINARY DATA
Mark
(hole)
Manchester NRZ Half pulse,
Hi transition to Lo = 0
Lo transition to Hi = 1
Differential Manchester NRZ
Half pulse, Transition at 0
start, 1 no change at start
Bipolar encoding:
Multiline Transmission 3 levels
MLT-3 signal, +V, 0V, -V
Alternate transitions at a 1 start,
but only to the next level, of the
3. no change of level at 0
A
Bipolar RZ half
pulse changes
for 1s, remain
at zero for 0 bit
0
-A
Binary signaling formats
3
4B5B Example
• In order to send information using 4B5B encoding, the data byte to be sent is
first broken into two nibbles. If the byte is 0E, the first nibble is 0 and the
second nibble is E. Next each nibble is remapped according to the 4B5B table.
Hex 0 is remapped to the 4B5B code 11110. Hex E is remapped to the 4B5B
code 11100. Other information remapping types are 5B6B and 8B10B.
4B5B Encoding Table
Data (Hex)
(Binary)
4B5B Code
0
0000
11110
1
0001
01001
2
0010
10100
...
...
...
D
1101
11011
E
1110
11100
F
1111
11101
• In 100BASE-FX and 100BASE-TX,
the 4B5B replacement happens at the
PCS sublayer of the Physical layer.
Information is then further encoded
for transmission using NRZI in
100BASE-FX at the PMA sublayer,
and MLT-3 in 100BASE-TX at the
PMD sublayer. FDDI also MLT-3.
• 100VG-AnyLAN is 5B6B.
4
8B/6T Example
• In order to send information using 8B6T encoding, the value of the data byte
is compared to the values in the 8B6T table. Every possible byte has a unique
6T code, a set of 6 tri-state symbols. Unlike 4B5B, 8B6T completely prepares
the data for transmission; no further encoding is required. The 256
possibilities are represented by a 6 symbol code using 3 different levels.
• 100BASE-T4 is currently the
8B6T Encoding Table
Data (Hex)
(Binary)
8B6T Code
00
0000 0000
+-00+-
01
0000 0001
0+-+-0
....
.... ....
......
0E
0000 1110
-+0-0+
....
.... ....
......
FE
1111 1110
-+0+00
FF
1111 1111
+0-+00
only technology which uses 8B6T
encoding. It performs 8B6T
encoding at the PCS sublayer of
the Physical layer. 100BASE-T4
then demultiplexes the 6T codes
onto three wire pairs.
Ternary signals are:
+1V, 0V, & -1V
5
Portion of 8B6T Code Table
6
Some Encoding schemes
•
•
•
•
10Mbps Ethernet (Manchester encoding)
100baseTX (MLT-3, 2 pair cat5, 4B5B)
100BaseFX (NRZ-I, 2 pair fiber, 4B5B)
100BaseT4 (3 level 1v, 0v, & -1v, 4 pair cat
3, 8B/6T)
• Token Ring (Differential Manchester)
7
Ethernet Version II is the protocol originally developed by Xerox, DEC, & Intel.
Preamble 7 bytes of 10101010 to synchronize input timing.
Start Of Frame Delimiter (SOFD) 1 byte, signals the beginning of the frame.
10101011 last 2 bits indicates next field is Destination Address.
Note: the Preamble and SOFD are not considered part of the actual frame.
Ethernet II Frame Format
8
Ethernet Version II frame format specification.
Like the 802.3 spec, the Version II spec defines a Data Link Header consisting of
14 bytes of information, but the Version II spec does not specify an LLC header.
The Data Link Header
Offset 0-5: Destination Address the first six bytes of an Ethernet frame. It
specifies to which adapter the data frame is being sent. A Destination Address
of all ones specifies a Broadcast Message that is read in by all receiving
Ethernet adapters.
Offset 6-11: The Source Address the next six bytes of an Ethernet frame. It
specifies from which adapter the message originated.
Offset 12-13: The Ethertype following the Source Address is a 2 byte field
called the Ethertype. The Ethertype is analogous to the SAPs in the 802.3 frame
in that it specifies the protocol type of the packet. 0x8000 is TCP/IP, etc... 9
User Data and FCS
Data: 46-1500 Bytes following the Ethertype are 46 to 1,500 bytes of data, generally
consisting of upper layer headers such as TCP/IP or IPX and then the actual user data.
FCS: The Last 4 bytes that the adapter reads in are the Frame Check Sequence or CRC.
The adapter checks the last 4 bytes it received against a checksum that it generates via
a complex polynomial. If the calculated checksum does not match the checksum on the
frame, the frame is discarded and never reaches the memory buffers in the station.
An interesting question arises when one considers the 802.3 and Version II frame formats:
Both formats specify a 2 byte field following the source address (an Ethertype in
Version II, and a Length field in 802.3) -- How does a driver know which format it is
seeing, if it is configured to support both?
Answer:
All Ethertypes have a value greater than 05DC hex, or 1500 decimal. Since the
maximum frame size in Ethernet is 1518 bytes, there is no point of overlap between
Ethertypes and lengths. If the field that follows the Source Address is greater than
O5DC hex, the frame is a Version II, otherwise, it is something else (either 802.3,
802.3 SNAP, or Novell Proprietary).
10
The IEEE Ethernet frame format is defined by the 802.2 Logical Link
Control (LLC) standard and is presented on the IEEE Ethernet
Frame Format. Is now the more widely used format.
IEEE Ethernet Frame Format
11
The IEEE 802.3 Frame Format is described in the IEEE 802.3 Specification. The
802.3 Specification defines a 14 byte Data Link Header followed by a Logical
Link Control Header that is defined by the 802.2 Specification.
The Data Link Header
Offset 0-5: Destination Address the first six bytes of an Ethernet frame specifies
to which adapter the data frame is being sent. A Destination Address of all ones
specifies a Broadcast Message that is read in by all receiving Ethernet adapters.
Offset 6-11: The Source Address the next six bytes of an Ethernet frame specifies
from which adapter the message originated.
Offset 12-13: Length Bytes 13 and 14 of an Ethernet frame contain the length of
the data in the frame, not including the preamble, 32 bit CRC, DLC addresses, or
the Length field itself. An Ethernet frame can be no shorter than 64 bytes total
12
length, and no longer than 1518 bytes total length.
THE 802.2 LOGICAL LINK CONTROL (LLC) HEADER
Following the Data Link Header is the Logical Link Control Header, which is described in
the IEEE 802.2 Specification. The purpose of the LLC header is to provide a "hole in the
ceiling" of the Data Link Layer. By specifying into which memory buffer the adapter
places the data frame, the LLC allows the upper layers to know where to find the data.
Offset 15: The DSAP, or Destination Service Access Point, is a 1 byte field that identifies a
protocol, or set of protocols, in the next higher layer. This functionality is crucial in
situations where users are running multiple protocol stacks, etc...
Offset 16: The SSAP, or Source Service Access Point is 1 byte and is analogous to the
DSAP, and specifies the Source of the sending process.
Offset 17: The Control Byte is a 1 byte control field, specifies the type of LLC frame.
USER DATA AND THE FRAME CHECK SEQUENCE (FCS)
Data: 43-1497 Bytes
Following the 802.2 header are 43 to 1,497 bytes of data, generally consisting of upper
layer headers such as TCP/IP or IPX and then the actual user data.
FCS: The Last 4 bytes that the adapter reads in are the Frame Check Sequence or CRC. The
adapter checks the last 4 bytes it received against a checksum that it generates via a
complex polynomial. If the calculated checksum does not match the checksum on the
frame, the frame is discarded and never reaches the memory buffers in the station.
13
A Token Ring Frame consist of three types: Data, Token, and Abort.
Data Frame:
• SD Start Delimiter 1 byte, alert arrival and start synchronizing
pattern: JK0JK000 where
J&K are 1 or 0 without transitions, that would be normal for Differential Manchester encoding.
JK0JK000
• AC Access Control 1 byte, with 4 subfields. 3 bits priority, 4th bit is the Token bit, monitor bit, 3
Reserve access to ring bits.
• FC Frame Control 1 byte, with 2 subfields. 1st bit= type of information sent: Control or Data.
The other 7 bits are special information used by Token Ring Logic.
• DA Destination address 6 bytes, physical MAC
• SA Source address 6 bytes, physical MAC
• Data field, the length is defined by max token holding time defined on the Ring. Bytes include
the PDU (DSAP, SSAP, Control, Data).
• FCS frame check sequence 4 bytes, CRC-32 cyclical redundancy check.
• ED end delimiter 1 byte, end of data field. JK1JK1IE, I=last frame indicator, E= error detected
by receiving or repeating station.
• FS Frame status 1 byte, address recognized bits & Frame copied bits AFxxAFxx
14
Token Frame:
• SD Start Delimiter 1 byte, alert arrival and start synchronizing pattern:
JK0JK000 where J&K are 1 or 0 without transitions, which are normally
used in Differential Manchester encoding. JK0JK000
• AC Access Control 1 byte, with 4 subfields. 3 bits priority, 4th bit is the
Token bit, monitor bit, 3 Reserve access to ring bits.
• ED end delimiter 1 byte, end of data field. JK1JK1IE, I=last frame
indicator, E= error detected by receiving or repeating station.
Abort frame:
• SD Start Delimiter 1 byte, alert arrival and start synchronizing pattern:
JK0JK000 where J&K are 1 or 0 without transitions, which are normally
used in Differential Manchester encoding. JK0JK00
• ED end delimiter 1 byte, end of data field. JK1JK1IE, I=last frame
indicator,
E= error detected by receiving or repeating station.
15
Token Ring IBM & IEEE 802.5 are examples of token passing nets.
• Token passing networks move a small frame, called a token, around the network. Possession
of the token grants the right to transmit data.
• If a node that receives a token has no information to send, it passes the token to the next end
station. Each station can hold the token for a maximum period of time, depending on the
specific technology that has been implemented
• When a token is passed to a host that has information to transmit, the host seizes the token
and alters the T bit, which has the effect of converting the token into a start-of-frame
sequence. Next, the station appends the information to transmit to the token and sends this
data to the next station on the ring. There is no token on the network while the Data frame is
circling the ring, unless the ring supports early token releases. Other stations on the ring
cannot transmit, they must wait for the token to become available. Token Ring networks have
no collisions.
• If early token release is supported, a new token can be released when the frame transmission
has been completed.
• The Data frame circulates around the ring until it reaches the destination station, which
copies the Data for processing. The Data frame continues around the ring until it reaches the
sending station, where it is removed. Sending stations verify the frame was received and
copied by the correct destination. It checks the Frame Status field bits address recognized bit
and Frame copied bit which are repeated in this field twice.
16
Wireless Frame:
Consist of a MAC Hdr, frame body, & Frame Check Sequence (FCS)
MAC Hdr – 7 fields 30 bytes long
Frame Body - variable from 0 to 2312
FCS – 32-bit cyclic redundancy check
17
Wireless End Station and Wireless Access Point
Wireless is fastest growing segment
Wi-Fi or 802.11b: 2.4GHz, direct
sequence spread spectrum (chip code),
CSMA/CA.
Two Operating modes:
Ad Hoc Mode - Independent Basic Service Set (IBSS)
direct communications, no AP (like 2 PC peer-to-peer)
Infrastructure Mode – Extended Service Set (ESS)
with access point connected to wired network
uses a portal or logical bridge between wired & wireless
802.11a not compatible with 802.11b or other manufacturers of 11a
18
The Hidden Node Problem
Solution: The Four-way Handshake
19
Wireless Security—Basic Steps You Need to Take
Wireless makes it easy to share Internet access and data. But you
wouldn't want to share your information with just anyone. With a
wireless network, your information is traveling through the
airwaves—not physical wires, so anyone within range can "listen
in" on your network. Here are some essential security measures
you should take to secure your wireless network.
1.
2.
3.
4.
5.
Change the default SSID (network name).
Disable the SSID broadcast option.
Change the default password needed to access a wireless device.
Enable MAC address filtering
Enable WEP 128-bit Encryption. Please note that this will reduce
your network performance.
6. Upgrade to Wi-Fi Protected Access (WPA)
20
1.
Change the default SSID.
Your wireless devices have a default SSID set by the factory. The SSID is
the name of your wireless network, and it can be anything you wish. Linksys
wireless products use linksys as the default SSID. Hackers know these
defaults and can try them to join your network. Change the network's SSID
to something unique, and make sure it doesn't refer to the networking
products you use. As an added precaution, be sure to change the SSID on a
regular basis, so any hacker who may have figured out your SSID in the
past will have to figure out the SSID repeatedly. This will deter future
intrusion attempts.
2. Disable SSID broadcast.
By default, most wireless networking devices are set to broadcast the SSID,
so anyone can easily join the wireless network. But hackers will also be able
to connect, so unless you're running a public hotspot, it's best to disable
SSID broadcast.
Keep these things in mind about the SSID:
a. Disable Broadcast
b. Make it unique
c. Change it often
21
3. Change the default password needed to access a wireless device.
For wireless products such as access points and routers, you will be asked for a
password when you want to change their settings. These devices have a default
password set by the factory. (The Linksys default password is admin.) Hackers
know these defaults and will try them to access your wireless device and change
your settings. To thwart this action, customize the device's password so it will be
hard to guess.
4. Enable MAC address filtering.
If your wireless products—such as access points and routers—offer it, enable
MAC address filtering. The MAC address is a unique series of numbers and
letters assigned to every networking device. With MAC address filtering enabled,
wireless network access is provided solely for wireless devices with specific
MAC addresses. This makes it harder for a hacker to access your network using a
random MAC address.
5. Enable WEP 128-bit Encryption.
There are other security measures you can take as well, but these are the most
essential. For WEP change encryption key periodically.
There are several ways that WEP can be maximized:
a. Use the highest level of encryption possible
b. Use a “Shared” Key
c. Use multiple WEP keys
d. Change your WEP key regularly
22
6. Upgrade to Wi-Fi Protected Access (WPA)
The biggest weakness in current wireless security settings is the WEP encryption
key. Even if your network hardware supports 256-bit encryption, the key is a
fixed key which could eventually be cracked by a determined intruder. Some
wireless Ethernet hardware now supports Wi-Fi Protected Access (WPA),
which uses a new dynamic keying method which generates trillions of keys
from a single key entry. Unfortunately, although WPA was introduced in
2003, many vendors have still not upgraded their hardware to support it.
Check with your wireless network vendors for hardware updates if your
wireless access point/router or network adapters don’t include WPA support.
If a single device on your wireless network doesn’t support WPA, you will
need to continue to use WEP encryption instead.
Change Channels
Usually on the "Setup" page, there is a "Channel" area, in that area, click on the
drop down list and use only channels 1, 6, or 11. These channels do not
"Overlap" with any other channels, and will give the clearest signal. After
changing the channel, click on the Apply button on the "Setup" screen, then a
page will appear prompting that the settings were successful, and when that
page appears, click on the Continue button. After applying the settings, see if
the Wireless signal is better or worse, if it is not better or if it is worse, then
try another channel.
23