Você está na página 1de 94

Ethernet TCP/IP Overview

Basic Ethernet Technologies

Introduction to Ethernet
Communications
What is Ethernet
Layers in the TCP/IP Model
Network Architectures & Topologies
Physical Support
Ethernet Protocols and Services
Summary

Schneider Electric - Ethernet TCP/IP Overview

What is Ethernet?
Invented in 1973-1975 by Xerox
Complex networking technology that defines wiring and signaling
standards for the physical layer through the means of the data link
layer and a common addressing format (IP address)
Standardized as IEEE 802.3
Allows computers and equipment to communicate to one another over
a common medium for Local Area Networks
Term derived from the combination of the Greek word aether (to
burn/shine/disperse) and network

Schneider Electric - Ethernet TCP/IP Overview

CSMA/CD
Carrier Sense Multiple Access with Collision
Detection
Ethernet originally made the use of a shared co-axial cable to network
Prone to collision problems

Governs the way computers share information on the same channel


Following procedure was used when a computer needed to transmit
information
Main procedure/Algorithm
Frame ready for transmission
Is medium idle? If not, wait until it becomes ready and wait the interframe gap
period (9.6 s in 10 Mbit/s Ethernet)
Start transmitting
Does a collision occur? If so, go to collision detected procedure
End successful transmission

Schneider Electric - Ethernet TCP/IP Overview

CSMA/CD
Carrier Sense Multiple Access with Collision
Detection
Collision detected procedure
Continue transmission until minimum packet time is reached (jam
signal) to ensure that all receivers detect the collision
Is maximum number of transmission attempts reached? If so, abort
transmission.
Calculate and wait random back off period
Re-enter main procedure at stage 1

Schneider Electric - Ethernet TCP/IP Overview

Types of Transmission
Simplex transmission: one-way

Half duplex transmission: alternating two-way

Full duplex transmission: simultaneous two-way

Schneider Electric - Ethernet TCP/IP Overview

MAC Address
Media Access Control Address
A unique identifier attached to most network adapters (NICs)
A number that acts like a name for a particular network adapter
The network cards (or built-in network adapters) in two different
computers will have different names, or MAC addresses, as would
an Ethernet adapter and a wireless adapter in the same computer,
and as would multiple network cards in a router.
However, it is possible to change the MAC address on most of
today's hardware.
Example: MAC Address = 00-14-A5-60-A4-96

Schneider Electric - Ethernet TCP/IP Overview

MAC Address
Ethernet Header
Number of bytes : 8

20

46 to 1500

4
FCS Check

TCP

IP

LLC (Type)
MAC
Source
MAC
Destination

Preamble

Ethernet header

20

Applications:
HTTP, IEC 61850, Modbus TCP, etc

Data

CRC

@ IP = network address

Schneider Electric - Ethernet TCP/IP Overview

Format des trames

Size of the frames (with prambule) :


minimal : 72 octets (46 octets of DATA)
maximal : 1526 octets
26 octets for the protocol

Schneider Electric - Ethernet TCP/IP Overview

Format of the frames


Flow direction of octets
First : first octet of prambule
last : last octet of the control sequence

Flow direction of bits for one octet


First : less significant bit (bit 0)
last : most significant bit (bit 7)

Time between frames : 9.6 s minimum


10 Mbits/s = 10 bits / s
Time between frame 9.6 s --> 9.6 x 10 = 96 bits time (12 octets)

Schneider Electric - Ethernet TCP/IP Overview

10

Different field of the frame


Prambule
7 octets: synchronisation
7 * (10101010)

SFD (Start Frame Delimiter)


1 octet: 10101011
Start the begining of the frame

Destination Address
unique address of a station (unicast)
or group of stations address (multicast)
or all stations address (broadcast)

source Address
physical adresse of the sending station

Schneider Electric - Ethernet TCP/IP Overview

11

Les diffrents champs de la trame


Size of the data zone (spcifique 802.3)
between 1 et 1500 octets

or Type of protocol (specifique Ethernet)


Valeur 0x0600 (=1536)

Data + padding
size 1500 octets
size 46 octets
padding (octets sans signification)
when less of 46 octets of data to send

FCS : Frame Control Sequence


4 octets of control : CRC (Cyclic Redundancy Check)
Polynme de degr 32, for the fields :
addresses (destination and source)
size of the data zone
data + padding
Schneider Electric - Ethernet TCP/IP Overview

12

Diffrent field of the frame


field "type" in the frame Ethernet
2 octets in hxadcimal format XX-YY ou XXYY
field types known
0800 IP
0806 ARP
6000 6009 DEC (6004 LAT)
8019 DOMAIN (Apollo)
8038 DEC LANBridge management
88B8 IEC 61850 GOOSE

Or
field size" in the frame IEEE802.3
all the number of protocols are higher than the maximum size of the
data zone in a frame (1500)
a station can identify the frames
if value > 1500 frame Ethernet
if not frame IEEE802.3
Schneider Electric - Ethernet TCP/IP Overview

13

the Addresses MAC


Addresse MAC = 6 octets (48 bits)
Unicast :
first bit (sent) = 0
--> 1er octet of @ is even :
08:00:20:06:D4:E8
00:00:0C:00:5B:37
2nd bit (sent) = 0 shows a universal address (given by IEEE)
1er octet = x0, x1, x4, x5, x8, x9, xC, xD ...

Multicast :
first bit (sent) =1 ---> 1er octet of @ is odd :
Shows a group of stations :
09-00-2B-00-00-0F protocol LAT de DEC
09-00-2B-01-00-00 LANbridge (pont) de DEC

Schneider Electric - Ethernet TCP/IP Overview

14

Les Adresses MAC


Broadcast = diffusion = FF:FF:FF:FF:FF:FF
All the stations of a network (all segments)

IEEE has given sections of addresses to the manufacturers:


The 3 first octets show the origine of the device
00:00:0C:XX:XX:XX : Cisco
08:00:20:XX:XX:XX : Sun
08:00:09:XX:XX:XX : HP
08:00:14:XX:XX:XX : Excelan
But there are addresses "non IEEE" :
AA:00:04:XX:XX:XX: DEC

the adresses Ethernet and IEEE802.3 are uniques


ETHERNET dont know adresses IP !!!
Schneider Electric - Ethernet TCP/IP Overview

15

IP address version 4 (IPv4)


IPv4 is a best effort delivery protocol because it
Does not guarantee delivery
Does not ensure packets will arrive in the correct order
Does not check for duplicate packet delivery

Has 232 possible addresses (around 4.2 billion)


Will run out of address by 2010 or 2011

10

194

30

00001010

11000010

00000001

00011110

1 byte

Schneider Electric - Ethernet TCP/IP Overview

1 byte

1 byte

1 byte

NetID

HostID

Network

Equipment
16

SubnetMask
3 classes of networks
Class A

Class B

Class C

31

netID

31

Class B
Class C

hostID
26

netID

31

Min Value
Class A

24

netID

Max Value

hostID

Possible # of
Networks

Max # of devices
per Network

hostID

Typical Use

0.0.0.0

126.255.255.255

126

16777214

Large networks

128.0.0.0

191.255.255.255

16384

65534

Big organizations

192.0.0.0

223.255.255.255

2097152

254

Small networks

Schneider Electric - Ethernet TCP/IP Overview

17

Ladressage IP
24

31

CLASSE A

Class A: larger Host ID = local network bigger

netid

hostid
16

31

CLASSE B

10

hostid

netid

31

CLASSE C

110

netid

hostid

31

CLASSE D

1110

Multicast et usages spciaux

Classe

Val. Min.
octet 1

Val. Max.
octet 1

Nombre max.
rseaux

Nombre max.
stations

Usage

126

126

16 777 214

Grands
rseaux

128

191

16 384

65 534

Grosses
organisations

192

223

2 097 152

254

Petits
rseaux

224

231

Multicast et usages spciaux

239

254

Rserv usage ultrieur (ou priv)

Schneider Electric - Ethernet TCP/IP Overview

18

SubnetMask
Ex: Extraction of Network Address
IP Address

10

194

30

Subnet Mask

255

255

255

IP Address

00001010

11000010

00000001

00011110

AND
Subnet Mask

11111111

11111111

11111111

00000000

00001010

11000010

00000001

00000000

10
Schneider Electric - Ethernet TCP/IP Overview

194

0
19

adresses IP subneting
255

255

254

Src IP

10

194

138

Dst IP

10

194

27

11111111 11111111 11111110 00000000


00001010 11000010 00000100 10001010
00001010 11000010 00000101 00011011

same subnet => frame sent directly to destination


Src IP

10

194

138

Dst IP

10

194

27

11111111 11111111 11111110 00000000


00001010 11000010 00000100 10001010
00001010 11000010 00000110

00011011

other subnet => frame sent directly to routeur


Schneider Electric - Ethernet TCP/IP Overview

20

Ladressage IP
particular Case
0.0.0.0 no adress
127.0.0.1 itself (loopback, localhost)
all bits of hostid at 0 : the network
all bits of hostid at 1 : all the devices of the network (broadcast)
Private networks : usefull adresses free to use for internal network no
connected directly to Internet (connection possible via a proxy )
10.0.0.0 10.255.255.255 (10/8)
172.16.0.0 172.31.255.255 (172.16/12)
192.168.0.0 192.168.255.255 (192.168/16)

Adresses automatic (no routables)


169.154.0.0 169.154.255.255 (169.154/16)

Schneider Electric - Ethernet TCP/IP Overview

21

ARP (Address Resolution Protocol)


Ethernet only knows adresses MAC
ARP allows to change IP address to a MAC address
Principle
the station source sends a request in broadcast mode at level MAC who
has address (IP) x.y.z.t ?
The station concerned answers it is me that is my address MAC
The association IP/MAC is stored in a cache ARP
Each inputof this cache is erased after 30s to 2mn

ARP allows to detect / prevent the double adress IP


At the begining, the device sends a request ARP with its own adress
(Gratuitous ARP)
Normaly this request must stay without any answer

RARP (reverse ARP) ralise la fonction inverse

Schneider Electric - Ethernet TCP/IP Overview

22

Address Resolution Protocol (ARP)


Method for finding a host's hardware address based on its network
layer address.
It is possible to view a list of all addresses registered in the ARP table
by using the ARP a command in the DOS command prompt

Schneider Electric - Ethernet TCP/IP Overview

23

ARP (continued)
ARP is used in four cases when two hosts are communicating
1 Two hosts are on the same network and one sends a packet to the other
1.
2.
2 Two hosts are on different networks and must use a gateway to reach each
other
3 A router needs to forward a packet from a host through another router
3.
4.
4 A router needs to forward a packet from a host to another host on the same
network

The last three cases are mostly used over the Internet as two
computers on the internet are typically separated by more than 3
hops.
Imagine computer A sends a packet to computer D and there are two
routers, B & C, between them
Case 2 covers A sending to D
Case 3 covers B sending to C
Case 4 covers C sending to D
Schneider Electric - Ethernet TCP/IP Overview

24

automatic allocation of adress IP


BOOTP: Boot Protocol
DHCP: Dynamic Host Configuration Protocol

Certains quipements ne possdent pas dadresse IP pr attribue


Incapacit de la stocker
Optimisation de la gestion des adresses

BOOTP permet un quipement de rcuprer une adresse IP auprs


dun serveur
DHCP est une volution de BOOTP (mmes trames)
Principe
La station met une requte en broadcast de niveau MAC qui peut me
donner une adresse IP ?
Le serveur du rseau rpond en indiquant ladresse attribue
soit partir dune table dassociation MAC/IP prconfigure
soit par allocation dynamique (DHCP)
Ladresse gateway est aussi communique par le serveur
La rfrence dun fichier de paramtres peut-tre donne
Schneider Electric - Ethernet TCP/IP Overview

25

Attribution automatique dadresse IP


Schneider Electric workstations are configured to obtain an IP
address automatically from the network

Schneider Electric - Ethernet TCP/IP Overview

26

IP Address version 6 (IPv6)


IPv6 has been designed to replace IPv4 in the future
Originally planned for 2010 or 2011
Has been very slow to adopt
128

Has 2

possible addresses (around 3.4 10 )


38

510 28 for every person in the world


4.5 1014 for every visible star in the known universe

0010 : 2a8c : 003b : 90ad : 0cb7 : 0000 : 0000 : 1004


10 : 2a8c : 3b : 90ad : cb7 : 0000 : 0000 : 1004
10 : 2a8c : 3b : 90ad : cb7 : : 1004
Schneider Electric - Ethernet TCP/IP Overview

27

IPv6 Networks
Networks are written in CIDR (Classless Inter-Domain Routing)
notation

0010 : 2a8c : 003b : : / 48

0010 : 2a8c : 003b : 0000 : 0000 : 0000 : 0000 : 0000


0010 : 2a8c : 003b : ffff : ffff : ffff : ffff : ffff

Schneider Electric - Ethernet TCP/IP Overview

28

Mapping IPv4 to IPv6


The first 80 bits are set to 0
The next 16 bits are set to 1
The last 32 bits is the IPv4 address

10

194

30

0000 1010 1100 0010 0000 0001 0001 1110


0

: : ffff : 0ac2 : 011e

Schneider Electric - Ethernet TCP/IP Overview

29

Introduction to Ethernet
Communications
What is Ethernet
Layers in the TCP/IP Model
Network Architectures & Topologies
Physical Support
Ethernet Protocols and Services
Summary

Schneider Electric - Ethernet TCP/IP Overview

30

Open System Interconnection OSI


7 Layer Architecture

SOFTWARE

HARDWARE

APPLICATION LAYER

HTTP, SMTP, SNMP, FTP,


Modbus, IEC 61850, DNP

PRESENTATION
LAYER

XDR, ASN.1, SMB, AFP,


NCP

SESSION LAYER

ASAP, TLS, SSL, ISO 8327 /


CCITT X.225, RPC,
NetBIOS, ASP

TRANSPORT LAYER

TCP, UDP, RTP, SCTP, SPX,


ATP

NETWORK LAYER

IP, ICMP, IGMP, IPX, OSPF,


RIP,ARP

DATA LINK LAYER

Ethernet, Token ring, STP,


Frame relay, ISDN, ATM,
802.11 WiFi

PHYSICAL LAYER

10BASE-T, 100BASE-T,
1000BASE-T, various
802.11 physical layers

Schneider Electric - Ethernet TCP/IP Overview

31

APPLICATION LAYER

Layer 7: Application layer

PRESENTATION LAYER
SESSION LAYER
TRANSPORT LAYER
NETWORK LAYER
DATA LINK LAYER
PHYSICAL LAYER

It interfaces directly to and performs common application services for


the application processes
Issues requests to the presentation layer.
The common application layer services provide semantic (language)
conversion between associated application processes.
Note: Examples of common application services of general interest include
the virtual file, virtual terminal, and job transfer and manipulation protocols.

The application layer of the four layer and five layer TCP/IP models
corresponds to the application layer, the presentation layer and session
layer in the seven layer OSI models.

Schneider Electric - Ethernet TCP/IP Overview

32

APPLICATION LAYER

Layer 6: Presentation layer

PRESENTATION LAYER
SESSION LAYER
TRANSPORT LAYER
NETWORK LAYER
DATA LINK LAYER
PHYSICAL LAYER

Transforms data to provide a standard interface for the Application


layer. MIME encoding, data encryption and similar manipulation of the
presentation is done at this layer to present the data as a service or
protocol developer sees fit.
Examples:
Converting an EBCDIC-coded text file to an ASCII-coded file
Serializing objects and other data structures into and out of XML

Schneider Electric - Ethernet TCP/IP Overview

33

APPLICATION LAYER

Layer 5: Session layer

PRESENTATION LAYER
SESSION LAYER
TRANSPORT LAYER
NETWORK LAYER
DATA LINK LAYER
PHYSICAL LAYER

Controls the dialogues/connections (sessions) between computers


Establishes, manages and terminates the connections between the
local and remote application.
It provides for either full-duplex or half-duplex operation, and
establishes checkpointing, adjournment, termination, and restart
procedures.
This layer is responsible for "graceful close" of sessions, which is a
property of TCP, and also for session checkpointing and recovery,
which is not usually used in the Internet protocols suite.

Schneider Electric - Ethernet TCP/IP Overview

34

APPLICATION LAYER

Layer 4: Transport layer

PRESENTATION LAYER
SESSION LAYER
TRANSPORT LAYER
NETWORK LAYER
DATA LINK LAYER
PHYSICAL LAYER

Provides transparent transfer of data between end users


Controls the reliability of a given link through flow control,
segmentation/de-segmentation, and error control
Some protocols are state and connection oriented. This means that the
transport layer can keep track of the packets and retransmit those that
fail.
Example:
Transmission Control Protocol (TCP). The transport layer is the layer that
converts messages into TCP segments or User Datagram Protocol (UDP)

Analogy:
Post Office, which deals with the dispatching and classification of mail and
parcels sent.
Schneider Electric - Ethernet TCP/IP Overview

35

Couche Transport
Ports
Just as every IP device has an IP address each service on
Ethernet has a port address.
The port address is needed to allow a end devices network stack
to pass the correct data to the correct application.
Ports allow a single Ethernet stack can handle data for many
different applications at the same time.
The port used by the source device to send the data is assigned
randomly from a pool.
The destination port that the data is sent to is defined for each
Ethernet service.
Some protocols are assigned well known numbers like FTP,
HTTP, Modbus
Other protocols take a socket from the available pool - this
does not guarantee compatibility across different networks and
systems.
Schneider Electric - Ethernet TCP/IP Overview

36

Couche Transport
Ports (cont.)
The port numbers are divided into three ranges: the Well Known
Ports, the Registered Ports, and the Dynamic and/or Private
Ports.
The Well Known Ports are those from 0 through 1023. Well
Known ports SHOULD NOT be used without IANA registration.
The Registered Ports are those from 1024 through 49151.
Registered ports SHOULD NOT be used without IANA
registration.
The Dynamic and/or Private Ports are those from 49152
through 65535.

Schneider Electric - Ethernet TCP/IP Overview

37

Couche Transport
Ports (cont.)
Les ports usuels :
21 (tcp) : FTP (parfois coupl 20/tcp)
23 (tcp) : Telnet. On trouve par exemple des modems/routeurs en telnet.
25 (tcp) : SMTP, envoi d'email.
53 (tcp et udp) : DNS
67 (tcp et udp) : DHCP, gestion automatique des IP d'un rseau.
80 (tcp et udp) : HTTP
102 (tcp et udp) : ISO-TSAP Class 0 IEC 61850 / MMS over TCP/IP
110 (tcp et udp) : POP3, lecture de courrier.
123 (tcp et udp) : NTP (Network Time protocol), synchronisation de
l'heure.
502 (tcp et udp) : asa-appl-proto (Dennis Dube)
Modbus

Schneider Electric - Ethernet TCP/IP Overview

38

Couche Transport UDP


UDP - User Datagram Protocol.
The UDP layer requires that an application build the single packet of
data is then put into a UDP header and sent onto the Ethernet
network. No retry or delivery order services are provided.
UDP allows a packet to be broadcast, unlike TCP that requires a
dedicated socket between the endpoints.
Retries and data integrity can still be provided but must be handled
by the application layer protocol.

Troubleshooting commands for the TCP/UDP Layer


Netstat, using switches.

Schneider Electric - Ethernet TCP/IP Overview

39

Couche Transport TCP


TCP - Transmission Control Protocol
TCP allows a reliable transport of data from one device to the
other by :
Transporting data along a socket using sequence numbers to record
the amount of data sent.
Implementing a send/acknowledge system where each packet of
data is acknowledged.
Implementing an adaptive retry system where a lost packet can be
resent or a lost section of data resent without having to abort the
entire transmission.
Provides re-ordering of the IP datagrams at the destination based on
sequence number - this is needed as IP datagrams can arrive in a
different order to what they are sent.
Providing flow control that prevents a receiving device from being
overloaded with data.
Providing a checksum on the header and data sent.

A TCP socket connection must be established between two


devices before data can be sent. The socket connection must be
closed after all data is sent.
Schneider Electric - Ethernet TCP/IP Overview

40

- TCP : segmenter, encapsuler,


ordonnancer
metteur

Message

Message

TCP

Rcepteur

TCP

3 4

IP

IP

ETHERNET
Schneider Electric - Ethernet TCP/IP Overview

41

Couche Transport TCP


Socket Setup and Take Down.
A socket setup follows these steps :
Client device chooses a random socket number and sends a
SYN packet to the Server IP and Socket address.
The Server responds with a ACK of the request plus a SYN to
open the socket in the other direction, so two way
communications are possible.
The Client and Server both specify a window at this
point, this is the amount of data that the device is able to
accept at this time.
The window can be set to 0 to prevent any more data
being sent.

The Client then sends an ACK of the SYN from the Server,
this completes the Socket establishment.

Schneider Electric - Ethernet TCP/IP Overview

42

APPLICATION LAYER

Layer 3: Network layer

PRESENTATION LAYER
SESSION LAYER
TRANSPORT LAYER
NETWORK LAYER
DATA LINK LAYER
PHYSICAL LAYER

Provides the means of transferring data sequences from a source to a


destination via one or more networks while maintaining the quality of
service requested by the Transport layer.
Performs network routing functions, and might also perform
segmentation/de-segmentation, and report delivery errors.
Routers operate at this layersending data throughout the extended
network and making the Internet possible. This is a logical addressing
scheme values are chosen by the network engineer
Example:
Internet Protocol (IP).

Analogy:
Air Mail or Consolidated Carrier that transfers the mail from Point A to Point
B
Schneider Electric - Ethernet TCP/IP Overview

43

APPLICATION LAYER

Layer 2: Data Link layer

PRESENTATION LAYER
SESSION LAYER
TRANSPORT LAYER
NETWORK LAYER
DATA LINK LAYER
PHYSICAL LAYER

Provides the functional and procedural means to transfer data between


network entities and to detect and possibly correct errors that may
occur in the Physical layer
It arranges bits from physical layer into logical chunks of data, known
as frames
This is the layer at which the bridges and switches operate
Connectivity is provided only among locally attached network nodes
forming layer 2 domains for unicast or broadcast forwarding. Other
protocols may be imposed on the data frames to create tunnels and
logically separated layer 2 forwarding domain

Schneider Electric - Ethernet TCP/IP Overview

44

APPLICATION LAYER

Layer 1: Physical layer

PRESENTATION LAYER
SESSION LAYER
TRANSPORT LAYER
NETWORK LAYER
DATA LINK LAYER
PHYSICAL LAYER

Defines all the electrical and physical specifications for devices


This includes the layout of pins, voltages, and cable specifications
Hubs, repeaters, and network adapters are physical-layer devices
Major functions and services performed by the physical layer are:
Establishment and termination of a connection to a communications
medium.
Sharing communication resources among multiple users.
Modulation, or conversion between the representation of digital data in user
equipment and the corresponding signals transmitted over a
communications channel. These are signals operating over the physical
cabling or over a radio link.

Various physical-layer Ethernet standards are also in this layer;


Ethernet incorporates both this layer and the data-link layer. The same
applies to other local-area networks, such as IEEE 802.11
Schneider Electric - Ethernet TCP/IP Overview

45

OSI: 7 Layer Architecture


APPLICATION LAYER
PRESENTATION
LAYER
SESSION LAYER
SOFTWARE

TRANSPORT LAYER
NETWORK LAYER

TCP
Checking &
Correction
IP
Routing /
Addressing

TCP/IP

DATA LINK LAYER


PHYSICAL LAYER
HARDWARE

Schneider Electric - Ethernet TCP/IP Overview

46

Introduction to Ethernet
Communications
What is Ethernet
Layers in the TCP/IP Model
Network Architectures & Topologies
Physical Support
Ethernet Protocols and Services
Summary

Schneider Electric - Ethernet TCP/IP Overview

47

Types of Area Networks


WAN: Wide Area Network
Computer network that covers a large area:
Metropolitan, regional, or national

MAN: Metropolitan Area Network


Computer networks usually spanning a city
Typically use wireless or optical fibre

LAN: Local Area Network


Computer network covering a small area:
Home, office, or group of buildings
Current LANs are likely based on IEEE 802.3
Ethernet technology, running at 10, 100 or 1000 Mbit/s

VLAN: Virtual Local Area Network


A grouping of devices that arent on the same physical LAN
Allows re-grouping of devices via software instead of physically

Schneider Electric - Ethernet TCP/IP Overview

48

Why are VLANs Important?


VLANs are used to create logical groups of devices as if they were on
the same LAN
Router needed to connect two VLANs together
Flexible
Easy management and administration of logical groups of devices.
Easier to add/remove and modify devices on the LAN through software

Cost Effective
Fewer switches are needed in multi-LAN networks

Interoperable
Is an IEEE standard adopted across the industry
Schneider Electric - Ethernet TCP/IP Overview

49

VLAN Network
L3

L2

L2

L2

Schneider Electric - Ethernet TCP/IP Overview

L2

50

Trunks and Tags


Trunk
A VLAN trunk carries packets from multiple VLANs on a single cable

Tag
Each packet is identified by a VLAN tag
The tag is 4 bytes and identifies the VLAN number
Used to differentiate the packets between the different networks
One VLAN is allowed to stay untagged

Schneider Electric - Ethernet TCP/IP Overview

51

VLAN Terms
Edge Port
Carries packets belonging to a single LAN
A port connected to an end station or device on the same LAN
Does not carry any VLAN tags

Trunk Port
Carries packets belonging to multiple VLANS.
Packets must be tagged with VLAN numbers, except the Trunk Native VLAN
Used to connect layer 2 devices (typically switches)

Tagged VLAN
VLAN packets sent from a trunk port
Each packet contains a tag with the VLAN ID

Untagged VLAN
VLAN packets sent from a trunk port without a VLAN tag

Trunk Native VLAN


Each trunk port can define a native VLAN
Untagged packets received on a trunk port are associated to the native VLAN defined
for that port

Schneider Electric - Ethernet TCP/IP Overview

52

Adding a VLAN tag


STANDARD Frame

TCP

IP

LLC (Type)
MAC
Source
MAC
Destination

Preamble

TAGGED Frame

TCP

IP

LLC (Type)

MAC
Source
MAC
Destination

Preamble

TPID PCP CFI VID

4 Bytes

Schneider Electric - Ethernet TCP/IP Overview

53

Tagged vs. Untagged


Untagged
Standard Ethernet packet/frame in a network
Used with end devices on edge ports

Tagged
Inserts a 4 byte tag into the header of the frame
Used by trunk ports to identify which VLAN the packet belongs to
VLAN ID has a range of 1-4095
Tag Protocol Identifier
Set to 0x8100 to identify the frame as belonging to a VLAN

TPID

PCP

CFI

16
Bi
ts

3 Bits

1 Bit

Schneider Electric - Ethernet TCP/IP Overview

VID
12
Bi
ts

Priority Code Point


Set (0-7) to identify the traffic as data, voice, video, etc
Canonical Format Indicator
Used for compatibility between Ethernet and Token Ring
frames
VLAN Identifier
Indicates which VLAN the frame belongs to. Has range of 14095
54

Types of Networking Topologies

Schneider Electric - Ethernet TCP/IP Overview

55

Introduction to Ethernet
Communications
What is Ethernet
Layers in the TCP/IP Model
Network Architectures & Topologies
Physical Support
Ethernet Protocols and Services
Summary

Schneider Electric - Ethernet TCP/IP Overview

56

Hardware: Hub
Device for connecting multiple twisted pair or fibre optic Ethernet
devices together, making them act as a single segment.
A form of multiport repeater that restores timing and signal strength.
Responsible for forwarding a jam signal to all ports if it detects a
collision.
All devices are in the same collision domain (CSMA/CD)
Half duplex only
Operates in the physical layer (layer 1) of the OSI model.

Schneider Electric - Ethernet TCP/IP Overview

57

Hardware: Switch
Connects devices within the same LAN
Is a networking device that performs transparent bridging (connection
of multiple network segments with forwarding based on MAC
addresses) at up to the speed of the hardware
Operates in the data link layer (layer 2) of the OSI model.
Each physical port is in a different collision domain
Allows full duplex
Stores MAC addresses in a database for fast referencing
Manages traffic by directing frames on necessary ports only

Schneider Electric - Ethernet TCP/IP Overview

58

Hardware: Hubs vs. Switches


What is the difference between a Hub & Switch?
An Ethernet hub unsophisticated broadcast device.
Hubs do not manage any network traffic
Any packet entering any port is broadcast out on every other port
Packet collisions may result since no traffic is managed--which greatly
impedes the smooth flow of traffic.

A switch isolates ports, meaning that every received packet is sent out
only to the port on which the target may be found
Since the switch intelligently sends packets where they need to go, the
performance of the network can be greatly increased.

Schneider Electric - Ethernet TCP/IP Overview

59

Hardware: Router
Operates in the network layer (layer 3) of the OSI model.
Connects devices between different networks, making the internet
possible.
A router is a computer networking device that buffers and forwards
data packets across an inter-network toward their destinations, through
a process known as routing.

Schneider Electric - Ethernet TCP/IP Overview

60

Hardware: Switches vs. Routers


A router acts as a junction between two or more networks to buffer and
transfer data packets among them.
A switch connects devices to form a Local area network (LAN) (which
might, in turn, be connected to another network via a router).

Schneider Electric - Ethernet TCP/IP Overview

61

Hardware: Server / Client


Server
Computer system or piece of hardware that provides services to clients
Used for dedicated applications

Data storage/aggregation
Email
File sharing
Printing
DHCP
Hardware configuration is particular to application

Client
Computer system that accesses a (remote) service on another computer by some
kind of network

Schneider Electric - Ethernet TCP/IP Overview

62

Ethernet Physical Support


Original Ethernet used Co-Axial cable
Not reliable for large extended networks
Damage or a single bad connector, could make the whole Ethernet
segment unusable.
Prone to electrical discontinuity (signal reflections)
Difficult to debug
Security: Information is transmitted across a common medium to all
therefore a single node can eavesdrop on all traffic.
Performance: Use of a single cable also means that the bandwidth
is shared, so that network traffic can slow to a crawl when, for
example, the network and nodes restart after a power failure.

Schneider Electric - Ethernet TCP/IP Overview

63

Ethernet Physical Support


3 common standards used today
10BASE-T
100BASE-TX(100BASE-T) : Fast Ethernet
1000BASE-T : Gigabit Ethernet

All use the same connections and cable type


RJ-45 connector
Category 5 (4 pair cable)

Schneider Electric - Ethernet TCP/IP Overview

64

Ethernet Physical Support


10Base-T/100Base-T
10BASE-T
1st vendor independent Ethernet standard developed from AT&T
Supports data transmission rates up to 10Mbits/s
Typical cable standards: 100m segment length with 24AWG (0.205mm)
cable
High quality cable: 150m

100BASE-T (100BASE-TX, 100BASE-T4)


Supports data transmission rates up to 100Mbits/s
Works on the same cable standards as 10BASE-T
Uses 2 pairs for data transmission

1000BASE-T
Supports data transmission rates up to 1000Mbits/s
Uses all fours for simultaneous data transmission
Schneider Electric - Ethernet TCP/IP Overview

65

Ethernet Physical Support:


Straight vs. Crossover
T586A to T586A are referred to as straight through cables
Same for T586B -T586B

T586A to T586B are referred to as crossover cables or patch cables

Schneider Electric - Ethernet TCP/IP Overview

66

Ethernet Physical Support


Fibre Optic
100BASE-FX functions the same as 100BASE-T but uses 2 strands of
fibre optic to receive and transmit
Not compatible with 10BASE-FL
10BASE-FL uses a 850nm
100BASE-FX uses a 1300nm near-infrared (NIR) light wavelength
Max distance: 400m

1000BASE-SX
Operates over multi-mode fibre using a 850nm NIR wavelength
Max distance: 220m (500m with good quality cable)

1000BASE-LX
Uses a long wavelength laser
Wavelength: 1270 to 1355 nm
Specified to work up to 2 km over 9 m single-mode fibre
Schneider Electric - Ethernet TCP/IP Overview

67

Introduction to Ethernet
Communications
What is Ethernet
Layers in the TCP/IP Model
Network Architectures & Topologies
Physical Support
Ethernet Protocols and Services
Summary

Schneider Electric - Ethernet TCP/IP Overview

68

Internet Services
TCP: Transmission Control Protocol
Allows applications on networked hosts to establish connections to one another
Guarantees reliable delivery of data from sender to receiver
Distinguishes data for multiple connections by concurrent applications running on the
same host
Uses the notion of port numbers to identify sending and receiving application endpoints on a host
Some examples include: FTP (21), TELNET (23), SMTP (25) and HTTP (80)

UDP: User Datagram Protocol


Allows programs on networked computers can send short messages sometimes
known as datagrams to one another
Network applications that use UDP include the Domain Name System (DNS),
streaming media applications such as IPTV, VoIP, Trivial File Transfer Protocol (TFTP)
and online games
Utilizes ports to allow application-to-application communication
Schneider Electric - Ethernet TCP/IP Overview

69

HTTP
Hyper Text Transfer Protocol
Used to transfer or convey information on the World Wide Web
Request/response protocol between clients and servers
Client: Web browser
Server: Web server containing images and documents

HTTP client initiates a request by establishing a Transmission Control


Protocol (TCP) connection to a particular port on a remote host
TCP port 80 by default

ECI850 and ACE850 supports HTTP to provide a configuration and


diagnostic interface

Schneider Electric - Ethernet TCP/IP Overview

70

FTP
File Transfer Protocol
Used to transfer data from one computer to another over the Internet,
or through a network
Client computer, running FTP client software, initiates connection to
server allowing client to perform various file manipulations
Some file managers and web browsers can support this function

FTP server listens on TCP port 21 for incoming connections


Insecure method for transferring data
Password information + data can sniffed out using a packet sniffer
Solution to this problem is to use either SFTP (SSH File Transfer Protocol),
or FTPS (FTP over SSL)

ECI850 and ACE850 supports FTP for uploading configuration files


CID: Configured IED Description
Schneider Electric - Ethernet TCP/IP Overview

71

DHCP
Dynamic Host Configuration Protocol
Allows a client device to request and obtain an IP address, subnet mask, and
gateway IP address from a server which has a list of addresses available for
assignment
Client sends out query prior to any IP communications
DHCP server to the client with the above information

Facilitates automatic network configuration that would otherwise have to be


configured manually
DHCP server ensures that all IP addresses are unique

Address = 10.195.229.130
IP Address?
Mask = 255.255.252.0
Subnet Mask?
IP = 10.195.288.1
Gateway IP?
Schneider Electric - Ethernet TCP/IP Overview

72

SNMP
Simple Network Management Protocol
SNMP is used by network administrators to manage devices on a
network
Performance
Find / Solve network problems
Plan network growth

Where?
Servers / Workstations
Routers / Switches / Hubs
Firewalls
Printers / IP Phones / Appliances

Schneider Electric - Ethernet TCP/IP Overview

73

SNMP (cont)
Resides in the Application layer of the OSI model
Consists of managers and agents
Manager
Software / Network Management System running
on a network component
Interface between the system administrator and
the management system

MIB

Agent
Integrated firmware running on a network
component
Interface between the manager and the physical
managed device
Provides data about themselves to managers
using Management Information dataBases (MIB)
Ex. How many packets are sent/received
through the device

Schneider Electric - Ethernet TCP/IP Overview

MIB

MIB

74

MMS
Manufacturing Message Specification
ISO 9506 (TC184) standard that defines how communications are
handled
Application level protocol that provides for 'peer to peer' real-time and
supervisory control communications over a network
Allows interoperable products to communicate between applications and
devices of different developers

Facilitates mapping between objects/registers using other protocols


Supports multiple communication links
TCP/IP, RS-232C, Token Bus, OSI, etc.

Used in client-server requests (reads)

Schneider Electric - Ethernet TCP/IP Overview

75

SNTP
Simple Network Timing Protocol
Protocol for synchronizing the clocks of computer
systems over data networks
Less complex form of NTP
Uses UDP port 123 as its transport layer
Uses NTP timestamp format
Unsigned 64bit
32 bits for seconds
32 bits for fractions of seconds
# of seconds from Jan.1 1900

Accuracy
On the order of milliseconds (10) over the
Internet
On the order of microseconds (~200) over
the LAN under ideal conditions
Schneider Electric - Ethernet TCP/IP Overview

76

RSTP: Rapid Spanning Tree Protocol


IEEE Open Standard
RSTP Evolution
STP
RSTP
RSTP

802.1d
802.1w
802.1d-2004

Schneider Electric - Ethernet TCP/IP Overview

1990
1998
2004

77

Why is it Important?
Bridge Loops - Broadcast Storm
Can occur if there is a loop in the physical LAN
A single packet can travel through the loop without reaching a destination
Takes up bandwidth and floods the network with traffic

Schneider Electric - Ethernet TCP/IP Overview

78

What is STP?
The Spanning Tree Protocol (STP) creates efficient links within a mesh network
of layer-2 devices called Bridges (typically switches)
It disables the ports on the switch that are not part of the tree, leaving a single
active path between devices
Flexible
Allows for redundant connections to provide automatic backup paths, without creating
bridge loops
The algorithm automatically changes based on the physical topology

Efficient
Devices automatically use the fastest connections between devices
Easy to configure

Interoperable
Is an IEEE standard adopted across the industry
Devices from different vendors can work together
Schneider Electric - Ethernet TCP/IP Overview

79

How it Works
Select a Root Bridge
The Bridge with the lowest Bridge ID
Root Bridge sets all ports to forwarding

Select a Root Port for each Bridge


Has the lowest path cost to the Root Bridge

Select a Designated Port per LAN segment


Reports the lowest path cost to the Root Bridge

All other ports on all devices are set to blocking

Schneider Electric - Ethernet TCP/IP Overview

80

BPDU Bridge Protocol Data Unit


Bridges exchange information with BPDU packets
Are regular Ethernet packets, but are used by bridges to share
spanning tree topologies
Are distributed to all devices in the network (PCs and edge devices),
but will be discarded if not using RSTP
Are sent periodically based on the Hello Time parameter (default 2
seconds)
Are generated by the root bridge and passed to all other bridges in the
network

Schneider Electric - Ethernet TCP/IP Overview

81

RSTP Network
ROOT
Bridge A
MAC: 0000.0000.1001
Priority: 32,768
Designated

Bridge B
MAC: 0000.0000.3021
Priority: 32,768

Designated

Root

Designated

Designated

Root

Bridge D
MAC: 0000.0000.8117
Priority: 32,768
Schneider Electric - Ethernet TCP/IP Overview

Bridge C
MAC: 0000.0000.4362
Priority: 32,768

Root

Root
Designated

Blocking

Bridge E
MAC: 0000.0000.9901
Priority: 32,768
82

Selecting a Root Bridge


When first powered, every switch assumes that it is the Root Bridge
and sends BPDUs indicating this every 2 seconds
If a better BPDU is received, the switch will:
Modify the port cost to the Root Bridge
Start forwarding the new roots received BPDUs

The Root Bridge of the network is the bridge with the smallest
Bridge ID.
At any time, a switch can become the root bridge by lowering its
Bridge ID
If manually selecting the Root Bridge, it should be as close to the center
of the network as possible

Schneider Electric - Ethernet TCP/IP Overview

83

Bridge Identifier
The Bridge ID is a unique identifier used to select the root bridge in the network
and is made of two parts:
Priority
0 - 61,440 in steps of 4096 with default of 32,768
MAC Address
The Switch MAC Address - 6 bytes

To compare two Bridge IDs, the priority is compared first. If both bridges have
the same priority, the MAC addresses are compared
Used in tie-breakers when determining port roles and path costs
Switches A (MAC=0000.0000.1000) and B (MAC=0000.0000.2000) both have a
priority of 32,768.
Switch A will automatically be selected as the root bridge
If the user would like Switch B to become the root bridge, its priority must be set
less than 32,768
Schneider Electric - Ethernet TCP/IP Overview

84

What does RSTP add to STP?


RSTP is a refinement of STP which means it has the same basic operating
characteristics
Detection of root bridge failure is done in 1 hello time (default hello time is 2
seconds)
Ports can be configured as edge ports if they are not connected to another
bridge.
Edge ports go into the forwarding state (still monitored for BPDUs incase a bridge is
attached)

Faster convergence times (steady state condition)


A bridge will send its spanning tree information to its designated ports.
If a second bridge receives this information and decides that it is superior root
information, the bridge will set all of its other ports to the discarding state.
The second bridge can then send an acknowledgment to the first bridge.
When the first bridge receives the acknowledgement, it will change that port to the
forwarding state, by-passing the usual listening/learning states.
This can create a cascade where each bridge proposes to its neighbors to determine
if they can rapidly change to the forwarding state.
Schneider Electric - Ethernet TCP/IP Overview

85

What does RSTP add to STP? (cont)


Backwards compatible with STP
Actively performs handshakes to determine port state instead of waiting
for timers to expire (Faster)
Uses alternate ports for fast recovery. If a fault is detected on the root
port, an alternate or a backup port will take over.
Ring size limited to 30 switches
Signals a topology change with port up (online), but not port down
(offline)

Schneider Electric - Ethernet TCP/IP Overview

86

RSTP Port Roles


Root
The forwarding port that has the lowest path cost to the root bridge. Each bridge can
have only one root port.

Designated
A port on a LAN segment whos bridge has the lowest path cost back to the root bridge.
Each LAN segment (collision domain) can have only one designated port, but a bridge
could have multiple designated ports.
NOTE: If a segment has a root port, the other segment will automatically be a
designated port

Non-designated
All other ports that are not the root port or designated. Automatically in the blocking state

Alternate
A port that presents an alternate path to the root bridge without using the root port. Will
become the root port if the original fails.

Backup
A port that is a backup for the designated ports
Schneider Electric - Ethernet TCP/IP Overview

87

RSTP Port States


Blocking
Does not send or receive user data, but can change into the Forwarding state if
another link fails and this port is needed. BPDU data is still received in blocking state.

Listening
The port processes BPDUs, but not data frames.

Learning
The port still doesnt forward data frames, but will learn the source MAC Addresses
and add them to the switchs database

Forwarding
The port that sends and receives data normally. It will still monitor BPDUs that might
tell the port to return to the blocking state

Discarding
The port doesnt forward data frames or learn MAC Addresses

Disabled
A port that is manually disabled by a network administrator
Schneider Electric - Ethernet TCP/IP Overview

88

How Much is it?


Determine the Port / Path Cost
Port Cost
Each port has a cost associated with it based on its speed and
according to a table in the standard. This value can be manually
configured to make it more/less preferred. Lower values indicate a
more preferred port.
Path Cost
An accumulated value based on the Port Cost values from other ports
in the segment. Its calculated by adding the cost received in the BPDU
to the port cost
Messages from any device in the network to the root bridge will travel
on the path with the least cost.
Schneider Electric - Ethernet TCP/IP Overview

89

Path Cost (cont)


Manufacturers can use different values for the ports, but these are the
recommendations from the standard
Link Speed Recommended
Value
100 Kb/s
200 000 000

20 000 000 200 000 000 1-200000000

1 Mb/s

20 000 000

2 000 000 200 000 000

1-200000000

10 Mb/s

2 000 000

200 000 20 000 000

1-200000000

100 Mb/s

200 000

20 000 2 000 000

1-200000000

1 Gb/s

20 000

2 000 200 000

1-200000000

10 Gb/s

2 000

200 20 000

1-200000000

100 Gb/s

200

20 2 000

1-200000000

1 Tb/s

20

2 200

1-200000000

10 Tb/s

1 20

1-200000000

Schneider Electric - Ethernet TCP/IP Overview

Recommended Range

Range

90

Path Cost (cont)


ROOT
D

10 Gb/s
2000

1 Gb/s
20000

R
100 Mb/s
200000

D
D

100 Mb/s
200000

1 Gb/s
20000

Schneider Electric - Ethernet TCP/IP Overview

10 Mb/s
2000000

R
D

10 Mb/s
2000000

91

Introduction to Ethernet
Communications
What is Ethernet
Layers in the TCP/IP Model
Network Architectures & Topologies
Physical Support
Ethernet Protocols and Services
Summary

Schneider Electric - Ethernet TCP/IP Overview

92

Summary
CSMA/CD is used to avoid packet collisions
MAC Addresses are unique identifiers programmed into all Network
devices and used to send packets from one device to another
IP addressing is used to send packets across networks and the internet

Schneider Electric - Ethernet TCP/IP Overview

93

Network Terminology
Important to be able to understand the various terms/acronyms used for
describing todays networking principles
CSMA/CD =Carrier Sense Multiple Access with Collision Detection
MAC Address = Media Access Control Address
TCP = Transmission Control Protocol
UDP = User Datagram Protocol
ARP= Address Resolution Protocol
HTTP = Hyper Text Transfer Protocol
FTP = File Transfer Protocol
SNMP = Simple Network Management Protocol
SNTP = Network Timing Protocol
DHCP = Dynamic Host Configuration Protocol (In Sepam is not present)
RSTP = Rapid Spanning Tree Protocol
Schneider Electric - Ethernet TCP/IP Overview

94

Você também pode gostar