| name | industrial-network-design |
| description | Concevoir, dimensionner et diagnostiquer les rรฉseaux Ethernet industriels. |
| version | 1.0.0 |
| author | EVA |
| license | Privรฉe EVA St-รtienne |
| platforms | ["linux","macos","windows"] |
| metadata | {"EVA":{"tags":["profinet","profinet-irt","profinet-rt","ethernet-ip","cip","modbus-tcp","profibus","network-design","ring-topology","dlr","mrp","lldp","snmp","industrial-switch","stratix","scalance","hirschmann","moxa","tsn","time-sensitive-networking","qos","vlan-industrial","iec-62443-3","cell-area-zone","ot-network","wireshark-industrial","industrial-firewall"],"related_skills":["industrial-protocols","industrial-networks-ot","cybersecurity-iec62443","plc-connectivity","sparkplug-b"]}} |
Conception de Rรฉseaux Industriels
Vue d'ensemble
Les rรฉseaux Ethernet industriels sont le systรจme nerveux de l'usine connectรฉe. Contrairement aux rรฉseaux IT, ils imposent :
- Dรฉterminisme โ Latence bornรฉe et rรฉpรฉtable pour le contrรดle
- Redondance โ MRP, DLR, PRP, HSR pour une disponibilitรฉ continue
- Robustesse โ EMI, tempรฉrature, vibrations, chocs
- Sรฉcuritรฉ โ Zones, conduits (IEC 62443-3), segmentation OT/IT
- Convergence โ IT/OT convergence avec TSN et 5G privรฉe
Quand l'utiliser
ร utiliser lorsque l'utilisateur demande :
- De concevoir un rรฉseau Ethernet pour une nouvelle usine ou ligne de production
- De diagnostiquer des problรจmes de performance rรฉseau (latence, perte de paquets)
- De configurer des switches industriels (Stratix, Scalance, Hirschmann, Moxa)
- De paramรฉtrer des protocoles de redondance (MRP, DLR, PRP, HSR)
- De planifier des VLAN et QoS pour le trafic temps rรฉel
- De configurer des pare-feux OT avec zones et conduits
- De capturer et analyser le trafic rรฉseau industriel (Wireshark)
1. Protocoles Ethernet Industriels
1.1 PROFINET
PROFINET RT (Real-Time) โ Latence typique < 1 ms
- Standard RT โ Cycle 1โ10 ms (TCP/IP stack)
- IRT (Isochronous Real-Time) โ Cycle 31.25 ยตsโ1 ms, matรฉriel FPGA/ASIC
- TSN-ready โ PROFINET over TSN (802.1Qbv, 802.1AS)
| PROFINET | RT (Real-Time) | IRT (Isochronous RT) |
|---|
| Cycle time | โฅ 1 ms | โฅ 31.25 ยตs |
| Jitter | < 1 ยตs | < 1 ยตs |
| Application | Standard automation | Motion control, drives |
| Hardware | Switch standard | Switch+ASIC support |
MRP (Media Redundancy Protocol) โ IEC 62439-2 :
- Topologie anneau, reconnexion < 200 ms
- MRM (Ring Manager) + MRC (Ring Client)
- Pour PROFINET RT uniquement (pas IRT)
response = send_dcp_request(
command="IDENTIFY_REQUEST",
interface="eth0",
timeout=2.0
)
devices = parse_dcp_response(response)
for device in devices:
print(f"Device: {device['name']}, IP: {device['ip']}, MAC: {device['mac']}")
1.2 EtherNet/IP
CIP (Common Industrial Protocol) sur Ethernet :
- Implicit messaging โ I/O data, cycle 1โ50 ms, UDP (port 2222)
- Explicit messaging โ Configuration/diagnostic, TCP (port 44818)
- CIP Sync โ Precision Time Protocol (IEEE 1588) pour synchronisation
- CIP Motion โ Drive synchronization over EtherNet/IP
DLR (Device Level Ring) โ Redondance en anneau :
- Reconnexion < 3 ms (beacon-based)
- Compatible avec les switches non-manageables (anneau ร base de superviseur)
- Supervisors (active/backup), participants, non-participants
identity = send_enip_command(
command="LIST_IDENTITY",
destination="192.168.1.100"
)
print(f"Vendor: {identity['vendor']}")
print(f"Device Type: {identity['device_type']}")
print(f"Serial: {identity['serial']}")
print(f"IP: {identity['ip']}")
1.3 Modbus TCP
- Port : 502
- Pas de QoS natif โ Convient pour supervision non-temps rรฉel
- Topologies : รtoile, ligne (avec switches non-manageables)
- Performance : Cycle 10โ100 ms, pas de dรฉterminisme garanti
1.4 PROFIBUS DP
- RS-485 ร 12 Mbps max
- Topologie : Bus linรฉaire avec rรฉpรฉteurs
- Segment max : 100 m ร 12 Mbps, 1200 m ร 93.75 kbps
- Maรฎtre (Classe 1 : contrรดleur, Classe 2 : outil)
- Esclaves jusqu'ร 126
2. Topologies Rรฉseau
2.1 รtoile
โโโโโโโโโโโโ
โ Switch โ
โ Central โ
โโโโโโฌโโโโโโ
โโโโโโโโโโผโโโโโโโโโ
โ โ โ
PLC-1 PLC-2 HMI-1
Avantages : Simple, facile ร diagnostiquer
Inconvรฉnients : Point de dรฉfaillance unique
Usage : Petites cellules, รฎlots non-critiques
2.2 Anneau (Ring)
PLC-1 โโโโ Switch1 โโโโ Switch2
โ โ
โ โ
PLC-4 โโโโ Switch4 โโโโ Switch3
Redondance :
- MRP : โค 50 switches, reconnexion < 200 ms (PROFINET)
- DLR : โค 50 nลuds, reconnexion < 3 ms (EtherNet/IP)
- RSTP : IEEE 802.1w reconnexion < 2 s
2.3 Arbre (Tree)
โโโโโโโโโโ
โ Core โ
โโโโโฌโโโโโ
โโโโโโโโโโผโโโโโโโโโ
โโโโโดโโโโโโโโโดโโโโโโโโโดโโโโ
โSwitch 1โโSwitch 2โโSwitch 3โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
2.4 PRP (Parallel Redundancy Protocol) โ IEC 62439-3
โโโโโโโโโโโโโโโโโโ
โ LAN A (Eth) โ
โโโโโดโโโโ โโโโโดโโโโ
โ DAN-A โโโโโโโโโโ DAN-B โ
โโโโโฌโโโโ PRP โโโโโฌโโโโ
โ LAN B (Eth) โ
โโโโโโโโโโโโโโโโโโ
- Zero switchover โ Paquets dupliquรฉs sur deux rรฉseaux
- Dan (Doubly Attached Node) โ Nลud avec deux interfaces
3. Conception d'Adressage IP et Segmentation
3.1 Plan d'adressage recommandรฉ par cellule
| Segment | Plage IP | Usage |
|---|
| Cell 1 โ Automation | 10.50.1.0/24 | PLC, HMI, drives, I/O |
| Cell 1 โ Supervision | 10.50.2.0/24 | SCADA, OPC, historiens |
| Cell 1 โ Cameras | 10.50.10.0/24 | Vision, inspection |
| Cell 2 โ Automation | 10.50.3.0/24 | PLC, HMI, drives, I/O |
| OT โ Services | 10.50.250.0/24 | Engineering, DHCP, DNS |
| OT โ DMZ | 10.50.254.0/24 | Historien bridges, firewall |
| IT โ Corporate | 172.16.0.0/16 | Bureau, ERP, MES |
3.2 VLAN et QoS
VLAN recommandรฉs par type de trafic :
| VLAN ID | Type | Prioritรฉ DSCP | Prioritรฉ 802.1p |
|---|
| 10 | Automation (PROFINET RT/IRT) | CS6 (48) | 6 |
| 20 | I/O (EtherNet/IP implicit) | CS5 (40) | 5 |
| 30 | Motion (CIP Sync) | CS6 (48) | 6 |
| 40 | Supervision / HMI | CS3 (24) | 3 |
| 50 | Engineering / OPC | CS2 (16) | 2 |
| 99 | IT / Corporate | โ | 0 |
switch.configure_vlan(vlan_id=10, name="AUTOMATION", qos_cos=6)
switch.configure_vlan(vlan_id=20, name="SUPERVISION", qos_cos=3)
switch.configure_trunk(interface="Gi1/1", allowed_vlans=[10, 20, 99], native_vlan=99)
switch.configure_access(interface="Gi1/2", vlan=10)
3.3 Cell/Area Zones (IEC 62443-3-2)
โโโโโโโโโโโโโโโโโโโโโโโ IT Enterprise โโโโโโโโโโโโโโโโโโโโโโโ
โ [Zone IT] โ ERP, MES, Email, Web โ
โโโโโโโโโโโโโโโโโโโโโโโ DMZ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ [Conduit] โ Reverse proxy, Historian bridge, AD sync โ
โโโโโโโโโโโโโโโโโโโโโโโ OT Zones โโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ Zone Cell 1 โ โ Zone Cell 2 โ โ
โ โ - PLC (S7-1500) โ โ - PLC (Compact) โ โ
โ โ - HMI (WinCC) โ โ - HMI โ โ
โ โ - Drives โ โ - Drives โ โ
โ โ - Vision system โ โ - Robot (KUKA) โ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Zone Services (Engineering) โ โ
โ โ - Engineering workstations โ โ
โ โ - TIA Portal / Studio 5000 โ โ
โ โ - OPC UA clients โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
4. Switching Industriel
4.1 Constructeurs et gammes
| Constructeur | Gamme | Redondance | Environnement |
|---|
| Cisco Stratix | 5400, 5700, 5900 | DLR, RSTP, MRP | Industriel (-40 ร +60 ยฐC) |
| Siemens Scalance | XC-200, XR-300, XM-400 | MRP, RSTP, PRP | Industriel |
| Hirschmann | MACH, BOBCAT, OCTOPUS | MRP, RSTP, HIPER-Ring | Industriel, ferroviaire |
| Moxa | EDS-G, MDS-G, TN | MRP, RSTP, Turbo Ring | Industriel |
4.2 Configuration typique Scalance
scalance.configure_interface(name="Port 1.1", mode="trunk", native_vlan=1)
scalance.configure_mrp(role="manager", vlan=1, timeout=200)
scalance.configure_vlan(vlan_id=10, name="PROFINET_IO")
scalance.configure_vlan(vlan_id=20, name="HMI")
scalance.configure_profinet(role="switch", domain="cell-01")
4.3 VLAN et sรฉcuritรฉ portuaire
switch.configure_port_security(
interface="Gi1/1",
max_mac=1,
violation="shutdown",
sticky_mac=True
)
switch.configure_dhcp_snooping(vlan=[10, 20, 30])
switch.configure_dynamic_arp_inspection(vlan=[10, 20, 30])
switch.configure_ip_source_guard(vlan=[10, 20, 30])
5. TSN (Time-Sensitive Networking)
TSN est l'avenir des rรฉseaux industriels convergents. Standards clรฉs :
| Standard IEEE | Nom | Fonction |
|---|
| 802.1AS | gPTP | Synchronisation horaire < 1 ยตs |
| 802.1Qbv | TAS | Time-Aware Shaper, fenรชtres dรฉdiรฉes trafic temps rรฉel |
| 802.1Qbu/802.3br | Frame Preemption | Interruption paquets longs pour prioritรฉ trafic temps rรฉel |
| 802.1CB | Seamless Redundancy | Duplication de paquets, zรฉro perte |
| 802.1Qci | PSFP | Filtrage et police par flux |
| 802.1Qcc | CUC/UCC | Configuration centralisรฉe des flux TSN |
tsn_config = {
"gate": {
"open_windows": [
{"start": 0, "duration_us": 500, "traffic_class": "time_critical"},
{"start": 500, "duration_us": 9500, "traffic_class": "best_effort"}
],
"cycle_time_us": 10000
},
"synchronization": {
"domain": 0,
"priority": 128,
"sync_interval_ms": 125
},
"streams": [
{"id": "PROFINET_IRT", "vlan": 10, "max_latency_us": 100},
{"id": "CIP_MOTION", "vlan": 30, "max_latency_us": 50}
]
}
6. Diagnostic Rรฉseau (Wireshark)
6.1 Filtres Wireshark pour rรฉseaux industriels
# PROFINET
profinet
profinet.dce.suboption == 0x02 # DCP Identify
profinet.rt.frameid == 0x8000 # RT Cyclic data
# EtherNet/IP
enip
enip.cpf.vendor_id == 0x00E1 # Rockwell
enip.command == 0x0063 # List Identity
# Modbus TCP
modbus.tcp
modbus.func_code == 0x03 # Read Holding Registers
modbus.func_code == 0x10 # Write Multiple Registers
# Contrรดle qualitรฉ
tcp.analysis.flags # Problรจmes TCP (retransmission, dup, window)
icmp || icmpv6 # Ping / problรจmes de connectivitรฉ
6.2 Mรฉtriques de performance
capture = read_pcap("network_trace.pcapng")
stats = {
"min_latency_us": capture.filter("profinet.rt").min_latency(),
"max_latency_us": capture.filter("profinet.rt").max_latency(),
"avg_latency_us": capture.filter("profinet.rt").avg_latency(),
"jitter_us": capture.filter("profinet.rt").jitter(),
"packet_loss_pct": capture.packet_loss_rate(),
"ring_recovery_ms": capture.filter("mrp").ring_recovery_time(),
"top_errors": ["TCP Retransmissions", "CRC Errors", "Late Collisions"],
}
7. Rรฉfรฉrences