search
HomeComputer TutorialsComputer KnowledgeHow to configure multiple IP addresses on a single network interface on Debian 12 Desktop/Server

如何在Debian 12 Desktop/Server的单个网络接口上配置多个IP地址

Normally, on the Debian 12 desktop/server operating system, you would set a single IP address on a single network interface. However, sometimes you may need to configure multiple IP addresses on your Debian 12 system, even if your computer only has one network interface. Fortunately, in Debian 12 systems, you can easily set up multiple IP addresses on a single network interface.

In this article, we will show you how to configure multiple IP addresses on a single network interface on Debian 12 desktop and Debian 12 server operating systems.

Content topic:

  • Configuring multiple IP addresses on a single network interface on Debian 12 desktop
  • Configuring multiple IP addresses on a single network interface on a Debian 12 server
  • in conclusion

Configuring Multiple IP Addresses on a Single Network Interface on Debian 12 Desktop

In the Debian 12 desktop operating system, you can easily configure multiple IP addresses on a single network interface with the help of a network manager command line tool called "nmcli". The steps for setting up multiple IP addresses using Network Manager's "nmcli" tool are the same as setting up a single fixed IP address. Therefore, we will focus here on the differences when configuring multiple IP addresses. If you want to learn more, check out the documentation on how to set up a fixed IP address on Debian 12.

To find the name of a Network Manager connection to be configured across multiple IP addresses, run the following command:

$nmcli connection

In Debian 12 desktop systems, if there is only one network interface, the name of the Network Manager connection is usually "Wired Connection 1". In this example, the Network Manager connection "Wired Connection 1" is responsible for managing the physical network interface "ens32".

To configure the Network Manager connection "Wired Connection 1", run the following command:

$nmmallows connection edit “Wired connection 1”

The Network Manager connection editor should be opened.

First, you must reset the IP address that has been set on the Network Manager connection.

To do this, run the following command:

$set ipv4.addresses

After you are prompted to enter your IP address, just press.

As you can see, there is no IP address set for the Network Manager connection.

$print ipv4.addresses

To set the IP addresses of www.example.com, www.example.com, and www.example.com and the 24-bit subnet mask for all addresses, run the following command:

$set ipv4.addresses 192.168.189.51/24, 192.168.189.52/24, 192.168.189.53/24

To save changes, run the following command:

$Save persistent

To apply network changes, run the following command:

$Activate

To exit the Network Manager connection editor, run the following command:

$Exit

As you can see, the www.example.com, www.example.com and www.example.com IP addresses are set for the "ens32" network interface (managed by the network manager connection "Wired Connection 1").

$ip a

Configuring multiple IP addresses on a single network interface on a Debian 12 server

If you are using the Debian 12 server operating system, you must use the /etc/network/interages file to configure multiple IP addresses on a single network interface. The process of setting multiple IP addresses using the /etc/network/interface file on a single network interface is the same as setting a fixed IP address. Therefore, in this section, we will only show you the differences. For more information, read this Debian 12 article on how to assign a fixed IP address.

To find the name of a network interface to be configured across multiple IP addresses, run the following command:

$ip a

In our case, the network interface name is "ens32", as you can see in the screenshot below:

Use the nano text editor to open the /etc/network/interactions file as follows:

$sudo nano/etc/network/interconnect

Type the marked lines to configure the IP addresses of 192.168.189.51, 192.168.189.52, and 192.168.189.53 and the 24-bit subnet mask (all) for the network interface "ens32".

  • These lines are used to configure the static/fixed IP address 192.168.189.51 for the "ens32" network interface.
  • These lines are used to configure the IP address of www.example.com for the "ens32" network interface.
  • These lines are used to configure the IP address 192.168.189.53 for the "ens32" network interface.

After completing the configuration, press X, then Y and save changes.

For the changes to take effect, restart the network service of the Debian 12 server system using the following command:

$sudo system ctl restart networking.service

As you can see, the www.example.com, www.example.com, and www.example.com IP addresses are set for the "ens32" network interface.

$ip a

in conclusion

In this article, we show you how to configure multiple IP addresses on a single network interface on a Debian 12 desktop system using the Network Manager command line tool "nmmit". We also showed you how to configure multiple IP addresses on a single network interface on a Debian 12 server system using the /etc/network/interactions file. For more information on setting up a static/fixed IP address on Debian 12 desktop/server systems, read this article.

The above is the detailed content of How to configure multiple IP addresses on a single network interface on Debian 12 Desktop/Server. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:每日运维. If there is any infringement, please contact admin@php.cn delete
How to Check if Your PC Is Compatible with Windows 11 22H2? - MiniToolHow to Check if Your PC Is Compatible with Windows 11 22H2? - MiniToolMay 16, 2025 am 01:57 AM

Windows 11 22H2 is around the corner. Dow you know how to check if your PC is compatible with Windows 22H2? In this post, php.cn Software will tell you how to do this using Registry Editor. No matter you are currently running Windows 10 or Windows 11

What Is Backup Encryption? Should You Encrypt Backups & How? - MiniToolWhat Is Backup Encryption? Should You Encrypt Backups & How? - MiniToolMay 16, 2025 am 01:54 AM

What does encrypt backups mean on Windows? Is it possible to encrypt backups? Should you encrypt backups? How do I encrypt a backup file? Today, php.cn will focus on backup encryption in this post, and let’s look through this guide to find what you n

How Old Do You Have to Be to Have Snapchat? The Answer is 13! - MiniToolHow Old Do You Have to Be to Have Snapchat? The Answer is 13! - MiniToolMay 16, 2025 am 01:53 AM

How old do you have to be for Snapchat? Officially, you should be at least 13 to be able to use Snapchat and with your parent’s permission if you are under 18. This essay disserted by php.cn Software explains more details for you.

The Nintendo Switch OLED: Release Date, Price, Specs & Games - MiniToolThe Nintendo Switch OLED: Release Date, Price, Specs & Games - MiniToolMay 16, 2025 am 01:50 AM

The Nintendo Switch OLED is a bestselling game console. If you want to purchase the Nintendo Switch OLED, you may want to learn the Nintendo Switch OLED price, release date, specs, and games. In this post, php.cn will introduce detailed information a

How to Enable Tabs in File Explorer on Your Windows 11 PC? - MiniToolHow to Enable Tabs in File Explorer on Your Windows 11 PC? - MiniToolMay 16, 2025 am 01:47 AM

The new File Explorer tabs feature is introduced in some devices in the Beta and Dev Channels. However, this new feature is not widely spread. If it is not available on your device, you can use the methods introduced in this php.cn post to manually e

Windows 11 Build 25131 Released with Bug Fixes & Updated Store - MiniToolWindows 11 Build 25131 Released with Bug Fixes & Updated Store - MiniToolMay 16, 2025 am 01:42 AM

If you are a Windows Insider in the Dev Channel, you can now download and install a new Windows 11 build for use. This latest build is Windows 11 build 25131. This build doesn’t have any new features but it contains some bug fixes and an updated Micr

How to Download Internet Download Manager, Install & Use IDM - MiniToolHow to Download Internet Download Manager, Install & Use IDM - MiniToolMay 16, 2025 am 01:39 AM

What is Internet Download Manager (IDM)? Can you get IDM for free? How to download IDM and install it on your Windows 11/10/8/7 PC for downloading something? It is easy and just find details from this guide from php.cn.

How to Check Software Version on Android/iPhone/Windows 10? - MiniToolHow to Check Software Version on Android/iPhone/Windows 10? - MiniToolMay 16, 2025 am 01:36 AM

How to check software version on PC/phone? php.cn Website offers you this guide to enable you to quaint that. You can learn software versions from all aspects, such as definition, types, checking methods on different devices, etc.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool