practical ethernet

51
Practical Ethernet

Upload: bernie

Post on 12-Jan-2016

32 views

Category:

Documents


0 download

DESCRIPTION

Practical Ethernet. What is Ethernet?. Ethernet is the most widely-installed local area network (LAN) technology. Specified in a standard, IEEE 802.3. IEEE = Institute for electical and electronical engineers. Physical interfaceMedium MAC interfaceStation Ethernet Frame. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Practical Ethernet

Practical Ethernet

Page 2: Practical Ethernet

What is Ethernet?

Page 3: Practical Ethernet

3

TOC

Ethernet is the most widely-installed local area network (LAN) technology. Specified in a standard, IEEE 802.3

1. Physical interface Medium2. MAC interface Station3. Ethernet Frame

IEEE = Institute for electical and electronical engineers

Page 4: Practical Ethernet

4

TOCTable of contentTable 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

Page 5: Practical Ethernet

5

TOCTerminology

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

Page 6: Practical Ethernet

6

TOCHow it all began…

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)

Page 7: Practical Ethernet

7

TOCEthernet, the standaard IEEE802.3

Logical Link Control

Page 8: Practical Ethernet

8

TOC

Carrier Sense Multiple Access with Collision Detection

Page 9: Practical Ethernet

9

TOCBasic 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.

Page 10: Practical Ethernet

10

TOCBasic 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.

Page 11: Practical Ethernet

11

TOCBasic Principles – Full Duplex

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

Page 12: Practical Ethernet

12

TOCAutonegotiation

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.

Page 13: Practical Ethernet

13

TOCBasic Principles – Bridged LAN Topology

LAN BLAN B

LAN ALAN A

LAN CLAN C

BRIDGE 3BRIDGE 3

BRIDGE 2BRIDGE 2

BRIDGE 1BRIDGE 1

BPDU (Bridge Protocol Data Units)

Page 14: Practical Ethernet

14

TOCBasic Principles – Spanning Trees (cont’d)

0

11 10

12 13 9

2 3

6 7 8

5 1

419

4

2 2

4 4

419 19

19

100 100 100

root

path cost

bridge

LANPath cost

10Mbps 100100Mbps 191000Mbps 4

1Gbps 2

Page 15: Practical Ethernet

PHYs

Page 16: Practical Ethernet

16

TOCPHY Overview – Naming Convention

100BASE-TX100BASE-TX

Bitrate, in Mbps Modulation(uppercase!)

MediumModifier

Page 17: Practical Ethernet

17

TOCPHY Overview

1 Mbps 2 Mbps 10 Mbps

100 Mbps 1 Gbps 10

Gbps100

Gbps

COAX

10BASE-5

10BASE-2

10BROAD-36

T

P1BASE-5 2BASE-TL

10BASE-T

10PASS-TS

100BASE-TX

100BASE-T4

100BASE-T2

1000BASE-CX

1000BASE-T

10GBASE-CX4

10GBASE-T

FBR

FOIRL

10BASE-FL

10BASE-FB

10BASE-FP

100BASE-FX

100BASE-LX10

100BASE-BX10

1000BASE-LX

1000BASE-SX

1000BASE-LX10

1000BASE-BX10

1000BASE-PX10

1000BASE-PX20

10GBASE-X

10GBASE-R (3)

10GBASE-W (3)

Page 18: Practical Ethernet

19

TOCThe 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

Page 19: Practical Ethernet

20

TOCModern PHYs

The 100Mbps Generation (“Fast Ethernet”) The 1000Mbps Generation (“Gigabit Ethernet”) The 10Gbps Generation (“10 Gigabit Ethernet”) The Media Independent Interface

Page 20: Practical Ethernet

MAC and IP

Page 21: Practical Ethernet

29

TOCIP as a common layer

LANEthernet

Mobile ADSLAnalogue / ISDN

(PSTN)ATM

IP (internet Protocol)

Browser E-Mail Newsgroups File Transfer …..

. . .

Everything runs over IP

IP runs over everything

Page 22: Practical Ethernet

30

TOCData encapsulation

Application DataLAYER N

LAYER N-1Header

LAYER N-2Header

TrailerHeaderPhysicalLAYER

ETHERNET Frame

Page 23: Practical Ethernet

31

TOCMAC Frame

SFDpre-amble

Fixed sequence to alert the receiver (0x55555555555555D5)

DA

Destination MAC address (unique device addr.)

SA

Source MAC address (unique device addr.)

lengthtype

Frame length or type information

P A Y L O A D (46–1500 Bytes)

Payload, encapsulatedIn LLC/SNAP.

FCS

Frame Check Sequence, CRC

Page 24: Practical Ethernet

32

TOCTypes of payload

Preamble(7 bytes)

Destination Address(6 bytes)

Source Address(6 bytes)

Type(2 bytes) 46<=INFO<= 1500 bytes

FCS(4 bytes)

SFD (1 byte)

Type0800

Type0806

Type8035

PADARP request

ARP reply

2

PADRARP request

RARP reply

IP Datagram

46-1500

2

2

28 18

28 18

Page 25: Practical Ethernet

33

TOCMAC address

Page 26: Practical Ethernet

34

TOCDefinition 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

Page 27: Practical Ethernet

35

TOCAddressing principles 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.

IP Address

Physical Address

Port Number

Internet Layer (IP)

Host to Network Layer (PHYS)

Transport Layer (TCP/UDP)

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.

Page 28: Practical Ethernet

36

TOCHost to host communication

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

Ethernet LAN

IP1 IP2

MAC1MAC2

Best Effort delivery

Page 29: Practical Ethernet

37

TOCAddress Resolution Protocol (ARP)

Ethernet LANIP1 IP2

MAC1MAC2IP datagramEthernet frame

2. IP1 & IP2 belong to the same IP subnet? Yes

3. Send ARP request to retrieve Dest MAC

Src: MAC1Dst: Broadcast

Src IP: IP1Dst IP: IP2

Ethernet Broadcast

4. Receive ARP reply from IP2

Src: MAC2Dst: MAC1

Src IP: IP2Dst IP: IP1

5. Create ARP entry

ARP Table

IP2 MAC2

Eth. Header IP Header

Src: MAC1Dst: ?

Src IP: IP1Dst IP: IP2

1. Create Ethernet frame (IP1 > IP2)

6. Send IP datagram to IP2

Src: MAC1Dst: MAC2

Src IP: IP1Dst IP: IP2

Page 30: Practical Ethernet

38

TOCAddress 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

Page 31: Practical Ethernet

Sniffing the Ether

Page 32: Practical Ethernet

40

TOChttp://www.ethereal.com

Free and open source sniffing tool

Page 33: Practical Ethernet

41

TOChttp://www.ethereal.com

Filter

Update in realtime

Stop after xx seconds

Page 34: Practical Ethernet

42

TOChttp://www.ethereal.com

Page 35: Practical Ethernet

HUB/Switch/Router/Gateway

Page 36: Practical Ethernet

44

TOCLAN 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)

Page 37: Practical Ethernet

45

TOCLAN interconnection: How ?

How interconnecting LANs ? Repeaters Bridges Routers Gateways

Page 38: Practical Ethernet

46

TOCBasic Principles – Switching & Routing

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.

Page 39: Practical Ethernet

47

TOCRepeater / HUB

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

L1L2L3L4L5L6L7

L1L2L3L4L5L6L7

L1L1

Repeater

End node End node

Page 40: Practical Ethernet

48

TOCEthernet hub (repeater)

Ethernet frames are always transmitted to all stations

Also the sending station receives its own data transmitted. This allows to execute the collision detection

Page 41: Practical Ethernet

49

TOCBridge

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

L1L2L3L4L5L6L7

L1L2L3L4L5L6L7

L1L1

Bridge

End node End node

L2 L2 MAC address

Page 42: Practical Ethernet

50

TOCIncreased 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

Page 43: Practical Ethernet

51

TOCBridging 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

Page 44: Practical Ethernet

52

TOC

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

Router

L1L2L3L4L5L6L7

L1L2L3L4L5L6L7

L1L1

Router

End node End node

IP addressL2L3

L2L3

Page 45: Practical Ethernet

53

TOC

A Gateway acts at all layers (including applications)

Decisions based upon packet content

Packets can be rerouted, discarted, change content, ...

Gateways

L1L2L3L4L5L6L7

L1L2L3L4L5L6L7

L1L1

GatewayEnd node End node

L2L3

L2L3

L4L5L6L7

L4L5L6L7

Page 46: Practical Ethernet

LAN to LAN over WAN

Page 47: Practical Ethernet

55

TOCLAN interconnect using SDHCORPORATE LAN

IP1

MAC1

Ethernet LAN

IP2

MAC2

Ethernet LAN

IP3

MAC3

SDH

Eth

Eth

Eth

VC12, VC3 or VC4

connection

LAN switch or Router

LAN to LAN board(physical connection so

no bridging or routing, so no traffic reduction)

Page 48: Practical Ethernet

56

TOCDecrease Traffic using Bridge or Router

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

Ethernet LAN

IP2

Ethernet LAN

IP3

SDHISA

BRIDGEor

ROUTER

ISA

BRIDGEor

ROUTER

Page 49: Practical Ethernet

Future?

Page 50: Practical Ethernet

58

TOCDTE Power via MDI (802.3af)

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!

Page 51: Practical Ethernet

59

TOCDTE Power via MDI: Examples