Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Disable IPv6 |
---|
| echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
echo 0 > /proc/sys/net/ipv6/conf/lo/disable_ipv6
ip link set lo up mtu 65535 |
Note that IPv6 operation would occur on the host itself, IPv6 will be handled at freeRouter level Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Disable IPv6 |
---|
| echo 96 > /proc/sys/vm/nr_hugepages
modprobe uio_pci_generic
dpdk-devbind.py -b uio_pci_generic 01:00.0
dpdk-devbind.py -b uio_pci_generic 02:00.0
dpdk-devbind.py -b uio_pci_generic 05:00.0
dpdk-devbind.py -b uio_pci_generic 06:00.0
dpdk-devbind.py -b uio_pci_generic 07:00.0
dpdk-devbind.py -b uio_pci_generic 08:00.0 |
In the stanza above, we configure DPDK (required) In this case we use 96 hugepages, this value can be different if you are using a box with different characteristics (# of ports, memory etc.) The objective is to configure a value that is not too high (waste of resources) and not too small. otherwise p4dpdk won't run. In this case this leaves 10 Free HugePages. Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | HugesPages Verification |
---|
| grep HugePages_ /proc/meminfo
HugePages_Total: 96
HugePages_Free: 10
HugePages_Rsvd: 0
HugePages_Surp: 0 |
- Activate UIO_PCI_GENERIC driver
- Bind the interfaces to DPDK, DPDK will control them now. Keep in mind that now they will be invisible from the linux kernel.
This command use device PCI ID. In order to check device PCI ID just issue the below command: Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | List PCI device ID list ready to be use (or not by DPDK) |
---|
| dpdk-devbind.py --status
Network devices using DPDK-compatible driver
============================================
0000:01:00.0 'I211 Gigabit Network Connection 1539' drv=uio_pci_generic unused=igb
0000:02:00.0 'I211 Gigabit Network Connection 1539' drv=uio_pci_generic unused=igb
0000:05:00.0 'I211 Gigabit Network Connection 1539' drv=uio_pci_generic unused=igb
0000:06:00.0 'I211 Gigabit Network Connection 1539' drv=uio_pci_generic unused=igb
0000:07:00.0 'I211 Gigabit Network Connection 1539' drv=uio_pci_generic unused=igb
0000:08:00.0 'I211 Gigabit Network Connection 1539' drv=uio_pci_generic unused=igb
Network devices using kernel driver
===================================
0000:09:00.0 'AR928X Wireless Network Adapter (PCI-Express) 002a' if=wlan0 drv=ath9k unused=uio_pci_generic
No 'Baseband' devices detected
==============================
Other Crypto devices
====================
0000:00:1a.0 'Atom Processor Z36xxx/Z37xxx Series Trusted Execution Engine 0f18' unused=uio_pci_generic
No 'Eventdev' devices detected
==============================
No 'Mempool' devices detected
=============================
No 'Compress' devices detected
==============================
No 'Misc (rawdev)' devices detected
=================================== |
- Configure the appliance OOBM via veth pair (as all physical ports are handled by DPDK and will be invisible from the Linux kernel)
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Disable IPv6 |
---|
| #VETH for CPU_PORT and OOBM_PORT
ip link add veth0a type veth peer name veth0b
ip link set veth0a multicast on
ip link set veth0a allmulti on
ip link set veth0a promisc on
ip link set veth0a mtu 8192
ip link set veth0a up
ip link set veth0b multicast on
ip link set veth0b allmulti on
ip link set veth0b promisc on
ip link set veth0b mtu 8192
ip link set veth0b up
ethtool -K veth0a rx off
ethtool -K veth0a tx off
ethtool -K veth0a sg off
ethtool -K veth0a tso off
ethtool -K veth0a ufo off
ethtool -K veth0a gso off
ethtool -K veth0a gro off
ethtool -K veth0a lro off
ethtool -K veth0a rxvlan off
ethtool -K veth0a txvlan off
ethtool -K veth0a ntuple off
ethtool -K veth0a rxhash off
ethtool --set-eee veth0a eee off
ethtool -K veth0b rx off
ethtool -K veth0b tx off
ethtool -K veth0b sg off
ethtool -K veth0b tso off
ethtool -K veth0b ufo off
ethtool -K veth0b gso off
ethtool -K veth0b gro off
ethtool -K veth0b lro off
ethtool -K veth0b rxvlan off
ethtool -K veth0b txvlan off
ethtool -K veth0b ntuple off
ethtool -K veth0b rxhash off
ethtool --set-eee veth0b eee off |
So the above section is pretty straightforward: - It creates veth0a / veth0b pair. For those familiar with P4, this is similar to the channel between the control plane (freeRouter) and p4dpdk (dataplane) using CPU_PORT
- It sets for veth0a/veth0b: multicast/allmulti/promisc flag + mtu=8192
- It disables TCP offload for veth0a/veth0b
We do the same thing for the wireless networkOut Of Band management (linux access) Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | veth1a/veth1b for Wireless networkOOB management |
---|
| ip link add veth1a type veth peer name veth1b
ip link set veth1a multicast on
ip link set veth1a allmulti on
ip link set veth1a promisc on
ip link set veth1a mtu 1500
ip link set veth1a up
ip link set veth1b multicast on
ip link set veth1b allmulti on
ip link set veth1b promisc on
ip link set veth1b mtu 8192
ip link set veth1b up
ip link set wlan0 up
ethtool -K veth1a rx off
ethtool -K veth1a tx off
ethtool -K veth1a sg off
ethtool -K veth1a tso off
ethtool -K veth1a ufo off
ethtool -K veth1a gso off
ethtool -K veth1a gro off
ethtool -K veth1a lro off
ethtool -K veth1a rxvlan off
ethtool -K veth1a txvlan off
ethtool -K veth1a ntuple off
ethtool -K veth1a rxhash off
ethtool --set-eee veth1a eee off
ethtool -K veth1b rx off
ethtool -K veth1b tx off
ethtool -K veth1b sg off
ethtool -K veth1b tso off
ethtool -K veth1b ufo off
ethtool -K veth1b gso off
ethtool -K veth1b gro off
ethtool -K veth1b lro off
ethtool -K veth1b rxvlan off
ethtool -K veth1b txvlan off
ethtool -K veth1b ntuple off
ethtool -K veth1b rxhash off
ethtool --set-eee veth1b eee off
ip addr flush dev veth1a
ip addr add 192.168.128.254/24 dev veth1a |
Add default route to SDN999 for OOBM return traffic (192.168.128.1 is freeRouter sdn999: we will see the full config later) Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | #ADD DEFAULT ROUTE to OOBM SDN999 |
---|
| route add default gw 192.168.128.1 |
|