-
Notifications
You must be signed in to change notification settings - Fork 11
/
settings.py
45 lines (34 loc) · 1.89 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from os import environ
# tell Django about the Django settings file
environ['DJANGO_SETTINGS_MODULE'] = 'web.settings'
# IP of the server this simulator works for
VNS_WEB_SERVER_IP = 'localhost'
# location where the VNS web server will listen
VNS_WEB_SERVER_PORT = 80
# Whether to forward packets addressed to 10/8, 172.16/12, or 192.168/16
# addresses out to the network (off of the simulator). This does not affect
# forwarding within the simulation.
MAY_FORWARD_TO_PRIVATE_IPS = True
# The interface which connects the simulator to the real network. All packets
# will be sniffed from this interface. If the packet is addressed to one of the
# simulated topology's Ethernet addresses (or is an ARP request for the Ethernet
# address of one its gateway node IPs), then it will be injected onto the
# appropriate topology. Packets coming off simulated topology's will be put out
# on this interface. If it is the empty string, then the similar is isolated.
BORDER_DEV_NAME = 'eth0'
# The list of IPs to NOT inject from the real world to the simulator. Usually,
# you want the simulator machine's own IP address to be in this list.
IP_ADDRS_TO_FILTER_OUT = []
# The filter describing what packets to inject from those sniffed from the real
# world. The default is to inject everything except IP packets to or from
# addresses in the IP_ADDRS_TO_FILTER_OUT list.
PCAP_FILTER = ' and '.join(['not ip dst %s and not ip src %s' % (a,a) for a in IP_ADDRS_TO_FILTER_OUT])
# How long may a topology's gateway cache the ARP translation of the first hop
# node on the topology (in seconds).
ARP_CACHE_TIMEOUT = 30
# Max time (in seconds) which a topology may be active. (0 = no max)
MAX_TOPOLOGY_LIFE_SEC = 3600
# Max time (in seconds) to keep an idle topology. (0 = no max)
MAX_INACTIVE_TOPOLOGY_LIFE_SEC = 900
# For VNS web server nodes: root folder which they will serve from
WEB_SERVER_ROOT_WWW = './vns_web_server_www/'