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

0

why i am getting 2 diffrent ids for same node??

asked 2015-08-24 02:51:16 -0800

Ashwini_Mhatre gravatar image

hi all, I have openvswitch configured on public cloud (amazon). I have connected that switch with odl in cloud.now i am getting two different ids for that node. i want to add flows on that switch progrmatically. But due to this issue,node id is DYNAMIC and i am facing issue while adding flows.

Regards, Ashwini mhatre

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-08-24 11:07:28 -0800

jamoluhrsen gravatar image

Ashwini,

I'm not sure what method ovs uses to pick it's mac address when you create the bridge, but I know it's not using the same one each time. The switch mac address that it connects to the controller with is converted to decimal and used as the id number. You can specify the mac address to use, with a command like this:

sudo ovs-vsctl set bridge s1 other-config:hwaddr=\"00:00:00:00:00:01\"

However, if you are seeing two switches connected to your controller with different IDs with only a single ovs instance, then you are hitting some kind of bug or environment issue. If this is the case, can you provide more details (e.g. ifconfig -a, on your ovs system, output of a rest call to controller @ /restconf/operational/opendaylight-inventory:nodes

JamO

edit flag offensive delete publish link more

Comments

Hi Jam O, on UI there is only one switch connected but after each refresh it showing different id . it is simultaneously displaying 2 different ids I have one querry. How nodeid created in controller?? is it depend on ip address or MAC address Regards,

Ashwini_Mhatre ( 2015-08-24 21:28:01 -0800 )edit
0

answered 2015-08-24 12:34:07 -0800

What if you use the switch IP address form the response message to distinguish the switch:

Request

http://localhost:8181/restconf/operational/opendaylight-inventory:nodes/

Response

 ....
<description xmlns="urn:opendaylight:flow:inventory">None</description>
<serial-number xmlns="urn:opendaylight:flow:inventory">None</serial-number>
<hardware xmlns="urn:opendaylight:flow:inventory">Open vSwitch</hardware>
<software xmlns="urn:opendaylight:flow:inventory">2.3.0</software>
<manufacturer xmlns="urn:opendaylight:flow:inventory">Nicira, Inc.</manufacturer>
<ip-address xmlns="urn:opendaylight:flow:inventory">192.168.56.10</ip-address>
....

From above response you can relate the switch IP address and switch dpid.

edit flag offensive delete publish link more

Comments

hi subash, I am hitting http://localhost:8181/restconf/operational/opendaylight-inventory:nodes/ for many times and each time it will showing me correct ip with diffrent nodeid. Thanks

Ashwini_Mhatre ( 2015-08-24 21:25:30 -0800 )edit

@Ashwini_Mhatre Did it solve your problem ?

subhash ( 2015-08-24 22:59:39 -0800 )edit

no .....:(

Ashwini_Mhatre ( 2015-08-24 23:05:35 -0800 )edit

you can use ip address to distinguish you switch.. if I am understanding your problem correctly.

subhash ( 2015-08-24 23:09:27 -0800 )edit

in my case I have only one switch.so it has only one ip associate with it.but for that switch odl showing diffrent node id each time after hitting http://localhost:8181/restconf/operational/opendaylight-inventory:nodes/

Ashwini_Mhatre ( 2015-08-24 23:19:08 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-08-24 02:51:16 -0800

Seen: 43 times

Last updated: Aug 24 '15