p001 example 1 - nihole/PSEFABRIC GitHub Wiki
Brief Descrition
This example shows how to manage (create/delete/change) vlans, networks, interfaces. In this example, we will configure all networks (except loopbacks), vlans, interfaces (https://github.com/nihole/PSEFABRIC/wiki/Structure) described in the scheme above are configured here.
Prerequisites
- Installation procedure has to be done
- EVE lab environment has to be installed
Zero Configuration
It is assumed that this test starts with a zero configuration. So, let's start by cleaning some of the possible previous configurations.
cd $PSEFABRIC
sh psef_clean.sh
- Run the CONFD.
cd $CONFD_DIR/myprojects/psefabric
sudo make all start
Don't close this window. You will see here if everything is fine.
- Now create one more terminal session and in the new window execute this command
sudo make cli
All configuration of PSEFABRIC will be done in this window.
- Create one more terminal session
At this point, we have 3 terminal sessions.
Now we may begin our configurations.
Add Configuration
cd $PROJECT/PSEF_DOCS/EXAMPLES/EXAMPLE_1/AD
more term_download.conf
- copy and paste this output in CONFD (second window, in configuration mode)
commit
If there are some errors, you will see them in the first terminal window. If everything is fine configuration files will be created:
Current config file of PSEFABRIC
$PSEFABRIC/PSEF_CONF/pse-config.xml
Configuration files of MOs (real equipment)
$PSEFABRIC/PSEF_CONF/EQ_CONF/dc1_fw1.xml
$PSEFABRIC/PSEF_CONF/EQ_CONF/dc1_sw1.txt
$PSEFABRIC/PSEF_CONF/EQ_CONF/dc2_fw1.txt
$PSEFABRIC/PSEF_CONF/EQ_CONF/dc2_sw1.txt
$PSEFABRIC/PSEF_CONF/EQ_CONF/dc3_r1.txt
$PSEFABRIC/PSEF_CONF/EQ_CONF/dc3_sw1.txt
It's a good practice to open these files and check whether everything matches your wishes.
To upload these configurations at lab equipment in the folder $PSEFABRIC/PSEF_SCRIPTS/EQ_SCRIPTS
execute this command
perl load_all.pl
If everything is fine, the output will be something like this
dc1_sw1...
dc1_sw1 OK
dc3_r1...
dc3_r1 OK
dc2_sw1...
dc2_sw1 OK
dc2_fw1...
dc2_fw1 OK
dc3_sw1...
dc3_sw1 OK
dc1_fw1...
dc1_fw1 OK
Remove Configuration
cd $PROJECT/PSEF_DOCS/EXAMPLES/EXAMPLE_1/RM
You have to repeat the same steps as in the previous example. But in this case (when we want to delete all configuration we've done) the easiest way is to perform the commands
rollback configuration 0
commit
Change Configuration
cd $PROJECT/PSEF_DOCS/EXAMPLES/EXAMPLE_1/CH
You have to repeat the same steps as in the Addition example.
Diagnostics and Troubleshooting
- First of all, if something is wrong you usually can see logs in the first terminal window (where command
make start
has been executed) - You may also see logs in the process of uploading of configuration to equipment.
- And of course you may see the configuration of lab equipment make all usual diagnostics and troubleshooting.
- You may check the configurations for the equipment in the folder
$PSEFABRIC/PSEF_CONF/EQ_CONF/
- There is a powerful debugging mechanism in this PSEFABRIC implementation. You may examine any essential internal data exchange. If debugging is on (you may turn it on/off in
$PSEFABRIC/PSEF_SCRIPTS/psef_debug.py
) this information is saved in the folder$PSEFABRIC/PSEF_LOGS/
.
To understand the meaning and the place in the Psefabric Management Data Flow Model see Detailed scheme of implementation