asadarafat / topoViewer

4 stars 1 forks source link

Link impairment does not work #34

Closed gusman closed 8 months ago

gusman commented 9 months ago

Description Link impairment seems not work. When I set delay 100000 ms, ping delay is still under 10ms.

Environment

IP NETNS result in server

/clab/dharmapu$ sudo ip netns
dharmapu-clab-2nodes-topoviewer
dharmapu-clab-2nodes-R1 (id: 1)
dharmapu-clab-2nodes-R2 (id: 0)

CLAB Topology yaml

name: dharmapu-clab-2nodes
prefix: __lab-name
mgmt:
  network: net_dharmapu-clab-2nodes
  ipv4-gw: 172.36.36.254
  ipv4-subnet: 172.36.36.0/24
  bridge: brmp-dharmapu
topology:
  nodes:
    R1:
      kind: vr-sros
      image: registry.srlinux.dev/pub/vr-sros:23.7.R1
      type: cpu=2 min_ram=4 max_nics=6 chassis=sr-1 slot=A card=cpm-1 slot=1 card=iom-1 mda/1=me6-100gb-qsfp28
      license: /clab/license/timos-latest.txt
      mgmt-ipv4: 172.36.36.1
      startup-config: configs/R1_R1_Core.cfg
      group: CORE
    R2:
      kind: vr-sros
      image: registry.srlinux.dev/pub/vr-sros:23.7.R1
      type: 'cp: cpu=2 min_ram=4 chassis=ixr-e slot=A card=cpm-ixr-e/imm14-10g-sfp++4-1g-tx ___ lc: cpu=2 min_ram=4 max_nics=18 chassis=ixr-e slot=1 card=imm14-10g-sfp++4-1g-tx  mda/1=m14-10g-sfp++4-1g-tx'
      license: /clab/license/timos-latest.txt
      mgmt-ipv4: 172.36.36.2
      startup-config: configs/R2_R2_Core.cfg
      group: CORE
    topoviewer:
      kind: linux
      mgmt-ipv4: 172.36.36.253
      image: ghcr.io/asadarafat/topoviewer:nightly-23.10.22b
      ports:
      - 8081:8081
      startup-delay: 3
      entrypoint: /opt/topoviewer/topoviewer clab --allowed-hostnames 192.168.10.16 --server-port 8081 --topology-file-json local-bind/topo-file.json
      binds:
      - /clab/dharmapu/clab-dharmapu-clab-2nodes/topology-data.json:/opt/topoviewer/local-bind/topo-file.json:ro
  links:
  - endpoints:
    - R1:eth1
    - R2:eth1
asadarafat commented 9 months ago

Could be different clab version

the one tested working is the following clab version...

the link delay defined here

hrefLink: `clab tools netem set -n ${edge.data('extraData').clabSourceLongName} -i ${edge.data("sourceEndpoint")}`,

and tested clab version is

`[root@kvm-host-antwerp02 ~]# clab version

                           _                   _       _     
                 _        (_)                 | |     | |    
 ____ ___  ____ | |_  ____ _ ____   ____  ____| | ____| | _  
/ ___) _ \|  _ \|  _)/ _  | |  _ \ / _  )/ ___) |/ _  | || \ 
( (__| |_|| | | | |_( ( | | | | | ( (/ /| |   | ( ( | | |_) )
\____)___/|_| |_|\___)_||_|_|_| |_|\____)_|   |_|\_||_|____/ 

    version: 0.45.1
     commit: 9197213c
       date: 2023-09-21T18:38:53Z
     source: https://github.com/srl-labs/containerlab
 rel. notes: https://containerlab.dev/rn/0.45/#0451
[root@kvm-host-antwerp02 ~]# ip netns
clab-3tierSmall-topoviewer (id: 36)
clab-3tierSmall-dcgw-1
clab-3tierSmall-dcgw-2
clab-3tierSmall-node1-10 (id: 31)
clab-3tierSmall-node1-2 (id: 33)
clab-3tierSmall-node1-7 (id: 32)
clab-3tierSmall-node1-3 (id: 30)
clab-3tierSmall-node1-4 (id: 29)
clab-3tierSmall-node1-1 (id: 26)
clab-3tierSmall-node1-8 (id: 28)
clab-3tierSmall-node1-6 (id: 27)
clab-3tierSmall-node1-5 (id: 25)
clab-3tierSmall-node1-9 (id: 24)
clab-3tierSmall-node2-2 (id: 22)
clab-3tierSmall-node2-1 (id: 23)`