Sunteți pe pagina 1din 39

Introduction to Ethernet

Ceragon Training Services

CeraOS 8.5

Proprietary and Confidential JULY 2016


AGENDA
• Local Area Network (LAN)

• Network Devices

• OSI Layers

• Ethernet Frame

• TCP

• VLAN concept

• VLAN Tagging

Proprietary and Confidential 2


THE LOCAL AREA NETWORK (LAN)

Proprietary and Confidential 3


NETWORK DEVICES
• The various devices used to build a data communication network can be classified into
type of equipment depending on how Ethernet packets are forwarded.

HUB BRIDGE / SWITCH ROUTER

Proprietary and Confidential 4


Difference between Hub, Switches and Routers
Intelligence:
• A hub sends anything that comes in one port out to the others. Every computer
connected to the hub “sees” everything that every other computer on the hub sees.
• A switch does a hubs’ work, more efficiently. By paying attention to the traffic that
comes across it, it can “learn” where particular addresses are.
• A router is comparable to a computer that can be programmed to understand,
possibly manipulate, and route the data its being asked to handle.

Proprietary and Confidential 5


OSI LAYERS - Functions
FUNCTIONS
7 APPLICATION Type of communication: e-mail, file transfer, web browsing

6 PRESENTATION Encryption, data conversion: ASCII to EBCDIC, BCD to binary et.

5 SESSION Starts, stops sessions. Maintains order

4 TRANSPORT Ensure delivery of entire file or message

3 NETWORK Routes data to different LANs and WANs based on network addresses

2 DATA LINK Transmits packets from node to node based on station address

1 PHYSICAL Electrical signals and cabling (physical medium)

Proprietary and Confidential 6


OSI LAYERS - Protocols
PROTOCOLS
7 APPLICATION HTTP, FTP, IRC, SSH, DNS, SNMP

6 PRESENTATION SSL, SFTP, IMAP, SSH, Jpeg, GIF, TIFF, MPEG, MIDI, mp3

5 SESSION VARIOUS API’S, SOCKETS

4 TRANSPORT TCP, UDP, ECN, SCTP, DCCP

3 NETWORK IP, IP Sec, ICMP, IGMP

2 DATA LINK Ethernet, Token Ring, SLIP, PPP, FDDI

1 PHYSICAL Coax, Fiber, Wireless


Proprietary and Confidential 7
ETHERNET FRAME, L1 & L2 headers
Untagged Ethernet, Frame Maximum Size 1518 Bytes
Preamble SFD DA MAC SA MAC Lenght/Type Payload + Padding FCS IFG ***
[7 Bytes] [1 Byte] [6 Bytes] [6 Bytes] [2 Bytes] [46-1500 Bytes] [4 Bytes] [12 Bytes]

Tagged Ethernet Frame, Maximum size is 1522 Bytes


Preamble SFD DA MAC SA MAC VLAN TAG Lenght/Type Payload + Padding FCS IFG ***
[7 Bytes] [1 Byte] [6 Bytes] [6 Bytes] [4 Bytes] [2 Bytes] [46-1500 Bytes] [4 Bytes] [12 Bytes]

TPID=0X8100 P-Bits CFI VLAN ID


[2 Bytes] [3 bits] [1 bit] [12 bits]

Preamble SFD DA MAC SA MAC S-VLAN TAG C-VLAN TAG Lenght/Type Payload + Padding FCS IFG ***
[7 Bytes] [1 Byte] [6 Bytes] [6 Bytes] [4 Bytes] [4 Bytes] [2 Bytes] [46-1500 Bytes] [4 Bytes] [12 Bytes]

TPID ** P-Bits CFI VLAN ID TPID=0X8100 P-Bits CFI VLAN ID


[2 Bytes] [3 bits] [1 bit] [12 bits] [2 Bytes] [3 bits] [1 bit] [12 bits]
*FCS is re-calculated when V-LAN tag is added. **TPID for QinQ: 0X8100, 0x88A8 / 0x9100 / 0x9200***arbitrary 8
Proprietary and Confidential
OSI and TCP/IP model
OSI model OSI model
TCP/IP
layers layers
model
Application Protocol P Preamble
Application Application
Presentation Protocol SFD Start frame Delimiter
Presentation Presentation
Application DATA
MAC Destination + Source MAC Address
Session Protocol
Session Session
EL Ether Length/Type
TCP/UDP DATA
Transport Transport Transport
VLAN Virtual local area network
IPv4/6 TCP/UDP DATA
Internet Network Network MPLS Multiprotocol Label Switching

MPLS IPv4/6 TCP/UDP DATA


Layer 2,5 Layer 2,5 Layer 2,5 IP Internet protocol

E
MAC MPLS IPv4/6 TCP/UDP DATA FCS
Data Link S-VLAN C-VLAN
L Data Link TCP Transmission control protocol
Network
Interface Physical P SFD MAC S-VLAN C-VLAN MPLS E
L
IPv4/6 TCP/UDP DATA FCS
Physical UDP User datagram protocol

Size in bytes: 7 1 12 4 4 4 2 20/40 20/8 4


FCS Frame check sequence

46-1500

Proprietary and Confidential 9


What happens at Layer 2?

LAYER 2 Headers
8 BYTES 8 BYTES 2 BYTES 46 - 1500 BYTES 4 BYTES

DESTINATION MAC SOURCE MAC CRC


TYPE DATA
ADDRESS ADDRESS Checksum

Proprietary and Confidential 10


What happens at Layer 3?
LAYER 3 HEADERS
BITS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

HEADER
0 VERSION TOS TOTAL LENGTH
LENGTH

32 IDENTIFICATION FLAGS FRAGMENT OFFSET

64 TIME TO LIVE PROTOCOL HEADER CHECKSUM

96 SOURCE ADDRESS

128 DESTINATION ADDRESS

160 OPTIONS

Proprietary and Confidential 11


What happens at Layer 4?
• UDP Header

UDP HEADER
BITS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

0 SOURCE PORT NUMBER DESTINATION PORT NUMBER

32 LENGTH CHECKSUM

Proprietary and Confidential 12


What happens at Layer 4?
• TCP Header
TCP HEADER
BITS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

0 SOURCE PORT NUMBER DESTINATION PORT NUMBER

32 SEQUENCE NUMBER

64 ACKNOWLEDGEMENT NUMBER

DATA C E U A P R S F
96 RESERVED W C R C S S Y I WINDOW SIZE
OFFSET R E G K H T N N

128 CHECKSUM URGENT POINTER

160 OPTIONS (if DATA OFFSET > 5)

Proprietary and Confidential 13


INTER-FRAME GAP

Ethernet works in Layer 1, Layer 2 and “Layer 2,5”

Proprietary and Confidential 14


TCP Protocol

Proprietary and Confidential 15


Transmission Control Protocol
• A TCP packet walks into a bar and says, “I’d like a beer.”
• The bartender replies, “You want a beer?”
The TCP packet replies, “Yes, I’d like a beer.”

Proprietary and Confidential 16


Transmission Control Protocol
 Hello, would you like to hear a TCP joke?
 Yes, I'd like to hear a TCP joke.
 OK, I'll tell you a TCP joke.
 OK, I'll hear a TCP joke.
 Are you ready to hear a TCP joke?
 Yes, I am ready to hear a TCP joke.
 OK, I'm about to send the TCP joke. It will last 10 seconds, it has two characters, it does
not have a setting, it ends with a punchline.
 OK, I'm ready to hear the TCP joke that will last 10 seconds, has two characters, does
not have a setting and will end with a punchline.
 I'm sorry, your connection has timed out... ...Hello, would you like to hear a TCP joke?

Proprietary and Confidential 17


TCP- Segment format

Proprietary and Confidential 18


TCP- Control field

Proprietary and Confidential 19


TCP- Connection establishment using three-way
handshake

Passive
Active open
open seq: 8000

UAPRS F
SY N
seq: 15000
Connection ack: 8001
opened nd: 5000
U A P R S F rw
SYN + ACK
seq: 8000
ack: 15001
UAPRS F
rwnd: 10000
ACK
Means “no data” !
seq: 8001 if piggybacking
Proprietary and Confidential 20
TCP- Numbering System
• The bytes of data transferred in each connection are numbered. Numbering starts
with an arbitrarily generated number.

• The value in the sequence number field of a segment defines the number assigned
to the first data byte contained in that segment.

• The value of the acknowledgment field in a segment defines the number of the next
byte expected to be received.

Proprietary and Confidential 21


TCP- Data Transfer

seq: 8001
Send
request ack: 15001
UAPRS F
Data Receive
bytes: 8001-9
000

Send seq: 9001


request ack: 15001
UAPRS F
Data Receive
bytes: 9001-1
0000

seq: 15001 Send


ack: 10001 request
UAPRS F
Data
17000
bytes: 15001-
seq: 10000
ack: 17001
UAPRS F
rwnd:10000

C on n ect ion Ter m in a t ion

Proprietary and Confidential 22


TCP- Connection termination using three-way handshake

Proprietary and Confidential 23


TCP- Congestion Control:
Slow start, exponential increase

1
cwnd
RTT
2
cwnd

RTT
4
cwnd

RTT
8

cwnd

Proprietary and Confidential 24


TCP- Congestion Control:
Congestion avoidance, additive increase

Proprietary and Confidential 25


TCP- Congestion example

Proprietary and Confidential 26


TCP- Calculating maximum throughput of one TCP
stream
• TCP window size [Bytes] = Bandwidth [bps] * RTD [Sec] /8

• * Example:

• TCP ideal window size = 1*109*30*10-3/8 = 3.75MBytes

Proprietary and Confidential 27


VLAN concept

Proprietary and Confidential


Virtual Local Area Network (VLAN) concept
Imagine that you have a network and three different customer
• Customer 1
• Customer 2
• Customer 3

NETWORK

Proprietary and Confidential 29


Virtual Local Area Network (VLAN) concept

VLANs are created to provide the segmentation services traditionally provided by


routers in LAN configurations
The most common protocol used today in configuring virtual LANs is IEEE 802.1Q

Proprietary and Confidential 30


OSI and TCP/IP model
OSI model OSI model
TCP/IP
layers layers
model
Application Protocol P Preamble
Application Application
Presentation Protocol SFD Start frame Delimiter
Presentation Presentation
Application DATA
MAC Destination + Source MAC Address
Session Protocol
Session Session
EL Ether Length/Type
TCP/UDP DATA
Transport Transport Transport
VLAN Virtual local area network
IPv4/6 TCP/UDP DATA
Internet Network Network MPLS Multiprotocol Label Switching

MPLS IPv4/6 TCP/UDP DATA


Layer 2,5 Layer 2,5 Layer 2,5 IP Internet protocol

E
MAC MPLS IPv4/6 TCP/UDP DATA FCS
Data Link S-VLAN C-VLAN
L Data Link TCP Transmission control protocol
Network
Interface Physical P SFD MAC S-VLAN C-VLAN MPLS E
L
IPv4/6 TCP/UDP DATA FCS
Physical UDP User datagram protocol

Size in bytes: 7 1 12 4 4 4 2 20/40 20/8 4


FCS Frame check sequence

46-1500

Proprietary and Confidential 31


ETHERNET FRAME, L1 & L2 headers
Untagged Ethernet, Frame Maximum Size 1518 Bytes
Preamble SFD DA MAC SA MAC Lenght/Type Payload + Padding FCS IFG ***
[7 Bytes] [1 Byte] [6 Bytes] [6 Bytes] [2 Bytes] [46-1500 Bytes] [4 Bytes] [12 Bytes]

Tagged Ethernet Frame, Maximum size is 1522 Bytes


Preamble SFD DA MAC SA MAC VLAN TAG Lenght/Type Payload + Padding FCS IFG ***
[7 Bytes] [1 Byte] [6 Bytes] [6 Bytes] [4 Bytes] [2 Bytes] [46-1500 Bytes] [4 Bytes] [12 Bytes]

TPID=0X8100 P-Bits CFI VLAN ID


[2 Bytes] [3 bits] [1 bit] [12 bits]

Preamble SFD DA MAC SA MAC S-VLAN TAG C-VLAN TAG Lenght/Type Payload + Padding FCS IFG ***
[7 Bytes] [1 Byte] [6 Bytes] [6 Bytes] [4 Bytes] [4 Bytes] [2 Bytes] [46-1500 Bytes] [4 Bytes] [12 Bytes]

TPID ** P-Bits CFI VLAN ID TPID=0X8100 P-Bits CFI VLAN ID


[2 Bytes] [3 bits] [1 bit] [12 bits] [2 Bytes] [3 bits] [1 bit] [12 bits]
*FCS is re-calculated when V-LAN tag is added. **TPID for QinQ: 0X8100, 0x88A8 / 0x9100 / 0x9200***arbitrary 32
Proprietary and Confidential
UNTAGGED ETHERNET FRAME

FCS is created by the sender and recalculated by the receiver

Preamble + SFD DA SA Length / Type DATA + PAD FCS

4 Bytes
8 Bytes 6 Bytes 6 Bytes 2 Bytes 46 - 1500 Bytes (32-bit
CRC)

Minimum 64 Bytes < FRAME SIZE < Maximum 1518 Bytes

Length / Type < 1500 - Parameter indicates number of Data Bytes


Length / Type > 1536 - Parameter indicates Protocol Type (PPPoE, PPPoA, ARP etc.)

33
Proprietary and Confidential
TAGGED ETHERNET FRAME
• Additional information is inserted
• Frame size increases to 1522 Bytes
4 Bytes

Preamble + SFD DA SA VLAN TAG Length / Type DATA + PAD FCS

TPID = 0x8100 TCI

P-TAG CFI VLAN ID


TPID = Tag protocol ID
3 Bit 1 Bit 12 Bit
TCI = Tag Control Information
CFI = 1 bit canonical Format Indicator

34
Proprietary and Confidential
TAGGING A FRAME VLAN TAG PAYLOAD

• VLAN ID uses 12 bits, therefore the number of maximum VLANs is 4096:


• 212 = 4096
• VID 0 = reserved
• VID 40904096 = reserved (dedicated for IP-10’s internal purposes such as MNG etc.)
• VID 1 = default

• After tagging a frame, FCS is recalculated


• CFI is set to 0 for ETH frames, 1 for Token Ring to allow TR frames over ETH
backbones (some vendors may use CFI for internal purposes)

35
Proprietary and Confidential
TPID / ETHER-Type / Protocol Type…
• EtherType is a two-octet field in an Ethernet frame, used Protocol type Value
to indicate which protocol is encapsulated in the payload Tagged Frame 0x8100
ARP 0x0806
of an Ethernet Frame.
Q-in-Q (CISCO) 0x8100
Q-in-Q (other vendors) 0x88A8
Q-in-Q (other vendors) 0x9100
• TPID in tagged frames in always set to 0x8100 Q-in-Q (other vendors) 0x9200
RARP 0x8035
IP 0x0800
• It is important that to understand the meaning and usage IPv6 0x86DD
PPPoE 0x8863/0x8864
of this parameter
MPLS 0x8847/0x8848
IS-IS 0x8000
LACP 0x8809
802.1x 0x888E

Proprietary and Confidential 36


Q-in-Q
• Additional VLAN (S-VLAN) is inserted
• Frame size increases to 1526 Bytes
4 Bytes 4 Bytes

Preamble + SFD DA SA S - VLAN C - VLAN Length / Type DATA + FCS


PAD

TPID = 0x88A8 TCI TPID = 0x8100 TCI

P-TAG CFI VLAN ID P-TAG CFI VLAN ID


3 Bit 1 Bit 12 Bit 3 Bit 1 Bit 12 Bit

37
Proprietary and Confidential
WHAT WAS DISCUSSED
 Local Area Network (LAN)

 Network Devices

 OSI Layers

 Ethernet Frame

 TCP

 VLAN concept

 VLAN Tagging

Proprietary and Confidential 38


Thank You

Proprietary and Confidential

S-ar putea să vă placă și