Topics list:

  1. P4 Studio: How to compile and run a program
  2. EdgeCore Wedge100BF-32QS Procedures: Recovery External/Main BIOS
  3. Install Barefoot SDE P4 Studio developed by Intel
  4. Install RARE/FreeRTR Network Operating System developed by GÉANT
  5. Install Nix Packet Manager: bf-sde-nixpkgs developed by Alexander Gall
  6. Update Release Nix Packet Manager: bf-sde-nixpkgs developed by Alexander Gall
  7. Install Data Plane Development Kit (DPDK) on Intel 82599 10 GbE Controller
  8. Data Plane Development Kit (DPDK) on Intel 82599 10 GbE Controller Cisco TRex Basic Testing
  9. P4 FreeRTR Data Plane Development Kit (DPDK) on Intel 82599 10 GbE Controller
  10. Install Ubuntu Server 16.04 LTS Network Operating System (UEFI)
  11. Google Training Course

Gitlab workspace: upgrade content of project

# Copy project from the virtual machine
scp -r mmisamor@p4lang-ubuntu1604LTS-250GB-vm:/home/mmisamor/volume-disk/workspace/tna_simple_switch ~/Desktop
# Replace content of the actual gitlab project
cp -r ~/Desktop/tna_simple_switch/ ~/cernbox/gitlab_workspace/p4lang/tna_simple_switch/
# Open Visual Studio Code to folder ~/cernbox/gitlab_workspace/p4lang and do a push!

Virtual environment and pypi

# Notes here: https://gitlab.cern.ch/network/ci-base-configs/-/raw/master/python36_monorepo_lib.yml # For internal pypi (venv-noted) sh-3.2# python3 -m venv venv-noted (venv-noted) sh-3.2# . venv-noted/bin/activate (venv-noted) sh-3.2# pip install -e . (venv-noted) sh-3.2# noted src/noted/config.yaml (venv-noted) sh-3.2# pip install --upgrade pip (venv-noted) sh-3.2# pip config --site set global.extra-index-url https://netnexus.web.cern.ch/repository/python/simple (venv-noted) sh-3.2# python3 setup.py sdist (venv-noted) sh-3.2# twine upload --repository-url https://netnexus.web.cern.ch/repository/python/ -u netci-netnexus -p $NETCI_NETNEXUS_PWD dist/* (venv-noted) sh-3.2# cd /tmp/ (venv-noted) sh-3.2# pip install noted-dev # Also, usefull commands to install and build on global pipit: python3 -m pip install -e . python3 -m build --sdist twine check dist/* twine upload dist/* python3 setup.py sdist

How to access EdgeCore Wedge100BF-32QS switch

Connect to ninja server as root

ssh mmisamor@ninja.cern.ch
mmisamor@ninja:~$ sudo su
root@ninja:/home/mmisamor#

Connect to BMC

root@ninja:/home/mmisamor# minicom cisco
# User: root
# Password: 0penBmc
root@bmc:~# 

# or

root@ninja:/home/mmisamor# ssh root@128.141.50.190
# User: root
# Password: 0penBmc
root@bmc:~# 

Connect to Main Board CPU console [Wedge NOS]

root@bmc:~# sol.sh
# User: root
# Password: <Enter>
Linux wedge 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64                                                                               
The programs included with the Debian GNU/Linux system are free software;       
the exact distribution terms for each program are described in the              
individual files in /usr/share/doc/*/copyright.                                                                                                               
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent               
permitted by applicable law.                                                    
Last login: Tue Oct  5 09:14:42 CEST 2021 on ttyS0                              
root@wedge:~#  

# or

root@ninja:/home/mmisamor# ssh rare@128.141.50.184
# User: rare
# Password: rare
Linux wedge 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Oct  5 09:22:24 2021 from 128.141.50.185
rare@wedge:~$ 

Connect to RARE/freeRtr [NOS control plane]

root@ninja:~$ ssh rare@128.141.50.183
# User: rare
# Password: rare
welcome
line ready
CRN0001#  

Run Barefoot Shell on EdgeCore Wedge100BF-32QS

root@ninja:/home/mmisamor# ssh rare@128.142.224.24
root@wedge:~# bfshell

        ********************************************
        *      WARNING: Authorised Access Only     *
        ********************************************

bfshell> ucli
Cannot read termcap database;
using dumb terminal settings.
bf-sde>

Add VLANs and IPv6 Route to Servers

# List the IPv6 routes available on the server
ip -6 route show

# Add IPv6 route
ip -6 addr add fc01:20::/64 via fc01:30::2 dev ens2

# Delete IPv6 route
ip -6 addr del fc01:20::/64 via fc01:30::2 dev ens2

# Create VLANs on the server
ip link add link ens2 name ens2.40 type vlan id 40
ip -6 addr add fc01:40::4/64 dev ens2.40
ip link set up ens2.40
ip link set up ens2.40

# Set up and down one interface on the server
ip link set down enp5s0f1
ip link set up enp5s0f1

# Create permanent config on the server using Netplan
# Server 2
root@itcs-p4srv-02:/etc/netplan# cat 00-installer-config.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: true
    eno2:
      dhcp4: true
    enp5s0f0:
      dhcp4: true
    enp5s0f1:
      dhcp4: true
    ens2:
      dhcp4: true
  vlans:
    ens2.40:
      id: 40
      link: ens2
      addresses: [ "fc01:40::4/64" ]
    enp5s0f1.70:
      id: 70
      link: enp5s0f1
      addresses: [ "fc01:70::4/64" ]

# Server 1
root@itcs-p4srv-01:/etc# cat netplan/00-installer-config.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: true
    eno2:
      dhcp4: true
    enp5s0f0:
      dhcp4: true
    enp5s0f1:
      dhcp4: true
    ens2:
      dhcp4: true
  vlans:
    ens2.30:
      id: 30
      link: ens2
      addresses: [ "fc01:30::1/64" ]

# Server 3
root@itcs-p4srv-03:/home/mmisamor# cat /etc/netplan/00-installer-config.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: true
    eno2:
      dhcp4: true
    enp5s0f0:
      dhcp4: true
    enp5s0f1:
      dhcp4: true
    ens2:
      dhcp4: true
  vlans:
    ens2.50:
      id: 50
      link: ens2
      addresses: [ "fc01:50::5/64" ]
    enp5s0f1.60:
      id: 60
      link: enp5s0f1
      addresses: [ "fc01:60::5/64" ]

# Apply the new configuration to the network
netplan apply

Reload bf_forwarder

E513-E-YECWH-1# reload process bffwd

Enable LLDP on Ubuntu Server

# Enable LLDP on Ubuntu Server interfaces
root@itcs-p4srv-03:/home/mmisamor# lldpad -d
root@itcs-p4srv-03:/home/mmisamor# for i in `ls /sys/class/net/ | grep 'eth\|ens\|eno\|enp*'` ; do echo "enabling lldp for interface: $i" ; lldptool set-lldp -i $i adminStatus=rxtx ; lldptool -T -i $i -V sysName enableTx=yes; lldptool -T -i $i -V portDesc enableTx=yes ; lldptool -T -i $i -V sysDesc enableTx=yes; lldptool -T -i $i -V sysCap enableTx=yes; lldptool -T -i $i -V mngAddr enableTx=yes; done
# Configure LLDP on Ubuntu Server subinterfaces, for example, for interface ens2 vlan_id = 44
root@itcs-p4srv-03:/home/mmisamor# lldpcli
[lldpcli] # configure system interface pattern ens2.44
[lldpcli] # show neighbors
[lldpcli] # exit
# Apply configuration
root@itcs-p4srv-03:/home/mmisamor# lldpad -d

Create IPv6 Flow Label Packets

# Launch server
root@itcs-multione-01 ipv6_flow_label# ./server

# Launch the client: send 5 packets to client_ipv6_addr = 2001:1458:301:cd::100:3d8 and flow_label = 131072
root@itcs-p4srv-02:/home/mmisamor/ipv6_flow_label# for i in $(seq 1 5); do ./client "2001:1458:301:cd::100:3d8" 131072; done

# Take a look to the traffic with Wireshark
root@itcs-multione-01 ~# tshark -i eth0 -f "ip6 and port 24999" -T fields -e frame.number -e frame.time_delta -e ipv6.src -e ipv6.dst -e tcp.port -e ipv6.flow
UserForm
First Name Carmen
Last Name Misa Moreira
Titles Telecommunications Engineering
Email carmen.misa.moreira@cernNOSPAMPLEASE.ch
Telephone +34662305074
Mobile 66315 (CERN Phone)
Skype ID

Department IT-CS-CE
Organization CERN
URL https://home.cern
Location Meyrin
Region Geneva
Country Switzerland
Status Update https://www.linkedin.com/in/carmen-misa-moreira-09182b137/
Edit personal data
Edit | Attach | Watch | Print version | History: r43 < r42 < r41 < r40 < r39 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r43 - 2022-07-14 - MariaDelCarmenMisaMoreira
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback