kis – cvi č enie #2

26
KIS – Cvičenie #2 Ethernet, MAC podvrstva Marián Beszédeš, B506 [email protected]

Upload: erica-nolan

Post on 30-Dec-2015

33 views

Category:

Documents


0 download

DESCRIPTION

KIS – Cvi č enie #2. Ethernet, MAC podvrstva Marián Beszédeš, B506 beszedes @ktl.elf.stuba.sk. Ethernet Network Elements. Ethernet LANs consist of : network nodes interconnecting media The network nodes fall into two major classes: Data terminal equipment (DTE) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: KIS – Cvi č enie #2

KIS – Cvičenie #2

Ethernet, MAC podvrstva

Marián Beszédeš, [email protected]

Page 2: KIS – Cvi č enie #2

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)

Page 3: KIS – Cvi č enie #2

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

Page 4: KIS – Cvi č enie #2

RM OSI = Reference Model Open Systems Interconnection

Page 5: KIS – Cvi č enie #2

Logical Relationship to the RM OSIDTE

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

Page 6: KIS – Cvi č enie #2

Logical Relationship to the RM OSIDCE

• 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

Page 7: KIS – Cvi č enie #2

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

Page 8: KIS – Cvi č enie #2

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

Page 9: KIS – Cvi č enie #2

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.

Page 10: KIS – Cvi č enie #2

The Ethernet basic data frame

• Destination address (DA) – 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

• 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– The second bit of their first octet set to one

• 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– The second bit of their first octet set to one

Page 11: KIS – Cvi č enie #2

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

Page 12: KIS – Cvi č enie #2

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

Page 13: KIS – Cvi č enie #2

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

Page 14: KIS – Cvi č enie #2

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

Page 15: KIS – Cvi č enie #2

Frame Transmission

• How is the transmission started?1. an end station MAC receives a transmit-

frame 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

Page 16: KIS – Cvi č enie #2

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

Page 17: KIS – Cvi č enie #2

CSMA/CD Access method

Page 18: KIS – Cvi č enie #2

CSMA/CD Access method

Page 19: KIS – Cvi č enie #2

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

Page 20: KIS – Cvi č enie #2

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

Page 21: KIS – Cvi č enie #2

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 bit-length - 20 metres in copper cable).

Station A will have transmitted only 50 bits (NOT 512 !!!)when the collision reaches it

Page 22: KIS – Cvi č enie #2

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

:-)

Page 23: KIS – Cvi č enie #2

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

Page 24: KIS – Cvi č enie #2

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

Page 25: KIS – Cvi č enie #2

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

Page 26: KIS – Cvi č enie #2

References

• www.cisco.com

• www.wikipedia.org

• www.windowsnetworking.com