Page MenuHomeVyOS Platform

IP addresses configured on vif-s interfaces are not added to the system
Closed, ResolvedPublicBUG

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.

[email protected]:~$ sudo ip addr add "192.168.1.1/24" dev eth1.100
[email protected]:~$ 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?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

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.
Unknown Object (User) added a subscriber: Unknown Object (User).Sep 3 2019, 6:37 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.

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

[email protected]:~$ 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:

[email protected]# set interfaces ethernet eth1 vif-s 100 vif-c 999 address 192.168.1.1/24 
[edit]
[email protected]# commit
[edit]
[email protected]# 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)

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

15: eth1.100@eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
    link/ether 00:0d:b9:53:07:ed brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 scope global eth1.100
       valid_lft forever preferred_lft forever

Tested in VyOS 1.3-rolling-202004100117 - issue auto-resolved itself with the rewrite of the VLAN stuff into XML and python

erkin set Issue type to Bug (incorrect behavior).Aug 31 2021, 6:52 PM