noxrepo / pox

The POX network software platform
https://noxrepo.github.io/pox-doc/html/
Apache License 2.0
619 stars 470 forks source link

pox can't listening on OpenWrt #278

Closed EngHassanJ closed 2 years ago

EngHassanJ commented 2 years ago

I want to create ovs bridge to add controller listening on Router wirelessly

any suggestion for this please ? Screen Shot 2022-05-15 at 5 27 59 PM

Screen Shot 2022-05-15 at 5 28 23 PM

MurphyMc commented 2 years ago

It looks likely to me that this version of POX has been modified, so it's hard to provide much help.

The error message indicates that it looks like you're running POX on a machine that doesn't have address 192.168.1.1, though. If you do "ifconfig", do any interfaces have 192.168.1.1?

EngHassanJ commented 2 years ago

It looks likely to me that this version of POX has been modified, so it's hard to provide much help. ;;;

which version is stable? what is the possible solution?

the outout of ifconfig:

Screen Shot 2022-05-14 at 2 51 37 PM

MurphyMc commented 2 years ago

If you do git status in the POX directory, does it show no modifications?

Regarding your ifconfig... I am guessing that's the output of ifconfig on the OpenWRT device. Is that right? That's not the one that matters. The one that matters is where you're running POX, which I suspect is not the same device.

You want to configure OVS to connect to POX. You give it the remote address where the controller is.

EngHassanJ commented 2 years ago

If you do git status in the POX directory, does it show no modifications? Screen Shot 2022-05-15 at 9 28 36 PM

yes, you are right, I running pox on VirtualBox , and ovs on the router

You want to configure OVS to connect to POX. You give it the remote address where the controller is

is that mean, need to give ovs' configuration the IP's of POX controller or vice versa?
also, how can know the default IP of POX?

I'm sorry for asking multiple questions

MurphyMc commented 2 years ago

Right, so you've made some modifications to POX. That makes it hard for me to give good advice, especially since I'm not sure your modifications are correct (it looks to me like maybe you've hardcoded it to bind to 192.168.1.1, which is probably wrong and also not necessary even if it's right, since you could specify this on the command line). Unless you really know what you're doing, I suggest you revert to POX without changes.

You want to configure OVS to connect to POX. You give it the remote address where the controller is

is that mean, need to give ovs' configuration the IP's of POX controller or vice versa?

You're using ovs-vsctl's set-controller command, and currently telling it the address of the controller is 192.168.1.1. But I don't think that's the address of the controller. The controller is POX. The address given to OVS via set-controller should be the address where POX is running. The usual case for OpenFlow is that the controller (e.g., POX) listens for connections, and the switches make active TCP connections to the controller.

also, how can know the default IP of POX?

There is no such thing. The IP for POX is the address for the machine where POX is running. You could use ifconfig from the machine where POX is running to see what IP addresses it has. In your case, things may be slightly complex because you're running POX in a virtual machine. I think VirtualBox's default network configuration is to use NAT, so the IP addresses inside a VM is not directly accessible from outside the VM. You need to add a port forwarding rule in the VM configuration (e.g., to forward port 6633), or use a bridged connection instead of a NAT connection or something. This is general network/VM configuration stuff, outside the scope of POX.

EngHassanJ commented 2 years ago

thank you for replying

I revert openflow.of_01 file to orginal with address:0.0.0.0

Screen Shot 2022-05-19 at 1 16 57 PM

and the openvswitch with out change is :

Screen Shot 2022-05-19 at 1 37 30 PM

even when I use ovs-vsctl set-controller tcp:192.168.0.1:6633 it does not connect to pox I use opkg install openvswitch command to install ovs

this is the openvswitch script as it is : Screen Shot 2022-05-19 at 1 35 04 PM

what is your suggestion?

MurphyMc commented 2 years ago

I don't know your network setup, so I can only be just so helpful here.

You need to know the IP address of the machine where the controller is running, and that address needs to be reachable with an active connection from the switch.

As I said, a good first step is running ifconfig on the (virtual?) machine where POX runs. Have you done that?

EngHassanJ commented 2 years ago

I don't know your network setup, so I can only be just so helpful here.

You need to know the IP address of the machine where the controller is running, and that address needs to be reachable with an active connection from the switch.

As I said, a good first step is running ifconfig on the (virtual?) machine where POX runs. Have you done that?

here it is : Screen Shot 2022-05-29 at 9 28 59 PM

I have MacBook Pro and the POX controller is on the Ubuntu VB

MurphyMc commented 2 years ago

So it looks like OVS should be set for a controller running on 192.168.1.197.

EngHassanJ commented 2 years ago

yeah Mr. MurphyMc , this is great,

So it looks like OVS should be set for a controller running on 192.168.1.197.

The controller starts listening when setting the same IP of the VM thank you so much, Mr

Screen Shot 2022-06-14 at 11 02 32 AM

Screen Shot 2022-06-14 at 11 01 46 AM