On Wed, Aug 13, 2014 at 7:23 PM, Rod N. Melton <r...@pobox.com> wrote: > I posted this question on mininet-discuss mail list and they insist that it > is an open vswitch question. > > why do the port numbers assigned to an interface (say s1-eth2) change when > linux system is rebooted? So, you are rebooting the machine (and not restarting the 'program'). Are you using 'interfaces' file to configure OVS? If so, the OVS interfaces are deleted during shutdown and then re-created during startup. This will cause different port numbers.
> > Is there an ovs-ofctl or ovs-vsctl command I can use to force/change the > switch port numbers to not change for a given interface (say s1-eth2) when i > reboot linux/ovs? You cannot change the port number after it is created. But you can provide the port number before a port is created through the 'ofport_request' column of the 'Interface' table. ex: ovs-vsctl add-port br0 p0 -- set interface p0 ofport_request=20 You can also get it done through 'interfaces' file. debian/openvswitch-switch.README.Debian should have an example (through the 'ovs_extra' option. > > thx, > > Rod > > > > On 2014-08-11 10:04, Gurucharan Shetty wrote: > > On Sun, Aug 10, 2014 at 9:53 AM, Rod N. Melton <r...@pobox.com> wrote: > > mininet version 2.1.0+ ovs-vsctl (Open vSwitch) 2.1.0 OpenDaylight with OF13 > Ubuntu 14.04 in VirtualBox I have a mininet topology which I created with a > python script. I created a script which uses ovs-ofctl to add flows to the > switches. The problem which I am having is that it seems that when i exit > mininet and OpenDaylight and restart both programs I can see that the > mapping between interface names (example s3-eth1) and port numbers is > changing. This means that the script I created for adding flows no longer > works. I can see the changes by using sudo ovs-ofctl show s1 Can someone > tell me how to prevent this change when restarting mininet (or OpenDaylight > or Ubuntu)? > > I am not familiar with mininet. Open vSwitch itself should not change > the port numbers after a restart (Otherwise, its a bug). > > If they are getting changed, it probably means that a third-party > integration script deletes and re-adds the ports. > > You may have better luck with this question in a mininet mailing list. > > Really frustrating. sudo ovs-ofctl show s3 OFPT_FEATURES_REPLY (xid=0x2): > dpid:0000000000000003 n_tables:254, n_buffers:256 capabilities: FLOW_STATS > TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP actions: OUTPUT SET_VLAN_VID > SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST > SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE 1(s3-eth2): addr:9e:fc:2c:66:e4:63 > config: 0 state: 0 current: 10GB-FD COPPER speed: 10000 Mbps now, 0 Mbps max > 2(s3-eth1): addr:5e:42:96:e9:47:92 << s3-eth1 was port 3 last time I ran > mininet. why did it change?? config: 0 state: 0 current: 10GB-FD COPPER > speed: 10000 Mbps now, 0 Mbps max 3(s3-eth3): addr:1e:b0:98:07:23:c9 << > s3-eth3 was port 2 last time I ran mininet. why did it change?? config: 0 > state: 0 current: 10GB-FD COPPER speed: 10000 Mbps now, 0 Mbps max > 4(s3-eth4): addr:72:86:0e:af:dd:9a config: 0 state: 0 current: 10GB-FD > COPPER speed: 10000 Mbps now, 0 Mbps max LOCAL(s3): addr:2a:74:82:09:4a:44 > config: 0 state: 0 speed: 0 Mbps now, 0 Mbps max OFPT_GET_CONFIG_REPLY > (xid=0x4): frags=normal miss_send_len=0 Thanks for any help. Rod > _______________________________________________ discuss mailing list > discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss > > > > > > _______________________________________________ > discuss mailing list > discuss@openvswitch.org > http://openvswitch.org/mailman/listinfo/discuss > _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss