FLYNC ExamplesΒΆ

Welcome to the configuration examples and tutorials! This section walks you through practical usage of the FLYNC configuration system with real examples.


Base ExampleΒΆ

This example provides a fully functional reference configuration that can be used as a baseline when developing your own system setup. It demonstrates how multiple networking features can be integrated into a cohesive design, helping you understand both structure and implementation details.

The configuration includes the following key components:

  • Ethernet Network Topology - Illustrates how devices are interconnected, including port roles, link relationships, and overall network structure. This serves as a guide for designing scalable and deterministic Ethernet architectures.

  • Time Synchronization - Shows how gPTP configuration is defined and maintained across the network.

  • MACsec - Shows the configuration of MACsec-aware nodes of the system for link protection.

  • Quality of Service (QoS), Layer 2 TSN, and TCAM Usage - Provides sample configurations for traffic prioritization and deterministic networking using Time-Sensitive Networking (TSN) features. It also illustrates how TCAM rules can be allocated and used for traffic classification and filtering. You can use this configuration as a starting point, adapting interface mappings, policies, and feature parameters to match the specific requirements of your hardware platform and application.

Example ConfigurationΒΆ

πŸ“ ecus/ - Contains the configuration files of all the ECUs within the example
πŸ“ eth_ecu/ - Contains all the configuration files of eth_ecu
πŸ“ controllers/ - Contains all the configuration files for the controllers within eth_ecu
πŸ“„ eth_ecu_controller1.flync.yaml
meta:
  author: Dev
  compatible_flync_version: 
    version_schema: semver
    version: 0.9.0
  target_system: flync_os

name: eth_ecu_controller1
interfaces:
  - name: eth_ecu_c1_iface1
    mac_address: 00:11:22:33:44:55
    mii_config:
      type: sgmii
      speed: 1000
      mode: mac
    virtual_interfaces:
      - name: eth_ecu_c1_i1_viface1
        vlanid: 40
        addresses: 
          - address: 10.0.40.7
            ipv4netmask: 255.255.255.0
        multicast:
          - 224.0.0.23
    ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 0
          sync_config:
            type: time_receiver
            sync_timeout: 3
            sync_followup_timeout: 10
          pdelay_config: 
            log_tx_period: 1
    ingress_streams:
      - name: stream_0
        stream_identification: 
          - vlanid: [10, 20, 30, 40]
            dst_ipv4: 
              address: 10.0.0.0
              ipv4netmask: 255.255.0.0
            protocol: udp
            dst_port: 
              from_value: 32000
              to_value: 33000
        drop_at_ingress: false
        max_sdu_size: 1522
        policer:
          type: single_rate_two_color
          cir: 10000
          cbs: 10000
          eir: 0
          ebs: 5000
          coupling: false  
      - name: stream_1
        stream_identification: 
          - vlanid: 10
            dst_ipv4: 
              address: 224.0.0.0
              ipv4netmask: 255.0.0.0
            protocol: tcp
        drop_at_ingress: false
        max_sdu_size: 1522
        policer:
          type: double_rate_three_color
          cir: 10000
          cbs: 10000
          eir: 20000
          ebs: 2000
          coupling: true
    htb: 
      root_id: "1:"
      default_class: 12
      child_classes: 
        - classid: 11
          rate: 5
          ceil: 10
          filter:
            - prio: 1
              vlanid: 40
              dst_ipv4:
                address: 10.0.40.0
                ipv4netmask: 255.255.255.0
              protocol: tcp
        - classid: 12
          rate: 5
          ceil: 10
          filter:
            - prio: 2
              vlanid: 40
              dst_ipv4:
                address: 10.0.40.0
                ipv4netmask: 255.255.255.0
              protocol: udp
          child_classes: 
    macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_always
      delay_protect: false
      participant_activation: always
πŸ“ internal_topology/ - Contains the internal connections within eth_ecu
πŸ“„ eth_ecu_topology.flync.yaml
connections:
  - type: ecu_port_to_controller_interface
    id: conn1
    ecu_port: eth_ecu_p1
    controller_interface: eth_ecu_c1_iface1 
πŸ“ ports/ - Contains the configuration file for all the ports of eth_ecu
πŸ“„ eth_ecu_ports.flync.yaml
ports:
  - name: eth_ecu_p1
    mdi_config:
      mode: base_t1
      speed: 1000
      duplex: full
      role: slave
      autonegotiation: false
    mii_config:
      type: sgmii
      speed: 1000
      mode: phy
πŸ“„ ecu_metadata.flync.yaml - Contains the metadata for eth_ecu
author: Dev
compatible_flync_version: 
  version_schema: semver
  version: 0.9.0
πŸ“ high_processing_core/ - Contains all the configuration files of the high_processing_core
πŸ“ controllers/ - Contains all the configuration files for the controllers within the high_processing_core
πŸ“„ hpc_controller1.flync.yaml
meta:
  author: Dev
  compatible_flync_version: 
    version_schema: semver
    version: 0.9.0
  target_system: flync_os
  
name: hpc_controller1
interfaces:
  - name: hpc_c1_iface1
    mac_address: 00:11:22:33:44:55
    mii_config:
      type: rmii
      speed: 100
      mode: phy
    virtual_interfaces:
      - name: hpc_c1_i1_viface1
        vlanid: 10
        addresses: 
          - address: 10.0.10.5
            ipv4netmask: 255.255.255.0
        multicast:
          - 224.0.0.14
      - name: hpc_c1_i1_viface2
        vlanid: 20
        addresses: 
          - address: 10.0.20.5
            ipv4netmask: 255.255.255.0
        multicast:
          - 224.0.0.13
      - name: hpc_c1_i1_viface3
        vlanid: 50
        addresses: 
          - address: 10.0.50.5
            ipv4netmask: 255.255.255.0
        multicast: []
    ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 1
          sync_config:
            type: time_receiver
            sync_timeout: 3
            sync_followup_timeout: 10
          pdelay_config: 
            log_tx_period: 1
    macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_always
      delay_protect: false
      participant_activation: always
πŸ“„ hpc_controller2.flync.yaml
meta:
  author: Dev
  compatible_flync_version: 
    version_schema: semver
    version: 0.9.0
  target_system: flync_os

name: hpc_controller2
interfaces:
  - name: hpc_c2_iface1
    mac_address: 00:11:22:33:44:55
    mii_config:
      type: rmii
      speed: 100
      mode: phy
    virtual_interfaces:
      - name: hpc_c2_i1_viface1
        vlanid: 40
        addresses: 
          - address: 10.0.40.6
            ipv4netmask: 255.255.255.0
        multicast:
          - 224.0.0.21
          - 224.0.0.23
      - name: hpc_c1_i1_viface2
        vlanid: 30
        addresses: 
          - address: 10.0.30.6
            ipv4netmask: 255.255.255.0
        multicast: []
    macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_always
      delay_protect: false
      participant_activation: always
πŸ“ internal_topology/ - Contains the internal connections within the high_processing_core
πŸ“„ hpc_topology.flync.yaml
connections:
  - type: ecu_port_to_switch_port
    id: conn1
    ecu_port: hpc1_p1
    switch_port: hpc_s1_p0
  - type: ecu_port_to_switch_port
    id: conn2
    ecu_port: hpc1_p2
    switch_port: hpc_s1_p4
  - type: ecu_port_to_switch_port
    id: conn3
    ecu_port: hpc1_p3
    switch_port: hpc_s1_p3
  - type: switch_port_to_controller_interface
    id: conn4
    switch_port: hpc_s1_p1
    controller_interface: hpc_c1_iface1
  - type: switch_port_to_controller_interface
    id: conn5
    switch_port: hpc_s1_p2
    controller_interface: hpc_c2_iface1
πŸ“ ports/ - Contains the configuration file for all the ports of the high_processing_core
πŸ“„ hpc_ports.flync.yaml
ports:
  - name: hpc1_p1
    mdi_config:
      mode: base_t1
      speed: 100
      duplex: full
      role: master
      autonegotiation: false
    mii_config:
      type: rmii
      speed: 100
      mode: phy

  - name: hpc1_p2
    mdi_config:
      mode: base_t1
      speed: 1000
      duplex: full
      role: master
      autonegotiation: false

  - name: hpc1_p3
    mdi_config:
      mode: base_t1
      speed: 1000
      duplex: full
      role: master
      autonegotiation: false
πŸ“ switches/ - Contains the configuration file for all the switches of the high_processing_core
πŸ“„ hpc_switch1.flync.yaml
meta:
  author: Dev
  compatible_flync_version: 
    version_schema: semver
    version: 0.9.0
  target_system: flync_os
name: hpc_switch1  
ports:
- name: hpc_s1_p0
  silicon_port_no: 0
  default_vlan_id: 1
  mii_config:
    type: rmii
    speed: 100
    mode: mac
  ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 2
          sync_config:
            type: time_receiver
            sync_timeout: 3
            sync_followup_timeout: 10
          pdelay_config: 
            log_tx_period: 1
  ingress_streams:
    - name: stream_0
      stream_identification: 
        - vlanid: [10, 20, 30, 40]
          dst_ipv4: 
            address: 10.0.0.0
            ipv4netmask: 255.255.0.0
          protocol: udp
          dst_port: 
            from_value: 32000
            to_value: 33000
      drop_at_ingress: false
      max_sdu_size: 1522
      policer:
        type: single_rate_two_color
        cir: 10000
        cbs: 10000
        eir: 0
        ebs: 5000
        coupling: false  
    - name: stream_1
      stream_identification: 
        - vlanid: 10
          dst_ipv4: 
            address: 224.0.0.0
            ipv4netmask: 255.0.0.0
          protocol: tcp
      drop_at_ingress: false
      max_sdu_size: 1522
      policer:
        type: double_rate_three_color
        cir: 10000
        cbs: 10000
        eir: 20000
        ebs: 2000
        coupling: true
  traffic_classes:
    - name: high_prio
      priority: 7
      frame_priority_values: [7, 6, 5, 4]
      selection_mechanisms:
        type: cbs
        idleslope: 50000
    - name: best_effort
      priority: 1
      frame_priority_values: [3, 2, 1, 0] 
      selection_mechanisms:
        type: cbs
        idleslope: 10000
  macsec_config: 
    vlan_bypass: []
    mka_enabled: true
    hello_time: 1000
    bounded_hello_time: 2000
    life_time: 100000
    sak_retire_time: 20000
    macsec_mode: integrity
    kay_on: true
    key_role: key_server_never
    delay_protect: false
    participant_activation: always
      
- name: hpc_s1_p1
  silicon_port_no: 1
  default_vlan_id: 1
  mii_config:
    type: rmii
    speed: 100
    mode: mac
  ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 3
          sync_config:
            type: time_transmitter
            log_tx_period: -3
            two_step: true
            tlv: []
  macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_never
      delay_protect: false
      participant_activation: always
  
         

- name: hpc_s1_p2
  silicon_port_no: 2
  default_vlan_id: 1
  mii_config:
    type: rmii
    speed: 100
    mode: mac
  macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_never
      delay_protect: false
      participant_activation: always

- name: hpc_s1_p3
  silicon_port_no: 3
  default_vlan_id: 1
  ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 4
          sync_config:
            type: time_transmitter
            log_tx_period: -3
            two_step: true
            tlv: []
  ingress_streams:
    - name: stream_0
      stream_identification: 
        - vlanid: [10, 20, 30, 40]
          dst_ipv4: 
            address: 10.0.0.0
            ipv4netmask: 255.255.0.0
          protocol: udp
          dst_port: 
            from_value: 32000
            to_value: 33000
      drop_at_ingress: false
      max_sdu_size: 1522
      policer:
        type: single_rate_two_color
        cir: 10000
        cbs: 10000
        eir: 0
        ebs: 5000
        coupling: false  
    - name: stream_1
      stream_identification: 
        - vlanid: 10
          dst_ipv4: 
            address: 224.0.0.0
            ipv4netmask: 255.0.0.0
          protocol: tcp
      drop_at_ingress: false
      max_sdu_size: 1522
      policer:
        type: double_rate_three_color
        cir: 10000
        cbs: 10000
        eir: 20000
        ebs: 2000
        coupling: true   
  traffic_classes:
    - name: high_prio
      priority: 7
      frame_priority_values: [7, 6, 5, 4]
      selection_mechanisms:
        type: cbs
        idleslope: 50000
    - name: best_effort
      priority: 1
      frame_priority_values: [3, 2, 1, 0] 
      selection_mechanisms:
        type: cbs
        idleslope: 10000   
  macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_never
      delay_protect: false
      participant_activation: always

- name: hpc_s1_p4
  silicon_port_no: 4
  default_vlan_id: 1
  ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 5
          sync_config:
            type: time_transmitter
            log_tx_period: -3
            two_step: true
            tlv: []
  ingress_streams:
    - name: stream_0
      stream_identification: 
        - vlanid: [10, 20, 30, 40]
          dst_ipv4: 
            address: 10.0.0.0
            ipv4netmask: 255.255.0.0
          protocol: udp
          dst_port: 
            from_value: 32000
            to_value: 33000
      drop_at_ingress: false
      max_sdu_size: 1522
      policer:
        type: single_rate_two_color
        cir: 10000
        cbs: 10000
        eir: 0
        ebs: 5000
        coupling: false  
    - name: stream_1
      stream_identification: 
        - vlanid: 10
          dst_ipv4: 
            address: 224.0.0.0
            ipv4netmask: 255.0.0.0
          protocol: tcp
      drop_at_ingress: false
      max_sdu_size: 1522
      policer:
        type: double_rate_three_color
        cir: 10000
        cbs: 10000
        eir: 20000
        ebs: 2000
        coupling: true      
  traffic_classes:
    - name: high_prio
      priority: 7
      frame_priority_values: [7, 6, 5, 4]
      selection_mechanisms:
        type: cbs
        idleslope: 50000
    - name: best_effort
      priority: 1
      frame_priority_values: [3, 2, 1, 0] 
      selection_mechanisms:
        type: cbs
        idleslope: 10000
  macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_never
      delay_protect: false
      participant_activation: always 


vlans:
- name: VLAN10
  id: 10
  default_priority: 0
  ports:
    - hpc_s1_p0
    - hpc_s1_p1

- name: VLAN20
  id: 20
  default_priority: 0
  ports:
    - hpc_s1_p0
    - hpc_s1_p1
    - hpc_s1_p4

- name: VLAN30
  id: 30
  default_priority: 0
  ports:
    - hpc_s1_p0
    - hpc_s1_p2

- name: VLAN40
  id: 40
  default_priority: 0
  ports:
    - hpc_s1_p2
    - hpc_s1_p3
    - hpc_s1_p4

- name: VLAN50
  id: 50
  default_priority: 0
  ports:
    - hpc_s1_p1


host_controller:
  name: hpc_sw_host_iface
  mac_address: 00:11:22:33:44:56
  virtual_interfaces:
    - name: hpc_sw_host_viface
      vlanid: 50
      addresses:
        - address: 10.0.50.101
          ipv4netmask: 255.255.255.0    
      multicast: []  
πŸ“„ ecu_metadata.flync.yaml - Contains the metadata for the high_processing_core
author: Dev
compatible_flync_version: 
  version_schema: semver
  version: 0.9.0
πŸ“ zonal_platform1/ - Contains all the configuration files of the zonal_platform1
πŸ“ controllers/ - Contains all the configuration files for the controllers within the zonal_platform1
πŸ“„ z1_controller1.flync.yaml
meta:
  author: Dev
  compatible_flync_version: 
    version_schema: semver
    version: 0.9.0
  target_system: flync_os
name: z1_controller1
interfaces:
  - name: z1_c1_iface1
    mac_address: 00:11:22:33:44:55
    mii_config:
      type: rmii
      speed: 100
      mode: phy
    virtual_interfaces:
      - name: z1_c1_i1_viface1
        vlanid: 10
        addresses: 
          - address: 10.0.10.1
            ipv4netmask: 255.255.255.0
        multicast:
          - 224.0.0.14
      - name: z1_c1_i1_viface2
        vlanid: 50
        addresses: 
          - address: 10.0.50.1
            ipv4netmask: 255.255.255.0
        multicast: []
    ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 6
          sync_config:
            type: time_transmitter
            log_tx_period: -3
            two_step: true
            tlv: []
    macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_always
      delay_protect: false
      participant_activation: always
πŸ“„ z1_controller2.flync.yaml
meta:
  author: Dev
  compatible_flync_version: 
    version_schema: semver
    version: 0.9.0
  target_system: flync_os
name: z1_controller2
interfaces:
  - name: z1_c2_iface1
    mac_address: 00:11:22:33:44:55
    mii_config:
      type: rmii
      speed: 100
      mode: phy
    virtual_interfaces:
      - name: z1_c2_i1_viface1
        vlanid: 20
        addresses: 
          - address: 10.0.20.2
            ipv4netmask: 255.255.255.0
        multicast:
          - 224.0.0.11
          - 224.0.0.13
      - name: z1_c2_i1_viface2
        vlanid: 30
        addresses: 
          - address: 10.0.30.2
            ipv4netmask: 255.255.255.0
        multicast: []
    ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 7
          sync_config:
            type: time_receiver
            sync_timeout: 3
            sync_followup_timeout: 10
          pdelay_config: 
            log_tx_period: 1
    macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_always
      delay_protect: false
      participant_activation: always
πŸ“ internal_topology/ - Contains the internal connections within the zonal_platform1
πŸ“„ z1_topology.flync.yaml
connections:
  - type: ecu_port_to_switch_port
    id: conn1
    ecu_port: z1_p1
    switch_port: z1_s1_p0
  - type: switch_port_to_controller_interface
    id: conn2
    switch_port: z1_s1_p1
    controller_interface: z1_c1_iface1
  - type: switch_port_to_controller_interface
    id: conn3
    switch_port: z1_s1_p2
    controller_interface: z1_c2_iface1
πŸ“ ports/ - Contains the configuration file for all the ports of the zonal_platform1
πŸ“„ z1_ports.flync.yaml
ports:
  - name: z1_p1
    mdi_config:
      mode: base_t1
      speed: 100
      duplex: full
      role: slave
      autonegotiation: false
πŸ“ switches/ - Contains the configuration file for all the switches of the zonal_platform1
πŸ“„ z1_switch1.flync.yaml
meta:
  author: Dev
  compatible_flync_version: 
    version_schema: semver
    version: 0.9.0
  target_system: flync_os
name: z1_switch1
ports:
- name: z1_s1_p0
  silicon_port_no: 0
  default_vlan_id: 1
  ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 8
          sync_config:
            type: time_transmitter
            log_tx_period: -3
            two_step: true
            tlv: []
  ingress_streams:
    - name: stream_0
      stream_identification: 
        - vlanid: [10, 20, 30, 40]
          dst_ipv4: 
            address: 10.0.0.0
            ipv4netmask: 255.255.0.0
          protocol: udp
          dst_port: 
            from_value: 32000
            to_value: 33000
      drop_at_ingress: false
      max_sdu_size: 1522
      policer:
        type: single_rate_two_color
        cir: 10000
        cbs: 10000
        eir: 0
        ebs: 5000
        coupling: false  
    - name: stream_1
      stream_identification: 
        - vlanid: 10
          dst_ipv4: 
            address: 224.0.0.0
            ipv4netmask: 255.0.0.0
          protocol: tcp
      drop_at_ingress: false
      max_sdu_size: 1522
      policer:
        type: double_rate_three_color
        cir: 10000
        cbs: 10000
        eir: 20000
        ebs: 2000
        coupling: true
  traffic_classes:
    - name: high_prio
      priority: 7
      frame_priority_values: [7, 6, 5, 4]
      selection_mechanisms:
        type: cbs
        idleslope: 50000
    - name: best_effort
      priority: 1
      frame_priority_values: [3, 2, 1, 0] 
      selection_mechanisms:
        type: cbs
        idleslope: 10000
  macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_always
      delay_protect: false
      participant_activation: always
        
- name: z1_s1_p1
  silicon_port_no: 1
  default_vlan_id: 1
  mii_config:
    type: rmii
    speed: 100
    mode: mac
  ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 9
          sync_config:
            type: time_receiver
            sync_timeout: 3
            sync_followup_timeout: 10
          pdelay_config: 
            log_tx_period: 1
  macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_never
      delay_protect: false
      participant_activation: always

- name: z1_s1_p2
  silicon_port_no: 2
  default_vlan_id: 1
  mii_config:
    type: rmii
    speed: 100
    mode: mac
  ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 10
          sync_config:
            type: time_transmitter
            log_tx_period: -3
            two_step: true
            tlv: []
  macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_never
      delay_protect: false
      participant_activation: always

vlans:
- name: VLAN10
  id: 10
  default_priority: 0
  ports:
    - z1_s1_p0
    - z1_s1_p1

- name: VLAN20
  id: 20
  default_priority: 0
  ports:
    - z1_s1_p0
    - z1_s1_p2

- name: VLAN30
  id: 30
  default_priority: 0
  ports:
    - z1_s1_p0
    - z1_s1_p2

- name: VLAN50
  id: 50
  default_priority: 0
  ports:
    - z1_s1_p1


host_controller:
  name: z1_sw_host_iface
  mac_address: 00:11:22:33:44:56
  virtual_interfaces:
    - name: z1_sw_host_viface
      vlanid: 50
      addresses:
        - address: 10.0.50.100
          ipv4netmask: 255.255.255.0    
      multicast: []  
πŸ“„ ecu_metadata.flync.yaml - Contains the metadata for the zonal_platform1
author: Dev
compatible_flync_version: 
  version_schema: semver
  version: 0.9.0
πŸ“ zonal_platform2/ - Contains all the configuration files of the zonal_platform2
πŸ“ controllers/ - Contains all the configuration files for the controllers within the zonal_platform2
πŸ“„ z2_controller1.flync.yaml
meta:
  author: Dev
  compatible_flync_version: 
    version_schema: semver
    version: 0.9.0
  target_system: flync_os
name: z2_controller1
interfaces:
  - name: z2_c1_iface1
    mac_address: 00:11:22:33:44:55
    mii_config:
      type: rmii
      speed: 100
      mode: phy
    virtual_interfaces:
      - name: z2_c1_i1_viface1
        vlanid: 0
        addresses: 
          - address: 10.0.0.3
            ipv4netmask: 255.255.255.0
        multicast:
          - 224.0.0.50
  - name: z2_c1_iface2
    mac_address: 00:11:22:33:44:55
    mii_config:
      type: sgmii
      speed: 1000
      mode: phy
    virtual_interfaces:
      - name: z2_c1_i2_viface1
        vlanid: 20
        addresses: 
          - address: 10.0.20.3
            ipv4netmask: 255.255.255.0
        multicast:
          - 224.0.0.11
          - 224.0.0.13
    ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 11
          sync_config:
            type: time_receiver
            sync_timeout: 3
            sync_followup_timeout: 10
          pdelay_config: 
            log_tx_period: 1
    macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_never
      delay_protect: false
      participant_activation: always
πŸ“„ z2_controller2.flync.yaml
meta:
  author: Dev
  compatible_flync_version: 
    version_schema: semver
    version: 0.9.0
  target_system: flync_os
name: z2_controller2
interfaces:
  - name: z2_c2_iface1
    mac_address: 00:11:22:33:44:55
    mii_config:
      type: rmii
      speed: 100
      mode: mac
    virtual_interfaces:
      - name: z2_c1_i1_viface1
        vlanid: 0
        addresses: 
          - address: 10.0.0.4
            ipv4netmask: 255.255.255.0
        multicast:
          - 224.0.0.51
  - name: z2_c2_iface2
    mac_address: 00:11:22:33:44:55
    mii_config:
      type: sgmii
      speed: 1000
      mode: phy
    virtual_interfaces:
      - name: z2_c2_i2_viface1
        vlanid: 40
        addresses: 
          - address: 10.0.40.4
            ipv4netmask: 255.255.255.0
        multicast:
          - 224.0.0.21
    ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 12
          sync_config:
            type: time_receiver
            sync_timeout: 3
            sync_followup_timeout: 10
          pdelay_config: 
            log_tx_period: 1
    macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_never
      delay_protect: false
      participant_activation: always
πŸ“ internal_topology/ - Contains the internal connections within the zonal_platform2
πŸ“„ z2_topology.flync.yaml
connections:
  - type: ecu_port_to_switch_port
    id: conn1
    ecu_port: z2_p1
    switch_port: z2_s1_p0
  - type: switch_port_to_controller_interface
    id: conn2
    switch_port: z2_s1_p1
    controller_interface: z2_c1_iface2
  - type: switch_port_to_controller_interface
    id: conn3
    switch_port: z2_s1_p2
    controller_interface: z2_c2_iface2
  - type: controller_interface_to_controller_interface
    id: conn4
    controller_interface1: z2_c1_iface1
    controller_interface2: z2_c2_iface1 
πŸ“ ports/ - Contains the configuration file for all the ports of the zonal_platform2
πŸ“„ z2_ports.flync.yaml
ports:
  - name: z2_p1
    mdi_config:
      mode: base_t1
      speed: 1000
      duplex: full
      role: slave
      autonegotiation: false
πŸ“ switches/ - Contains the configuration file for all the switches of the zonal_platform2
πŸ“„ z2_switch1.flync.yaml
meta:
  author: Dev
  compatible_flync_version: 
    version_schema: semver
    version: 0.9.0
  target_system: flync_os
name: z2_switch1
ports:
- name: z2_s1_p0
  silicon_port_no: 0
  default_vlan_id: 1
  ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 14
          sync_config:
            type: time_receiver
            sync_timeout: 3
            sync_followup_timeout: 10
          pdelay_config: 
            log_tx_period: 1
  ingress_streams:
    - name: stream_0
      stream_identification: 
        - vlanid: [10, 20, 30, 40]
          dst_ipv4: 
            address: 10.0.0.0
            ipv4netmask: 255.255.0.0
          protocol: udp
          dst_port: 
            from_value: 32000
            to_value: 33000
      drop_at_ingress: false
      max_sdu_size: 1522
      policer:
        type: single_rate_two_color
        cir: 10000
        cbs: 10000
        eir: 0
        ebs: 5000
        coupling: false  
    - name: stream_1
      stream_identification: 
        - vlanid: 10
          dst_ipv4: 
            address: 224.0.0.0
            ipv4netmask: 255.0.0.0
          protocol: tcp
      drop_at_ingress: false
      max_sdu_size: 1522
      policer:
        type: double_rate_three_color
        cir: 10000
        cbs: 10000
        eir: 20000
        ebs: 2000
        coupling: true
  traffic_classes:
    - name: high_prio
      priority: 7
      frame_priority_values: [7, 6, 5, 4]
      selection_mechanisms:
        type: cbs
        idleslope: 50000
    - name: best_effort
      priority: 1
      frame_priority_values: [3, 2, 1, 0] 
      selection_mechanisms:
        type: cbs
        idleslope: 10000
  macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_always
      delay_protect: false
      participant_activation: always

- name: z2_s1_p1
  silicon_port_no: 1
  default_vlan_id: 1
  mii_config:
    type: sgmii
    speed: 1000
    mode: mac
  ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 15
          sync_config:
            type: time_transmitter
            log_tx_period: -3
            two_step: true
            tlv: []
  macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_always
      delay_protect: false
      participant_activation: always

- name: z2_s1_p2
  silicon_port_no: 2
  default_vlan_id: 1
  mii_config:
    type: sgmii
    speed: 1000
    mode: mac
  ptp_config:
      cmlds_linkport_enabled: false
      ptp_ports:
        - domain_id: 0
          src_port_identity: 13
          sync_config:
            type: time_transmitter
            log_tx_period: -3
            two_step: true
            tlv: []
  macsec_config: 
      vlan_bypass: []
      mka_enabled: true
      hello_time: 1000
      bounded_hello_time: 2000
      life_time: 100000
      sak_retire_time: 20000
      macsec_mode: integrity
      kay_on: true
      key_role: key_server_always
      delay_protect: false
      participant_activation: always
         
tcam_rules:
  - name: rule_1
    id: 1
    match_filter: 
      pcp: [3, 4]
    match_ports: 
      - z2_s1_p0
    action:
      - type: drop
        ports: 
          - z2_s1_p2
  - name: rule_2
    id: 2
    match_filter: 
      vlanid: 20
      pcp: [3, 4]
    match_ports: 
      - z2_s1_p0
    action:
      - type: vlan_overwrite
        ports: 
          - z2_s1_p1
        overwrite_vlan_pcp: 1
        

vlans:
- name: VLAN20
  id: 20
  default_priority: 0
  ports:
    - z2_s1_p0
    - z2_s1_p1

- name: VLAN40
  id: 40
  default_priority: 0
  ports:
    - z2_s1_p0
    - z2_s1_p2


host_controller:
  name: z2_sw_host_iface
  mac_address: 00:11:22:33:44:56
  virtual_interfaces:
    - name: z2_sw_host_viface
      vlanid: 0
      addresses:
        - address: 10.0.0.102
          ipv4netmask: 255.255.255.0    
      multicast: []  
πŸ“„ ecu_metadata.flync.yaml - Contains the metadata for the zonal_platform2
author: Dev
compatible_flync_version: 
  version_schema: semver
  version: 0.9.0
πŸ“ topology/ - Contains the configuration file for ECU interconnections within the example
πŸ“„ system_topology.flync.yaml
connections:
  - type: ecu_port_to_ecu_port
    id: conn1
    ecu1_port: hpc1_p1
    ecu2_port: z1_p1
  - type: ecu_port_to_ecu_port
    id: conn2
    ecu1_port: hpc1_p2
    ecu2_port: z2_p1
  - type: ecu_port_to_ecu_port
    id: conn3
    ecu1_port: hpc1_p3
    ecu2_port: eth_ecu_p1
πŸ“„ system_metadata.flync.yaml
release:
  version_schema: semver
  version: 1.2.1
author: System_Architect
compatible_flync_version:
  version_schema: semver
  version: 0.9.0
oem: OEM_example
platform: Arch1

Ethernet Network TopologyΒΆ

The Ethernet Network Topology diagram provides a comprehensive visual representation of all components included in the configuration.

The diagram identifies the VLANs, IP addresses, and multicast groups assigned to each controller and switch, giving a complete view of the logical network segmentation and addressing scheme.

Each of the four ECUs is shown as an individual block. The diagram also illustrates the internal connectivity between components within each ECU, as well as the external connections between ECUs, making both intra-ECU and inter-ECU communication paths easy to understand.

_images/ethernet_topology.svg

QoS/L2 TSN and TCAM ConfigurationΒΆ

The QoS / Layer 2 TSN and TCAM Configuration diagram provides a comprehensive visual overview of the Time-Sensitive Networking (TSN) mechanisms and TCAM rules implemented in this configuration.

The diagram highlights the HTB (Hierarchical Token Bucket) shaper configured on the Linux-based controllers (eth_ecu), as well as the Credit-Based Shapers (CBS) applied on the egress ports of the switches to manage time-sensitive traffic.

It also shows the ingress stream filters deployed on the ingress ports of the switches, which are used for traffic policing and stream identification in accordance with TSN requirements.

In addition, the diagram includes the TCAM rules configured on the switch (z2_switch1), illustrating how hardware-based classification and filtering are used to enforce traffic handling policies.

_images/qos.svg

Time Synchronization ConfigurationΒΆ

The Timesync Configuration diagram provides a clear visual overview of the time-synchronization roles assigned to all time-aware devices in the system.

It illustrates how time is distributed across the network, identifying which devices act as time-transmitters or time_receivers.

This helps clarify the synchronization hierarchy and the timing relationships between system components.

_images/ptp.svg

MACsec ConfigurationΒΆ

The MACsec Configuration diagram provides a clear visual overview of the roles and relationships of all MACsec participants within the system.

It identifies which devices function as MACsec peers, showing where secure channels are established and how link-layer protection is applied across the network.

This helps clarify the security topology and illustrates how data integrity (and confidentiality) is maintained between connected nodes.

_images/macsec.svg

Further ExamplesΒΆ

ECU VariantsΒΆ

Single controller, single (virtual) interface, external PHYΒΆ

_images/single_controller_single_iface_ext_PHY.png

Note

The MDI configuration must be compliant with that of the other ECU to which the port is connected to. In this case, mode, speed and duplex must match; while role must be opposite to that of the other ECU config (i.e., if slave in the connected ECU, master shall be configured).

Note

The MII configuration must be compliant with that of the ECU controller configuration. In this case, type and speed must match; while mode must oppose the controller interface config (i.e., if mac in the controller interface, phy shall be configured).

πŸ“„ ecu1_ports.flync.yaml
ports:
   -  name: ecu1_port1
      mdi_config:
         mode: base_t1
         speed: 100
         duplex: full
         role: master
         autonegotiation: false
      mii_config:
         type: rmii
         speed: 100
         mode: phy
πŸ“„ ecu1_controller1.flync.yaml
meta:
   author: Developer1
   compatible_flync_version:
      version_schema: semver
      version: 0.9.0
   target_system: flync_os
name: ecu1_controller1
interfaces:
   -  name: ecu1_controller1_iface1
      mac_address: 00:11:22:33:44:55
      mii_config:
         type: rmii
         speed: 100
         mode: mac
      virtual_interfaces:
         -  name: ecu1_controller1_iface1_viface1
            vlanid: 0
            addresses:
               -  address: 10.0.10.1
                  ipv4_netmask: 255.255.255.0
            multicast:
               -  239.0.0.1
               -  239.0.0.2
πŸ“„ ecu1_internal_topology.flync.yaml
connections:
   - type: ecu_port_to_controller_interface
     id: conn1
     ecu_port: ecu1_port1
     controller_interface: ecu1_controller1_iface1

Single controller, single (virtual) interface, integrated PHYΒΆ

_images/single_controller_single_iface_int_PHY.png

Note

Since PHY is integrated into the host controller, no MII configuration is needed on the port side.

πŸ“„ ecu1_ports.flync.yaml
ports:
-  name: ecu1_port1
   mdi_config:
      mode: base_t1
      speed: 100
      duplex: full
      role: master
      autonegotiation: false
   mii_config: null

Note

Since PHY is integrated into the host controller, no MII configuration is needed in the controller either.

πŸ“„ ecu1_controller1.flync.yaml
meta:
   author: Developer1
   compatible_flync_version:
      version_schema: semver
      version: 0.9.0
   target_system: flync_os
name: ecu1_controller1
interfaces:
   -  name: ecu1_controller1_iface1
      mac_address: 00:11:22:33:44:55
      mii_config: null
      virtual_interfaces:
         -  name: ecu1_controller1_iface1_viface1
            vlanid: 0
            addresses:
               -  address: 10.0.10.1
                  ipv4_netmask: 255.255.255.0
            multicast:
               - 239.0.0.1
               - 239.0.0.2
πŸ“„ ecu1_internal_topology.flync.yaml
connections:
   -  type: ecu_port_to_controller_interface
      id: conn1
      ecu_port: ecu1_port1
      controller_interface: ecu1_controller1_iface1

Single controller, multiple (virtual) interfaces, external PHYΒΆ

_images/single_controller_multiple_iface_ext_PHY.png
πŸ“„ ecu1_ports.flync.yaml
ports:
-  name: ecu1_port1
   mdi_config:
      mode: base_t1
      speed: 100
      duplex: full
      role: master
      autonegotiation: false
  mii_config:
      type: rmii
      speed: 100
      mode: phy
πŸ“„ ecu1_controller1.flync.yaml
meta:
   author: Developer1
   compatible_flync_version:
      version_schema: semver
      version: 0.9.0
   target_system: flync_os
name: ecu1_controller1
interfaces:
   -  name: ecu1_controller1_iface1
      mac_address: 00:11:22:33:44:55
      mii_config:
         type: rmii
         speed: 100
         mode: mac
      virtual_interfaces:
         -  name: ecu1_controller1_iface1_viface1
            vlanid: 10
            addresses:
               -  address: 10.0.10.1
                  ipv4_netmask: 255.255.255.0
            multicast:
               - 239.0.0.1
               - 239.0.0.2
         -  name: ecu1_controller1_iface1_viface2
            vlanid: 20
            addresses:
               -  address: 10.0.20.1
                  ipv4_netmask: 255.255.255.0
            multicast:
               - 239.0.0.3
πŸ“„ ecu1_internal_topology.flync.yaml
connections:
   -  type: ecu_port_to_controller_interface
      id: conn1
      ecu_port: ecu1_port1
      controller_interface: ecu1_controller1_iface1

Single controller, multiple (virtual) interfaces, integrated PHYΒΆ

_images/single_controller_multiple_iface_int_PHY.png
πŸ“„ ecu1_ports.flync.yaml
ports:
   -  name: ecu1_port1
      mdi_config:
         mode: base_t1
         speed: 100
         duplex: full
         role: master
         autonegotiation: false
      mii_config: null
πŸ“„ ecu1_controller1.flync.yaml
meta:
   author: Developer1
   compatible_flync_version:
      version_schema: semver
      version: 0.9.0
   target_system: flync_os
name: ecu1_controller1
interfaces:
   -  name: ecu1_controller1_iface1
      mac_address: 00:11:22:33:44:55
      mii_config: null
      virtual_interfaces:
         -  name: ecu1_controller1_iface1_viface1
            vlanid: 10
            addresses:
               -  address: 10.0.10.1
                  ipv4_netmask: 255.255.255.0
            multicast:
               - 239.0.0.1
               - 239.0.0.2
         -  name: ecu1_controller1_iface1_viface2
            vlanid: 20
            addresses:
               -  address: 10.0.20.1
                  ipv4_netmask: 255.255.255.0
            multicast:
                  - 239.0.0.3
πŸ“„ ecu1_internal_topology.flync.yaml
connections:
   -  type: ecu_port_to_controller_interface
      id: conn1
      ecu_port: ecu1_port1
      controller_interface: ecu1_controller1_iface1

Switch ECU, multiple (virtual) interfaces, external PHYΒΆ

_images/switch_ecu_ext_PHY.png
πŸ“„ ecu1_ports.flync.yaml
ports:
   -  name: ecu1_port1
      mdi_config:
         mode: base_t1
         speed: 100
         duplex: full
         role: master
         autonegotiation: false
      mii_config:
         type: rmii
         speed: 100
         mode: phy
   -  name: ecu1_port2
      mdi_config:
         mode: base_t1
         speed: 100
         duplex: full
         role: master
         autonegotiation: false
      mii_config:
         type: rmii
         speed: 100
         mode: phy
πŸ“„ ecu1_controller1.flync.yaml
meta:
   author: Developer1
   compatible_flync_version:
      version_schema: semver
      version: 0.9.0
   target_system: flync_os
name: ecu1_controller1
interfaces:
   -  name: ecu1_controller1_iface1
      mac_address: 00:11:22:33:44:55
      mii_config:
            type: rmii
            speed: 100
            mode: phy
      virtual_interfaces:
         -  name: ecu1_controller1_iface1_viface1
            vlanid: 10
            addresses:
               -  address: 10.0.10.1
                  ipv4_netmask: 255.255.255.0
            multicast:
               - 224.0.0.11
               - 224.0.0.13
         -  name: ecu1_controller1_iface1_viface2
            vlanid: 20
            addresses:
               -  address: 10.0.20.1
                  ipv4_netmask: 255.255.255.0
            multicast: null
πŸ“„ ecu1_switch1.flync.yaml
meta:
   author: Developer1
   compatible_flync_version:
      version_schema: semver
      version: 0.9.0
   target_system: flync_os
name: ecu1_switch1
ports:
   -  name: switch1_port1
      silicon_port_no: 1
      default_vlan_id: 1
      mii_config:
         type: rmii
         speed: 100
         mode: mac
   -  name: switch1_port2
      silicon_port_no: 2
      default_vlan_id: 1
      mii_config:
         type: rmii
         speed: 100
         mode: mac
   -  name: switch1_port0
      silicon_port_no: 0
      default_vlan_id: 1
      mii_config:
         type: rmii
         speed: 100
         mode: mac
vlans:
   -  name: vlan10
      id: 10
      default_priority: 0
      ports:
         - switch1_port0
         - switch1_port1
         - switch1_port2
      multicast:
         -  address: 224.0.0.11
            ports:
               - switch1_port0
               - switch1_port1
         -  address: 224.0.0.13
            ports:
                  - switch1_port0
                  - switch1_port2
   -  name: vlan20
      id: 20
      default_priority: 0
      ports:
         - switch1_port1
         - switch1_port2
      multicast:
         -  address: 224.0.0.12
            ports:
               - switch1_port1
               - switch1_port2

Note

The MII mode of the switch1_port0 must oppose the one of the ecu1_controller1_iface1.

πŸ“„ ecu1_internal_topology.flync.yaml
connections:
   -  type: ecu_port_to_switch_port
      id: conn1
      ecu_port: ecu1_port1
      switch_port: switch1_port1
   -  type: ecu_port_to_switch_port
      id: conn2
      ecu_port: ecu1_port2
      switch_port: switch1_port2
   -  type: switch_port_to_controller_interface
      id: conn3
      switch_port: switch1_port0
      controller_interface: ecu1_controller1_iface1

Switch ECU with Host controller, multiple (virtual) interfaces, external PHYΒΆ

_images/switch_ecu_with_host_ext_PHY.png
πŸ“„ ecu1_ports.flync.yaml
ports:
   -  name: ecu1_port1
      mdi_config:
         mode: base_t1
         speed: 100
         duplex: full
         role: master
         autonegotiation: false
      mii_config:
         type: rmii
         speed: 100
         mode: phy
   -  name: ecu1_port2
      mdi_config:
         mode: base_t1
         speed: 100
         duplex: full
         role: master
         autonegotiation: false
      mii_config:
         type: rmii
         speed: 100
         mode: phy
πŸ“„ ecu1_controller1.flync.yaml
meta:
   author: Developer1
   compatible_flync_version:
      version_schema: semver
      version: 0.9.0
target_system: flync_os
name: ecu1_controller1
interfaces:
   -  name: ecu1_controller1_iface1
      mac_address: 00:11:22:33:44:55
      mii_config:
         type: rmii
         speed: 100
         mode: phy
      virtual_interfaces:
         -  name: ecu1_controller1_iface1_viface1
            vlanid: 10
            addresses:
               -  address: 10.0.10.1
                  ipv4_netmask: 255.255.255.0
            multicast:
               - 224.0.0.11
               - 224.0.0.13
         -  name: ecu1_controller1_iface1_viface2
            vlanid: 20
            addresses:
               -  address: 10.0.20.1
                  ipv4_netmask: 255.255.255.0
         -  name: ecu1_controller1_iface1_viface3
            vlanid: 30
            addresses:
               -  address: 10.0.30.1
                  ipv4_netmask: 255.255.255.0
πŸ“„ ecu1_switch1.flync.yaml
meta:
   author: Developer1
   compatible_flync_version:
      version_schema: semver
      version: 0.9.0
name: ecu1_switch1
ports:
   -  name: switch1_port1
      silicon_port_no: 1
      default_vlan_id: 1
      mii_config:
         type: rmii
         speed: 100
         mode: mac
   -  name: switch1_port2
      silicon_port_no: 2
      default_vlan_id: 1
      mii_config:
         type: rmii
         speed: 100
         mode: mac
   -  name: switch1_port0
      silicon_port_no: 0
      default_vlan_id: 1
      mii_config:
         type: rmii
         speed: 100
         mode: mac
vlans:
   -  name: vlan10
      id: 10
      default_priority: 0
      ports:
         - switch1_port0
         - switch1_port1
         - switch1_port2
      multicast:
         -  address: 224.0.0.11
            ports:
               - switch1_port0
               - switch1_port1
         -  address: 224.0.0.13
            ports:
                  - switch1_port0
                  - switch1_port2
   -  name: vlan20
      id: 20
      default_priority: 0
      ports:
         - switch1_port1
         - switch1_port2
      multicast:
         -  address: 224.0.0.12
            ports:
               - switch1_port1
               - switch1_port2
   -  name: vlan30
      id: 30
      default_priority: 0
      ports:
         - switch1_port0
host_controller:
   name: ecu1_switch1_controlleriface1
   mac_address: 00:11:22:33:44:66
   virtual_interfaces:
   -  name: vlan30
      vlanid: 30
      addresses:
         -  address: 10.0.30.100
            ipv4_netmask: 255.255.255.0
      multicast: null

Note

The MII mode of the switch1_port0 must oppose the one of the ecu1_controller1_iface1.

Note

The Host controller of the switch will have the same configuration as any Controller Interface.

πŸ“„ ecu1_internal_topology.flync.yaml
connections:
   -  type: ecu_port_to_switch_port
      id: conn1
      ecu_port: ecu1_port1
      switch_port: switch1_port1
   -  type: ecu_port_to_switch_port
      id: conn2
      ecu_port: ecu1_port2
      switch_port: switch1_port2
   -  type: switch_port_to_controller_interface
      id: conn3
      switch_port: switch1_port0
      controller_interface: ecu1_controller1_iface1

Internal Topology (Configuration and Types)ΒΆ

The internal topology file of each configured ECU must contain the description of all the internal connections within the device. The FLYNC model supports the connection types present in the following picture:

Important

Be aware of the kind of connection that is added to the file, since the name of the components shall adjust to it accordingly.

Example file (dummy example)

_images/internal_topology.png
πŸ“„ ecu1_internal_topology.flync.yaml
connections:
   -  type: ecu_port_to_switch_port
      id: conn1
      ecu_port: ecu1_port2
      switch_port: switch1_port1
   -  type: ecu_port_to_switch_port
      id: conn2
      ecu_port: ecu1_port3
      switch_port: switch1_port2
   -  type: ecu_port_to_switch_port
      id: conn3
      ecu_port: ecu1_port4
      switch_port: switch2_port1
   -  type: ecu_port_to_switch_port
      id: conn4
      ecu_port: ecu1_port5
      switch_port: switch2_port2
   -  type: ecu_port_to_controller_interface
      id: conn5
      ecu_port: ecu1_port1
      controller_interface: ecu1_controller1_iface1
   -  type: switch_port_to_controller_interface
      id: conn6
      switch_port: switch1_port0
      controller_interface: ecu1_controller1_iface2
   -  type: switch_port_to_controller_interface
      id: conn7
      switch_port: switch2_port0
      controller_interface: ecu1_controller2_iface1
   -  type: controller_interface_to_controller_interface
      id: conn8
      controller_interface1: ecu1_controller1_iface2
      controller_interface2: ecu1_controller2_iface1
   -  type: switch_port_to_switch_port
      id: conn9
      switch_port: switch1_port3
      switch2_port: switch2_port3

Additional Security Features ConfigurationΒΆ

Firewall ConfigurationΒΆ

The Firewall model consists of a default action and three lists defining rules for input, output and forward traffic, respectively. Each of these rules contains a pattern the packets are matched agaisnt, and an action executed when this check is positive:

πŸ“„ ecu1_controller1.flync.yaml
meta:
   author: Developer1
   compatible_flync_version:
      version_schema: semver
      version: 0.9.0
name: ecu1_controller1
interfaces:
   -  name: ecu1_controller1_iface1
      mac_address: 00:11:22:33:44:88
      mii_config:
      type: rmii
      speed: 100
      mode: mac
      virtual_interfaces:
      -  name: ecu1_controller1_iface1_viface1
         vlanid: 0
         addresses:
            -  address: 10.0.10.3
               ipv4_netmask: 255.255.255.0
      firewall:
         default_action: drop
         input_rules:
            -  name: allow_ssh
               action: accept
               pattern:
               src_ipv4: 10.0.0.2
               protocol: tcp
               dst_port: 22
               vlan_tagged: true
         output_rules:
            -  name: drop_output_vlan_33
               action: drop
               pattern:
               dst_ipv4:
                  address: 10.0.0.1
                  ipv4netmask : 255.255.255.0
               vlanid: 33
         forward_rules:
            -  name: allow_forwarded_udp
               action: accept
               pattern:
               src_ipv4:
                  address: 10.0.0.2
                  ipv4netmask : 255.255.255.0
               dst_ipv4:
                  address: 10.0.0.3
                  ipv4netmask : 255.255.255.0
               protocol: udp
               dst_port:
                     from_value: 30490
                     to_value: 30509

Switch TCAM ConfigurationΒΆ

_images/tcam_rules.png
πŸ“„ ecu1_switch1.flync.yaml
meta:
   author: Developer1
   compatible_flync_version:
      version_schema: semver
      version: 0.9.0
name: ecu_switch1
ports:
-  name: switch_port0
   silicon_port_no: 1
   default_vlan_id: 1
   mii_config:
      type: rmii
      speed: 100
      mode: mac

-  name: switch_port1
   silicon_port_no: 2
   default_vlan_id: 1
   mii_config:
      type: rmii
      speed: 100
      mode: mac

-  name: switch_port2
   silicon_port_no: 3
   default_vlan_id: 1
   mii_config:
      type: rmii
      speed: 100
      mode: mac

tcam_rules:
   -  name: Rule_1
      match_filter:
      src_mac:
         address: "10:10:10:22:22:22"
         macmask: "FF:FF:FF:FF:FF:FF"
      vlanid: 20
      pcp: 2
      protocol: udp
      dst_port:
         from_value: 32000
         to_value: 33000
      match_ports: [switch_port1]
      action:
      -  type: drop
         ports: [switch_port2]

   -  name: Rule_2
      match_filter:
      src_mac:
         address: "10:10:10:20:20:20"
         macmask: "FF:FF:FF:FF:FF:EE"
      vlanid: 20
      pcp: 5
      protocol: udp
      dst_port:
         from_value: 32000
         to_value: 33000
      match_ports: [switch_port0, switch_port1]
      action:
         -  type: vlan_overwrite
            overwrite_vlan_id: 10
            overwrite_vlan_pcp: 1
            ports: [switch_port2]

vlans:
-  name: VLAN10
   id: 10
   default_priority: 1
   ports:
      - switch_port0
      - switch_port1
      - switch_port2

-  name: VLAN20
   id: 20
   default_priority: 1
   ports:
      - switch_port0
      - switch_port1
      - switch_port2

Sockets ConfigurationΒΆ

A socket in FLYNC represents a logical endpoint on a virtual network interface of an ECU. It defines how the controller will send and receive traffic over a specific IP address, port, and protocol (TCP/UDP).

_images/sockets.svg

Note

Sockets must be defined in a separate folder for each ECU for better readability.

Note

Multiple sockets may be defined in a single file for different address endpoints, but they must belong to the same VLAN.