[OpenWrt-Devel] Configuring OVS on OpenWRT
Yousong Zhou
yszhou4tech at gmail.com
Thu Nov 20 22:16:25 EST 2014
On 21 November 2014 10:03, Yilun Zhou <yilun.zhou at duke.edu> wrote:
> Hi,
>
>
> I have installed OVS on my router and I want to connect it with a Floodlight
> controller. The IP address of the laptop on which Floodlight is running is
> 192.168.1.161 and Floodlight is running on port 6633. Here is what I am
> doing.
>
>
> First, I start Floodlight controller (the vanilla version without any
> change). Then I turn on the router and ssh into it. Executing "ifconfig" on
> it will give me:
>
>
> br-lan Link encap:Ethernet HWaddr 4E:60:DE:E6:B2:8F
> inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
> inet6 addr: fe80::4c60:deff:fee6:b28f/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:14712 errors:0 dropped:0 overruns:0 frame:0
> TX packets:16189 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:2100036 (2.0 MiB) TX bytes:10682748 (10.1 MiB)
>
> eth0 Link encap:Ethernet HWaddr 4E:60:DE:E6:B2:8F
> inet6 addr: fe80::4c60:deff:fee6:b28f/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:2902 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:0 (0.0 B) TX bytes:400010 (390.6 KiB)
> Interrupt:4
>
> eth0.1 Link encap:Ethernet HWaddr 4E:60:DE:E6:B2:8F
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:2897 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:0 (0.0 B) TX bytes:386971 (377.9 KiB)
>
> eth1 Link encap:Ethernet HWaddr 4C:60:DE:E6:B2:90
> inet addr:10.181.27.151 Bcast:10.181.27.255 Mask:255.255.252.0
> inet6 addr: fe80::4e60:deff:fee6:b290/64 Scope:Link
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:58936 errors:0 dropped:328 overruns:0 frame:0
> TX packets:11874 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:17323683 (16.5 MiB) TX bytes:1944846 (1.8 MiB)
> Interrupt:5
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> inet6 addr: ::1/128 Scope:Host
> UP LOOPBACK RUNNING MTU:16436 Metric:1
> RX packets:16 errors:0 dropped:0 overruns:0 frame:0
> TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:3578 (3.4 KiB) TX bytes:3578 (3.4 KiB)
>
> wlan0 Link encap:Ethernet HWaddr 4C:60:DE:E6:B2:8F
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:392 errors:0 dropped:0 overruns:0 frame:0
> TX packets:501 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:61323 (59.8 KiB) TX bytes:125276 (122.3 KiB)
>
> wlan1 Link encap:Ethernet HWaddr 4C:60:DE:E6:B2:91
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:6925 errors:0 dropped:0 overruns:0 frame:0
> TX packets:8214 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:1138837 (1.0 MiB) TX bytes:7156326 (6.8 MiB)
>
> Specifically wlan0 is 2.4GHz wifi and wlan1 is 5GHz wifi. I want to use
> Floodlight to control 2.4GHz wifi (wlan0). I do not know exactly what br-lan
> is. So if anyone can explain it to me that would be great.
>
>
> Then I use "ovs-vsctl del-br" to delete any remaining bridge so that
> "ovs-vsctl show" will report nothing.
OpenWrt's default firewall policy will block any incoming and forward
traffic and lan network is an exception so that user from LAN can
access 192.168.1.1:{20,80}. br-lan is the bridge interface of LAN
consisting of eth0 and wlan0 in your case.
> Then I have the following
> configuration file that I execute.
>
>
> ovs-vsctl add-br br0;
> ovs-vsctl add-port br0 wlan0;
> ovs-vsctl add-port br0 br-lan;
> ifconfig br-lan 0.0.0.0;
> ifconfig br0 192.168.1.1;
> ovs-vsctl set-controller br0 tcp:192.168.1.161:6633;
I am not familiar with ovs-vsctl, but replace above commands with the
following line should work.
ovs-vsctl set-controller br-lan tcp:192.168.1.161:6633;
>
> However, after I execute this program, the only connection that I have is
> SSH. I can't browse the Internet anymore. However, my Floodlight controller
> shows the connection from br0
Output traffic is allowed by default.
Regards.
yousong
> and if I were to capture PacketIn events, I
> can see that it receives some packets from time to time. Nevertheless, it is
> more like periodic update than network request because rapidly refreshing my
> webpage will not significantly increase the packets received.
>
> Could anyone tell me what might go wrong?
>
> Thanks,
> Yilun
>
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list