Commit b64528aa authored by Pedro Oliveira's avatar Pedro Oliveira

first try: test existing pimd

parent bcefc317
...@@ -99,3 +99,11 @@ ENV/ ...@@ -99,3 +99,11 @@ ENV/
# mypy # mypy
.mypy_cache/ .mypy_cache/
#netkit
*.tar.bz2
netkit-ng/
emulation/*.disk
# pim # pim
### Topology
![topology](topology.png)
### Execute test
```sh
$ . script.sh
```
### Close test
```sh
$ cd emulation/
$ lcrash
```
router1[0]=A
router1[1]=B
router1[2]=tap,192.168.2.1,192.168.2.2
router1[mem]=256
router2[0]=A
router2[1]=C
router2[mem]=256
ip addr add dev eth0 10.0.0.1/24
ip link set dev eth0 up
ip addr add dev eth1 10.0.1.1/24
ip link set dev eth1 up
#NAT for private ip's
iptables -t nat -A POSTROUTING -s 0.0.0.0/0 -o eth2 -j MASQUERADE
apt-get update && apt-get install pimd
nameserver 8.8.8.8
nameserver 8.8.4.4
ip addr add dev eth0 10.0.0.2/24
ip link set dev eth0 up
ip addr add dev eth1 10.0.1.2/24
ip link set dev eth1 up
#default route para obter conectividade internet
ip route add 0.0.0.0/0 via 10.0.0.1
apt-get update && apt-get install pimd
nameserver 8.8.8.8
nameserver 8.8.4.4
#!/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://github.com/netkit-ng/netkit-ng-build/releases/download/0.1.3/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
export NETKIT_HOME=$(pwd)/netkit-ng
export MANPATH=:$NETKIT_HOME/man
export PATH=$NETKIT_HOME/bin:$PATH
cd netkit-ng
OUTPUT=$(./check_configuration.sh);
if echo $OUTPUT | grep -q "failed"; then
#erro na instalacao do netkit
echo "$OUTPUT"
exit
fi
cd ../emulation/
lstart
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment