How to assign a static ip address before eth link running in ubuntu 18.04 LTS?How Assign Static IP using Netplan so isc-dhcp-server doesn't crashHow to assign unique MAC addresses to sub-interfacesissue with dhcp default network fileHow to assign static IP address by MAC addressUbuntu and Static IP AddressHow do I assign a static IP address in Ubuntu 17.04 without rebooting?Netplan error, error on nameserverUbuntu Server 18.04.1 Cannot Keep Static IP Address After AssignedHow Assign Static IP using Netplan so isc-dhcp-server doesn't crash
Mutate my DNA sequence
How can I increase the rate of regeneration in humans without the possibility of tumors developing?
How to write 2**n - 1 as a recursive function?
Why would shrinking TEMPDB log lead to slowness?
How to draw 15-puzzle in LaTeX
Questions about `cs_new:...` and friends and their TeX relatives regarding global, local, long, nopar, protected, expandable and naming
Why is Microwaved mac & cheese burnt where they touch?
Some lesser known open problems/ conjectures in number theory
How to record this drawing effect?
Integrate GA or GA360 with SFMC?
Which are stars and which are noise in this comet photo?
If you have multiple planeswalkers, how many of their loyalty abilities can you use in a single turn?
Are homeless people protected by antidiscrimination laws?
Extract lines from files with names begining with given letter
What is an idiom, phrase or expression for situation such as "throw a pigeon among cats"
Intuition for the derivative of the exponential function
Given small computational resources how navigation was implemented ( Not Samples of old guidance software)
Is there any physical evidence for motion?
What's the short and accented note at the very end of a song called?
Explanation for why nickel turns green in hydrochloric acid
Can you catch the thief?
What's the origin of the trope that dragons used to be common but aren't any more?
Why do the Romance languages use definite articles, when Latin doesn't?
Why is Robin Hood French in Shrek?
How to assign a static ip address before eth link running in ubuntu 18.04 LTS?
How Assign Static IP using Netplan so isc-dhcp-server doesn't crashHow to assign unique MAC addresses to sub-interfacesissue with dhcp default network fileHow to assign static IP address by MAC addressUbuntu and Static IP AddressHow do I assign a static IP address in Ubuntu 17.04 without rebooting?Netplan error, error on nameserverUbuntu Server 18.04.1 Cannot Keep Static IP Address After AssignedHow Assign Static IP using Netplan so isc-dhcp-server doesn't crash
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I know that if I need to assign a static ip address I will need to use netplan
in Ubuntu 18.04, and I have done exactly that and made it work.
Here is my config file:
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: yes
enp131s0f0:
dhcp4: no
addresses: [10.66.0.1/24]
After I use netplan apply
, the ifconfig
command shows the ip address of enp131s0f0
set to 10.66.0.1
after I plug the cable into the port for "enp131s0f0". This causes a problem because if I do not plug in the cable to this port, the port itself won't get a static ip address even if the ipaddress is set in netplan, this will cause some services to fail to start (eg, isc-dhcp-server).
For example, if you have 3 ports and you have configured them like so:
network:
version: 2
renderer: networkd
ethernets:
enp131s0f0:
dhcp4: no
addresses: [10.66.0.1/24]
enp131s0f1:
dhcp4: no
addresses: [10.66.1.1/24]
enp131s0f2:
dhcp4: no
addresses: [10.66.2.1/24]
enp131s0f3:
dhcp4: no
addresses: [10.66.3.1/24]
If isc-dhcp-server is installed on all these 3 ports. The isc-dhcp-server will start only if you connect all 3 ports, if you failed to connect your cable to any one port of these 3 ports the isc-dhcp-server will fail to start because the port does not have a static address (without the cable plugged into the port), even if you set the static ip address in netplan.
So I would like to ask how to permanently assign a static address to a net port. To make it have an ipaddress before I plug in the cable... I need this because there are some ports on my server that currently I do not use (the cable is left unplugged), but I need isc-dhcp-server to start...
networking server network-manager ethernet dhcp
add a comment
|
I know that if I need to assign a static ip address I will need to use netplan
in Ubuntu 18.04, and I have done exactly that and made it work.
Here is my config file:
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: yes
enp131s0f0:
dhcp4: no
addresses: [10.66.0.1/24]
After I use netplan apply
, the ifconfig
command shows the ip address of enp131s0f0
set to 10.66.0.1
after I plug the cable into the port for "enp131s0f0". This causes a problem because if I do not plug in the cable to this port, the port itself won't get a static ip address even if the ipaddress is set in netplan, this will cause some services to fail to start (eg, isc-dhcp-server).
For example, if you have 3 ports and you have configured them like so:
network:
version: 2
renderer: networkd
ethernets:
enp131s0f0:
dhcp4: no
addresses: [10.66.0.1/24]
enp131s0f1:
dhcp4: no
addresses: [10.66.1.1/24]
enp131s0f2:
dhcp4: no
addresses: [10.66.2.1/24]
enp131s0f3:
dhcp4: no
addresses: [10.66.3.1/24]
If isc-dhcp-server is installed on all these 3 ports. The isc-dhcp-server will start only if you connect all 3 ports, if you failed to connect your cable to any one port of these 3 ports the isc-dhcp-server will fail to start because the port does not have a static address (without the cable plugged into the port), even if you set the static ip address in netplan.
So I would like to ask how to permanently assign a static address to a net port. To make it have an ipaddress before I plug in the cable... I need this because there are some ports on my server that currently I do not use (the cable is left unplugged), but I need isc-dhcp-server to start...
networking server network-manager ethernet dhcp
Are you using a desktop or server installation?
– heynnema
May 29 at 15:24
status please...
– heynnema
May 30 at 14:05
status please...
– heynnema
Jun 3 at 13:39
add a comment
|
I know that if I need to assign a static ip address I will need to use netplan
in Ubuntu 18.04, and I have done exactly that and made it work.
Here is my config file:
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: yes
enp131s0f0:
dhcp4: no
addresses: [10.66.0.1/24]
After I use netplan apply
, the ifconfig
command shows the ip address of enp131s0f0
set to 10.66.0.1
after I plug the cable into the port for "enp131s0f0". This causes a problem because if I do not plug in the cable to this port, the port itself won't get a static ip address even if the ipaddress is set in netplan, this will cause some services to fail to start (eg, isc-dhcp-server).
For example, if you have 3 ports and you have configured them like so:
network:
version: 2
renderer: networkd
ethernets:
enp131s0f0:
dhcp4: no
addresses: [10.66.0.1/24]
enp131s0f1:
dhcp4: no
addresses: [10.66.1.1/24]
enp131s0f2:
dhcp4: no
addresses: [10.66.2.1/24]
enp131s0f3:
dhcp4: no
addresses: [10.66.3.1/24]
If isc-dhcp-server is installed on all these 3 ports. The isc-dhcp-server will start only if you connect all 3 ports, if you failed to connect your cable to any one port of these 3 ports the isc-dhcp-server will fail to start because the port does not have a static address (without the cable plugged into the port), even if you set the static ip address in netplan.
So I would like to ask how to permanently assign a static address to a net port. To make it have an ipaddress before I plug in the cable... I need this because there are some ports on my server that currently I do not use (the cable is left unplugged), but I need isc-dhcp-server to start...
networking server network-manager ethernet dhcp
I know that if I need to assign a static ip address I will need to use netplan
in Ubuntu 18.04, and I have done exactly that and made it work.
Here is my config file:
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: yes
enp131s0f0:
dhcp4: no
addresses: [10.66.0.1/24]
After I use netplan apply
, the ifconfig
command shows the ip address of enp131s0f0
set to 10.66.0.1
after I plug the cable into the port for "enp131s0f0". This causes a problem because if I do not plug in the cable to this port, the port itself won't get a static ip address even if the ipaddress is set in netplan, this will cause some services to fail to start (eg, isc-dhcp-server).
For example, if you have 3 ports and you have configured them like so:
network:
version: 2
renderer: networkd
ethernets:
enp131s0f0:
dhcp4: no
addresses: [10.66.0.1/24]
enp131s0f1:
dhcp4: no
addresses: [10.66.1.1/24]
enp131s0f2:
dhcp4: no
addresses: [10.66.2.1/24]
enp131s0f3:
dhcp4: no
addresses: [10.66.3.1/24]
If isc-dhcp-server is installed on all these 3 ports. The isc-dhcp-server will start only if you connect all 3 ports, if you failed to connect your cable to any one port of these 3 ports the isc-dhcp-server will fail to start because the port does not have a static address (without the cable plugged into the port), even if you set the static ip address in netplan.
So I would like to ask how to permanently assign a static address to a net port. To make it have an ipaddress before I plug in the cable... I need this because there are some ports on my server that currently I do not use (the cable is left unplugged), but I need isc-dhcp-server to start...
networking server network-manager ethernet dhcp
networking server network-manager ethernet dhcp
edited May 29 at 15:40
Arronical
14.5k10 gold badges54 silver badges102 bronze badges
14.5k10 gold badges54 silver badges102 bronze badges
asked May 29 at 14:47
Reverie MetherlenceReverie Metherlence
61 bronze badge
61 bronze badge
Are you using a desktop or server installation?
– heynnema
May 29 at 15:24
status please...
– heynnema
May 30 at 14:05
status please...
– heynnema
Jun 3 at 13:39
add a comment
|
Are you using a desktop or server installation?
– heynnema
May 29 at 15:24
status please...
– heynnema
May 30 at 14:05
status please...
– heynnema
Jun 3 at 13:39
Are you using a desktop or server installation?
– heynnema
May 29 at 15:24
Are you using a desktop or server installation?
– heynnema
May 29 at 15:24
status please...
– heynnema
May 30 at 14:05
status please...
– heynnema
May 30 at 14:05
status please...
– heynnema
Jun 3 at 13:39
status please...
– heynnema
Jun 3 at 13:39
add a comment
|
1 Answer
1
active
oldest
votes
Here's a minimal .yaml file for your configuration... this assumes that 10.66.0.2 is an available static address on your network, and that 10.66.0.1 is the proper gateway...
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: true
enp4s0f0:
addresses: [10.66.0.2/24]
gateway4: 10.66.0.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
optional: true # may or may not be desired, to stop 2 minute boot delay
sudo netplan --debug generate
# generate config files
sudo netplan apply
# apply configuration
reboot
# reboot and verify operation
This doesn't seem to address the OP's concerns that having network cables unplugged on various NICs is causing problems. Your config resembles the OP's very closely, is the lack of a gateway address and nameserver what's causing the issue when a cable is unplugged?
– Arronical
May 29 at 15:44
@Arronical the primary problem is that OP tried to assign a static IP using (probably) the IP of the gateway.
– heynnema
May 29 at 15:52
That's a good point! I missed that. They're trying to install a DHCP server so perhaps they're trying to create some sort of router? The second example shows different values in the 3rd octet so may be a possibility?
– Arronical
May 29 at 16:01
@Arronical same problem there... assigning the IP to the gateway address.
– heynnema
May 29 at 16:02
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1147147%2fhow-to-assign-a-static-ip-address-before-eth-link-running-in-ubuntu-18-04-lts%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Here's a minimal .yaml file for your configuration... this assumes that 10.66.0.2 is an available static address on your network, and that 10.66.0.1 is the proper gateway...
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: true
enp4s0f0:
addresses: [10.66.0.2/24]
gateway4: 10.66.0.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
optional: true # may or may not be desired, to stop 2 minute boot delay
sudo netplan --debug generate
# generate config files
sudo netplan apply
# apply configuration
reboot
# reboot and verify operation
This doesn't seem to address the OP's concerns that having network cables unplugged on various NICs is causing problems. Your config resembles the OP's very closely, is the lack of a gateway address and nameserver what's causing the issue when a cable is unplugged?
– Arronical
May 29 at 15:44
@Arronical the primary problem is that OP tried to assign a static IP using (probably) the IP of the gateway.
– heynnema
May 29 at 15:52
That's a good point! I missed that. They're trying to install a DHCP server so perhaps they're trying to create some sort of router? The second example shows different values in the 3rd octet so may be a possibility?
– Arronical
May 29 at 16:01
@Arronical same problem there... assigning the IP to the gateway address.
– heynnema
May 29 at 16:02
add a comment
|
Here's a minimal .yaml file for your configuration... this assumes that 10.66.0.2 is an available static address on your network, and that 10.66.0.1 is the proper gateway...
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: true
enp4s0f0:
addresses: [10.66.0.2/24]
gateway4: 10.66.0.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
optional: true # may or may not be desired, to stop 2 minute boot delay
sudo netplan --debug generate
# generate config files
sudo netplan apply
# apply configuration
reboot
# reboot and verify operation
This doesn't seem to address the OP's concerns that having network cables unplugged on various NICs is causing problems. Your config resembles the OP's very closely, is the lack of a gateway address and nameserver what's causing the issue when a cable is unplugged?
– Arronical
May 29 at 15:44
@Arronical the primary problem is that OP tried to assign a static IP using (probably) the IP of the gateway.
– heynnema
May 29 at 15:52
That's a good point! I missed that. They're trying to install a DHCP server so perhaps they're trying to create some sort of router? The second example shows different values in the 3rd octet so may be a possibility?
– Arronical
May 29 at 16:01
@Arronical same problem there... assigning the IP to the gateway address.
– heynnema
May 29 at 16:02
add a comment
|
Here's a minimal .yaml file for your configuration... this assumes that 10.66.0.2 is an available static address on your network, and that 10.66.0.1 is the proper gateway...
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: true
enp4s0f0:
addresses: [10.66.0.2/24]
gateway4: 10.66.0.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
optional: true # may or may not be desired, to stop 2 minute boot delay
sudo netplan --debug generate
# generate config files
sudo netplan apply
# apply configuration
reboot
# reboot and verify operation
Here's a minimal .yaml file for your configuration... this assumes that 10.66.0.2 is an available static address on your network, and that 10.66.0.1 is the proper gateway...
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: true
enp4s0f0:
addresses: [10.66.0.2/24]
gateway4: 10.66.0.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
optional: true # may or may not be desired, to stop 2 minute boot delay
sudo netplan --debug generate
# generate config files
sudo netplan apply
# apply configuration
reboot
# reboot and verify operation
edited May 29 at 16:32
answered May 29 at 15:19
heynnemaheynnema
27.2k3 gold badges29 silver badges73 bronze badges
27.2k3 gold badges29 silver badges73 bronze badges
This doesn't seem to address the OP's concerns that having network cables unplugged on various NICs is causing problems. Your config resembles the OP's very closely, is the lack of a gateway address and nameserver what's causing the issue when a cable is unplugged?
– Arronical
May 29 at 15:44
@Arronical the primary problem is that OP tried to assign a static IP using (probably) the IP of the gateway.
– heynnema
May 29 at 15:52
That's a good point! I missed that. They're trying to install a DHCP server so perhaps they're trying to create some sort of router? The second example shows different values in the 3rd octet so may be a possibility?
– Arronical
May 29 at 16:01
@Arronical same problem there... assigning the IP to the gateway address.
– heynnema
May 29 at 16:02
add a comment
|
This doesn't seem to address the OP's concerns that having network cables unplugged on various NICs is causing problems. Your config resembles the OP's very closely, is the lack of a gateway address and nameserver what's causing the issue when a cable is unplugged?
– Arronical
May 29 at 15:44
@Arronical the primary problem is that OP tried to assign a static IP using (probably) the IP of the gateway.
– heynnema
May 29 at 15:52
That's a good point! I missed that. They're trying to install a DHCP server so perhaps they're trying to create some sort of router? The second example shows different values in the 3rd octet so may be a possibility?
– Arronical
May 29 at 16:01
@Arronical same problem there... assigning the IP to the gateway address.
– heynnema
May 29 at 16:02
This doesn't seem to address the OP's concerns that having network cables unplugged on various NICs is causing problems. Your config resembles the OP's very closely, is the lack of a gateway address and nameserver what's causing the issue when a cable is unplugged?
– Arronical
May 29 at 15:44
This doesn't seem to address the OP's concerns that having network cables unplugged on various NICs is causing problems. Your config resembles the OP's very closely, is the lack of a gateway address and nameserver what's causing the issue when a cable is unplugged?
– Arronical
May 29 at 15:44
@Arronical the primary problem is that OP tried to assign a static IP using (probably) the IP of the gateway.
– heynnema
May 29 at 15:52
@Arronical the primary problem is that OP tried to assign a static IP using (probably) the IP of the gateway.
– heynnema
May 29 at 15:52
That's a good point! I missed that. They're trying to install a DHCP server so perhaps they're trying to create some sort of router? The second example shows different values in the 3rd octet so may be a possibility?
– Arronical
May 29 at 16:01
That's a good point! I missed that. They're trying to install a DHCP server so perhaps they're trying to create some sort of router? The second example shows different values in the 3rd octet so may be a possibility?
– Arronical
May 29 at 16:01
@Arronical same problem there... assigning the IP to the gateway address.
– heynnema
May 29 at 16:02
@Arronical same problem there... assigning the IP to the gateway address.
– heynnema
May 29 at 16:02
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1147147%2fhow-to-assign-a-static-ip-address-before-eth-link-running-in-ubuntu-18-04-lts%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Are you using a desktop or server installation?
– heynnema
May 29 at 15:24
status please...
– heynnema
May 30 at 14:05
status please...
– heynnema
Jun 3 at 13:39