Page MenuHomeVyOS Platform

T9518-test-instructions.md

Authored By
rherold
Wed, Oct 28, 9:51 AM
Size
5 KB
Referenced Files
None
Subscribers
None

T9518-test-instructions.md

# T9518: test the fix on a running router
This tests the change from the draft PR https://github.com/vyos/vyos-1x/pull/5595 (commit `2a72cb9c8`) without building an image. It edits system files, use a lab router and not a production one. The edits stay until you revert them or upgrade the image.
The change: `protocols mpls interface <if>` also enables MPLS in VPP for that interface. VPP gets the default MPLS table first. MPLS is applied again after a restart of VPP, after a change of the Ethernet interface (also when VPP is changed or removed in the same commit) and when VPP is removed and the NIC goes back to the kernel. It is switched off before a VLAN of a VPP interface is deleted or created again by an update, because VPP keeps a stale MPLS count for the interface index otherwise.
Scope: physical VPP interfaces (`eth1` in the task) and their VLANs. Other VPP interfaces (`vppbond`, `vpplo`, `vppgre`, `vppipip`, `vppvxlan` and their VLANs) are refused with an error, their entry would be lost when the saved configuration is loaded at boot.
If you applied an earlier patch from this task, revert it first (section 4), then apply this one.
## Tested on
- Lab image `2026.10.16-0024-rolling` (vyos-1x `999.0-15129-g61f35e0f4`, VPP `v25.10.0-60~vyos20261019233412.17c9bba8f`, FRR 10.7.1, kernel 6.18.55-vyos).
- Two routers on one L2 segment: the VPP router with `eth0` as VPP interface, a second router without VPP. LDP over `eth0` with `explicit-null`, loopbacks and static routes as in the task.
- Also tested: a restart of VPP, a reboot with the saved configuration, a VLAN `eth0.10` of the VPP interface (created together with its MPLS entry, deleted alone and added again, recreated by a change of `ingress-qos`), a `vif-s` protocol change, a commit that changes a VPP setting and the Ethernet node of the NIC together, removal of the whole `vpp` node with MPLS configured, and two VPP interfaces in one commit.
- The patch is made against the files of the image above (the `patch` of the image applies it without errors, the final result passed the six MPLS smoketests of the change).
- Not tested: other VPP versions, `vif-c` (VPP does not create sub-interfaces for it, an MPLS entry on it has no effect in VPP), VRFs.
## 1. Apply
Run as a user with sudo (`vyos`), on the router with the VPP interface:
```
# backup of the files (the patch changes 4 of them, plus the JSON file)
sudo tar czf ~/t9518-orig.tgz -C / \
usr/lib/python3/dist-packages/vyos/vpp/control_vpp.py \
usr/libexec/vyos/conf_mode/interfaces_ethernet.py \
usr/libexec/vyos/conf_mode/protocols_mpls.py \
usr/libexec/vyos/conf_mode/vpp.py \
usr/share/vyos/config-mode-dependencies/vyos-vpp.json
# copy T9518-vpp-mpls-enable.patch and T9518-json.py to the router first
cd / && sudo patch -p1 --dry-run < ~/T9518-vpp-mpls-enable.patch
```
The dry run must list 4 `patching file` lines and no `FAILED`. If it fails, the image is too different: send the output of `show version` and do not continue.
```
cd / && sudo patch -p1 < ~/T9518-vpp-mpls-enable.patch
# the dependency entry: run protocols_mpls again after a VPP commit
sudo python3 ~/T9518-json.py
# expected output: True
sudo systemctl restart vyos-configd
```
`T9518-json.py` rewrites `vyos-vpp.json` with two entries added (`mpls` below `vpp` and below `interfaces_ethernet`), the formatting of the file changes, the content does not.
## 2. Test
As the normal user, in configure mode. Use the VPP interface of your setup (`eth1` in the task):
```
delete protocols mpls interface eth1
commit
set protocols mpls interface eth1
commit
```
Check:
```
vppctl show mpls interface
vppctl show interface feat eth1 | grep -a1 mpls-input
show mpls ldp neighbor
ping 10.255.0.2 source-address 10.255.0.1 count 5
```
Expected: `show mpls interface` lists `eth1` and its tap (`tap4096`). The line after `mpls-input:` at `eth1` is `none configured` and not `mpls-not-enabled`. The ping works without the two manual `vppctl set interface mpls ... enable` commands.
Then check that it survives a VPP restart (the commit restarts VPP) and that removal works:
```
set vpp settings poll-sleep-usec 20
commit
vppctl show interface feat eth1 | grep -a1 mpls-input
delete protocols mpls interface eth1
commit
vppctl show interface feat eth1 | grep -a1 mpls-input
```
Expected: after the first commit MPLS is on again (`none configured`), after the second it is `mpls-not-enabled`. Set `poll-sleep-usec` back to your value afterwards.
If you use a VLAN of the VPP interface (`eth1.10`) as MPLS interface, delete the `vif` and its MPLS entry in one commit and add both again, then check that the line after `mpls-input:` of `eth1.10` is not `mpls-not-enabled`. `show mpls interface` alone is not enough for this check, VPP can list an interface there while the feature is off.
A commit that changes a VPP setting and the Ethernet node of the VPP interface together must keep MPLS on, also on the VLAN:
```
set vpp settings poll-sleep-usec 20
set interfaces ethernet eth1 description test
commit
vppctl show interface feat eth1 | grep -a1 mpls-input
```
Expected: the commit passes and the line after `mpls-input:` is not `mpls-not-enabled`. Delete the `description` and set `poll-sleep-usec` back afterwards.
Last, a VPP loopback, bond or tunnel as MPLS interface must be refused by the commit with `MPLS is not supported on the VPP interface`.
## 3. Please report
- `show version`
- the output of the commands above (before and after, the ping result)
- if a commit fails: `sudo journalctl -u vyos-configd --since '-5min' --no-pager | tail -40`
Please do not post core files, they can contain customer data.
## 4. Revert
```
cd / && sudo tar xzf ~/t9518-orig.tgz
sudo systemctl restart vyos-configd
```
An image upgrade also replaces the files.

File Metadata

Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4565589
Default Alt Text
T9518-test-instructions.md (5 KB)

Event Timeline