Ubuntu 18.04 Static IP with NetPlan require reboot
I need to provide OVA with static IP.
I'm using clean Ubuntu 18.04 image and running (testing) on virtual box and vmware.
When I configure the IP address in the yaml file, and running the command:
sudo netplan apply
Nothing changes.
Only when I reboot the machine, the IP address changes.
This is what inside my yaml:
network:
version: 2
renderer:
ethernets:
enp0s3:
dhcp4: no
addresses: [10.0.2.100/24]
gateway4: 10.0.2.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
Typically, Linux does not require rebooting.
Please help me.
@heynnema
networking 18.04
add a comment |
I need to provide OVA with static IP.
I'm using clean Ubuntu 18.04 image and running (testing) on virtual box and vmware.
When I configure the IP address in the yaml file, and running the command:
sudo netplan apply
Nothing changes.
Only when I reboot the machine, the IP address changes.
This is what inside my yaml:
network:
version: 2
renderer:
ethernets:
enp0s3:
dhcp4: no
addresses: [10.0.2.100/24]
gateway4: 10.0.2.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
Typically, Linux does not require rebooting.
Please help me.
@heynnema
networking 18.04
@heynnema Can you help me?
– Nimitack
Dec 20 '18 at 10:34
FYI: changerederer:
torenderer: networkd
.
– heynnema
Dec 21 '18 at 15:46
FYI #2: usesudo netplan -debug generate
beforesudo netplan apply
.
– heynnema
Dec 21 '18 at 15:47
add a comment |
I need to provide OVA with static IP.
I'm using clean Ubuntu 18.04 image and running (testing) on virtual box and vmware.
When I configure the IP address in the yaml file, and running the command:
sudo netplan apply
Nothing changes.
Only when I reboot the machine, the IP address changes.
This is what inside my yaml:
network:
version: 2
renderer:
ethernets:
enp0s3:
dhcp4: no
addresses: [10.0.2.100/24]
gateway4: 10.0.2.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
Typically, Linux does not require rebooting.
Please help me.
@heynnema
networking 18.04
I need to provide OVA with static IP.
I'm using clean Ubuntu 18.04 image and running (testing) on virtual box and vmware.
When I configure the IP address in the yaml file, and running the command:
sudo netplan apply
Nothing changes.
Only when I reboot the machine, the IP address changes.
This is what inside my yaml:
network:
version: 2
renderer:
ethernets:
enp0s3:
dhcp4: no
addresses: [10.0.2.100/24]
gateway4: 10.0.2.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
Typically, Linux does not require rebooting.
Please help me.
@heynnema
networking 18.04
networking 18.04
edited Dec 20 '18 at 10:40
asked Dec 20 '18 at 10:33
Nimitack
1063
1063
@heynnema Can you help me?
– Nimitack
Dec 20 '18 at 10:34
FYI: changerederer:
torenderer: networkd
.
– heynnema
Dec 21 '18 at 15:46
FYI #2: usesudo netplan -debug generate
beforesudo netplan apply
.
– heynnema
Dec 21 '18 at 15:47
add a comment |
@heynnema Can you help me?
– Nimitack
Dec 20 '18 at 10:34
FYI: changerederer:
torenderer: networkd
.
– heynnema
Dec 21 '18 at 15:46
FYI #2: usesudo netplan -debug generate
beforesudo netplan apply
.
– heynnema
Dec 21 '18 at 15:47
@heynnema Can you help me?
– Nimitack
Dec 20 '18 at 10:34
@heynnema Can you help me?
– Nimitack
Dec 20 '18 at 10:34
FYI: change
rederer:
to renderer: networkd
.– heynnema
Dec 21 '18 at 15:46
FYI: change
rederer:
to renderer: networkd
.– heynnema
Dec 21 '18 at 15:46
FYI #2: use
sudo netplan -debug generate
before sudo netplan apply
.– heynnema
Dec 21 '18 at 15:47
FYI #2: use
sudo netplan -debug generate
before sudo netplan apply
.– heynnema
Dec 21 '18 at 15:47
add a comment |
1 Answer
1
active
oldest
votes
See if the ip
command will help...
Bring interfaces up or down
Previously users were used to using the ifconfig command. Users should now familiarize themselves with the more powerful ip
command. Manually modifying network devices is now accomplished via the ip
command.
As an example to bring up an interface and bring it back down:
ip link set enp0s3 up
ip link set enp0s3 down
See "man ip" for more information on how to manipulate the state of routing, network devices, interfaces and tunnels.
source: https://netplan.io/faq
The interface goes to down/up, but IP doesn’t change.
– Nimitack
Dec 23 '18 at 8:27
You might look atip address { add | change | replace } IFADDR dev IFNAME
, and otherip address
commands.
– heynnema
Dec 23 '18 at 15:12
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/3.0/"u003ecc by-sa 3.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%2f1103322%2fubuntu-18-04-static-ip-with-netplan-require-reboot%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
See if the ip
command will help...
Bring interfaces up or down
Previously users were used to using the ifconfig command. Users should now familiarize themselves with the more powerful ip
command. Manually modifying network devices is now accomplished via the ip
command.
As an example to bring up an interface and bring it back down:
ip link set enp0s3 up
ip link set enp0s3 down
See "man ip" for more information on how to manipulate the state of routing, network devices, interfaces and tunnels.
source: https://netplan.io/faq
The interface goes to down/up, but IP doesn’t change.
– Nimitack
Dec 23 '18 at 8:27
You might look atip address { add | change | replace } IFADDR dev IFNAME
, and otherip address
commands.
– heynnema
Dec 23 '18 at 15:12
add a comment |
See if the ip
command will help...
Bring interfaces up or down
Previously users were used to using the ifconfig command. Users should now familiarize themselves with the more powerful ip
command. Manually modifying network devices is now accomplished via the ip
command.
As an example to bring up an interface and bring it back down:
ip link set enp0s3 up
ip link set enp0s3 down
See "man ip" for more information on how to manipulate the state of routing, network devices, interfaces and tunnels.
source: https://netplan.io/faq
The interface goes to down/up, but IP doesn’t change.
– Nimitack
Dec 23 '18 at 8:27
You might look atip address { add | change | replace } IFADDR dev IFNAME
, and otherip address
commands.
– heynnema
Dec 23 '18 at 15:12
add a comment |
See if the ip
command will help...
Bring interfaces up or down
Previously users were used to using the ifconfig command. Users should now familiarize themselves with the more powerful ip
command. Manually modifying network devices is now accomplished via the ip
command.
As an example to bring up an interface and bring it back down:
ip link set enp0s3 up
ip link set enp0s3 down
See "man ip" for more information on how to manipulate the state of routing, network devices, interfaces and tunnels.
source: https://netplan.io/faq
See if the ip
command will help...
Bring interfaces up or down
Previously users were used to using the ifconfig command. Users should now familiarize themselves with the more powerful ip
command. Manually modifying network devices is now accomplished via the ip
command.
As an example to bring up an interface and bring it back down:
ip link set enp0s3 up
ip link set enp0s3 down
See "man ip" for more information on how to manipulate the state of routing, network devices, interfaces and tunnels.
source: https://netplan.io/faq
edited Dec 22 '18 at 15:19
answered Dec 20 '18 at 15:17
heynnema
18.1k22054
18.1k22054
The interface goes to down/up, but IP doesn’t change.
– Nimitack
Dec 23 '18 at 8:27
You might look atip address { add | change | replace } IFADDR dev IFNAME
, and otherip address
commands.
– heynnema
Dec 23 '18 at 15:12
add a comment |
The interface goes to down/up, but IP doesn’t change.
– Nimitack
Dec 23 '18 at 8:27
You might look atip address { add | change | replace } IFADDR dev IFNAME
, and otherip address
commands.
– heynnema
Dec 23 '18 at 15:12
The interface goes to down/up, but IP doesn’t change.
– Nimitack
Dec 23 '18 at 8:27
The interface goes to down/up, but IP doesn’t change.
– Nimitack
Dec 23 '18 at 8:27
You might look at
ip address { add | change | replace } IFADDR dev IFNAME
, and other ip address
commands.– heynnema
Dec 23 '18 at 15:12
You might look at
ip address { add | change | replace } IFADDR dev IFNAME
, and other ip address
commands.– heynnema
Dec 23 '18 at 15:12
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f1103322%2fubuntu-18-04-static-ip-with-netplan-require-reboot%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
@heynnema Can you help me?
– Nimitack
Dec 20 '18 at 10:34
FYI: change
rederer:
torenderer: networkd
.– heynnema
Dec 21 '18 at 15:46
FYI #2: use
sudo netplan -debug generate
beforesudo netplan apply
.– heynnema
Dec 21 '18 at 15:47