Is it possible to change the configuration of OVS switch in Mininet topology from ODL controller? - sdn

I am a newbie to SDN domain. I implemented my custom Mininet topology with multiple remote ODL controllers.
I am now testing to change the pre-configuration of OVS switch (i.e., controller ip address to another ip address of controller) in Mininet from ODL controller.
Is it possible to change the preconfigured mapping between switch and controller in run time?
If it is possible, I would like to know the steps to follow.

You can either try to use server name instead of IP address, or you can put a tcp proxy between your switch and the controller.
Very simple example might be a use of netcat to forward traffic to the remote controller:
./netcat -L ${controller_ip_address}:${controller_openflow_port} -p ${local_port}
and let your mininet connect to netcat, which will forward the request to the remote controller
sudo mn --controller=remote,ip=127.0.0.1,port=${local_port}

Related

how to identify the ip address of mininet network?

I have set up a preview of ryu controller and mininet,but i am not able to identify the mininet ip address as well as not able to ping from other vm machine.But i am able to get the ip of mininet sub-host.
If you want to ping a VM from another VM, you must configure 'Bridged Adapter` for each VM, that way they both have access to the network that you are using, take a look at this.

Mininet openflow tutorial

I am new to mininet and trying to follow the tutorial on mininet/openflow https://github.com/mininet/openflow-tutorial/wiki/Learn-Development-Tools
I have a problem with the Wireshark capture, it's only capturing TCP packets on the lo interface, no OpenFlow packets at all.
any idea what might be wrong?
Cheers,
ami
I think you use openflow on port 6634 but as you can see here in wireshark documentation it expects to see OpenFlow packets on port 6633 or 6653.
I prefer to use third party controller but if you want to use mininet default controller, you can set its port with:
sudo controller ptcp:6653
mininet
when starting Mininet, it sets the controller in my case to port 6653.
Calling the openflow controller later on, I had to specify the port too:sudo controller ptcp:6653

Pica8 SDN whiteswitch ping from mangement console to host port

I am connecting my controller PC to a Pica8 white switch via the Management port. I can SSH into the switch and ping the controller PC, however I cant ping the hosts through the standard ports. I have created a bridge of the first four ports and have successfully pinged from host to host after I installed a flow that allowed it.
My question is, is there some kind of mechanism separating the controller port from all of the data ports, I would think I should be able to ping from the switch to the hosts.
I'm not sure this answers your question, but before pinging the management port I believe you need to set an IP for it via the console port.
I use minicom per the instructions located here. However, I am using the RJ45 to DB9 adapter cable -> USB Serial port connection. That looks like so.
Unfortunately, that creates a problem with minicom, since the instructions tell you to simply power up the switch and observe the received data. There is actually a little more to it than that. You have to configure minicom's serial port. Fortunately, there is a tech blog that I found very helpful. If you follow the provided instructions, it will walk you through changing ports. Once you modify the port that minicom is listening on (For me it is Port /dev/ttyUSB0), you should be able to configure your management port.

How to setup the VIP in Avi Vantage on a Linux Cloud

I've been trying to get Avi Vantage running on a single linux box using the docker installation method described here, using the "single host deployment" method:
http://kb.avinetworks.com/installing-avi-vantage-for-a-linux-server-cloud/
I've got the Controller and the Service Engine running and the Controller can see the Service Engine. Now, I'm trying to create a Virtual Service, but I'm not sure how to configure the Virtual IP (VIP).
What network interface should I bind the VIP to?
VIP is bound to interface based on the reachability. This is done automatically by placement manager.
case-1
Say eth0 - 1.1.1.2/24 and when vip is in the same subnet (say 1.1.1.100), vs placement logic will choose eth0.
case-2:
Say eth0 - 1.1.1.2/24 and when vip is in the different subnet (say 100.100.100.100), you can set the placement subnet in vs (advanced settings). That will force the vs to be placed on eth0
case-3:
The above can be done without placement subnet by using BGP. Configure BGP peers and enable_rhi in the VS (advanced_settings). VS will be placed on eth0 and additionally we will advertise vip though bgp. This will avoid manual configuration of routes to reach vip on the first hop router.

Hosting site using xampp server from local network without port-forwarding

I want to make my site available world wide. Im using xampp server for hosting. I have no access to any kind of servers and modems. Situation is shown below:
My site server has local ip assigned by wifi router and it runs Windows 8.
Remember I have no access on any kind of servers and modems so port port-forwarding is impossible (out of my scope).
Its actually difficult, but not impossible.
One way, I would approach this is:
I would host a page on internet.
Then take request and store it in database.
One of my program will always be running from my computer.
Then check for request and curl the request to localhost. For this you may use Node.js (taking data from database using GET method and curl it to localhost).
This is the best I could think of. And I am working on it, when the code is ready I'll make it open source and notify you :)
But still, it's difficult, as you need to put user's request to sleep for 2 seconds and then transferring it.
Its slow, but may work out for you.
Disadvantages:
Program will be very slow and memory usage will be more.
Breaking may happen many times.
High bandwidth wastage
If not encrypted, MIM (Men in Middle) may possible.
Advantages:
Indirect method of hosting
Need not to worry about your code being lost.
I am looking forward for a better alternative and I would like to keep this question for bounty once again.
If you cannot open the necessary ports within your LAN you will require access to an external server. However, the external server does not need to host any code, e.g.
Create a Linux based ec2 instance using Amazon's free tier.
Install a package to redirect remote to local ports:
a. using socat:
Install socat using your distributions package manager
Connect via SSH: ssh -N -R 42500:127.0.0.1:80 -o ServerAliveInterval=60 ubuntu#xxx.xxx.xxx.xxx -N -R 8080:localhost:80 "socat TCP-LISTEN:8080,fork TCP:127.0.0.1:42500"
b. using a webserver and reverse proxy:
Install apache or nginx and any required reverse proxy modules and configure your VirtualHost to proxy requests to a local port, e.g. :8080 -> 127.0.0.1:42500
Connect via SSH: ssh -N -R 42500:127.0.0.1:80 -o ServerAliveInterval=60 ubuntu#xxx.xxx.xxx.xxx
Your machine is now reachable via the ec2 instance http://xxx.xxx.xxx.xxx:8080/.
I occasionally use this technique when debugging web service callbacks.
Update 17-02-2014
If you are a Windows user you will need to install a third-party tool to support ssh. Options include:
cygwin
git bash
PuTTY
PuTTY is the easiest choice if you are not familiar with *nix tools. To configure remote port forwarding in PuTTY expand the following setting: Connection -> SSH -> Tunnels. Given the previously described scenario, populate Source port as 42500, Desination as 127.0.0.1:80 and tick the Remote option. (You may also need to add the path to a PuTTY compatible private key in the Connection -> SSH -> Auth tab depending on your server configuration.
To test you have successfully forwarded a port, execute the command netstat -lnt on your server. You will see output similar to:
tcp 0 0 127.0.0.1:42500 0.0.0.0:* LISTEN
Finally you can test with curl http://127.0.0.1:42500. You will see the output of your own machines web root running on port 80.
if you don't have a public IP address and cannot use port forwarding it is impossible to host the site
As people have said you need a public IP address. However, even if you did you should not use xampp as a public server, as it is designed for development and therefore has some security settings disabled.
I would recommend buying some shared web hosting, and uploading it to that. (you can get cheap hosting if you google 'shared web hosting', plus free .tk domains are avaliable: http://www.dot.tk/)
Do your company has any vpn network?
If it does and you have access to the vpn network, you can include your server to the vpn network and your guest will only need to login to your company vpn network then access your site like in a local network without using port forwarding. And since your data is very confidential, I assume that using vpn will also help to increase the security of your data.
Please correct me if I'm wrong.
Thank You.
What you are asking is not possible without port forwarding.
Lets break it into steps.
To host your site locally you will need a IP that is static so that
users can access it specifically.
You will need a domain so that it can be converted into user friendly name.
A 24x7 Internet Connection is must! You added a Wifi Router in your Diagram and most of today's router are capable of port forwarding.
What i will do in your scenario is:
Instead of using XAMP, i will install WAMP because i am more familiar with it and easy to configure.(totally personal preference)
Then i would set my server "ONLINE".(Google how to set WAMP server online)
Forward port "80" from router settings to my local computer ip address.(mostly it is tagged as "Virtual Server","Firewall","Port Forwarding",etc vary router to router in settings)
Suppose you have a local ip "192.168.1.3" and global/router IP "254.232.123.232" then you would redirect all the HTTP request done towards router to your local IP.
[[[[254.232.123.232]]]] --+ :80 +-- --------->192.168.1.3
That is good for now, but then you will need to tackle dynamic IP problem of router. But don't worry, thanks to some free sites that will be easy!
Go to no-ip.org -> Setup Account -> and create a entry, just a subdomain for now to test whether everything is working fine.(subdomain like mysite.no-ip.org, later purchase a real Domain)
Input your IP address there(Router IP) and download its application which will automatically update their server if your local IP changes.
Wait for some minutes and Voila! Your site is live.