User Tools

Site Tools


linux:ethernet-subinterface

Add an ethernet subinterface

Probably obsolete with the rise of Netplan

Assuming RedHat, Centos or Fedora.

The process: Go to the directory with the networking scripts

cd /etc/sysconfig/network-scripts

Copy the original network script for the interface

cp ifcfg-eth0 ifcfg-eth0:1

Edit ifcfg-eth0:1 and change the device name, change DEVICE=eth0 to DEVICE=eth0:1 Change the IP address, change IPADDR=[current value] to IPADDR=[ip address for subinterface]

Save the file.
Restart the network service.

service network restart

Check with ifconfig.

linux/ethernet-subinterface.txt · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki