LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-21-2017, 09:09 PM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Rep: Reputation: Disabled
Learning SDN - Software Defined Network


I am creating a bridge and a port (ethX) like so:
Code:
~$ sudo ovs-vsctl add-br br0
~$ sudo ovs-vsctl list-br 
br0
~$ sudo ovs-vsctl show
96ece70a-9932-4b25-a238-fafec223e4d7
    Bridge "br0"
        Port "br0"
            Interface "br0"
                type: internal
    ovs_version: "2.5.0"
~$ sudo ovs-vsctl add-port br0 ethX
ovs-vsctl: Error detected while setting up 'ethX'.  See ovs-vswitchd log for details.
Here is the log:
Code:
$ tail /var/log/openvswitch/ovs-vswitchd.log
... 
.... ... 
2017-04-22T01:46:28.358Z|00034|bridge|INFO|bridge br0: added interface br0 on port 65534
2017-04-22T01:46:28.358Z|00035|bridge|INFO|bridge br0: using datapath ID 0000b298c24dcc47
2017-04-22T01:46:28.358Z|00036|connmgr|INFO|br0: added service controller "punix:/var/run/openvswitch/br0.mgmt"
2017-04-22T01:47:23.129Z|00037|bridge|WARN|could not open network device ethX (No such device)
It is obvious the port does not exists yet,
until I added it.
Does the error message means I have to create a file of some kind for ethX?
There is no mention of such file for port (ethX) in man ovs-vsctl.
How do I remove this error?

Last edited by fanoflq; 04-21-2017 at 09:22 PM.
 
Old 04-21-2017, 10:22 PM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by fanoflq View Post
'ethX'
Code:
2017-04-22T01:47:23.129Z|00037|bridge|WARN|could not open network device ethX (No such device)
Run
Code:
ifconfig -a
to see what interfaces you have on your system.
 
Old 04-21-2017, 10:32 PM   #3
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
@lazydog:

i tried this and it works:
Quote:
~$ sudo ovs-vsctl add-port br0 ens3

~$ sudo ovs-vsctl show
96ece70a-9932-4b25-a238-fafec223e4d7
Bridge "br0"
Port "ens3"
Interface "ens3"
Port "br0"
Interface "br0"
type: internal
Then I tried to add a tap and got error:
Quote:
ovs_version: "2.5.0"
~$ ovs-vsctl add-port br0 tap0 tag=1
ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (Permission denied)
~$ sudo ovs-vsctl add-port br0 tap0 tag=1
ovs-vsctl: Error detected while setting up 'tap0'. See ovs-vswitchd log for detail
Here is the log error:
Quote:
~$ tail /var/log/openvswitch/ovs-vswitchd.log
...
... ...
2017-04-22T03:09:35.116Z|00042|bridge|WARN|could not open network device tap0 (No such device)
There is no tap0 from ifconfig -a.

Last edited by fanoflq; 04-21-2017 at 10:34 PM.
 
Old 04-21-2017, 10:37 PM   #4
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Quote:
Originally Posted by fanoflq View Post
ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (Permission denied)
Looks like you need to be root to run this command.
 
Old 04-21-2017, 11:19 PM   #5
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
@lazydog:

Sorry, I pasted the incorrect line item.
Here is the correct error in log:
Quote:
2017-04-22T04:07:10.464Z|00019|bridge|WARN|could not open network device tap0 (No such device)
I know what the problem is.
The (physical or virtual) port has to exists first before we can add it to the virtual bridge.
So we need to use ip command to add a link (e.g. interface eth6) and a tuntap before using command ovs-vsctl to add port.
I am just learning and guessing/inferring as I go.
I wish there is a good newbie tutorial online that does not assume you know a lot already....
Have not found one yet...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Meet Solaris 11.2, where SDN means 'Software-Defined Net profit' LXer Syndicated Linux News 0 08-05-2014 03:40 PM
LXer: OpenDaylight: Open Source Programming to the Software-Defined Network LXer Syndicated Linux News 0 02-19-2014 05:00 PM
LXer: Linux Internals for SDN (Software Defined Networking) LXer Syndicated Linux News 0 10-25-2013 01:20 PM
LXer: OpenDaylight Foundation aims to shape the future of Software Defined Networking (SDN) LXer Syndicated Linux News 0 10-07-2013 04:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration