How to use Netplan in Ubuntu 17.10 to add IP addresses for Wireless iface

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












Being solely wifi connected, I successfully used the following 'etc/network/ifup.d' script in 16.04 to set up extra local IP addresses when my wireless interface came up. In 17.10 I'm being told to use Netplan. However, I'm finding little support for this kind of activity and wireless in general. Can anyone help with a simple Netplan YAML equivalent, please? My wireless interface is ID'd as wlan0 when it's up.



#!/bin/sh
# this script creates additional ip addresses using the wlan0 interface
# for local server-based applications to be accessible from other local devices
if [ "$IFACE" != lo ]; then
ip addr add 192.168.1.8/24 dev wlan0
ip addr add 192.168.1.9/24 dev wlan0
fi









share|improve this question























  • Please use the button above the edit window to format code, output, and error messages.
    – user68186
    Apr 17 at 17:14














up vote
1
down vote

favorite












Being solely wifi connected, I successfully used the following 'etc/network/ifup.d' script in 16.04 to set up extra local IP addresses when my wireless interface came up. In 17.10 I'm being told to use Netplan. However, I'm finding little support for this kind of activity and wireless in general. Can anyone help with a simple Netplan YAML equivalent, please? My wireless interface is ID'd as wlan0 when it's up.



#!/bin/sh
# this script creates additional ip addresses using the wlan0 interface
# for local server-based applications to be accessible from other local devices
if [ "$IFACE" != lo ]; then
ip addr add 192.168.1.8/24 dev wlan0
ip addr add 192.168.1.9/24 dev wlan0
fi









share|improve this question























  • Please use the button above the edit window to format code, output, and error messages.
    – user68186
    Apr 17 at 17:14












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Being solely wifi connected, I successfully used the following 'etc/network/ifup.d' script in 16.04 to set up extra local IP addresses when my wireless interface came up. In 17.10 I'm being told to use Netplan. However, I'm finding little support for this kind of activity and wireless in general. Can anyone help with a simple Netplan YAML equivalent, please? My wireless interface is ID'd as wlan0 when it's up.



#!/bin/sh
# this script creates additional ip addresses using the wlan0 interface
# for local server-based applications to be accessible from other local devices
if [ "$IFACE" != lo ]; then
ip addr add 192.168.1.8/24 dev wlan0
ip addr add 192.168.1.9/24 dev wlan0
fi









share|improve this question















Being solely wifi connected, I successfully used the following 'etc/network/ifup.d' script in 16.04 to set up extra local IP addresses when my wireless interface came up. In 17.10 I'm being told to use Netplan. However, I'm finding little support for this kind of activity and wireless in general. Can anyone help with a simple Netplan YAML equivalent, please? My wireless interface is ID'd as wlan0 when it's up.



#!/bin/sh
# this script creates additional ip addresses using the wlan0 interface
# for local server-based applications to be accessible from other local devices
if [ "$IFACE" != lo ]; then
ip addr add 192.168.1.8/24 dev wlan0
ip addr add 192.168.1.9/24 dev wlan0
fi






17.10 netplan






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 17 at 17:13









user68186

14.3k84360




14.3k84360










asked Apr 17 at 17:09









Lemon Dexter

84




84











  • Please use the button above the edit window to format code, output, and error messages.
    – user68186
    Apr 17 at 17:14
















  • Please use the button above the edit window to format code, output, and error messages.
    – user68186
    Apr 17 at 17:14















Please use the button above the edit window to format code, output, and error messages.
– user68186
Apr 17 at 17:14




Please use the button above the edit window to format code, output, and error messages.
– user68186
Apr 17 at 17:14










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










You can find information on configuring wireless interfaces and assigning multiple IP addresses to the same interface at https://netplan.io .



Specifically something like the following is likely what you want (assuming you are using DHCP and adding static addresses, you don't really say)...



network:
version: 2
renderer: networkd
wifis:
wlp2s0b1:
dhcp4: yes
dhcp6: no
addresses: [192.168.1.8/24, 192.168.1.9/24]
access-points:
"network_ssid_name":
password: "**********"





share|improve this answer






















  • OK thanks everyone. I had in fact tried this (from the examples) however in debug mode it threw out a last line "definition wlan0 is not for us (backend 2)" which I took to be an error. In fact it had been working all along!
    – Lemon Dexter
    Apr 18 at 15:16











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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
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%2f1025883%2fhow-to-use-netplan-in-ubuntu-17-10-to-add-ip-addresses-for-wireless-iface%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










You can find information on configuring wireless interfaces and assigning multiple IP addresses to the same interface at https://netplan.io .



Specifically something like the following is likely what you want (assuming you are using DHCP and adding static addresses, you don't really say)...



network:
version: 2
renderer: networkd
wifis:
wlp2s0b1:
dhcp4: yes
dhcp6: no
addresses: [192.168.1.8/24, 192.168.1.9/24]
access-points:
"network_ssid_name":
password: "**********"





share|improve this answer






















  • OK thanks everyone. I had in fact tried this (from the examples) however in debug mode it threw out a last line "definition wlan0 is not for us (backend 2)" which I took to be an error. In fact it had been working all along!
    – Lemon Dexter
    Apr 18 at 15:16















up vote
1
down vote



accepted










You can find information on configuring wireless interfaces and assigning multiple IP addresses to the same interface at https://netplan.io .



Specifically something like the following is likely what you want (assuming you are using DHCP and adding static addresses, you don't really say)...



network:
version: 2
renderer: networkd
wifis:
wlp2s0b1:
dhcp4: yes
dhcp6: no
addresses: [192.168.1.8/24, 192.168.1.9/24]
access-points:
"network_ssid_name":
password: "**********"





share|improve this answer






















  • OK thanks everyone. I had in fact tried this (from the examples) however in debug mode it threw out a last line "definition wlan0 is not for us (backend 2)" which I took to be an error. In fact it had been working all along!
    – Lemon Dexter
    Apr 18 at 15:16













up vote
1
down vote



accepted







up vote
1
down vote



accepted






You can find information on configuring wireless interfaces and assigning multiple IP addresses to the same interface at https://netplan.io .



Specifically something like the following is likely what you want (assuming you are using DHCP and adding static addresses, you don't really say)...



network:
version: 2
renderer: networkd
wifis:
wlp2s0b1:
dhcp4: yes
dhcp6: no
addresses: [192.168.1.8/24, 192.168.1.9/24]
access-points:
"network_ssid_name":
password: "**********"





share|improve this answer














You can find information on configuring wireless interfaces and assigning multiple IP addresses to the same interface at https://netplan.io .



Specifically something like the following is likely what you want (assuming you are using DHCP and adding static addresses, you don't really say)...



network:
version: 2
renderer: networkd
wifis:
wlp2s0b1:
dhcp4: yes
dhcp6: no
addresses: [192.168.1.8/24, 192.168.1.9/24]
access-points:
"network_ssid_name":
password: "**********"






share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 18 at 3:06









dpb

4,90911545




4,90911545










answered Apr 17 at 21:30









slangasek

2,27811318




2,27811318











  • OK thanks everyone. I had in fact tried this (from the examples) however in debug mode it threw out a last line "definition wlan0 is not for us (backend 2)" which I took to be an error. In fact it had been working all along!
    – Lemon Dexter
    Apr 18 at 15:16

















  • OK thanks everyone. I had in fact tried this (from the examples) however in debug mode it threw out a last line "definition wlan0 is not for us (backend 2)" which I took to be an error. In fact it had been working all along!
    – Lemon Dexter
    Apr 18 at 15:16
















OK thanks everyone. I had in fact tried this (from the examples) however in debug mode it threw out a last line "definition wlan0 is not for us (backend 2)" which I took to be an error. In fact it had been working all along!
– Lemon Dexter
Apr 18 at 15:16





OK thanks everyone. I had in fact tried this (from the examples) however in debug mode it threw out a last line "definition wlan0 is not for us (backend 2)" which I took to be an error. In fact it had been working all along!
– Lemon Dexter
Apr 18 at 15:16


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1025883%2fhow-to-use-netplan-in-ubuntu-17-10-to-add-ip-addresses-for-wireless-iface%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491