On Mon, Jun 16, 2014 at 02:06:36PM -0700, Lavanya M.K wrote: > Hi, > > Sorry, let me explain once more with exact commands. This time, i tried a > different topology. > > First i created a mininet topology (custom): > > h1 = self.addHost( 'h1' ) > h2 = self.addHost( 'h2' ) > h3 = self.addHost( 'h3' ) > h4 = self.addHost( 'h4' ) > s1 = self.addSwitch( 's1' ) > s2 = self.addSwitch( 's2' ) > > # Add links > self.addLink( h1, s1 ) > self.addLink( h2, s1 ) > self.addLink( h3, s2 ) > self.addLink( h4, s2 ) > self.addLink( s1, s2 ) > > By default, the host IP addresses assigned are: 10.0.0.1, 10.0.0.2, > 10.0.0.3 and 10.0.0.4. > Now i want to create two subnets where h1 and h3 belong to one subnet while > h2 and h4 belong to another. So i change the IP address of h2 and h4 as > follows: > in h2's xterm: ifconfig h2-eth0 10.0.0.9/29 > in h4's xterm : ifconfig h4-eth0 10.0.0.10/29 > in h1's xterm : ifconfig h1-eth0 10.0.0.1/29 > in h3's xterm : ifconfig h3-eth0 10.0.0.3/29 > > But now even if i do a dump in mininet prompt, the ip addresses are > unchanged. Nevertheless, i proceed.
What about using h1.setIP( '10.0.0.1/29' ) ? > Now, h1 is able to ping h3 and h3 to h1. But all other pings fail(including > between h2 and h4) Not sure of the reason! Failure of ping between h1 and > h2 (h3 and h4) is expected. > > mininet> h2 ping h1 > connect: Network is unreachable > > mininet> h2 ping h4 > connect: Network is unreachable > > (one small observation: whenever i do a del-flow for the switch and then do > a ping, even though ping is successful, dump-flows for the switch returns > empty) you're talking ovs-dpctl, right? The flow expires real quick, so maybe you could use 'scp' or another transfer tool to be able to see that. > I continue to add flow rules to make the vlan work: > For switch s1: > sh ovs-ofctl add-flow s1 in_port=1,dl_vlan=0xffff > action=mod_vlan_vid:10,output:normal > sh ovs-ofctl add-flow s1 in_port=2,dl_vlan=0xffff > action=mod_vlan_vid:20,output:normal > sh ovs-ofctl add-flow s1 in_port=3,dl_vlan=10,action=strip_vlan,output:1 > sh ovs-ofctl add-flow s1 in_port=3,dl_vlan=20,action=strip_vlan,output:2 > > sh ovs-ofctl add-flow s2 in_port=1,dl_vlan=0xffff > action=mod_vlan_vid:10,output:normal > sh ovs-ofctl add-flow s2 in_port=2,dl_vlan=0xffff > action=mod_vlan_vid:20,output:normal > sh ovs-ofctl add-flow s2 in_port=3,dl_vlan=10,action=strip_vlan,output:1 > sh ovs-ofctl add-flow s2 in_port=3,dl_vlan=20,action=strip_vlan,output:2 > > Again, ping between h1 and h3 works, but all other pings fail. I noticed in > the controller(OpenDayLight) that the flow rule is not even being hit for > port 2. I guess you have a connectivity issue pior to the flow, so fix that first then work with the flows. > Could you please point out where i am going wrong in getting the vLANs > isolated? > > Also, i need to further proceed and add flow rules so that i can send > packets between vLANs. Do i need to add a router to make this possible? If > so, i presume the router should be placed between the two switches? > Is it possible to get communication between vLANs to work in a openvswitch > network without using a router? > > Thanks, > Lavanya > > > On Fri, Jun 13, 2014 at 4:47 PM, Flavio Leitner <f...@redhat.com> wrote: > > > On Fri, Jun 13, 2014 at 04:01:35PM -0700, Lavanya M.K wrote: > > > Hi, > > > > > > I am trying to create two VLANs on mininet using openvswitches. The > > > topology is as follows: I first created two subnets to mimic two VLANs. I > > > did this by configuring the ip addresses of hosts as below: > > > > > > vlan1 connected to switch 1: > > > host 1: 10.0.0.1/29 > > > host 2: 10.0.0.2/29 > > > > > > vlan2 connected to switch 2: > > > host 3 : 10.0.0.9/29 > > > host4 : 10.0.0.10/29 > > > > > > switch 1 and switch 2 are connected to each other. > > > > > > Now when i ping h1 to h2, it succeeds which h1 to h3 fails as expected. I > > > added flow rules to make the vlan work. Flow rule eg: for switch one, the > > > flow rule tags packets from port 1 and 2 with vlad_id 10 and strips any > > tag > > > from packet from port 3 and performs output=normal. > > > Similar flow rule for switch 2(vlan_id=20) > > > Now ping fails between h1 and h2 and also between h3 and h4. > > > Kindly guide me how to make vlan working with openvswitch. > > > > Sorry, I didn't get what exactly the rules are doing. > > Could you please provide the exact commands you're using to > > add the flows? > > > > Also, how are you checking for the port numbers? > > > > fbl > > _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss