Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Linux » Adding a subnetwork interface to an existing network interface
  • Remove Bing Chat Button from Edge Sidebar
    How to Remove Bing Chat Button from Edge Sidebar Windows
  • Uninstall Wampserver
    How to uninstall WAMPServer from Windows Web Server
  • Watchguard Firewall 180504 100511
    WatchGuard Log and Report Server Installation in a VM Network | Monitoring
  • parttt
    Adding a new partition to an existing Linux server Linux
  • Delete Expired Profiles on Mac
    Remove Expired Configuration Profiles on Mac Mac
  • windows 10 2018 insider wallpaper
    How to create an Environment variables in Windows Windows
  • Windows Admin Center v2   2401 install   2306 to 2311 upgrade
    Upgrade Windows Admin Center 2306 – 2311: Install WACmg 2410 Network | Monitoring
  • screenshot 2020 02 07 at 21.56.50
    Setup Kiosk Mode on Windows 10 with AD User Account Windows

Adding a subnetwork interface to an existing network interface

Posted on 27/10/202006/09/2023 Christian By Christian No Comments on Adding a subnetwork interface to an existing network interface
subnetwork interface

A Network Interface Card (NIC) is used to connect a computer to an Ethernet network. This tutorial will teach you two ways you can add a network interface to an already existing network interface.

METHOD 1


– Additionally, we look at my available interfaces by issuing the ip command.

existing network interface

For this tutorial, I am going to create and attach a sub network interface to the lo interface. All the configuration files for the various network interfaces are stored in the etc/sysconfig/network-scripts directory.

First, we will copy the content of the configuration scripts of the interface we want to attach the new subnetwork interface to; copy it to a file that will serve as the configuration script for the new subnetwork interface. The new script must end with a :interger extention. For example, the new interface I am creating will be named lo:1

  • Copy the configuration file with the command:

    cp /etc/sysconfig/network-scripts/ifcfg-lo /etc/sysconfig/network-scripts/ifcfg-lo:1

Remember to change the name of the network interfaces correspondingly when you are trying yours.

network configuration

When you are done copying, open the file you just created with the copy command with a text editor:

network management

Modifying Device Names in Copy Commands

Furthermore, Where you see DEVICE, change the device name to match the one you used in the copy command. In my case, I will change lo to lo:1.
– However, Also change the IPADDR value to the new address you want to add to the existing interface. In my case, I will put 127.0.0.10.

subnetwork interface

Save and quit the editor. Now, restart the interface using the command: ifup interfaceName. In my case, it will be ifup lo:1

network configuration

Moreover, If we run the ip a command again, you will see the new network sub-interface has been added.

network configuration

In addition, You can ping the ip address to verify if it is truly up.

METHOD 2
– Nonetheless, Let’s run the ip a command again to view our existing network interfaces.

Consequently, For this demonstration, I will attach a new sub network interface to the ens33 interface.

Similarly, Now use the command below to add a new interface to a network interface: nmcli con mod interfaceName +ipv4.addresses  “new-ip-address/nwMask”. In my case, the command will be nmcli con mod ens33 +ipv4.addresses “192.168.37.175/24”.

Nevertheless, Now reboot your system and run the ip a command again.

Nevertheless, The major difference between both methods is that you control naming the newly created interface in the first method.

I hope you found this tutorial helpful.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Linux Tags:Enhanced Networking Adapter, Networking

Post navigation

Previous Post: Log Off: How to sign out of Windows Server 2012
Next Post: How to check your current Runlevel in Linux

Related Posts

  • PersonalHow to Create Symbolic Links in Linux
    All You Need to Know About Symbolic Links in Linux Linux
  • nodejs install on ubuntu
    How to install Node.js on Ubuntu Linux
  • Screenshot 2020 05 14 at 19.28.50
    How to install and configure Rancid Linux
  • greywireshark
    How to install WireShark on a Linux Ubuntu System Linux
  • Header image
    How to setup a Third-Party DNS Server on a Linux Server Linux
  • images copy
    How to disable automatic screen lock in Ubuntu Linux Linux

More Related Articles

PersonalHow to Create Symbolic Links in Linux All You Need to Know About Symbolic Links in Linux Linux
nodejs install on ubuntu How to install Node.js on Ubuntu Linux
Screenshot 2020 05 14 at 19.28.50 How to install and configure Rancid Linux
greywireshark How to install WireShark on a Linux Ubuntu System Linux
Header image How to setup a Third-Party DNS Server on a Linux Server Linux
images copy How to disable automatic screen lock in Ubuntu Linux Linux

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Remove Bing Chat Button from Edge Sidebar
    How to Remove Bing Chat Button from Edge Sidebar Windows
  • Uninstall Wampserver
    How to uninstall WAMPServer from Windows Web Server
  • Watchguard Firewall 180504 100511
    WatchGuard Log and Report Server Installation in a VM Network | Monitoring
  • parttt
    Adding a new partition to an existing Linux server Linux
  • Delete Expired Profiles on Mac
    Remove Expired Configuration Profiles on Mac Mac
  • windows 10 2018 insider wallpaper
    How to create an Environment variables in Windows Windows
  • Windows Admin Center v2   2401 install   2306 to 2311 upgrade
    Upgrade Windows Admin Center 2306 – 2311: Install WACmg 2410 Network | Monitoring
  • screenshot 2020 02 07 at 21.56.50
    Setup Kiosk Mode on Windows 10 with AD User Account Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,827 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.