Ubuntu 18.04 new second IP not working












0















On my VPS i have 2 ip-adresses. Now the hosting company changed my second ip-adress.
I changed the ip-adress in the /etc/netplan/*.yaml to the new one, but the new one does not work, sites not work and can't ping the new IP.
Here my config file:



network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: no
dhcp6: no
addresses: [5.157.82.219/23, 185.37.68.40/24]
gateway4: 5.157.82.1
nameservers:
addresses: [109.235.76.162,93.94.226.236,85.158.203.252,85.158.200.76,8.8.8.8]


I just replaced the second ip, anyone maybe know why its not working?





VPS IP settings
Here a screenshot from the account page










share|improve this question

























  • Did you do a sudo netplan --debug generate and a sudo netplan apply? And I just noticed... the second address isn't even on the same subnet. And why is one netmask = 23 and the other = 24?

    – heynnema
    Mar 10 at 0:36













  • Please edit such text as an edit into your original question. It's impossible to read in the comments. Thanks!

    – heynnema
    Mar 10 at 13:59











  • Can't edit in the commands.. i will try your settings

    – Rick
    Mar 10 at 16:02











  • No, you can't edit the comments after 4 minutes. You need to redo the command, copy the output to the clipboard, edit your question, paste the clipboard at the end of your text, select the pasted text, and format it with the {} icon.

    – heynnema
    Mar 10 at 16:19
















0















On my VPS i have 2 ip-adresses. Now the hosting company changed my second ip-adress.
I changed the ip-adress in the /etc/netplan/*.yaml to the new one, but the new one does not work, sites not work and can't ping the new IP.
Here my config file:



network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: no
dhcp6: no
addresses: [5.157.82.219/23, 185.37.68.40/24]
gateway4: 5.157.82.1
nameservers:
addresses: [109.235.76.162,93.94.226.236,85.158.203.252,85.158.200.76,8.8.8.8]


I just replaced the second ip, anyone maybe know why its not working?





VPS IP settings
Here a screenshot from the account page










share|improve this question

























  • Did you do a sudo netplan --debug generate and a sudo netplan apply? And I just noticed... the second address isn't even on the same subnet. And why is one netmask = 23 and the other = 24?

    – heynnema
    Mar 10 at 0:36













  • Please edit such text as an edit into your original question. It's impossible to read in the comments. Thanks!

    – heynnema
    Mar 10 at 13:59











  • Can't edit in the commands.. i will try your settings

    – Rick
    Mar 10 at 16:02











  • No, you can't edit the comments after 4 minutes. You need to redo the command, copy the output to the clipboard, edit your question, paste the clipboard at the end of your text, select the pasted text, and format it with the {} icon.

    – heynnema
    Mar 10 at 16:19














0












0








0








On my VPS i have 2 ip-adresses. Now the hosting company changed my second ip-adress.
I changed the ip-adress in the /etc/netplan/*.yaml to the new one, but the new one does not work, sites not work and can't ping the new IP.
Here my config file:



network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: no
dhcp6: no
addresses: [5.157.82.219/23, 185.37.68.40/24]
gateway4: 5.157.82.1
nameservers:
addresses: [109.235.76.162,93.94.226.236,85.158.203.252,85.158.200.76,8.8.8.8]


I just replaced the second ip, anyone maybe know why its not working?





VPS IP settings
Here a screenshot from the account page










share|improve this question
















On my VPS i have 2 ip-adresses. Now the hosting company changed my second ip-adress.
I changed the ip-adress in the /etc/netplan/*.yaml to the new one, but the new one does not work, sites not work and can't ping the new IP.
Here my config file:



network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: no
dhcp6: no
addresses: [5.157.82.219/23, 185.37.68.40/24]
gateway4: 5.157.82.1
nameservers:
addresses: [109.235.76.162,93.94.226.236,85.158.203.252,85.158.200.76,8.8.8.8]


I just replaced the second ip, anyone maybe know why its not working?





VPS IP settings
Here a screenshot from the account page







networking 18.04






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 10 at 20:08









fossfreedom

150k37329374




150k37329374










asked Mar 9 at 22:14









RickRick

31




31













  • Did you do a sudo netplan --debug generate and a sudo netplan apply? And I just noticed... the second address isn't even on the same subnet. And why is one netmask = 23 and the other = 24?

    – heynnema
    Mar 10 at 0:36













  • Please edit such text as an edit into your original question. It's impossible to read in the comments. Thanks!

    – heynnema
    Mar 10 at 13:59











  • Can't edit in the commands.. i will try your settings

    – Rick
    Mar 10 at 16:02











  • No, you can't edit the comments after 4 minutes. You need to redo the command, copy the output to the clipboard, edit your question, paste the clipboard at the end of your text, select the pasted text, and format it with the {} icon.

    – heynnema
    Mar 10 at 16:19



















  • Did you do a sudo netplan --debug generate and a sudo netplan apply? And I just noticed... the second address isn't even on the same subnet. And why is one netmask = 23 and the other = 24?

    – heynnema
    Mar 10 at 0:36













  • Please edit such text as an edit into your original question. It's impossible to read in the comments. Thanks!

    – heynnema
    Mar 10 at 13:59











  • Can't edit in the commands.. i will try your settings

    – Rick
    Mar 10 at 16:02











  • No, you can't edit the comments after 4 minutes. You need to redo the command, copy the output to the clipboard, edit your question, paste the clipboard at the end of your text, select the pasted text, and format it with the {} icon.

    – heynnema
    Mar 10 at 16:19

















Did you do a sudo netplan --debug generate and a sudo netplan apply? And I just noticed... the second address isn't even on the same subnet. And why is one netmask = 23 and the other = 24?

– heynnema
Mar 10 at 0:36







Did you do a sudo netplan --debug generate and a sudo netplan apply? And I just noticed... the second address isn't even on the same subnet. And why is one netmask = 23 and the other = 24?

– heynnema
Mar 10 at 0:36















Please edit such text as an edit into your original question. It's impossible to read in the comments. Thanks!

– heynnema
Mar 10 at 13:59





Please edit such text as an edit into your original question. It's impossible to read in the comments. Thanks!

– heynnema
Mar 10 at 13:59













Can't edit in the commands.. i will try your settings

– Rick
Mar 10 at 16:02





Can't edit in the commands.. i will try your settings

– Rick
Mar 10 at 16:02













No, you can't edit the comments after 4 minutes. You need to redo the command, copy the output to the clipboard, edit your question, paste the clipboard at the end of your text, select the pasted text, and format it with the {} icon.

– heynnema
Mar 10 at 16:19





No, you can't edit the comments after 4 minutes. You need to redo the command, copy the output to the clipboard, edit your question, paste the clipboard at the end of your text, select the pasted text, and format it with the {} icon.

– heynnema
Mar 10 at 16:19










1 Answer
1






active

oldest

votes


















0














Try this. Use copy/paste ALL of the text, to update your .yaml file.



network:
version: 2
renderer: networkd
ethernets:
ens3:
addresses:
- 5.157.82.219/23
- 185.37.68.40/24
#gateway4: 5.157.82.1 # not used with routes
routes:
- to: 0.0.0.0/0
via: 5.157.82.1
metric: 100
- to: 0.0.0.0/0
via: 185.37.68.1
metric: 100
nameservers:
addresses:
- 5.157.86.220
- 5.157.87.220
- 5.157.86.221


sudo netplan --debug generate



sudo netplan apply






share|improve this answer


























  • Same, first IP is working, second not. i don't get it. before the ip change these settings where working.

    – Rick
    Mar 10 at 16:04











  • Also does not work on DHCP

    – Rick
    Mar 10 at 16:04











  • @Rick try my new edit. Report back.

    – heynnema
    Mar 10 at 16:13











  • Sorry still not working :( I don't get that with the old IP it just workt, new ip, change just the ip in config and its not working. Could it be a fault with the hosting company?

    – Rick
    Mar 10 at 16:31











  • You need to ask what's the correct gateway for the 2nd address... I guessed it was 185.37.68.1, but if it's different, you'll have to edit in the correct address. OR... is the new address supposed to REPLACE the first address? Did you copy/paste my entire text? What are you actually expecting to work differently with the addition of the 2nd address?

    – heynnema
    Mar 10 at 16:34













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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1124408%2fubuntu-18-04-new-second-ip-not-working%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









0














Try this. Use copy/paste ALL of the text, to update your .yaml file.



network:
version: 2
renderer: networkd
ethernets:
ens3:
addresses:
- 5.157.82.219/23
- 185.37.68.40/24
#gateway4: 5.157.82.1 # not used with routes
routes:
- to: 0.0.0.0/0
via: 5.157.82.1
metric: 100
- to: 0.0.0.0/0
via: 185.37.68.1
metric: 100
nameservers:
addresses:
- 5.157.86.220
- 5.157.87.220
- 5.157.86.221


sudo netplan --debug generate



sudo netplan apply






share|improve this answer


























  • Same, first IP is working, second not. i don't get it. before the ip change these settings where working.

    – Rick
    Mar 10 at 16:04











  • Also does not work on DHCP

    – Rick
    Mar 10 at 16:04











  • @Rick try my new edit. Report back.

    – heynnema
    Mar 10 at 16:13











  • Sorry still not working :( I don't get that with the old IP it just workt, new ip, change just the ip in config and its not working. Could it be a fault with the hosting company?

    – Rick
    Mar 10 at 16:31











  • You need to ask what's the correct gateway for the 2nd address... I guessed it was 185.37.68.1, but if it's different, you'll have to edit in the correct address. OR... is the new address supposed to REPLACE the first address? Did you copy/paste my entire text? What are you actually expecting to work differently with the addition of the 2nd address?

    – heynnema
    Mar 10 at 16:34


















0














Try this. Use copy/paste ALL of the text, to update your .yaml file.



network:
version: 2
renderer: networkd
ethernets:
ens3:
addresses:
- 5.157.82.219/23
- 185.37.68.40/24
#gateway4: 5.157.82.1 # not used with routes
routes:
- to: 0.0.0.0/0
via: 5.157.82.1
metric: 100
- to: 0.0.0.0/0
via: 185.37.68.1
metric: 100
nameservers:
addresses:
- 5.157.86.220
- 5.157.87.220
- 5.157.86.221


sudo netplan --debug generate



sudo netplan apply






share|improve this answer


























  • Same, first IP is working, second not. i don't get it. before the ip change these settings where working.

    – Rick
    Mar 10 at 16:04











  • Also does not work on DHCP

    – Rick
    Mar 10 at 16:04











  • @Rick try my new edit. Report back.

    – heynnema
    Mar 10 at 16:13











  • Sorry still not working :( I don't get that with the old IP it just workt, new ip, change just the ip in config and its not working. Could it be a fault with the hosting company?

    – Rick
    Mar 10 at 16:31











  • You need to ask what's the correct gateway for the 2nd address... I guessed it was 185.37.68.1, but if it's different, you'll have to edit in the correct address. OR... is the new address supposed to REPLACE the first address? Did you copy/paste my entire text? What are you actually expecting to work differently with the addition of the 2nd address?

    – heynnema
    Mar 10 at 16:34
















0












0








0







Try this. Use copy/paste ALL of the text, to update your .yaml file.



network:
version: 2
renderer: networkd
ethernets:
ens3:
addresses:
- 5.157.82.219/23
- 185.37.68.40/24
#gateway4: 5.157.82.1 # not used with routes
routes:
- to: 0.0.0.0/0
via: 5.157.82.1
metric: 100
- to: 0.0.0.0/0
via: 185.37.68.1
metric: 100
nameservers:
addresses:
- 5.157.86.220
- 5.157.87.220
- 5.157.86.221


sudo netplan --debug generate



sudo netplan apply






share|improve this answer















Try this. Use copy/paste ALL of the text, to update your .yaml file.



network:
version: 2
renderer: networkd
ethernets:
ens3:
addresses:
- 5.157.82.219/23
- 185.37.68.40/24
#gateway4: 5.157.82.1 # not used with routes
routes:
- to: 0.0.0.0/0
via: 5.157.82.1
metric: 100
- to: 0.0.0.0/0
via: 185.37.68.1
metric: 100
nameservers:
addresses:
- 5.157.86.220
- 5.157.87.220
- 5.157.86.221


sudo netplan --debug generate



sudo netplan apply







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 10 at 19:45

























answered Mar 10 at 13:46









heynnemaheynnema

20.3k22258




20.3k22258













  • Same, first IP is working, second not. i don't get it. before the ip change these settings where working.

    – Rick
    Mar 10 at 16:04











  • Also does not work on DHCP

    – Rick
    Mar 10 at 16:04











  • @Rick try my new edit. Report back.

    – heynnema
    Mar 10 at 16:13











  • Sorry still not working :( I don't get that with the old IP it just workt, new ip, change just the ip in config and its not working. Could it be a fault with the hosting company?

    – Rick
    Mar 10 at 16:31











  • You need to ask what's the correct gateway for the 2nd address... I guessed it was 185.37.68.1, but if it's different, you'll have to edit in the correct address. OR... is the new address supposed to REPLACE the first address? Did you copy/paste my entire text? What are you actually expecting to work differently with the addition of the 2nd address?

    – heynnema
    Mar 10 at 16:34





















  • Same, first IP is working, second not. i don't get it. before the ip change these settings where working.

    – Rick
    Mar 10 at 16:04











  • Also does not work on DHCP

    – Rick
    Mar 10 at 16:04











  • @Rick try my new edit. Report back.

    – heynnema
    Mar 10 at 16:13











  • Sorry still not working :( I don't get that with the old IP it just workt, new ip, change just the ip in config and its not working. Could it be a fault with the hosting company?

    – Rick
    Mar 10 at 16:31











  • You need to ask what's the correct gateway for the 2nd address... I guessed it was 185.37.68.1, but if it's different, you'll have to edit in the correct address. OR... is the new address supposed to REPLACE the first address? Did you copy/paste my entire text? What are you actually expecting to work differently with the addition of the 2nd address?

    – heynnema
    Mar 10 at 16:34



















Same, first IP is working, second not. i don't get it. before the ip change these settings where working.

– Rick
Mar 10 at 16:04





Same, first IP is working, second not. i don't get it. before the ip change these settings where working.

– Rick
Mar 10 at 16:04













Also does not work on DHCP

– Rick
Mar 10 at 16:04





Also does not work on DHCP

– Rick
Mar 10 at 16:04













@Rick try my new edit. Report back.

– heynnema
Mar 10 at 16:13





@Rick try my new edit. Report back.

– heynnema
Mar 10 at 16:13













Sorry still not working :( I don't get that with the old IP it just workt, new ip, change just the ip in config and its not working. Could it be a fault with the hosting company?

– Rick
Mar 10 at 16:31





Sorry still not working :( I don't get that with the old IP it just workt, new ip, change just the ip in config and its not working. Could it be a fault with the hosting company?

– Rick
Mar 10 at 16:31













You need to ask what's the correct gateway for the 2nd address... I guessed it was 185.37.68.1, but if it's different, you'll have to edit in the correct address. OR... is the new address supposed to REPLACE the first address? Did you copy/paste my entire text? What are you actually expecting to work differently with the addition of the 2nd address?

– heynnema
Mar 10 at 16:34







You need to ask what's the correct gateway for the 2nd address... I guessed it was 185.37.68.1, but if it's different, you'll have to edit in the correct address. OR... is the new address supposed to REPLACE the first address? Did you copy/paste my entire text? What are you actually expecting to work differently with the addition of the 2nd address?

– heynnema
Mar 10 at 16:34




















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1124408%2fubuntu-18-04-new-second-ip-not-working%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

How did Captain America manage to do this?

迪纳利

南乌拉尔铁路局