multiple_ip_addresses_on_single_interface
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
multiple_ip_addresses_on_single_interface [2023/11/13 17:09] – [The Better Method] walkeradmin | multiple_ip_addresses_on_single_interface [2023/11/13 17:26] (current) – [The Better Method] walkeradmin | ||
---|---|---|---|
Line 127: | Line 127: | ||
\\ | \\ | ||
<color # | <color # | ||
- | <color # | + | <color # |
- | <color # | + | <color # |
- | \\ | + | |
\\ | \\ | ||
Each one of these interface files will contain the specific IP Address details that are required, but they will all be associated with a single interface. The <color # | Each one of these interface files will contain the specific IP Address details that are required, but they will all be associated with a single interface. The <color # | ||
\\ | \\ | ||
\\ | \\ | ||
- | + | **<color # | |
- | + | \\ | |
- | + | < | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
TYPE=Ethernet | TYPE=Ethernet | ||
PROXY_METHOD=none | PROXY_METHOD=none | ||
Line 157: | Line 151: | ||
IPV6_DISABLED=yes | IPV6_DISABLED=yes | ||
IPV6INIT=no | IPV6INIT=no | ||
+ | </ | ||
+ | In the next two files, we just enter the additional information: | ||
+ | \\ | ||
+ | \\ | ||
+ | **<color # | ||
+ | \\ | ||
+ | < | ||
+ | NAME=eno1 | ||
+ | UUID=ca90417f-9df9-4f34-bae5-77aa6531cc00 | ||
+ | DEVICE=eno1: | ||
+ | ONBOOT=yes | ||
+ | IPADDR=10.32.13.233 | ||
+ | PREFIX=24 | ||
+ | GATEWAY=10.32.13.1 | ||
+ | PREFIX1=24 | ||
+ | </ | ||
+ | \\ | ||
+ | **<color # | ||
+ | < | ||
+ | NAME=eno1 | ||
+ | UUID=ca90417f-9df9-4f34-bae5-77aa6531cc00 | ||
+ | DEVICE=eno1: | ||
+ | ONBOOT=yes | ||
+ | IPADDR=137.1.0.100 | ||
+ | PREFIX=24 | ||
+ | GATEWAY=137.1.0.1 | ||
+ | PREFIX1=24 | ||
+ | </ | ||
+ | Play close attention to the **DEVICE** setting, you must set the name to match the interface file name (so for file <color # | ||
+ | \\ | ||
+ | \\ | ||
+ | After rebooting the unit, we can now see that there are three IP Addresses on interface ifcfg-eno1. | ||
+ | \\ | ||
+ | \\ | ||
+ | Using ip -br -c a to show the IP Addresses: | ||
+ | \\ | ||
+ | \\ | ||
+ | eno1 | ||
+ | \\ | ||
+ | \\ | ||
+ | If we perform an ip route: | ||
+ | \\ | ||
+ | < | ||
+ | default via 192.168.1.1 dev eno1 proto static metric 101 | ||
+ | 10.32.13.0/ | ||
+ | 130.1.0.0/ | ||
+ | 192.168.1.0/ | ||
+ | 11.0.0.0/16 dev eno2 proto kernel scope link src 11.0.223.2 metric 102 | ||
+ | </ | ||
+ | We can see that the default route is still via **eno1**, and that the other alias IP Addresses are still going via **eno1**. | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | |||
multiple_ip_addresses_on_single_interface.1699895382.txt.gz · Last modified: 2023/11/13 17:09 by walkeradmin