You are not logged in.

#1 2014-01-19 08:53:07

Dorg
Member
Registered: 2013-05-08
Posts: 4

SOLVED! Subinterfaces not working

I know there is a raspberry pi specific forum but I am guessing this functionality is not specific to Raspberry Pi.

I got a second usb nic for the pi but found out it takes too much power for my version of the RaspPi so my solution requires using subinterfaces.  Problem is I have not been able to figure out how to create them.  I have tried using IP, netctl and looked into netcfg(deprecated apparently?) and lastly I tried to set one up with Ifconfig knowing that any changes made with it would be wiped on reboot.  I figured I could just create an init script to make the interfaces and assign the ip addresses and then reboot and services that required said interfaces.  No go.  Any help would be lovely.

Netctl profiles I created didn't create subinterfaces.  In fact the one profile I made for eth0 didn't even properly configure it for static even though I read the documentation and followed various faqs and tried multiple permutations.  Am I just missing something basic?

Last edited by Dorg (2014-01-24 10:03:15)

Offline

#2 2014-01-19 09:19:10

Dorg
Member
Registered: 2013-05-08
Posts: 4

Re: SOLVED! Subinterfaces not working

Okay, I found where I was making some syntax errors.

The command I needed is "ip link add type veth".  However, I get this as a response: "RTNETLINK answers: Operation not supported". 

It seems this is related to veth kernel module.  Thing is Kernel 3.10.27-1-ARCH doesn't seem to have veth or support it. A "modprobe veth" returns with module not found.  Trying to find a way to download/compile it into arch but heading into new territory and would love some direction.

EDIT - Just read the code for the veth kernel module and it uses the name of the driver.  I am guessing this means that RTNETLINK is the driver and is responding properly.  I.e. is it not a veth module because the driver and veth module is loaded but the hardware just doesn't support virtual interfaces.  Would love for someone to tell me I am wrong.

Last edited by Dorg (2014-01-19 09:42:01)

Offline

#3 2014-01-19 11:09:26

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: SOLVED! Subinterfaces not working

Did you update your kernel without rebooting? I call the following alias when a module load fails to test it.

alias kernel-test='[ -d "/usr/lib/modules/$(uname -r)" ] || echo "Kernel has been updated. Please reboot."'

To add your link, maybe try something like this. As type choose either veth, vlan or macvlan. I don't know what suits you best.

ip link add link eth0 dev eth0.sub type veth address aa:aa:aa:aa:aa:aa

Last edited by progandy (2014-01-19 11:11:08)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2014-01-19 13:34:22

Dorg
Member
Registered: 2013-05-08
Posts: 4

Re: SOLVED! Subinterfaces not working

I did pacman -Syu and I believe there was a kernel update.  However, I did reboot as anything with the kernel requires such.  I do not see the module loaded with an lsmod.  Nothing happened when I typed "kernel-test".  Now that I look at it, the alias needs to be called in a particular way. Not sure how it is meant to be used.  Rather tired at this point.  Been researching networking on this pi/arch all day.

As usual the ip link command returns: "operation not supported".

Last edited by Dorg (2014-01-19 13:37:55)

Offline

#5 2014-01-19 15:49:37

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: SOLVED! Subinterfaces not working

Dorg wrote:

Now that I look at it, the alias needs to be called in a particular way.

The alias only tests if there is a modules directory for the currently running kernel version. Missing module directory equals updated kernel without reboot.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2014-01-24 10:02:20

Dorg
Member
Registered: 2013-05-08
Posts: 4

Re: SOLVED! Subinterfaces not working

SOLVED!  The issue had nothing to do with what I was or wasn't doing.  IP link add ... should have worked fine except the new commit of kernel 3.10.* didn't have CONFIG_VETH.  Quick hop over to the Arm Arch forums and it was solved within the same day.  Reply came late due to school and work taking up most of my time. 

Here is the link to the thread if anyone is interested.

Last edited by Dorg (2014-01-24 10:02:46)

Offline

#7 2016-06-01 14:28:10

ghassanius
Member
Registered: 2016-06-01
Posts: 1

Re: SOLVED! Subinterfaces not working

How was it fixed?

Offline

#8 2016-06-01 18:01:57

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,842
Website

Re: SOLVED! Subinterfaces not working

Presumably the relevant option was enabled in the kernel config. Please don't necrobump, especially when the topic is marked as solved.

https://wiki.archlinux.org/index.php/Fo … bumping.22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB