-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
54 lines (41 loc) · 1.17 KB
/
Makefile
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
46
47
48
49
50
51
52
53
LATEX := pdflatex --synctex=1 -file-line-error
TOPOLOGY_FILE := src/mytopo.py
TOPOLOGY_NAME := mytopo
CONTROLLER_IP := 127.0.0.1
CONTROLLER_PORT := 6633
NSWITCHES := 4
IPERF := iperf3
PORT := 8080
IP := 10.0.0.1
PROT := TCP
PROTFLAGS :=
SWITCHID := 3
LOG_FILE = log.txt
# IPERFFLAGS :=
ifeq (${IPERF}, iperf)
IPERFFLAGS += -e
else
IPERFFLAGS += -V
endif
ifeq (${PROT}, TCP)
PROTFLAGS +=
else
PROTFLAGS += -u
endif
.PHONY: informe
install:
cd pox/ext/; ln -s ../../src/firewall.py || true
cd pox/ext/; ln -s ../../src/translator.py || true
cambiarID:
sed -i 's/IPDELSWITCHCONELFIREWALL = [0-9]/IPDELSWITCHCONELFIREWALL = ${SWITCHID}/' src/firewall.py
run: cambiarID
echo " " > log.txt
pox/pox.py firewall forwarding.l2_learning log.level --DEBUG samples.pretty_log log --file=${LOG_FILE}
mininet:
mn --custom ${TOPOLOGY_FILE} --topo ${TOPOLOGY_NAME},${NSWITCHES} --controller remote,ip=${CONTROLLER_IP},port=${CONTROLLER_PORT}
create-server:
${IPERF} -s -p ${PORT}
send-data:
${IPERF} -c ${IP} ${IPERFFLAGS} -p ${PORT} ${PROTFLAGS}
informe:
$(LATEX) --shell-escape informe/informe.tex