Feat: Lab1 done
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "docs/template"]
|
||||
path = docs/template
|
||||
url = ../typst-template
|
||||
BIN
docs/main.pdf
Normal file
69
docs/main.typ
Normal file
@@ -0,0 +1,69 @@
|
||||
#import "template/module.typ": *
|
||||
|
||||
#show: default.with(
|
||||
title: "SDN - Lab 1",
|
||||
authors: ((
|
||||
name: "Yi-Ting Shih (111550013)",
|
||||
affiliation: "National Yang Ming Chaio Tung University",
|
||||
email: "ytshih@cs.nycu.edu.tw",
|
||||
),),
|
||||
)
|
||||
|
||||
= Part 1: Answer Questions
|
||||
|
||||
1. When ONOS activate "org.onosproject.openflow," what APPs does it activate?
|
||||
|
||||
It activates:
|
||||
- org.onosproject.openflow
|
||||
- org.onosproject.hostprovider
|
||||
- org.onosproject.lldpprovider
|
||||
- org.onosproject.openflow-base
|
||||
- org.onosproject.optical-model
|
||||
|
||||
2. After we activate ONOS and run P.17 Mininet command, will H1 ping H2 successfully? Why or why not?
|
||||
|
||||
No, S1 and S2 will not forward packets unless `org.onosproject.fwd` is activated.
|
||||
|
||||
3. Which TCP port does the controller listen to the OpenFlow connection request from the switch? (Take screenshot and explain your answer.)
|
||||
|
||||
> netstat before activating `org.onosproject.openflow-base`
|
||||
#image("part1-1.png", width: 350pt)
|
||||
|
||||
> netstat after activating `org.onosproject.openflow-base`
|
||||
#image("part1-2.png", width: 350pt)
|
||||
|
||||
The ports that appeared only when openflow-base were enabled are:
|
||||
- tcpv6 `:::6633`
|
||||
- tcpv6 `:::6653`
|
||||
|
||||
4. In question 3, which APP enables the controller to listen on the TCP port?
|
||||
|
||||
`org.onosproject.openflow-base`
|
||||
|
||||
= Part 2: Create a custom Topology
|
||||
|
||||
> Run your Python script and use command "pingall"
|
||||
#image("part2-1.png", width: 350pt)
|
||||
|
||||
> Then take a screenshot of topology on GUI
|
||||
#image("part2-2.png", width: 350pt)
|
||||
|
||||
= Part 3: Statically assign Hosts IP Address in Mininet
|
||||
|
||||
> command "dump"
|
||||
#image("part3-1.png", width: 350pt)
|
||||
|
||||
> "ifconfig" on host h1
|
||||
#image("part3-2.png", width: 350pt)
|
||||
|
||||
> "ifconfig" on host h2
|
||||
#image("part3-3.png", width: 350pt)
|
||||
|
||||
> "ifconfig" on host h3
|
||||
#image("part3-4.png", width: 350pt)
|
||||
|
||||
> "ifconfig" on host h4
|
||||
#image("part3-5.png", width: 350pt)
|
||||
|
||||
> "ifconfig" on host h5
|
||||
#image("part3-6.png", width: 350pt)
|
||||
BIN
docs/part1-1.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
docs/part1-2.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
docs/part2-1.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
docs/part2-2.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
docs/part3-1.png
Normal file
|
After Width: | Height: | Size: 130 KiB |
BIN
docs/part3-2.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
docs/part3-3.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
docs/part3-4.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
docs/part3-5.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
docs/part3-6.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
1
docs/template
Submodule
BIN
lab1_111550013/lab1_111550013.pdf
Normal file
BIN
lab1_111550013/lab1_111550013.zip
Normal file
28
lab1_111550013/lab1_part2_111550013.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from mininet.topo import Topo
|
||||
|
||||
class Lab1_Topo_111550013(Topo):
|
||||
def __init__(self):
|
||||
Topo.__init__(self)
|
||||
|
||||
h1 = self.addHost('h1')
|
||||
h2 = self.addHost('h2')
|
||||
h3 = self.addHost('h3')
|
||||
h4 = self.addHost('h4')
|
||||
h5 = self.addHost('h5')
|
||||
|
||||
s1 = self.addSwitch('s1')
|
||||
s2 = self.addSwitch('s2')
|
||||
s3 = self.addSwitch('s3')
|
||||
s4 = self.addSwitch('s4')
|
||||
|
||||
self.addLink(h1, s1)
|
||||
self.addLink(h2, s2)
|
||||
self.addLink(h3, s3)
|
||||
self.addLink(h4, s4)
|
||||
self.addLink(h5, s4)
|
||||
|
||||
self.addLink(s1, s2)
|
||||
self.addLink(s2, s3)
|
||||
self.addLink(s2, s4)
|
||||
|
||||
topos = {'topo_part2_111550013': Lab1_Topo_111550013}
|
||||
28
lab1_111550013/lab1_part3_111550013.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from mininet.topo import Topo
|
||||
|
||||
class Lab1_Topo_111550013(Topo):
|
||||
def __init__(self):
|
||||
Topo.__init__(self)
|
||||
|
||||
h1 = self.addHost('h1', ip='192.168.0.1/27')
|
||||
h2 = self.addHost('h2', ip='192.168.0.2/27')
|
||||
h3 = self.addHost('h3', ip='192.168.0.3/27')
|
||||
h4 = self.addHost('h4', ip='192.168.0.4/27')
|
||||
h5 = self.addHost('h5', ip='192.168.0.5/27')
|
||||
|
||||
s1 = self.addSwitch('s1')
|
||||
s2 = self.addSwitch('s2')
|
||||
s3 = self.addSwitch('s3')
|
||||
s4 = self.addSwitch('s4')
|
||||
|
||||
self.addLink(h1, s1)
|
||||
self.addLink(h2, s2)
|
||||
self.addLink(h3, s3)
|
||||
self.addLink(h4, s4)
|
||||
self.addLink(h5, s4)
|
||||
|
||||
self.addLink(s1, s2)
|
||||
self.addLink(s2, s3)
|
||||
self.addLink(s2, s4)
|
||||
|
||||
topos = {'topo_part3_111550013': Lab1_Topo_111550013}
|
||||