Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

unable to connect two L3 network


I want to do one test to let two hosts with different vlan can communicate with each other. SDN controller is use onenflowplugin module.

here is the step:

step 1: create network mn --custom --topo mytopo --mac --controller=remote,ip=,port=6633 --switch ovsk,protocols=OpenFlow13 begin-------------------------------------

class MyTopo( Topo ): "Simple topology example."

def __init__( self ):
    "Create custom topo."

    # Initialize topology
    Topo.__init__( self )

    vh1 = self.addHost('vh1', cls=VLANHost, vlan=100, ip='',defaultRoute='via')
    vh2 = self.addHost('vh2', cls=VLANHost, vlan=101, ip='',defaultRoute='via')

    vh11 = self.addHost('vh11', cls=VLANHost, vlan=100, ip='',defaultRoute='via')
    vh12 = self.addHost('vh12', cls=VLANHost, vlan=101, ip='',defaultRoute='via')

    h1Host = self.addHost('h3',ip='',defaultRoute='via')
    h2Host = self.addHost('h4',ip='',defaultRoute='via')

    leftSwitch = self.addSwitch( 's1' )
    rightSwitch = self.addSwitch( 's2' )

    # Add links
    self.addLink( h1Host, leftSwitch )
    self.addLink( h2Host, rightSwitch )

    self.addLink( vh1, leftSwitch )
    self.addLink( vh2, leftSwitch )

    self.addLink( vh11, rightSwitch  )
    self.addLink( vh12, rightSwitch )

    self.addLink( leftSwitch, rightSwitch )

topos = { 'mytopo': ( lambda: MyTopo() ) } end-------------------------------------

step 2: check the network

mininet> dump <host h3:="" h3-eth0:"" pid="22505"> <host h4:="" h4-eth0:"" pid="22507"> <vlanhost vh1:="" vh1-eth0.100:"" pid="22509"> <vlanhost vh2:="" vh2-eth0.101:"" pid="22511"> <vlanhost vh11:="" vh11-eth0.100:"" pid="22513"> <vlanhost vh12:="" vh12-eth0.101:"" pid="22515"> <ovsswitch{'protocols': 'openflow13'}="" s1:="" lo:,s1-eth1:none,s1-eth2:none,s1-eth3:none,s1-eth4:none="" pid="22520"> <ovsswitch{'protocols': 'openflow13'}="" s2:="" lo:,s2-eth1:none,s2-eth2:none,s2-eth3:none,s2-eth4:none="" pid="22523"> <remotecontroller{'ip': '',="" 'port':="" 6633}="" c0:="""" pid="22496"> mininet> vh1 ip r s default via dev vh1-eth0.100

step 3: one host ping another host.
mininet>h3 ping –c 1 vh1 result: fail due to not config the gateway.

step 4: config the subnet gateway. config the sugnet gateway in the controller. gateway IP address/mask is and

step5: do ping test again. mininet>h3 ping –c 1 vh1 result: fail due to flow entry don't handle the vlan tag.

here is the flow entry:

OFPSTFLOW reply (OF1.3) (xid=0x2): cookie=0xa, duration=1099.058s, table=0, npackets=1913, nbytes=142650, sendflowrem priority=0 actions=CONTROLLER:65535 cookie=0x0, duration=866.952s, table=0, npackets=0, nbytes=0, priority=1,ip,nwdst= actions=setfield:00:00:00:00:00:01->ethdst,output:1 cookie=0x0, duration=690.363s, table=0, npackets=2, nbytes=196, priority=1,ip,nwdst= actions=setfield:00:00:00:00:00:03->eth_dst,output:2

is there any way that we can do in controller to let these two host can communicate each other ? i only know that i can do it after update flow rule with CLI command to handle the vlan tag: "table=0,priority=4,ip,nwdst=, actions=moddldst:00:00:00:00:00:03, modvlanvid:100,2" "table=0,priority=3,dlvlan=100,ip,nwdst=,actions=moddldst:00:00:00:00:00:01, stripvlan,1"

Br, weiguo