Hi,

On 2016年07月22日 13:53, [email protected] wrote:
> Hi all
>
>
> Scenario:
>
>
>
>     host1 ------> switch 1---------> switch2 ---------> host2
>
>
>
> python script:
>
> -
>
> -
>
>    host1 = net.addHost('h1', cls=Host, mac='01:00:00:00:01:00', 
> ip='172.16.20.10/24', defaultRoute='via 172.16.20.1')
>    host2 = net.addHost('h2', cls=Host, mac='02:00:00:00:02:00', 
> ip='192.168.30.10/24', defaultRoute='via 192.168.30.1')
>
>     switch1 = net.addSwitch( 's1', cls=OVSKernelSwitch, dpid='1', 
> protocols='OpenFlow13', mac='00:00:00:00:00:01' )
>     switch2 = net.addSwitch( 's2', cls=OVSKernelSwitch, dpid='2', 
> protocols='OpenFlow13', mac='00:00:00:00:00:02' )
> -
> -
> -
> match = parser.OFPMatch(in_port=1, eth_src=' ? ', eth_dst=' ? ')
> actions = 
> [parser.OFPActionSetField(parser.OFPMatchField.make(ofproto.OXM_OF_IP_DSCP, 
> 22)), parser.OFPActionOutput(2)]
> inst = [parser.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS,actions)]
> self.add_flow(datapath=000000000001, command=ofp.OFPFC_ADD, priority=1, 
> out_port=2, match=match, instructions=inst)
> -
>
> -
>
>
> Problem:
>
> I want to send a data flow from host1 to host2.
>
>
> what will the the eth_src?   00:00:00:00:00:01'   or  01:00:00:00:01:00
>
> what will the the eth_dst?   00:00:00:00:00:02'   or  02:00:00:00:02:00

To communicate between hosts on the L2 networks, the switches need to learn the 
MAC addresses
of the hosts connecting to that networks.
   http://osrg.github.io/ryu-book/en/html/switching_hub.html

So I think you need to install flows with the MAC addresses of hosts.

Thanks,
Iwase

>
>
> THanks
>
> -Tanvir
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports.http://sdm.link/zohodev2dev
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to