TIPS Sub Interface

spr41178

Member
Joined
Mar 10, 2022
Messages
52
Reaction score
5
Good afternoon,

On the Raspberry Pi is it possible to activate sub interfaces?

i.e i want on eth0 to be able to have and eth0:1 with a different ip that is pingable and accessible like the original one (eth0)

edit - i have achieved it with webmin as a virtual interface but where does it add the entry so i can edit it manually?

Thanks in advance
 
for Debian it should be in /etc/network/interfaces(.d/*)
 
for Debian it should be in /etc/network/interfaces(.d/*)
Funny enough it is not in there.
All i have is what i added as a static ip in dhcpcd.conf for wlan and eth0 despite the fact that webmin has activated a wlan0:1 sub interface which shows in ifconfig i cant seem to find it in the asterisk files.
 
It's not an as
Funny enough it is not in there.
All i have is what i added as a static ip in dhcpcd.conf for wlan and eth0 despite the fact that webmin has activated a wlan0:1 sub interface which shows in ifconfig i cant seem to find it in the asterisk files.
It's not an asterisk think, it's an OS thing, it's all in here



Multiple IP addresses on one Interface​

 
It's not an as

It's not an asterisk think, it's an OS thing, it's all in here



Multiple IP addresses on one Interface​

Ok so i added the following to the /etc/network/interfaces file

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.5.247
netmask 255.255.255.0

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.5.250
netmask 255.255.255.0
gateway 192.168.5.1
dns-nameservers 192.168.5.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

auto wlan0:1
allow-hotplug wlan0:1
iface wlan0:1 inet static
address 192.168.5.246
netmask 255.255.255.0

After that i disabled the dhcpcd service and it works fine.

One hickup is that the openvpn got messed up.
I followed originally the github procedure to set it up and it worked but after i added the lines
in the /interfaces file it is not working.

ifconfig shows it as active tun0 10.8.0.1 but missing from webmin (no tun0).
 
Pretty sure this is what i have set it up to begin with.

I will try to remove it and re-install it then now that i am using the /interfaces method and see if it comes up.

Thank you
ip add

will show better than webmin
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top