This Python script provides a command-line tool for managing network interfaces and VLAN subinterfaces on a Linux system. It allows you to display available network interfaces, create VLAN subinterfaces, change IPv6 addresses on VLAN interfaces, and delete VLAN subinterfaces.
- Show Interfaces: List all available network interfaces along with their IPv6 addresses.
- Create VLAN Subinterface: Create a VLAN subinterface on a base network interface and assign an IPv6 address to it.
- Change VLAN IPv6 Address: Modify the IPv6 address of an existing VLAN subinterface, with an option to delete the old address.
- Delete VLAN Subinterface: Remove a VLAN subinterface from the system.
- Python 3.x
- Linux-based system
- Required utilities installed (
ip
,subprocess
)
-
Clone or Download the Script:
git clone [https://github.com/VATASec/Authomotive_Ethernet.git](https://github.com/VATASec/Authomotive_Ethernet_Tools.git) cd network-interface-tool
-
Run the Script:
python3 network_interface_tool.py
-
Choose an Action: When prompted, select an action by entering the corresponding number:
- 1: Show interfaces
- 2: Add VLAN interface and set IPv6
- 3: Change VLAN IPv6 address
- 4: Delete VLAN subinterface
- 5: Exit