creating a static IP for ubuntu 17.04 server behind router
I have the following ifconfig:-
enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.21.0.11 netmask 255.255.240.0 broadcast 10.21.15.255
inet6 rr50::9r16:r57r:rrr6:rr86 prefixlen 64 scopeid 0x20<link>
ether 88:88:rr:8r:b8:88 txqueuelen 1000 (Ethernet)
RX packets 1283617 bytes 447482292 (447.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 777459 bytes 128121082 (128.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xf7100000-f7120000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 62037 bytes 26306447 (26.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 62037 bytes 26306447 (26.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Also my /etc/network/interfaces
looks like this:-
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
To assign a static IP i tried to add something like this from here:-
auto enp0s31f6
iface enp0s31f6 inet static
address 10.253.0.50
netmask 255.255.255.0
network 10.253.0.0
gateway 10.253.0.1
dns-nameservers 8.8.8.8
I save it with sudo and then on terminal type and enter: sudo ifdown enp0s31f6 && sudo ifup enp0s31f6
. This does not work. The goal was to enable nomachine access to this server machine from an outside client network. Doing this step led to loss of connection with the server immediately. The above ifconfig results is greek to me and i copied pasted from above SO answer. How to make this work? What are the correct values i should have given for the fields address, netmask, network, gateway.
networking network-manager dhcp nx nomachine
|
show 4 more comments
I have the following ifconfig:-
enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.21.0.11 netmask 255.255.240.0 broadcast 10.21.15.255
inet6 rr50::9r16:r57r:rrr6:rr86 prefixlen 64 scopeid 0x20<link>
ether 88:88:rr:8r:b8:88 txqueuelen 1000 (Ethernet)
RX packets 1283617 bytes 447482292 (447.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 777459 bytes 128121082 (128.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xf7100000-f7120000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 62037 bytes 26306447 (26.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 62037 bytes 26306447 (26.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Also my /etc/network/interfaces
looks like this:-
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
To assign a static IP i tried to add something like this from here:-
auto enp0s31f6
iface enp0s31f6 inet static
address 10.253.0.50
netmask 255.255.255.0
network 10.253.0.0
gateway 10.253.0.1
dns-nameservers 8.8.8.8
I save it with sudo and then on terminal type and enter: sudo ifdown enp0s31f6 && sudo ifup enp0s31f6
. This does not work. The goal was to enable nomachine access to this server machine from an outside client network. Doing this step led to loss of connection with the server immediately. The above ifconfig results is greek to me and i copied pasted from above SO answer. How to make this work? What are the correct values i should have given for the fields address, netmask, network, gateway.
networking network-manager dhcp nx nomachine
Your values are ok but still don't match your ifconfig.. did you trysudo service networking reload
? Of you are connected over ssh or something it's clear that you lose the connection if the IP changes or the network is not coming up correctly..
– derHugo
Jun 27 '17 at 5:40
And of course you add YOUR values for the IP and so on assuming your gateway is 10.21.0.1 thanaddress 10.21.0.11
netmask 255.255.240.0
gateway 10.21.0.1
dns-nameservers 8.8.8.8
(don't have to set network if you have set the others)
– derHugo
Jun 27 '17 at 5:48
@derHugo If the broadcast address via DHCP is 10.21.15.255, then I suspect that the gateway may be 10.21.15.1, but user_1_1_1 needs to verify:route -n
. Furthermore, I suggest a static address outside the DHCP pool which 10.21.0.11 is not.
– chili555
Jun 27 '17 at 12:30
No @chili555 I don't think so since his/her ip is 10.21.0.11 and netmask is 255.255.240.0 => IPs available are 10.21.0.1 - 10.21.15.254 ;) Anyway it's just an example
– derHugo
Jun 27 '17 at 15:11
Furthermore we don't know the DHCP pool actually since it may always be smaller than the network eg. 10.21.2.10-10.21.12.255; than the rest could be used by static IPs.
– derHugo
Jun 27 '17 at 16:56
|
show 4 more comments
I have the following ifconfig:-
enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.21.0.11 netmask 255.255.240.0 broadcast 10.21.15.255
inet6 rr50::9r16:r57r:rrr6:rr86 prefixlen 64 scopeid 0x20<link>
ether 88:88:rr:8r:b8:88 txqueuelen 1000 (Ethernet)
RX packets 1283617 bytes 447482292 (447.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 777459 bytes 128121082 (128.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xf7100000-f7120000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 62037 bytes 26306447 (26.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 62037 bytes 26306447 (26.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Also my /etc/network/interfaces
looks like this:-
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
To assign a static IP i tried to add something like this from here:-
auto enp0s31f6
iface enp0s31f6 inet static
address 10.253.0.50
netmask 255.255.255.0
network 10.253.0.0
gateway 10.253.0.1
dns-nameservers 8.8.8.8
I save it with sudo and then on terminal type and enter: sudo ifdown enp0s31f6 && sudo ifup enp0s31f6
. This does not work. The goal was to enable nomachine access to this server machine from an outside client network. Doing this step led to loss of connection with the server immediately. The above ifconfig results is greek to me and i copied pasted from above SO answer. How to make this work? What are the correct values i should have given for the fields address, netmask, network, gateway.
networking network-manager dhcp nx nomachine
I have the following ifconfig:-
enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.21.0.11 netmask 255.255.240.0 broadcast 10.21.15.255
inet6 rr50::9r16:r57r:rrr6:rr86 prefixlen 64 scopeid 0x20<link>
ether 88:88:rr:8r:b8:88 txqueuelen 1000 (Ethernet)
RX packets 1283617 bytes 447482292 (447.4 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 777459 bytes 128121082 (128.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xf7100000-f7120000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 62037 bytes 26306447 (26.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 62037 bytes 26306447 (26.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Also my /etc/network/interfaces
looks like this:-
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
To assign a static IP i tried to add something like this from here:-
auto enp0s31f6
iface enp0s31f6 inet static
address 10.253.0.50
netmask 255.255.255.0
network 10.253.0.0
gateway 10.253.0.1
dns-nameservers 8.8.8.8
I save it with sudo and then on terminal type and enter: sudo ifdown enp0s31f6 && sudo ifup enp0s31f6
. This does not work. The goal was to enable nomachine access to this server machine from an outside client network. Doing this step led to loss of connection with the server immediately. The above ifconfig results is greek to me and i copied pasted from above SO answer. How to make this work? What are the correct values i should have given for the fields address, netmask, network, gateway.
networking network-manager dhcp nx nomachine
networking network-manager dhcp nx nomachine
asked Jun 27 '17 at 5:33
user_1_1_1user_1_1_1
190413
190413
Your values are ok but still don't match your ifconfig.. did you trysudo service networking reload
? Of you are connected over ssh or something it's clear that you lose the connection if the IP changes or the network is not coming up correctly..
– derHugo
Jun 27 '17 at 5:40
And of course you add YOUR values for the IP and so on assuming your gateway is 10.21.0.1 thanaddress 10.21.0.11
netmask 255.255.240.0
gateway 10.21.0.1
dns-nameservers 8.8.8.8
(don't have to set network if you have set the others)
– derHugo
Jun 27 '17 at 5:48
@derHugo If the broadcast address via DHCP is 10.21.15.255, then I suspect that the gateway may be 10.21.15.1, but user_1_1_1 needs to verify:route -n
. Furthermore, I suggest a static address outside the DHCP pool which 10.21.0.11 is not.
– chili555
Jun 27 '17 at 12:30
No @chili555 I don't think so since his/her ip is 10.21.0.11 and netmask is 255.255.240.0 => IPs available are 10.21.0.1 - 10.21.15.254 ;) Anyway it's just an example
– derHugo
Jun 27 '17 at 15:11
Furthermore we don't know the DHCP pool actually since it may always be smaller than the network eg. 10.21.2.10-10.21.12.255; than the rest could be used by static IPs.
– derHugo
Jun 27 '17 at 16:56
|
show 4 more comments
Your values are ok but still don't match your ifconfig.. did you trysudo service networking reload
? Of you are connected over ssh or something it's clear that you lose the connection if the IP changes or the network is not coming up correctly..
– derHugo
Jun 27 '17 at 5:40
And of course you add YOUR values for the IP and so on assuming your gateway is 10.21.0.1 thanaddress 10.21.0.11
netmask 255.255.240.0
gateway 10.21.0.1
dns-nameservers 8.8.8.8
(don't have to set network if you have set the others)
– derHugo
Jun 27 '17 at 5:48
@derHugo If the broadcast address via DHCP is 10.21.15.255, then I suspect that the gateway may be 10.21.15.1, but user_1_1_1 needs to verify:route -n
. Furthermore, I suggest a static address outside the DHCP pool which 10.21.0.11 is not.
– chili555
Jun 27 '17 at 12:30
No @chili555 I don't think so since his/her ip is 10.21.0.11 and netmask is 255.255.240.0 => IPs available are 10.21.0.1 - 10.21.15.254 ;) Anyway it's just an example
– derHugo
Jun 27 '17 at 15:11
Furthermore we don't know the DHCP pool actually since it may always be smaller than the network eg. 10.21.2.10-10.21.12.255; than the rest could be used by static IPs.
– derHugo
Jun 27 '17 at 16:56
Your values are ok but still don't match your ifconfig.. did you try
sudo service networking reload
? Of you are connected over ssh or something it's clear that you lose the connection if the IP changes or the network is not coming up correctly..– derHugo
Jun 27 '17 at 5:40
Your values are ok but still don't match your ifconfig.. did you try
sudo service networking reload
? Of you are connected over ssh or something it's clear that you lose the connection if the IP changes or the network is not coming up correctly..– derHugo
Jun 27 '17 at 5:40
And of course you add YOUR values for the IP and so on assuming your gateway is 10.21.0.1 than
address 10.21.0.11
netmask 255.255.240.0
gateway 10.21.0.1
dns-nameservers 8.8.8.8
(don't have to set network if you have set the others)– derHugo
Jun 27 '17 at 5:48
And of course you add YOUR values for the IP and so on assuming your gateway is 10.21.0.1 than
address 10.21.0.11
netmask 255.255.240.0
gateway 10.21.0.1
dns-nameservers 8.8.8.8
(don't have to set network if you have set the others)– derHugo
Jun 27 '17 at 5:48
@derHugo If the broadcast address via DHCP is 10.21.15.255, then I suspect that the gateway may be 10.21.15.1, but user_1_1_1 needs to verify:
route -n
. Furthermore, I suggest a static address outside the DHCP pool which 10.21.0.11 is not.– chili555
Jun 27 '17 at 12:30
@derHugo If the broadcast address via DHCP is 10.21.15.255, then I suspect that the gateway may be 10.21.15.1, but user_1_1_1 needs to verify:
route -n
. Furthermore, I suggest a static address outside the DHCP pool which 10.21.0.11 is not.– chili555
Jun 27 '17 at 12:30
No @chili555 I don't think so since his/her ip is 10.21.0.11 and netmask is 255.255.240.0 => IPs available are 10.21.0.1 - 10.21.15.254 ;) Anyway it's just an example
– derHugo
Jun 27 '17 at 15:11
No @chili555 I don't think so since his/her ip is 10.21.0.11 and netmask is 255.255.240.0 => IPs available are 10.21.0.1 - 10.21.15.254 ;) Anyway it's just an example
– derHugo
Jun 27 '17 at 15:11
Furthermore we don't know the DHCP pool actually since it may always be smaller than the network eg. 10.21.2.10-10.21.12.255; than the rest could be used by static IPs.
– derHugo
Jun 27 '17 at 16:56
Furthermore we don't know the DHCP pool actually since it may always be smaller than the network eg. 10.21.2.10-10.21.12.255; than the rest could be used by static IPs.
– derHugo
Jun 27 '17 at 16:56
|
show 4 more comments
1 Answer
1
active
oldest
votes
17 doesnt use ifup/down anymore.. it uses netplan.. see the answer from this guy..
Ubuntu 17.10 will not accept static IP
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%2f929489%2fcreating-a-static-ip-for-ubuntu-17-04-server-behind-router%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
17 doesnt use ifup/down anymore.. it uses netplan.. see the answer from this guy..
Ubuntu 17.10 will not accept static IP
add a comment |
17 doesnt use ifup/down anymore.. it uses netplan.. see the answer from this guy..
Ubuntu 17.10 will not accept static IP
add a comment |
17 doesnt use ifup/down anymore.. it uses netplan.. see the answer from this guy..
Ubuntu 17.10 will not accept static IP
17 doesnt use ifup/down anymore.. it uses netplan.. see the answer from this guy..
Ubuntu 17.10 will not accept static IP
answered Nov 16 '17 at 7:04
Daniel SmithDaniel Smith
111
111
add a comment |
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%2f929489%2fcreating-a-static-ip-for-ubuntu-17-04-server-behind-router%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
Your values are ok but still don't match your ifconfig.. did you try
sudo service networking reload
? Of you are connected over ssh or something it's clear that you lose the connection if the IP changes or the network is not coming up correctly..– derHugo
Jun 27 '17 at 5:40
And of course you add YOUR values for the IP and so on assuming your gateway is 10.21.0.1 than
address 10.21.0.11
netmask 255.255.240.0
gateway 10.21.0.1
dns-nameservers 8.8.8.8
(don't have to set network if you have set the others)– derHugo
Jun 27 '17 at 5:48
@derHugo If the broadcast address via DHCP is 10.21.15.255, then I suspect that the gateway may be 10.21.15.1, but user_1_1_1 needs to verify:
route -n
. Furthermore, I suggest a static address outside the DHCP pool which 10.21.0.11 is not.– chili555
Jun 27 '17 at 12:30
No @chili555 I don't think so since his/her ip is 10.21.0.11 and netmask is 255.255.240.0 => IPs available are 10.21.0.1 - 10.21.15.254 ;) Anyway it's just an example
– derHugo
Jun 27 '17 at 15:11
Furthermore we don't know the DHCP pool actually since it may always be smaller than the network eg. 10.21.2.10-10.21.12.255; than the rest could be used by static IPs.
– derHugo
Jun 27 '17 at 16:56