From 0f8b548e22ef631608a60dadc26a320507c6375e Mon Sep 17 00:00:00 2001 From: gutsmiedl Date: Thu, 28 Aug 2025 14:31:01 +0000 Subject: [PATCH] =?UTF-8?q?README.md=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..a7adece --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +Cisco Nexus zu FortiGate Konverter + +Ein Python-Skript, das Cisco Nexus Interface-Konfigurationen (alte und neue NX-OS-Syntax) einliest und automatisch die passende FortiGate Interface-Konfiguration erzeugt. +Es verarbeitet standardmäßig VLANs, IP-Adressen, DHCP-Relays, Secondary IPs und Aliase. + +✨ Funktionen + +Unterstützt die alte und neue Cisco Nexus NX-OS-Syntax: + +ip address (alte Schreibweise) + +ip address / (neue Schreibweise) + +Erkennt automatisch Interface-Blöcke (mit oder ohne ! als Trenner) + +Konvertiert DHCP-Relay-Einstellungen (ip helper-address & ip dhcp relay address) + +Unterstützt HSRP-IPs (inklusive Secondary-Adressen) + +Schneidet Alias/Beschreibung automatisch auf max. 25 Zeichen + +Generiert FortiGate config system interface-Blöcke + +📂 Projektstruktur + +cisco-nexus-to-fortigate-converter/ +│── input/ +│ └── input_nexus.txt # Cisco Nexus Interface-Konfiguration +│── output/ +│ └── forti_config.txt # Generierte FortiGate-Konfiguration +│── main.py # Hauptskript +│── README.md # Diese Datei + +📖 Beispielausgabe + +Eingabe (Cisco Nexus): + +interface Vlan12 + description 192.168.178__House + ip address 192.168.178.2/24 + ip dhcp relay address 192.168.178.80 + +Ausgabe (FortiGate): + +edit "VL.12" + set vdom "root" + set dhcp-relay-service enable + set ip 192.168.178.2/24 + set alias "192.168.178__House" + set dhcp-relay-ip "192.168.178.80" + set interface "ae1" + set vlanid 12 +next