Practical Ethernet_0..

Download Report

Transcript Practical Ethernet_0..

Practical Ethernet
What is Ethernet?
TOC
IEEE = Institute for electical and
electronical engineers
Ethernet is the most widely-installed local area network (LAN)
technology. Specified in a standard, IEEE 802.3
1. Physical interface
2. MAC interface
3. Ethernet Frame
3
Medium
Station
Table of content
1.
Intro
2.
Basic principles
3.
PHY’s
4.
MAC and IP
5.
Sniffing the Ethernet
6.
HUB / Switch / Router / Gateway
7.
LAN to LAN over WAN (Ethernet via SDH)
8.
Future
4
TOC
Terminology

Ethernet, the standard: IEEE 802.3

Ethernet, the working off.. “CSMA/CD”.
Carrier Sense Multiple Access with Collision Detection

Actually “Ethernet” is a proprietary network technology from
Xerox (1979), later joined by DEC and Intel. This “Ethernet”
was used as the blueprint for IEEE 802.3, first published in
1983.

You can get a free copy of all IEEE 802 standards at
http://standards.ieee.org/getieee802
5
TOC
How it all began…

TOC
This diagram was reputedly drawn by Dr. Robert M. Metcalfe in
1976 to present Ethernet to the National Computer Conference
in June of that year. On the drawing are the original terms for
describing Ethernet. (source: http://www.ieee802.org/3)
6
Ethernet, the standaard IEEE802.3
TOC
Logical Link Control
7
TOC
Carrier Sense Multiple Access with Collision Detection
8
Basic Principles – Multiple Access
The original Ethernet architecture is a bus:
All stations are connected to the same physical medium
and compete with each other for “air time”.
Clients discard all frames that are not addressed to them.
9
TOC
Basic Principles – Carrier Sense / Collision Detection
A host must not initiate transmission of a packet when an other
host is transmitting (Carrier Sense).
When two hosts start transmitting simultaneously, this is detected
(Collision Detection), and both hosts will perform random back-off.
10
TOC
Basic Principles – Full Duplex
TOC
Twisted Pair (UTP) PHYs and certain optical fiber PHYs can be
used for point-to-point links only.
Since such a LAN consists of exactly two end stations, a Full
Duplex mode can optionally be used. Full Duplex mode is
mandatory at speeds above 1000Mbps.
Pause Frame
11
Autonegotiation

Twisted pair PHYs send out regular “link test pulses” to let the
peer know they’re still there (see green LED on connector).

Autonegotiation was introduced with the 100Mbps PHY
generation. It uses bursts of link pulses to enable different
PHYs to negotiate the “best” common mode of operation on a
given twisted-pair link:
Negotiation of bit rate: 10Mbps / 100Mbps / 1000Mbps
 Negotiation of duplex: half/full
 Negotiation of modulation: T, TX, T4, T2


This seems to be one of the (few) weak points in
interoperability between Ethernet equipment vendors.
12
TOC
Basic Principles – Bridged LAN Topology
BRIDGE 2
LAN A
LAN C
BRIDGE 1
LAN B
BRIDGE 3
BPDU
13
(Bridge Protocol Data Units)
TOC
Basic Principles – Spanning Trees (cont’d)
root
0
2
bridge
2
11
4
LAN
10
4
4
12
13
path cost
9
19
19
19
4
19 5
4
14
TOC
1
2
Path cost
3
100
100
6
7
100
8
10Mbps  100
100Mbps  19
1000Mbps  4
1Gbps  2
PHYs
PHY Overview – Naming Convention
100BASE-TX
Bitrate, in Mbps
16
Modulation
(uppercase!)
Medium Modifier
TOC
PHY Overview
1 Mbps
2 Mbps
C
O
A
X
TOC
10 Mbps
100 Mbps
1 Gbps
10 Gbps
1000BASE-CX
10GBASECX4
10BASE-5
10BASE-2
10BROAD-36
T
1BASE-5
2BASE-TL
P
10BASE-T
10PASS-TS
100BASE-TX
100BASE-T4
100BASE-T2
1000BASE-T
10GBASE-T
1000BASE-LX
1000BASE-SX
FOIRL
F
B
R
10BASE-FL
10BASE-FB
10BASE-FP
100BASE-FX
100BASE-LX10
100BASE-BX10
1000BASELX10
1000BASEBX10
1000BASEPX10
1000BASEPX20
17
10GBASE-X
10GBASE-R
(3)
10GBASE-W
(3)
100 Gbps
The 10Mbps Generation

1990: 10BASE-T
Requires 2 pairs of CAT-3 wiring (very widespread)
 Maximum reach approximately 100m (up to 150m on CAT-5)
 Uses RJ-45 connector
 Manchester encoding
 Full Duplex mode is optional


1993: 10BASE-F
Introduced to enhance and replace FOIRL
 10BASE-FL: Manchester encoding on 2 MMF up to 2000m
 10BASE-FB: only to be used as inter-repeater link, Half Duplex
 10BASE-FP: fiber optic passive star, up to 33 hosts at up to 500m

19
TOC
Modern PHYs
The 100Mbps Generation (“Fast Ethernet”)
 The 1000Mbps Generation (“Gigabit Ethernet”)
 The 10Gbps Generation (“10 Gigabit Ethernet”)
 The Media Independent Interface

20
TOC
MAC and IP
IP as a common layer
Browser
E-Mail
TOC
Newsgroups
…..
File Transfer
Everything runs over IP
IP (internet Protocol)
IP runs over everything
LAN
Ethernet
Mobile
29
ADSL
Analogue / ISDN
(PSTN)
ATM
...
Data encapsulation
LAYER N
LAYER N-1
LAYER N-2
Physical
LAYER
TOC
Application Data
Header
Header
Header
30
ETHERNET
Frame
Trailer
MAC Frame
preamble
SFD DA
TOC
SA
length
type
P A Y L O A D (46–1500 Bytes)
FCS
Frame Check Sequence, CRC
Payload, encapsulated
In LLC/SNAP.
Frame length or type information
Source MAC address (unique device addr.)
Destination MAC address (unique device addr.)
Fixed sequence to alert the receiver (0x55555555555555D5)
31
Types of payload
Preamble
(7 bytes)
Destination Source
Address
Address
(6 bytes)
(6 bytes)
TOC
Type
(2 bytes)
46<=INFO<= 1500 bytes
SFD (1 byte)
Type
0800
IP Datagram
2
Type
0806
2
Type
8035
2
32
46-1500
ARP request
ARP reply PAD
28
18
RARP request
RARP reply PAD
28
18
FCS
(4 bytes)
MAC address
33
TOC
Definition MAC address

48 bits expressed as 12 hexadecimal digits
E.g. : 00-90-D0-0A-20-1A (Alcatel modem)
 First 6 digits: vendor id
 Last 6 digits: interface serial number given by the vendor
 First byte always even to indicate interface source address. An
odd byte indicates group (multicast) address.
 All ones indicates Ethernet broadcast (FF-FF-FF-FF-FF-FF)


Global MAC address is unique in the world


281,474,976,710,656 addresses. This is more than 56,000 MAC
addresses for each person on the planet
For MAC addresses flat addressing scheme is used
34
TOC
Addressing principles

TOC
When a host transmits a packet the different layers contain source &
destination addressing information to guarantee proper delivery:

The Physical Address is used to deliver the packet to another host
connected to the same physical network (usually the gateway).
 The IP address is used to deliver the IP packet to the destination host
which can reside at the other side of the world.
 The TCP or UDP port number is used to deliver the data to the correct
application (window) after delivery to the host.
Transport Layer (TCP/UDP)
Internet Layer (IP)
Host to Network Layer (PHYS)

Port Number
IP Address
Physical Address
The combination of the IP address and the Port number
makes that the application window itself is uniquely identified
(worldwide). This combination is also called a SOCKET.
35
Host to host communication
Best Effort
delivery
TOC
Ethernet LAN
MAC1
MAC2
IP1
IP2

When host1 wants to send application data to host2 it will encapsulate the
data in an Ethernet frame which contains a source & destination physical
MAC address

Ethernet is a broadcast network, so each host will receive all frames.
Acceptance of the frame is based upon the destination MAC address.

Before delivery to the destination host the sender must retrieve the
destination’s MAC address

Connectionless (every packet contains MAC SA/DA )

Best effort (no datalink layer): reliability provided by TCP/IP
36
Address Resolution Protocol (ARP)
ARP Table
Ethernet frame
IP datagram
IP2
MAC1
MAC2
MAC2
IP1
Ethernet LAN
1. Create Ethernet frame (IP1 > IP2)
IP Header
Eth. Header
Src: MAC1
Dst: ?
Src IP: IP1
Dst IP: IP2
2. IP1 & IP2 belong to the same IP subnet? Yes
3. Send ARP request to retrieve Dest MAC
Src: MAC1
Dst: Broadcast
Src IP: IP1
Dst IP: IP2
4. Receive ARP reply from IP2
Src: MAC2
Dst: MAC1
Src IP: IP2
Dst IP: IP1
5. Create ARP entry
6. Send IP datagram to IP2
Src: MAC1
Dst: MAC2
37
Src IP: IP1
Dst IP: IP2
TOC
Ethernet Broadcast
IP2
Address Resolution Protocol

To send Ethernet frames from host to host it is necessary to know the
destination MAC address

ARP requests asks to translate IP address into MAC address

Since the physical address is not known, ARP is broadcasted

Also Reverse ARP exists

Two possibilities exist:

Dest IP in the same subnet: send ARP using dest. IP
 Dest IP in different subnet: send ARP using IP of gateway

LANs interconnected by bridges are within the same subnet.
Remember: Bridges are IP unaware

A bridge is transparent for ARP messages. It is as if the LANs
connected to the bridge are one big LAN
Of course the bridge uses SELF LEARNING to reduce traffic between the LANs
38
TOC
Sniffing the Ether
http://www.ethereal.com
Free and open source sniffing tool
40
TOC
http://www.ethereal.com
TOC
Filter
Update in realtime
Stop after xx seconds
41
http://www.ethereal.com
42
TOC
HUB/Switch/Router/Gateway
LAN interconnection: Why ?

Why interconnecting LANs ?

The bandwidth and the CSMA/CD limits the number of stations

Limitation on the cable length (see also physical interfaces)
E.g.: more than 2.5 km using repeaters for 802.3

The LANs are geographically spread

Reliability : for example, a defective node that keeps on sending
garbage will cripple the LAN (a bridge/router will block this)
44
TOC
LAN interconnection: How ?

How interconnecting LANs ?
Repeaters
 Bridges
 Routers
 Gateways

45
TOC
Basic Principles – Switching & Routing
TOC

Bridged Ethernet LANs are switched topologies: frames are
forwarded on the basis of an exact match of the 6-byte DA in
the forwarding table.

If no match can be found, the frame is flooded to all ports.

MAC addresses are allocated to pieces of hardware. There is
no underlying hierarchy. Ethernet is really peer-to-peer.

The IP network commonly running over an Ethernet uses
routing mechanisms to forward packets on the basis of a best
match of the 4-byte IP-address in the routing table.

IP addresses are inherently hierarchical (scalability).

An IP-aware device uses an “arp table” to associate IP
addresses with MAC addresses.
46
Repeater / HUB
TOC
End node
End node
L7
L6
L5
L4
L3
L2
L1
L7
L6
L5
L4
L3
L2
L1
Repeater
L1
L1

A repeater acts at the physical level (amplify and reshape)

Allows to increase the distance between nodes

Not aware of packets or frames

NO traffic reduction
47
Ethernet hub (repeater)
TOC

Ethernet frames are always transmitted to all stations

Also the sending station receives its own data transmitted. This
allows to execute the collision detection
48
Bridge
TOC
End node
End node
L7
L6
L5
L4
L3
L2
L1
L7
L6
L5
L4
L3
L2
L1
Bridge
L2
L1
L2
L1

A Bridge acts at the MAC layer (L2)

Forwarding or not based upon MAC address

Not aware of higher layers (IP, IPX, …)

Self learning (power on and it works!)

Traffic reduction
49
MAC address
Increased Network capacity using bridging

As long as traffic remains within LANx you can use the double
bandwidth compared to one large LAN

A bridge will buffer a frame from LANx to LANy because LANy
could be temporary busy
50
TOC
Bridging Principle

A bridge monitors the traffic on all ports and remembers for
each source MAC address on which port it resides. This is
called SELF LEARNING.

If the destination MAC address is not known, the frame is
forwarded to all interfaces:
‘If you do not know, send it to everybody’

If the destination MAC address is known as a result of the self
learning, the frame is forwarded to the indicated interface

A bridge can be :



self-learning
forwarding
blocking
51
TOC
Router
TOC
End node
End node
L7
L6
L5
L4
L3
L2
L1
L7
L6
L5
L4
L3
L2
L1
Router
L3
L2
L1
L3
L2
L1

A Router acts at the Internet layer (L3)

Routing based upon IP address

Not aware of higher layers (TCP segments, applications)

Self learning based upon routing protocols

Traffic reduction
52
IP address
Gateways
TOC
End node
Gateway
L7
L6
L5
L4
L3
L2
L1
L7
L6
L5
L4
L3
L2
L1
L7
L6
L5
L4
L3
L2
L1
End node
L7
L6
L5
L4
L3
L2
L1

A Gateway acts at all layers (including applications)

Decisions based upon packet content

Packets can be rerouted, discarted, change content, ...
53
LAN to LAN over WAN
LAN interconnect using SDH
TOC
CORPORATE LAN
MAC1
LAN switch or Router
IP1
Eth
LAN to LAN board
VC12, VC3 or
VC4 connection
(physical connection so no
bridging or routing, so no
traffic reduction)
SDH
Ethernet LAN
Ethernet LAN
Eth
MAC2
IP2
Eth
MAC3
IP3
55
Decrease Traffic using Bridge or Router
Ethernet LAN
Ethernet LAN
BRIDGE
or
ROUTER
IP2

TOC
I
S
A
SDH
I
S
A
BRIDGE
or
ROUTER
IP3
Without the bridge or router all the intra-LAN traffic of one LAN
is sent over the WAN (SDH) to the other LAN
Unnecessary load on the WAN
 Each LAN looses bandwidth due to other intra-LAN traffic


A router will send only the inter-LAN traffic over the WAN which
in best case doubles the bandwidth capabilities.

A bridge will initially broadcast all traffic over the WAN, but after
selflearning only the inter-LAN traffic over the WAN
56
Future?
DTE Power via MDI (802.3af)
TOC
Power over Ethernet

IEEE802.3af defines a way to provide electrical power to data
terminal equipment over a 10BASE-T,100BASE-TX or
1000BASE-T link.

It uses a previously unused pair to convey up to 12.95W, which
can be used to power…
palm/laptop computers
 Ethernet telephones
 wireless LAN access points
 webcams
…


Claims to be the first worldwide power distribution standard!
58
DTE Power via MDI: Examples
59
TOC