Docker and NGC
#sudo apt-get update
#sudo apt-get install docker.io
#docker --version
#docker images
#docker pull nvcr.io/nvidia/tesnsorflow-:20.12-tf1-py3
#docker ps
How many containers are running.
#docker run -it (interactive flag)
I will go into command prompt
#docker run --rm (delete the container when you exit container)
#docker run -v /home/ritesh/Desktop/:/workspace/test/ (mounting drive )
#docker run –gpus all (Take GPUS: 2,3 for multiple GPUS)
#docker run –name Test (name of container)
#pip show tensorflow
(+nv means optimized version )
#pip show numpy
#pip show pandas
#pip show jupyter
#docker commit <ID> <new name: new tag name>
Duplicate Image
#docker –rmi <Image ID, Third Column>
#docker -it --rm -p 1111:8888
Port forwarding (1111(outside Container):8888(Inside Container))
#docker image save -o /home/ritesh/desktop/jyputer.tar (imcomplete command)
#docker image ps
#docker attach <Container ID received from ps command>
To get into command prompt
Control P +Q : Exit from docker container
#docker image load -I /desktop/jupyter.tar
To load jupyter from locally saves .tar file
#docker login
#docker push <Repo name:version>
Name Space
Ubuntu Gets crashed then for recover
Open Ubuntu in Receovery Mode & Type following command
#sudo update-initramfs -u -k version
Version you will fund under /lib/modules
Then type following command to update grub
#sudo update-grub
Restart Machine.
Install Ubuntu
To get the full screen of Ubuntu
#sudo apt-get update
#sudo apt-get install build-essential gcc make perl dkms.
install from VirtualBoxCD Image
Reboot the system
#sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
Reboot the system
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++Day-1++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Name Space
Install following packages
sudo apt install iperf iperf3 netperf tcpdump wireshark
sudo su
ip netns del red
ip netns del blue
ip netns add red
ip netns add blue
ip link add eth-red type veth peer name eth-blue
ip link set eth-red netns red
ip link set eth-blue netns blue
ip netns exec red ip link set lo up
ip netns exec red ip link set eth-red up
ip netns exec blue ip link set lo up
ip netns exec blue ip link set eth-blue up
ip netns exec red ip address add 10.0.0.1/24 dev eth-red
ip netns exec blue ip address add 10.0.0.2/24 dev eth-blue
#######Red##############
Open New Terminal
sudo su
ip netns exec red bash
tc qdisc show dev eth-red
tc qdisc add dev eth-red root netem delay 5ms rate 10mbit
iperf -s
#######Blue##############
Open New Terminal
sudo su
ip netns exec blue bash
tc qdisc show dev eth-blue
tc qdisc add dev eth-blue root netem delay 10ms rate 50mbit
iperf -c 10.0.0.1
######################################################
Afternoon Session
sudo su
ip netns del red
ip netns del blue
ip netns del router
ip netns add red
ip netns add blue
ip netns add router
ip link add eth-red type veth peer name eth-router0
ip link add eth-router1 type veth peer name eth-blue
ip link set eth-red netns red
ip link set eth-blue netns blue
ip link set eth-router0 netns router
ip link set eth-router1 netns router
ip netns exec red ip link set lo up
ip netns exec blue ip link set lo up
ip netns exec router ip link set lo up
ip netns exec red ip link set eth-red up
ip netns exec router ip link set eth-router0 up
ip netns exec router ip link set eth-router1 up
ip netns exec blue ip link set eth-blue up
ip netns exec red ip address add 10.0.0.1/24 dev eth-red
ip netns exec router ip address add 10.0.0.2/24 dev eth-router0
ip netns exec router ip address add 11.0.0.1/24 dev eth-router1
ip netns exec blue ip address add 11.0.0.2/24 dev eth-blue
ip netns exec red ip route add default via 10.0.0.2 dev eth-red
ip netns exec blue ip route add default via 11.0.0.1 dev eth-blue
ip netns exec router sysctl -w net.ipv4.ip_forward=1
#######Router##############
Open New Terminal
sudo su
ip netns exec router bash
tc qdisc add dev eth-router0 root netem delay 5ms rate 10mbit
tc qdisc add dev eth-router1 root netem delay 5ms rate 100mbit
#######Red##############
Open New Terminal
sudo su
ip netns exec red bash
ping 11.0.0.2
tc qdisc show dev eth-red
tc qdisc add dev eth-red root netem delay 5ms rate 100mbit
iperf -s
#######Blue##############
Open New Terminal
sudo su
ip netns exec blue bash
ping 10.0.0.1
tc qdisc show dev eth-blue
tc qdisc add dev eth-blue root netem delay 10ms rate 10mbit
iperf -c 10.0.0.1
#############################################################
Day-2 Session-1
Installation Instructions:
1. Ensure pip is installed (python3 -m pip -V). If not, run:
$ sudo apt install python3-pip
2. [Optional but recommended] Upgrade pip
$ python3 -m pip install -U pip
3. Install NeST
$ python3 -m pip install nitk-nest
4. Install Netperf
$ sudo apt install netperf
These steps will be sufficient for session 1 tomorrow. Session 2 will cover running dynamic routing protocols in NeST (rip, ospf, isis). If you would like to follow that too, then:
5. Install Quagga
$ sudo apt install quagga quagga-doc
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++Day-2++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
https://nitk-nest.github.io/docs/tutorial/tutorial.html
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++Day-3++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Session -1
Session -2
$ sudo apt install hostapd
ip netns del red
ip netns del blue
ip netns add red
ip netns add blue
modprobe mac80211_hwsim radios=2
iw dev
iw phy phy0 set netns name red
iw phy phy1 set netns name blue
ip netns exec red ip link
ip netns exec blue ip link
ip netns exec red ip link set lo up
ip netns exec red ip link set wlan0 up
ip netns exec blue ip link set lo up
ip netns exec blue ip link set wlan1 up
sudo ip link set hwsim0 up
ip netns exec red ip address add 10.0.0.1/24 dev wlan0
ip netns exec blue ip address add 10.0.0.2/24 dev wlan1
sudo ip netns exec blue ping 10.0.0.2
#######Red##############
Open New Terminal
sudo su
ip netns exec red bash
ip address
iw dev
iw dev wlan0 set type ibss
iw dev wlan0 ibss join MyIBSS 2412
iw dev wlan0 ibss leave
iw dev wlan0 ibss join MyIBSS 2412
iw dev wlan0 ibss leave
iw dev wlan0 set type managed
hostapd hostapd.conf
#######Blue##############
Open New Terminal
sudo su
ip netns exec blue bash
ip address
iw dev
iw dev wlan1 set type ibss
iw dev wlan1 ibss join MyIBSS 2412
iw dev wlan1 ibss leave
iw dev wlan1 ibss join MyIBSS 2412
iw dev wlan1 ibss leave
iw dev wlan1 set type managed
wpa_supplicant -i wlan1 -c wpa_supplicant.conf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++Day-4++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++Day-5++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++