How to use Netplan in Ubuntu 17.10 to add IP addresses for Wireless iface
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
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
17.10 netplan
add a comment |Â
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
17.10 netplan
Please use the button above the edit window to format code, output, and error messages.
â user68186
Apr 17 at 17:14
add a comment |Â
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
17.10 netplan
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
17.10 netplan
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
add a comment |Â
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
add a comment |Â
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: "**********"
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
add a comment |Â
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: "**********"
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
add a comment |Â
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: "**********"
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
add a comment |Â
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: "**********"
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: "**********"
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
add a comment |Â
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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
Please use the button above the edit window to format code, output, and error messages.
â user68186
Apr 17 at 17:14