W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis...

16
An Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd www.controlspecialists.co.uk An Introduction to Profinet Frame Analysis using Wireshark – V1.0 (07/05/2013)

Transcript of W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis...

Page 1: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

An Introduction to

PROFINET Frame

Analysis using

Peter ThomasControl Specialists Ltd

www.controlspecialists.co.uk

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 (07/05/2013)

Page 2: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

2Objectives

• To gain an understanding of the way in which PROFINET devices communicate with one another over Ethernet.

• To learn how to capture the PROFINET Frames using Wireshark®.

• To analyse the captured frames to gain an understanding and purpose of the various protocols.

• This is a topic covered in more detail in the Certified Profinet Engineers Course

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 3: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

3What is Wireshark?

• Wireshark® is a network protocolanalyser. It lets you capture andinteractively browse the traffic running ona computer network.

• It is not dedicated to Proifinet and as suchcannot be compared to ProfiTrace.

• It is free to download and available fromwww.wireshark.org

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 4: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

4Frame Capturing – Mirrored Ports

Switch A – Port 2(IM153-3 & WAGO)

Switch B – Port 2(IM153-3 ONLY)

LAN LAN

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 5: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

5Frame Capturing – ProfiTap

USBX

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 6: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

6Frame Capturing Ports

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 7: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

7Scope of this workshop

• Wireshark® will be used to capture and analyseProfinet traffic during the following events:-

– Start-Up– Data Exchange– Loss of Module– Loss of Communications– Duplicate Device Name

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 8: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

8Equipment used in this workshop

• Siemens S7 PLC Hardware & Switches.• Wago IO• ProfiTap & Netilities from Procentec• Wireshark® Network Protocol Analyser.

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 9: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

9WIRESHARK - HomePage

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 10: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

10WIRESHARK – Frame Analysis

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Packet Filter

Expression Filter Buttons

Packet Details Window

Packet Bytes Window

Packet List Window

Page 11: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

11IEEE 802.3 EtherNet Frame

40 – 1500 BYTES

DATASOURCEMAC

6 BYTES

DESTMAC

ETHERTYPE

FRAMECHECK

SEQ

ETHER TYPE EXAMPLES

0800: Internet Protocol (IPV4)0806: ARP8892: PROFINET88CC: LLDP

Format / Contents dependent upon the value of the

ETHER TYPE

ETHERNET HEADER ETHERNET TRAILER

Note – VLAN Tags, IFG, Preamble and SFD bytes not shown.

ETHERNET FRAME

6 BYTES 2 BYTES 4 BYTES

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 12: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

12Profinet Frame

SOURCE ADDRESS DESTINATION ADDRESS ETHERTYPE

PROFINET IO DATA CYCLE COUNTER DATA STATUS

FRAME ID

TXFR STATUS

ETHERTYPE 8892 = PROFINET, FRAME ID 8000 = REAL TIME CLASS 2

-- APPLICATION PROTOCOL DATA UNIT STATUS --

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 13: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

13Profinet Frame (CPU to OUTPUTS)

SLOT 1

SLOT 2SLOT 3

SLOT 4

IOPS SLOT 3/4 DIG OUT DATA

DAP

DAP = DEVICE ACCESS POINT (IO DEVICE STATUS) 00 = BAD, 80 = GOODIOPS = IO PROVIDER STATUS (DATA STATUS @ CPU) 00 = BAD, 80 = GOOD

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 14: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

14Common Protocols

• PNIO-DCP – Name / IP Address Assignment• PNIO-CM – Start-up Services.• PNIO – Cyclic IO Data Exchange

• PN-PTCP – Time Syncronisation• PNIO-AL – Acyclic Alarms / Events

• ARP – IP Address – MAC Address Lookup• LLDP – Device Identity & Properties.

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 15: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

15Protocol Usage: Start-up to Data Exchange

Assign Device Name *

PNIO-DCP / ARP Assign IP Address

Establish Connection

PNIO-DCP or LLDP

PNIO-CM

PNIO Data Exchange

IO Device confirms Name SET

IO Device confirms IP Address SET

Connection Established

* DEVICE NAME ASSIGNMENT

Device Names can be set up Manually, prior to connecting to the network, or Automatically on power-up.

Manual name assignment uses PNIO-DCPand tools such as the Primary Set-Up Toolfrom Siemens or Netilities from Procentec.

Automatic name assignment uses theLLDP protocol and requires the use of a Profinet Topology Configuration Tool.

Primary Setup Tool

An Introduction to Profinet Frame Analysis using Wireshark – V1.0 www.controlspecialists.co.uk

Page 16: W4 PROFINET Frame Analysis, Peter Thomas · PDF fileAn Introduction to PROFINET Frame Analysis using Peter Thomas Control Specialists Ltd   An Introduction to Profinet Frame

16

An Introduction to Profinet Frame Analysis using Wireshark – V1.0

Practical Workshop

• Step-by-Step Guide• Overview

www.controlspecialists.co.uk