# Connect mininet hosts to root namespace

**URL:** <https://forum.p4.org/t/connect-mininet-hosts-to-root-namespace/91>\
**Category:** Uncategorized\
**Created:** [July 27, 2021, 6:07pm UTC](https://forum.p4.org/t/connect-mininet-hosts-to-root-namespace/91 "2021-07-27T18:07:47Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ederollora](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/ederollora/32/21_2.png) [@ederollora](https://forum.p4.org/u/ederollora)\
**Post date:** [August 5, 2021, 12:59pm UTC](https://forum.p4.org/t/connect-mininet-hosts-to-root-namespace/91/4 "2021-08-05T12:59:04Z")

</div>

**Let me tell you that I have not tested my following advice, so the steps I tell you to do might or not work. I believe they do work, but you need to test it. 🧐**

> Thank you so much for your answer. I asked in this forum because I believe p4 switch may impose some kind of limitations.

I think if there are any limitations, it is about Mininet probably. But we can sometimes try to help, of course 🙂

> A link is shown between root-eth0 and s1-eth5. However, when listing mininet networks’ nodes I cannot see any new host. I would like to place one host in root namespace, open its terminal, e.g. xterm h5 and then, as it is in the rootnamespace, would like to test I can ping to my host ip address(outside mininet). My aim is to be capable of accessing to some services running in my host machine from a mininet host. That’s why I believe placing a host in rootnamespace would make it possible.

So, you probably do not need any “host” since you already have the actual “host”. I mean why not use the terminal from the “host machine”?. You will need additional [“route” commands](https://www.thegeekstuff.com/2012/04/route-examples/) and [ARP rules](https://www.xmodulo.com/how-to-add-or-remove-static-arp-entry-on-linux.html) in the host machine to be able to route packets out of root-eth0 AND rules in the switch to route packets towards root-eth0. Not sure if you understand what I mean. Once you enable forwarding between Mininet and host machine, Mininet hosts should be able to access services running in the host machine.

I made a “kinda” descriptive picture:

 ![example](https://us1.discourse-cdn.com/flex019/uploads/p4/original/1X/35e32f53e360caaa0a644bb45feb1e5c39daded7.png)

Hope it helps Sally.

Cheers,

---

_[View the full topic](https://forum.p4.org/t/connect-mininet-hosts-to-root-namespace/91)._
