KIS – Cvičenie #1
Download
Report
Transcript KIS – Cvičenie #1
KIS – Cvičenie #2
Ethernet, MAC podvrstva
Marián Beszédeš, B506
[email protected]
Ethernet Network Elements
• Ethernet LANs consist of :
– network nodes
– interconnecting media
• The network nodes fall into two major
classes:
– Data terminal equipment (DTE)
– Data communication equipment (DCE)
The network nodes
• Data terminal equipment (DTE)
– Devices that are either the source or the destination
of data frames
– devices as PCs, workstations, file servers, or print
servers = end stations
• Data communication equipment (DCE)
– Intermediate network devices that receive and
forward frames across the network
– standalone devices - repeaters, network switches,
routers
– communications interface units such as interface
cards and modems
RM OSI = Reference Model Open Systems
Interconnection
Logical Relationship to the RM OSI
DTE
MAC Client = IEEE Standard 802.2 - Logical Link Control (LLC) Specification
•
Specifies the general interface between the network layer (IP, IPX, etc) and the
data link layer (Ethernet, Token Ring, etc).
IEEE Standard 802.3 - CSMA/CD Network (Ethernet) Specification
•
Specifies the frame format, cabling and signaling standards
Logical Relationship to the RM OSI
DCE
• MAC Client = IEEE Standard 802.1 - Bridge entity Specification
– LAN-to-LAN interfaces between LANs that use
• the same protocol (Ethernet to Ethernet)
• different protocols (Ethernet to Token Ring)
• IEEE Standard 802.3 - CSMA/CD Network (Ethernet)
Specification
– Specifies the frame format, cabling and signaling standards
The Ethernet basic data frame
• Frame - format of data “packets” on the wire
• Defined by the IEEE 802.3 standard
• Preamble (PRE)
– alternating pattern of ones and zeros
– tells receiving stations that a frame is coming
– provides a means to synchronize with the incoming bit stream
The Ethernet basic data frame
• Start-of-frame delimiter (SOF)
– alternating pattern of ones and zeros ending with two
consecutive 1-bits
– indicates that the next bit is the left-most bit in the left-most byte
of the destination address
Ethernet – MAC Address
• Individual addresses = unicast addresses
– refer to a single MAC
– are assigned by the NIC manufacturer from a
block of addresses allocated by the IEEE
• Group addresses = multicast addresses
– identify the end stations in a workgroup
– and are assigned by the network manager
• Broadcast address
– indicates all stations on the network.
The Ethernet basic data frame
•
Broadcast address
– "FF:FF:FF:FF:FF:FF".
•
Multicast addresses
– received by stations on a LAN which have been configured to do so
– the least significant bit of their first octet set to one
•
•
Locally Administered addresses
– assigned by the network administrator instead of the hardware vendor
Destination
address
(DA)
– The second
bit of their first
octet set to one
– MAC address (Media Access Control address)
• unique identifier attached to most forms of networking equipment
• Used on layer 2
• Unique (48-bit address space, there are potentially
281,474,976,710,656 possible MAC addresses )
– first three octets (in transmission order) - identify an organization
– next three octets are unique for the organization
The Ethernet basic data frame
• Destination address (DA)
– The remaining 46 bits are a uniquely assigned value that identifies a
single station, a defined group of stations, or all stations on the network.
• Source addresses (SA)
– identifies the sending station.
– always an individual address and the left-most bit in the SA field is
always 0
The Ethernet basic data frame
• Length/Type - Consists of 2 bytes
– If the Length/Type field value is less than or equal to 1500
• Indicates the number of MAC-client data bytes that are contained in
the data field of the frame
– If the Length/Type field value is greater than 1536
• indicates the frame type ID if the frame is assembled using an
optional format
The Ethernet basic data frame
• Data
– a sequence of n bytes of any value
– n is less than or equal to 1500
– If the length of the Data field is less than 46, the Data field must
be extended by adding a filler (a pad) sufficient to bring the Data
field length to 46 bytes
The Ethernet basic data frame
• Frame check sequence (FCS)
– contains a 32-bit cyclic redundancy check (CRC) value
– CRC value:
• Is created by the sending MAC
• is recalculated by the receiving MAC to check for damaged frames
– is generated over the DA, SA, Length/Type, and Data fields
Frame Transmission
•
How is the transmission started?
1. an end station MAC receives a transmitframe request (accompanying address,
data information) from the LLC sublayer
2. MAC assemble frame from the LLC
sublayer information
3. MAC transfers the assembled frame into
the MAC frame buffer
4. Half Duplex ? - CSMA/CD access method
CSMA/CD Access method
• Each Ethernet MAC determines for itself when it will be allowed to
send a frame
• Carrier sense : Each station continuously listens for traffic on the
medium to determine when gaps between frame transmissions
occur.
• Multiple access : Stations may begin transmitting any time they
detect that the network is quiet (there is no traffic).
• Collision detect
– two or more stations in the same CSMA/CD network (collision domain)
begin transmitting at approximately the same time
– the bit streams from the transmitting stations will interfere (collide) with
each other = all transmissions will be unreadable
– each transmitting station must be capable of detecting that a collision
has occurred before it has finished sending its frame
• Collision detected - Solution
– Each must stop transmitting as soon as it has detected the collision and
then must wait a random length of time before attempting to retransmit
the frame
CSMA/CD Access method
CSMA/CD Access method
CSMA/CD – Worst Case !!!
• two most-distant stations on the network both need to send a frame
• the second station does not begin transmitting until just before the
frame from the first station arrives
• second station - the collision will be detected almost immediately
• first station – it won’t be detected until the corrupted signal has
propagated all the way back to that station
• “Late collision” - If the collision reaches the transmitter, after it
completed sending the entire frame (the transmitter will not detect
the collision)
• The collision window
– maximum time that is required to detect a collision
– approximately equal to twice the signal propagation time between the
two most-distant stations on the network
– minimum frame length and the maximum collision domain segment
length are directly related to the term of collision window
Example : How "late collision" is
avoided in 10Base5 Ethernet?
• Recommendation:
– minimum frame size in an Ethernet network - 64bytes or 512bits
– maximum length of an Ethernet cable segment is 500 meters for
10BASE5 (Thick Ethernet)
• Propagation speed of the signal in copper media
– 10Mbps = 10,000,000 bits per second
– speed of light in a vacuum = 300,000,000 metres/second
– speed of electricity in a copper cable = 200,000,000
metres/second
– (200,000,000 m/s) / (10,000,000 bits / s) = 20 m/bit
Minimum size Ethernet frame consisting of 64 bytes
(512 bits) will occupy 10,240 metres of cable
Example : How "late collision" is
avoided in 10Base5 Ethernet?
• Station A begins to transmit
– It will have transmitted 25 bits by the time the signal
reaches Station B 500 meters away (500[m] / 20[m/b])
• Station B begins to transmit at the last possible
instant before Station A's signal reaches it
– the collision will reach Station A 25 bit-times later (the
time it takes for the signal on the wire to travel one bitlength - 20 metres in copper cable).
Station A will have transmitted only 50 bits (NOT 512 !!!)
when the collision reaches it
Example : How "late collision" is
avoided in 10Base5 Ethernet?
• Why 512 bits, 500m are the limit values?
– signal propagation from A to B (distance around
5000m) = 256 bits transmitted from A
– collision event to propagate back from B to A = 256
bits transmitted from A
– Summary = Distance from A to B = 5000 m
• Why 512 bits, 500m are the limit values?
– Thin Ethernet Network - 5*500m segment (4
repeaters can be used) = 2500m <> 5000m
– Specification is twice as strict as it needs to be
:-)
Consequences …
• 100-Mbps networks (minimum frame size =
512b):
– minimum-length frame can be transmitted in
approximately one-tenth of the defined collision
window
– Distance from A to B (network diameter) = around
200m (around 1/10 2500m)
• 1000-Mbps networks (minimum frame size =
512b):
– Distance from A to B (network diameter) = around
20m (around 1/100 2500m) = Not practical !!!
– Solution – Change minimum frame size to 520B
Consequences …
Parameter
10 Mbps
100 Mbps
1000 Mbps
Minimum frame size
64 bytes
64 bytes
520 bytes1 (with
extension field added)
Maximum collision
diameter, DTE to DTE
100 meters UTP
100 meters UTP
412 meters fiber
100 meters UTP
316 meters fiber
Maximum collision
diameter with repeaters
2500 meters
205 meters
200 meters
Maximum number of
segments in network
path
5
2
1
Frame Reception
• reverse process of frame transmission
• destination address of the received frame is checked
and matched against the station's address list
– Its MAC address
– its group addresses
– broadcast address
• address match is found
– the frame length is checked
– FCS is compared to the FCS that was generated during frame
reception
• frame length – OK, FCS match – OK => The frame is
then parsed and forwarded to the appropriate upper
layer
References
• www.cisco.com
• www.wikipedia.org
• www.windowsnetworking.com