---
# System prepended metadata

title: Mininet simulate SDN environment with Ryu and OvS
tags: [class notes]

---

# Mininet simulate SDN environment with Ryu and OvS
###### tags: `class notes`

## Task1:
create nodes(c0, s1, h1, h2, h3)
![](https://i.imgur.com/qNqH7Yv.png)
### Two way to add 3 Flows:
Arp Request Query:h1(10.0.0.1) to h2(10.0.0.2)
h2 mac addr(00:00:00: 00:00:02) ->output to port 2
h1 mac addr(00:00:00: 00:00:01) ->output to port 1
* use ovs-ofctl add-flow function in mininet
![](https://i.imgur.com/wFkOG8R.png)
xterminal display nodes info
![](https://i.imgur.com/Spamfpt.png)
![](https://i.imgur.com/O7R1K0J.png)

* use postman to add flow into localhost
![](https://i.imgur.com/T07A8lR.png)
![](https://i.imgur.com/AQoWefB.png)
![](https://i.imgur.com/RcG0RvK.png)


## Task2:
I complete the mysw_basic.py, and successfully run it:
At controller
![](https://i.imgur.com/L1ihOHb.png)
At mininet
![](https://i.imgur.com/6bq1L5A.png)

## Task3:
Finish the code, successful operate on OvS as well:
![](https://i.imgur.com/eQknPES.png)

![](https://i.imgur.com/SCpXuDZ.png)
