CONFIGURING MONGODB

If you need to change the configuration, edit the /etc/mongod.conf file to adjust parameters such as bindIP and ports. After editing the file, restart MongoDB:

sudo systemctl restart mongod

Step 7: Installing Mininet and Configuring VLANs

1. Install Mininet:

sudo apt install mininet

2. To run Mininet with a linear topology of 3 switches and a remote controller:

sudo mn --topo=linear,3 --controller=remote,ip=127.0.0.1

3. To configure VLANs on the machines:

h1 ip link add link h1-eth0 name vlan198 type vlan id 198
    h1 ip link set up vlan198
    h1 ip addr add 10.1.98.1/24 dev vlan198
    
    h3 ip link add link h3-eth0 name vlan198 type vlan id 198
    h3 ip link set up vlan198
    h3 ip addr add 10.1.98.3/24 dev vlan198

4. Test if the ping responds between hosts:

h1 ping 10.1.98.3

Step 8: Necessary Configurations After Restarting the Environment

1. Activate the virtual environment and configure MongoDB variables:

source test/bin/activate
    export MONGO_USERNAME=k1
    export MONGO_PASSWORD=k1
    export MONGO_DBNAME=k1

2. Start Kytos with the MongoDB database:

kytosd -f --database mongodb