Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pim_dm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
pim_dm
Commits
42fa12d9
Commit
42fa12d9
authored
Jun 16, 2020
by
Pedro Oliveira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use kathara instead of netkit
parent
ca26ca39
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
50 additions
and
31 deletions
+50
-31
README.md
README.md
+14
-6
emulation/lab.conf
emulation/lab.conf
+12
-1
emulation/router1.startup
emulation/router1.startup
+2
-2
emulation/router1/root/script.sh
emulation/router1/root/script.sh
+1
-0
emulation/router2.startup
emulation/router2.startup
+1
-0
emulation/router2/root/script.sh
emulation/router2/root/script.sh
+1
-0
emulation/router3.startup
emulation/router3.startup
+1
-0
emulation/router3/root/script.sh
emulation/router3/root/script.sh
+1
-0
emulation/router4.startup
emulation/router4.startup
+1
-0
emulation/router4/root/script.sh
emulation/router4/root/script.sh
+1
-0
script.sh
script.sh
+15
-22
No files found.
README.md
View file @
42fa12d9
#
pim
#
PIM-DM - Test Neighborhood establishment
### Topology
![
topology
](
topology.png
)
### Execute test
### Requirements
-
Kathara (https://www.kathara.org/)
-
Docker
-
gnome-terminal
### Execute lab test
```
sh
$
.
script.sh
```
### Close test
This script file will clone pim-dm repository to get the most updated version on the lab environment. Then will start the VMs through Kathara and change some settings on the virtual bridges that connect the VMs.
### Close lab test
```
sh
$
cd
emulation/
$
lcrash
$
kathara wipe
```
emulation/lab.conf
View file @
42fa12d9
LAB_DESCRIPTION
=
"Lab for testing the discovery of neighbors on PIM-DM"
LAB_VERSION
=
1
.
0
LAB_AUTHOR
=
"Pedro Oliveira"
LAB_EMAIL
=
pedro
.
francisco
.
oliveira
@
tecnico
.
ulisboa
.
pt
#########################################
# Router setup
#########################################
router1
[
0
]=
A
router1
[
1
]=
tap
,
192
.
168
.
2
.
1
,
192
.
168
.
2
.
2
router1
[
bridged
]=
true
router1
[
mem
]=
256
router1
[
image
]=
"pedrofran12/kathara-hpim-dm"
router2
[
0
]=
B
router2
[
mem
]=
256
router2
[
image
]=
"pedrofran12/kathara-hpim-dm"
router3
[
0
]=
C
router3
[
mem
]=
256
router3
[
image
]=
"pedrofran12/kathara-hpim-dm"
router4
[
0
]=
D
router4
[
mem
]=
256
router4
[
image
]=
"pedrofran12/kathara-hpim-dm"
#########################################
# Switch setup
...
...
@@ -22,4 +32,5 @@ switch1[1]=B
switch1
[
2
]=
C
switch1
[
3
]=
D
switch1
[
mem
]=
256
switch1
[
image
]=
"pedrofran12/kathara-hpim-dm"
emulation/router1.startup
View file @
42fa12d9
ip addr add dev eth0 10.0.0.1/24
ip -6 addr add 2001:0:0:1::1/64 dev eth0
ip link set dev eth0 up
emulation/router1/root/script.sh
View file @
42fa12d9
...
...
@@ -4,4 +4,5 @@ python3 Run.py -stop
python3 Run.py
-start
python3 Run.py
-t
R1 10.0.0.5
python3 Run.py
-ai
eth0
python3 Run.py
-ai
eth0
-6
python3 Run.py
-v
emulation/router2.startup
View file @
42fa12d9
ip addr add dev eth0 10.0.0.2/24
ip -6 addr add 2001:0:0:1::2/64 dev eth0
ip link set dev eth0 up
emulation/router2/root/script.sh
View file @
42fa12d9
...
...
@@ -4,4 +4,5 @@ python3 Run.py -stop
python3 Run.py
-start
python3 Run.py
-t
R2 10.0.0.5
python3 Run.py
-ai
eth0
python3 Run.py
-ai
eth0
-6
python3 Run.py
-v
emulation/router3.startup
View file @
42fa12d9
ip addr add dev eth0 10.0.0.3/24
ip -6 addr add 2001:0:0:1::3/64 dev eth0
ip link set dev eth0 up
emulation/router3/root/script.sh
View file @
42fa12d9
...
...
@@ -4,4 +4,5 @@ python3 Run.py -stop
python3 Run.py
-start
python3 Run.py
-t
R3 10.0.0.5
python3 Run.py
-ai
eth0
python3 Run.py
-ai
eth0
-6
python3 Run.py
-v
emulation/router4.startup
View file @
42fa12d9
ip addr add dev eth0 10.0.0.4/24
ip -6 addr add 2001:0:0:1::4/64 dev eth0
ip link set dev eth0 up
emulation/router4/root/script.sh
View file @
42fa12d9
...
...
@@ -5,4 +5,5 @@ python3 Run.py -stop
python3 Run.py
-start
python3 Run.py
-t
R4 10.0.0.5
python3 Run.py
-ai
eth0
python3 Run.py
-ai
eth0
-6
python3 Run.py
-v
script.sh
View file @
42fa12d9
#!/bin/bash
if
[
!
-d
"netkit-ng"
]
;
then
# se pasta netkit-ng nao existir descomprimir ficheiros
wget
-nc
https://github.com/netkit-ng/netkit-ng-core/releases/download/3.0.4/netkit-ng-core-32-3.0.4.tar.bz2
wget
-nc
https://web.ist.utl.pt/~ist177956/netkit/netkit-ng-filesystem-i386-F7.0-0.1.3.tar.bz2
wget
-nc
https://github.com/netkit-ng/netkit-ng-build/releases/download/0.1.3/netkit-ng-kernel-i386-K3.2-0.1.3.tar.bz2
tar
-xjSf
netkit-ng-core-32-3.0.4.tar.bz2
tar
-xjSf
netkit-ng-filesystem-i386-F7.0-0.1.3.tar.bz2
tar
-xjSf
netkit-ng-kernel-i386-K3.2-0.1.3.tar.bz2
fi
if
[
!
-d
"emulation/shared/root/pim_dm"
]
;
then
# if project does not exist, clone it
git clone https://github.com/pedrofran12/pim_dm.git emulation/shared/root/pim_dm
fi
export
NETKIT_HOME
=
$(
pwd
)
/netkit-ng
export
MANPATH
=
:
$NETKIT_HOME
/m
an
export
PATH
=
$NETKIT_HOME
/bin:
$PATH
cd
emulation/
sudo
kathara lcle
an
sudo
kathara lstart
--privileged
cd
netkit-ng
OUTPUT
=
$(
./check_configuration.sh
)
;
if
echo
$OUTPUT
|
grep
-q
"failed"
;
then
#erro na instalacao do netkit
echo
"
$OUTPUT
"
exit
fi
# open terminal of all nodes
for
f
in
*
;
do
if
[
-d
"
$f
"
-a
"
$f
"
=
~
"shared"
]
;
then
gnome-terminal
--
kathara connect
"
$f
"
;
fi
done
for
f
in
$(
ls
/sys/devices/virtual/net/ |
grep
"kt"
)
;
do
sudo
bash
-c
"echo 0 > /sys/devices/virtual/net/
$f
/bridge/multicast_snooping"
done
cd
../emulation/
lstart
-p
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment