Skip to content

AurelienAubry/NetworkSimulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Simulator

A Docker-based network simulator.

1. Prerequisites:

Docker
Python

Python libraries:

2. Usage:

You must be root to run the following commands.
Start a network

python3 netsim.py start Networks/network.yaml

Stop a network

python3 netsim.py stop Networks/network.yaml

3. Network file:

Example:

network:
    name: example_network
    
    hosts:
        - name: host1
          image: apache
          volume: 
            - /home/user/Docker/apache1/html/
            - /var/www/html/

        - name: host2
          image: apache
          volume: 
            - /home/user/Docker/apache2/html/
            - /var/www/html/

        - name: host3
          image: apache
    
    links:
        - host1:v0:10.0.0.1/24-host2:v0:10.0.0.2/24
        - host1:v1:10.0.1.1/24-host3:v0:10.0.1.3/24