Problem setting VLANs and IPv6 addresses

Ask questions about Arch Linux ARM. Please search before making a new topic.

Problem setting VLANs and IPv6 addresses

Postby jeajea » Mon Jan 02, 2017 9:22 pm

After updating the kernel and running pacman –Syu I have a
problem setting VLANs and IPv6 addresses

pogoplug v2 (POGO-E02G)

viewtopic.php?f=58&t=10701

I use a shell script to add VLANs and IPv4 and IPv6 addresses so I can change the addresses by editing a single file
Code: Select all
[root@ns02 rsync]# cd /usr/local/bin
[root@ns02 bin]# cat jims-eth-0.sh
#!/bin/sh
sleep 15
rm /tmp/eth.txt
# set eth0 address
ip addr add 192.168.xxx.252/24 broadcast 192.168.xxx.255 dev eth0
ip route add default via 192.168.xxx.1
ip addr add 2001:470:bccf:1::252/64 dev eth0
ip route add default via 2001:470:xxxx:1::1
#
# add vlan 5 to eth0
ip link add link eth0 name eth0.5 type vlan id 5
ip addr add 172.16.www.252/24 brd 172.16.www.255 dev eth0.5
ip addr add 2001:470:xxxx:2::252/64 dev eth0.5
ip link set dev eth0.5 up
# add vlan 7 to eth0
ip link add link eth0 name eth0.7 type vlan id 7
ip addr add 172.16.zzz.252/24 brd 172.16.zzz.255 dev eth0.7
sleep 500
touch /tmp/eth.txt
exit

I use a service I created to run the script automatically

Code: Select all
[root@ns02 bin]# cd /etc/systemd/system
[root@ns02 system]# ls
getty.target.wants  multi-user.target.wants  netctl@air3.service  stjim.service
[root@ns02 system]# cat  stjim.service
[Unit]
Description=My script

[Service]
ExecStart=/usr/local/bin/jims-eth-0.sh

[Install]
WantedBy=multi-user.target

[root@ns02 system]# systenctl status stjim.service
bash: systenctl: command not found
[root@ns02 system]# systemctl status stjim.service
? stjim.service - My script
   Loaded: loaded (/etc/systemd/system/stjim.service; enabled; vendor preset: di
   Active: inactive (dead) since Mon 2017-01-02 14:36:21 EST; 15s ago
  Process: 194 ExecStart=/usr/local/bin/jims-eth-0.sh (code=exited, status=0/SUC
 Main PID: 194 (code=exited, status=0/SUCCESS)

Dec 09 20:28:30 ns02 systemd[1]: Started My script.
Dec 09 20:28:45 ns02 jims-eth-0.sh[194]: rm: cannot remove '/tmp/eth.txt': No su
Dec 09 20:28:45 ns02 jims-eth-0.sh[194]: RTNETLINK answers: Operation not suppor
Dec 09 20:28:45 ns02 jims-eth-0.sh[194]: RTNETLINK answers: Operation not suppor
Dec 09 20:28:45 ns02 jims-eth-0.sh[194]: RTNETLINK answers: Operation not suppor
Dec 09 20:28:46 ns02 jims-eth-0.sh[194]: Cannot find device "eth0.5"
Dec 09 20:28:46 ns02 jims-eth-0.sh[194]: Cannot find device "eth0.5"
Dec 09 20:28:46 ns02 jims-eth-0.sh[194]: Cannot find device "eth0.5"
Dec 09 20:28:46 ns02 jims-eth-0.sh[194]: RTNETLINK answers: Operation not suppor
Dec 09 20:28:46 ns02 jims-eth-0.sh[194]: Cannot find device "eth0.7"

Code: Select all
[root@ns02 rsync]# uname -a
Linux ns02 4.4.39-1-ARCH #1 PREEMPT Wed Dec 21 07:43:11 MST 2016 armv5tel GNU/Linux
[root@ns02 rsync]#

[root@ns02 rsync]# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:25:31:00:b7:e5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.xxx.58/24 brd 192.168.xxx.255 scope global dynamic eth0
       valid_lft 172623sec preferred_lft 172623sec
    inet 192.168.xxx.252/24 brd 192.168.xxx.255 scope global secondary eth0
       valid_lft forever preferred_lft forever


I looked at the Man pagesnd can't figure out what I need to change in my script
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 113
Joined: Wed Aug 25, 2010 4:00 pm

Re: Problem setting VLANs and IPv6 addresses

Postby WarheadsSE » Tue Jan 03, 2017 12:06 pm

Running these commands by hand, to confirm which exactly are failing would be the first step. The output log does not identify exactly which. You could also `set -x` in the top of the script and run that by hand to see what happening.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6729
Joined: Mon Oct 18, 2010 2:12 pm

Re: Problem setting VLANs and IPv6 addresses

Postby jeajea » Tue Jan 03, 2017 3:51 pm

The commands don’t work manually either
Code: Select all
[root@ns02 bin]# ip addr add 2001:470:xxxx:1::252/64 dev eth0
RTNETLINK answers: Operation not supported
[root@ns02 bin]# ip route add default via 2001:470:xxxx:1::1
RTNETLINK answers: Operation not supported
[root@ns02 bin]# ip link add link eth0 name eth0.5 type vlan id 5
RTNETLINK answers: Operation not supported
[root@ns02 bin]# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:25:31:00:b7:e5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.xxx.58/24 brd 192.168.xxx.255 scope global dynamic eth0
       valid_lft 172285sec preferred_lft 172285sec
    inet 192.168.xxx.252/24 brd 192.168.xxx.255 scope global secondary eth0
       valid_lft forever preferred_lft forever
[root@ns02 bin]#

The IPv4 eth0 commands work in the script.
The script worked before I upgraded.
The script works on another Pogoplug that has a new (not upgrade) install of Arch
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 113
Joined: Wed Aug 25, 2010 4:00 pm

Re: Problem setting VLANs and IPv6 addresses

Postby WarheadsSE » Tue Jan 03, 2017 4:35 pm

Yes, I didn't expect them to work manually either. Finding out which fail was the point.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6729
Joined: Mon Oct 18, 2010 2:12 pm

Re: Problem setting VLANs and IPv6 addresses

Postby jeajea » Sun Jan 29, 2017 10:51 pm

I tried adding a USB Ethernet adapter that works on my other pogoplugs and it fails to appear in

“ip link”

on the one with the upgraded kernel

I wonder if it is a file protection problem

Any suggestions on how to fix this?
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 113
Joined: Wed Aug 25, 2010 4:00 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 2 guests