README
This docker image contains the can-utils package.
To be able to use/run it, the following steps should be followed:
- The host exposes the virtual interface vcan0. To create a virtual can port on the host:
- sudo modprobe vcan
- For the following error when enabling vcan module, we found a fix by installing the required extra kernel modules with
sudo apt install linux-modules-extra-$(uname -r)
modprobe: FATAL: Module vcan not found in directory /lib/modules/5.4.0-105-generic
- For the following error when enabling vcan module, we found a fix by installing the required extra kernel modules with
- sudo ip link add dev vcan0 type vcan
- sudo ip link set up vcan0
- sudo modprobe vcan
- Generate access token
- go to Access Tokens page
- add token name
- select read_registry and write_registry
- create token
- save the token to a file, as it is visible only once
- Login
- docker login gitlab.cs.pub.ro:5050 -p "INSERT_ACCESS_TOKEN"
- Run the setup using Docker Compose
- docker-compose up
- Generate CAN or Ethernet traffic from the containers
- docker exec <can-container-name> cangen vcan0
- docker exec <eth-container-name> trafgen --dev <eth-if> --conf trafgen.cfg
- View the CAN or Ethernet traffic on the host
- candump vcan0
- tcpdump -i <eth-if>
Or you can use the Makefile. Steps 1-3 remain the same and then:
- Run the setup
- make run
- Generate traffic as mentioned in the previous section
- Scan the traffic on the host
- Stop the containers and delete the images
- make clean
Useful links: