User Tools

Site Tools


virtualization:netsim

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
virtualization:netsim [2022/09/25 17:28] jotasandokuvirtualization:netsim [2025/01/26 17:52] (current) jotasandoku
Line 6: Line 6:
     * Data_models-todo     * Data_models-todo
     * templates_location-todo     * templates_location-todo
 +The application is installed in ''/usr/local/lib/python3.10/dist-packages/netsim''. There you can find files like ''/defaults/addressing.yml'' where we can customize ips or change them to ipv6
  
 ---- ----
Line 19: Line 19:
   #!/bin/bash   #!/bin/bash
   apt remove needrestart -y    apt remove needrestart -y 
 +  sudo add-apt-repository universe
   apt-get update -y    apt-get update -y 
   apt install python3-pip -y    apt install python3-pip -y 
   python3 -m pip install netsim-tools   python3 -m pip install netsim-tools
 +  ! (consider) python3 -m  pip3 install --upgrade pyopenssl cryptography
   !   !
   ! APPLY THIS MANUALLY   ! APPLY THIS MANUALLY
Line 58: Line 60:
   cat .gitignore   cat .gitignore
   **/archive/   **/archive/
-  **/schedule/\+  **/schedule/ 
 +  **/flash/ 
 +  **/.vagrant/ 
 +  vault.key 
 +  .Python 
 +  [Bb]in 
 +  [Ii]nclude 
 +  [Ll]ib 
 +  [Ll]ib64 
 +  [Ll]ocal 
 +  [Ss]cripts 
 +  pyvenv.cfg 
 +  .venv 
 +  .env 
 +  pip-selfcheck.json
   ! This to save all the containerlab configs at once:   ! This to save all the containerlab configs at once:
   netlab clab tarball   netlab clab tarball
Line 100: Line 116:
   vagrant box add nexus9300v.9.3.5.box --name cisco/nexus9300v   vagrant box add nexus9300v.9.3.5.box --name cisco/nexus9300v
   vagrant mutate cisco/nexus9300v libvirt   vagrant mutate cisco/nexus9300v libvirt
 +
 +
 +----
 +FOLDERS AND DEV ADVICES:
 +\\
 +See: [[https://netlab.tools/dev/module-attributes/]]
 +  * configuration templates snippets: 
 +    * ..netsim/ansible/templates/{module}/{vendor}.j2
 +      * example: ..netsim/ansible/templates/evpn/eos.j2
 +  * Module attributes for an individual module are stored (together with other module-specific data) in netsim/modules/<modname>.yml file.
 +
 +
 +
 +  # Default loopback, LAN, and P2P prefixes
 +  loopback:
 +    ipv6: 2001:db8:0::/48
 +  router_id:
 +    ipv4: 10.0.0.0/24
 +    prefix: 32
 +  lan:
 +    ipv6: 2001:db8:3e8::/48
 +  p2p:
 +    ipv6: 2001:db8:3e9::/48
 +  mgmt:
 +    ipv4: 192.168.121.0/24
 +    start: 100
 +    mac: 08-4F-A9-00-00-00
 +  l2only:
 +  vrf_loopback:
 +    ipv6: 2001:db8:3ea::/48
 +    
 +TCPDUMP IN NETLAB:
 +[[https://netlab.tools/netlab/capture/]]
 +  netlab up -p libvirt:p2p_bridge    # otherwise impossible to capture in lobvirt p2p links
 +  netlab capture r1 GigabitEthernet0/3 icmp -l
 +  netlab capture r1 GigabitEthernet0/3 -U -s0 -w - | sudo wireshark -k -i -
  
virtualization/netsim.1664126893.txt.gz · Last modified: (external edit)