Page MenuHomePhabricator

IP addresses configured on vif-s interfaces are not added to the system
Needs testing, HighPublicBUG

Description

Adding an IP address on a service VLAN (vif-s) is not propagated into the OS Kernel.
set interfaces ethernet eth1 vif-s 100 address '192.168.1.1/24'

ethernet eth1 {
    duplex auto
    hw-id 00:50:56:9d:d5:b6
    smp-affinity auto
    speed auto
    vif-s 100 {
        address 192.168.1.1/24
    }
}
vyos@vyos:~$ ip a | grep -A 5 "eth1.100"
17: eth1.100@eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:50:56:9d:d5:b6 brd ff:ff:ff:ff:ff:ff

Adding the address manually works so it seems not to be a Linux limitation.

cpo@LR1.wueIII:~$ sudo ip addr add "192.168.1.1/24" dev eth1.100
cpo@LR1.wueIII:~$ ip a | grep -A 5 "eth1.100"
17: eth1.100@eth1: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:50:56:9d:d5:b6 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 scope global eth1.100
       valid_lft forever preferred_lft forever

Details

Difficulty level
Unknown (require assessment)
Version
1.2.2
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

c-po assigned this task to dmbaturin.Sep 3 2019, 2:58 PM
c-po created this task.
c-po moved this task from Need Triage to VyOS 1.2.4 on the VyOS 1.2 Crux board.
c-po edited projects, added VyOS 1.2 Crux (VyOS 1.2.4); removed VyOS 1.2 Crux.
Dmitry added a subscriber: Dmitry.Sep 3 2019, 6:37 PM
kroy added a subscriber: kroy.EditedSep 3 2019, 7:19 PM

I took a look, but was unable to figure out how to finagle VyOS to fix it.

But basically, it's happening because the interface doesn't exist

set interfaces ethernet eth0 vif-s 100 description Blah
commit
set interfaces ethernet eth0 vif-s 100 address 192.168.1.1/24

That will set the address.

Doing the obvious, and adding a create: block to vyatta-cfg/templates/interfaces/pseudo-ethernet/node.tag/vif-s/node.def didn't seem to fix it.

pasik added a subscriber: pasik.Sep 4 2019, 8:07 PM
syncer changed the task status from Open to Needs testing.Nov 16 2019, 11:47 PM
syncer triaged this task as High priority.
syncer added a project: VyOS 1.3 Equuleus.

@c-po

cpo@LR1.wueIII:~$ sudo ip addr add "192.168.1.1/24" dev eth1.100

That command (above) don't correct for vif-s, with sudo you assign ipv4 only to one tag 8021q (Cvlan) .

You cannot assign ip address to Svlan without Cvlan.
Also, this Svlan cannot live without a daughter (Cvlan).

Correct config for double tag ip address is:

vyos@1.2-roll-ns# set interfaces ethernet eth1 vif-s 100 vif-c 999 address 192.168.1.1/24 
[edit]
vyos@1.2-roll-ns# commit
[edit]
vyos@1.2-roll-ns# sudo ifconfig
eth1      Link encap:Ethernet  HWaddr 52:54:00:e7:13:02  
          inet6 addr: fe80::5054:ff:fee7:1302/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1312 (1.2 KiB)  TX bytes:2708 (2.6 KiB)

eth1.100  Link encap:Ethernet  HWaddr 52:54:00:e7:13:02  
          inet6 addr: fe80::5054:ff:fee7:1302/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:1894 (1.8 KiB)

eth1.100.999 Link encap:Ethernet  HWaddr 52:54:00:e7:13:02  
          inet addr:192.168.1.1  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::5054:ff:fee7:1302/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:896 (896.0 B)
c-po added a comment.Dec 6 2019, 4:26 PM

I pick this up as I did the rewrite of this whole stuff

c-po claimed this task.Dec 6 2019, 4:27 PM
c-po added a subscriber: dmbaturin.