Skip to content

Multiple IPs on single interface (Network Configuration)#465

Open
trinkel wants to merge 10 commits intocanonical:mainfrom
trinkel:add-virtual-ip-configuration
Open

Multiple IPs on single interface (Network Configuration)#465
trinkel wants to merge 10 commits intocanonical:mainfrom
trinkel:add-virtual-ip-configuration

Conversation

@trinkel
Copy link

@trinkel trinkel commented Jan 12, 2026

Description

Adds instructions for creating multiple IPs on a single interface to the network configuration documentation.

Related Issue

Partially fixes #212

Contributor License Agreement (CLA)

By contributing to this project, you agree to the terms of
the Canonical Contributor License Agreement (CLA).
If you have not already signed the CLA, please do so here.


Commit Message for Squash Merge

We typically squash commits when merging. You can specify the commit message that should be used in this case if you wish.
Provide the desired commit message below:

[docs] Add instructions to configure virtual IPs to the Network Configuration page


Checklist

  • I have read and followed the Ubuntu Server contributing guide.
  • My pull request is linked to an existing issue (if applicable).
  • I have tested my changes, and they work as expected.

Additional Notes (Optional)

This PR addresses some of the discussion in #212. I will be continuing with additional updates to the Network Configuration page and was advised not to create a new issue for the continuation.


Thank you for contributing to the Ubuntu Server documentation!

trinkel and others added 9 commits January 3, 2026 10:13
**configuring-networks.md**
- Add section explaining how to add additional IPs to a typical network configuration.
**configuring-networks.md**
- Add `netplan` version with DHCP
- Add note about DHCP limitation
**configuring-networks.md**
- Minor grammar changes to three paragraphs.
**configuring-networks.md**
- Move _Adding a virtual IP address_ section
- Was a level 2 heading under _Configuring networks_
- Now a level 3 heading under _IP Addressing_
**configuring-networks.md**
- Remove early apply and verify instructions from _Adding a virtual IP address_ section
- Create a single _Apply and verify..._ section a conclusion to the _Adding a virtual IP address_ section
**configuring-networks.md**
- change look of code comments in _Adding a virtual IP_ section
**configuring-networks.md**
- Add that virtual IP is used on single network interface
- Fix wording of website virtual host usage
…ntu-server-documentation into add-virtual-ip-configuration
@trinkel
Copy link
Author

trinkel commented Jan 12, 2026

There is a statement in my updated text that only one IP on an interface can be furnished by DHCP. I consulted several sources and this is true to the best of my knowledge. Also, it doesn't appear that there is a way to configure a second DHCP address on an interface anyway. Please verify that it is correct.

Copy link
Collaborator

@s-makin s-makin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to improve this documentation :)

I only have a small formatting nit - I'd like to remove the bullet list from the below section since it still reads just fine (and would render better) if it was just normal body text. If you'd rather keep the bullet list format, please add 2 spaces of indentation to the code blocks to make them part of the list items. I've left suggestions in line.


#### Apply and verify the IP addresses

- Apply the configuration to enable the virtual IP:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Apply the configuration to enable the virtual IP:
Apply the configuration to enable the virtual IP:

sudo netplan apply
```

- Verify the IP addresses are available locally using one or more of the following:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Verify the IP addresses are available locally using one or more of the following:
Verify the IP addresses are available locally using one or more of the following:


Check the output to see that the addresses were applied to the interface that was configured.

- Verify the IP addresses are available on the network. From a different computer on the network:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Verify the IP addresses are available on the network. From a different computer on the network:
Verify the IP addresses are available on the network. From a different computer on the network:

Copy link
Member

@TheJJ TheJJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fear the multiple address syntax with labels is slightly wrong - i've added suggestions how to specify them correctly.


### Adding a virtual IP address

Virtual IP is a method for broadcasting multiple IP addresses to the network *on a single network interface*. For example, configuring a single network interface, use virtual IP to:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does the name virtual come from? wouldn't this be just named "multiple ip addresses"? These IPs are real and allocated, so I wouldn't say there's something virtual (non-real) about them.

Comment on lines +251 to +255
addresses:
- 192.168.0.100/24
label: eno1:0
- 192.168.0.101/24
label: eno1:1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this syntax doesn't seem right.

Suggested change
addresses:
- 192.168.0.100/24
label: eno1:0
- 192.168.0.101/24
label: eno1:1
addresses:
- 192.168.0.99/24
- 192.168.0.100/24:
label: eno1:0
- 192.168.0.101/24:
label: eno1:some-label

Comment on lines +270 to +273
addresses:
- 192.168.0.101/24
label: eno1:1
dhcp4: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here:

Suggested change
addresses:
- 192.168.0.101/24
label: eno1:1
dhcp4: true
addresses:
- 192.168.0.101/24:
label: eno1:your-label
dhcp4: true

@trinkel
Copy link
Author

trinkel commented Jan 26, 2026

Sorry for the delay getting back on these changes. I basically agree with everything, but somehow I busted my dev environment (see #615) and I can't review my work without starting from a fresh repo. Please bear with me as I get it straightened out.

@TheJJ
Copy link
Member

TheJJ commented Jan 26, 2026

I hope a git fetch origin; git rebase origin main would straighten things out for you, if not we can try to help :)

@trinkel
Copy link
Author

trinkel commented Jan 30, 2026

@s-makin, @TheJJ: Thanks for your editing and debugging suggestions. I synched my fork with upstream and re-cloned it locally. After cloning it a few times, it finally started working. Go figure.

I have made the changes and a few others in my local. I have a question since this is my first effort as part of a group: Is it considered rude to make suggested changes in my repo and committing rather than committing those suggestions in Github? I have other changes and wanted to have a record of the suggested changes in my repo history. But I also don't want to steal credit for making the suggestions (just not sure how all that works.)

Thanks again, and thanks for your patience.

@trinkel trinkel changed the title Add virtual ip to Network Configuration Multiple IPs on single interface (Network Configuration) Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feedback]: Configuring Networks does not address cloud-init

3 participants