Nothing Special   »   [go: up one dir, main page]

EE-379 Embedded Systems and Applications: Introduction To Ethernet

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

1

EE-379 Embedded Systems and Applications


Introduction to Ethernet
Cristinel Ababei
Department of Electrical Engineering, University at Buffalo
Spring 2013
Note: This course is offered as EE 459/500 in Spring 2013
Overview
Open Systems Interconnection (OSI)
The Internet
Internet Protocol (TCP/IP Protocol)
Ethernet History
Ethernet
Frame structure
Physical layer
MAC
2
Open Systems Interconnection (OSI)
Model
The Open Systems Interconnection (OSI)
model is a prescription of characterizing and
standardizing the functions of a
communications system in terms of
abstraction layers.
Similar communication functions are grouped
into logical layers.
A layer serves the layer above it and is served
by the layer below it.

OSI 7 Layers
3
1. Physical layer:
Defines electrical and physical specifications for devices
2. Data Link Layer (DLL): provides the functional and
procedural means to transfer data between network
entities and to detect and possibly correct errors. Has 2
sublayers:
Logical Link Control (LLC), upper
Medium Access Control (MAC), lower
3. Network layer:
Provides the functional and procedural means of transferring
variable length data sequences from a source host on one
network to a destination host on a different network
4. Transport layer:
Provides transparent transfer of data between end users,
providing reliable data transfer services to the upper layers

OSI 7 Layers
OSI 7 Layers
5. Session layer:
Controls the dialogues (connections) between computers.
It establishes, manages and terminates the connections
between the local and remote application.
It provides for full-duplex, half-duplex, or simplex operation, and
establishes checkpointing, adjournment, termination, and
restart procedures.
6. Presentation layer:
Provides encryption services, decryption, data compression, and
decompression.
7. Application layer:
Checks resource usability and synchronization with the remote
partner.
4
OSI Model Examples, View 1
OSI Model Examples, View 2
5
Overview
Open Systems Interconnection (OSI)
The Internet
Internet Protocol (TCP/IP Protocol)
Ethernet History
Ethernet
Frame structure
Physical layer
MAC
The Internet
The Internet is a global system of interconnected
computer networks that use the standard
Internet Protocol suite (TCP/IP) to serve billions
of users worldwide.
It is a network of networks that consists of
millions of private, public, academic, business,
and government networks, of local to global
scope, that are linked by a broad array of
electronic, wireless and optical networking
technologies.
6
Simplified Internet Architecture
Simplified Internet Architecture
7
Overview
Open Systems Interconnection (OSI)
The Internet
Internet Protocol (TCP/IP Protocol)
Ethernet History
Ethernet
Frame structure
Physical layer
MAC
Internet Protocol (or TCP/IP Protocol)
The Internet Protocol suite is the set of
communications protocols used for the
Internet and similar networks.
It is the most popular protocol stack for wide
area networks.
It is commonly known as TCP/IP, because of
its most important protocols:
Transmission Control Protocol (TCP)
Internet Protocol (IP)
8
Internet Protocol 4 Layers
1. Link layer:
Contains communication technologies for a local
network.
2. Internet layer (IP):
Connects local networks, thus establishing
internetworking.
3. Transport layer:
Handles host-to-host communication.
4. Application layer:
Contains all protocols for specific data communications
services on a process-to-process level.
It focuses more on network services, APIs, utilities, and
operating system environments.
TCP/IP vs. OSI
9
Data Encapsulation
A network packet is nothing more than a chunk of
data that an application wants to deliver to
another system on the network.
This chunk of data has information added to the
front and back that contains instructions for
where the data needs to go and what the
destination system should do with it once it
arrives.
The addition of this routing and usage
information is called encapsulation.
Data Encapsulation
10
Data Encapsulation
Overview
Open Systems Interconnection (OSI)
The Internet
Internet Protocol (TCP/IP Protocol)
Ethernet History
Ethernet
Frame structure
Physical layer
MAC
11
Ethernet History
The Original Design of Ethernet from Robert Metcalfe
Ethernet History: Speed matters - how Ethernet
went from 3Mbps to 100Gbps and beyond
On May 22, 1973, Bob Metcalfe at Xerox PARC, Palo Alto CA,
documented the invention of Ethernet in a memo, which described
communication across different "ethers" - including cable, telephone,
and radio - building on the ALOHAnet protocol
Bob Metcalfe, David Boggs, and Tat Lam built the first Ethernet
prototype at 2.94 Mbps
1980, Digital, Intel, and Xerox developed the standard of 10Mpbs DIX
Ethernet (a.k.a. Ethernet II)
1992, the Grand Junction Network Company brought up the
structure of 100Mbps Ethernet
1998, addressed the standard of Gigabit Ethernet
2002, 10 Gigabit standard published
2002-2010 40 Gigabit proposals
2010 100 Gigabit
Terabit Ethernet?
12
Speed of Ethernet
History
13
History
History
14
Overview
Open Systems Interconnection (OSI)
The Internet
Internet Protocol (TCP/IP Protocol)
Ethernet History
Ethernet
Frame structure
Physical layer
MAC
Ethernet
Carrier-sense multiple access/carrier detect
(CSMA/CD) protocol:
1. Listen to the cable
2. If nobodys there, start talking
3. If someone interrupts, stop, and retry after a random
time
The Ethernet Protocol is made up of a number of
components:
1. Structure of Ethernet frames
2. Physical Layer (i.e., the Media)
3. MAC operation
15
1. Frame Structure
Frame Structure
Information is sent around an Ethernet network in discreet
messages known as frames.

The frame structure consists of the following fields:
1. The Preamble - This consists of seven bytes, all of the form
"10101010". This allows the receiver's clock to be synchronized
with the sender's.
2. The Start Frame (SOF) Delimiter - This is a single byte
("10101011") which is used to indicate the start of a frame.
3. The Destination Address - This is the address of the intended
recipient of the frame. The addresses in 802.3 use globally
unique hardwired 48 bit addresses.
4. The Source Address - This is the address of the source, in the
same form as above.
5. Type of packet, 0x0800 for IP, 0x0806 for ARP, etc. Length of the
data in the Ethernet frame can be anything from 0 to 1500
bytes.
16
6. Data - This is the information being sent by the frame.
7. Pad - 802.3 frame must be at least 64 bytes long, so if the data is
shorter than 46 bytes, the pad field must compensate. The reason
for the minimum length lies with the collision detection mechanism.
In CSMA/CD the sender must wait at least two times the maximum
propagation delay before it knows that no collision has occurred. If a
station sends a very short message, then it might release the ether
without knowing that the frame has been corrupted. 802.3 sets an
upper limit on the propagation delay, and the minimum frame size is
set at the amount of data which can be sent in twice this figure.
8. Checksum - This is used for error detection and recovery.

Frame Structure
2. Physical Layer
Concerned with the low level electronic way in
which the signals are transmitted.
Signals are transmitted using Manchester
Phase Encoding (MPE). This encoding is used
to ensure that clocking data is sent along with
the data, so that the sending and receiving
device clocks are in sync.
Logic levels are transmitted along the medium
using voltage levels of 0.85V.
17
Types of Ethernet Cables
Cable type Max speed Max Length Operating
Frequency
CAT5 100 Mbps 100 m 100 MHz
CAT5e 1 Gbps 100 m 100 MHz
CAT6 10 Gbps 50 m 250 MHz
CAT6a 10 Gbps 100 m 500 MHz
All backwards-compatible
CAT7 in the works, 40Gbps and 100Gbps
Cable Structure
18
Cable
Structure
Cable
Structure
19
Cable Structure
3. Media Access Control (MAC)
To send a frame, a station on an 802.3 network
first listens to check if the medium is busy.
If it is, then, the station uses the 1-persistent strategy,
and transmits after only a short fixed delay (the inter-
frame gap) after the medium becomes idle.
If there is no collision, then this message will be sent
normally.
If the device detects a collision however, the frame
transmission stops and the station sends a jamming
signal to alert other stations of the situation. The
station then decides how long to wait before re-
sending using a truncated binary exponential backoff
algorithm.
After 16 continuous collisions, the MAC layer gives up
and reports a failure to the layer above.
20
MAC Flow Graph
How addressing takes place in Ethernet
Addressing in Ethernet takes place with MAC Addresses - 6
byte long (48 bits)
MAC address is also called Ethernet address or Hardware
address or Physical address
This address is of the physical Ethernet card or NIC
(network information card) which is installed on a system
Its programmed into the chip of a network card (burned
into the ROM of the NIC)
21
Ethernet (MAC) Addresses
Address fields
48 bits 281 trillion (world population: 6.5 billion)
Bits 4824: Vendor code
Bit 41: 0=ordinary, 1=group (broadcast) address
Bits 230: Serial number

Example:
$ ifconfig eth0
eth0 Ethernet HWaddr 00:08:74:23:CC:AB
OUI (Organizationally Unique Identifier):
00:08:74 is Dell Computer

Address FF:FF:FF:FF:FF:FF is broadcast
An Ethernet Packet (Frame)
00d006269c00 Destination MAC address (router)
00087423ccab Source MAC address (desktop)
0800 Type = IP packet

45 IPv4, 5 word (20-byte) header
00 Normal service
0028 Total length = 40 bytes
c31c Identification (unique)
4000 Dont Fragment
4006 hops to live
06 TCP protocol
3ff1 Header checksum (ones complement)
803b1372 Source IP 128.59.19.114 (desktop)
40ec6329 Destination IP 64.236.99.41

deac 0050 bf49 9ba6 a1a4 8bed 5010 ffff 1093 0000
22
IP Header Checksum Computation
IP Header
23
IP Addresses (layer 3 Network layer)
32-bit (4 byte) software stored address: assigned
to represent the same NIC as MAC address
represents
The 32-bit IP address is like a shorter nickname
for the 48-bit MAC address
Main point in differentiating IP from MAC
addresses:
Direct-connected transmission uses Layer 2 - MAC
addresses for frame delivery
Routed transmission uses Layer 3 - IP addresses for
packet delivery
IP Addresses
32 bits 4 billion (world population: 6.5 billion)
First n bits indicate network (n = 8, 16, 24)
For example, Google owns the range:
173.194.0.0 - 173.194.255.255

Magical addresses:
127.0.0.1 Me
192.168.x.x Never assigned worldwide
10.x.x.x Never assigned worldwide
255.255.255.255 Broadcast
24
MAC Addresses vs. IP Addresses
MAC address
Its just a manufacturer code and a serial number
There's no structure to it beyond that, and so no way
to route packets efficiently
MAC address is used purely to address machines on a
local network segment
IP address
Introduced to address machines outside a network
segment
IP addresses have an inherent hierarchy with the use
of subnet masks, etc., allowing large networks to be
addressed in a block for efficient routing

User Datagram Protocol (UDP)
UDP is one of the core members of the Internet
Protocol suite
With UDP, computer applications can send messages,
(referred to as datagrams), to other hosts on an
Internet Protocol (IP) network without prior
communications to set up special transmission
channels or data paths
It has no handshaking dialogues exposes any
unreliability of the underlying network protocol to the
user's program
UDP is suitable when error checking and correction is
either not necessary or performed in the application
25
UDP Packets
Credits, References
Ethernet Introduction, Ross MCIlroy, 2004;
http://www.dcs.gla.ac.uk/~ross/Ethernet/index.htm
Cable images;
http://image.pinout.net/pinout_network_rj45_files/
LPC17xx user manual, 2010;
http://www.nxp.com/documents/user_manual/UM10360.pdf
And many others (see lab#7 for more references)

You might also like