question: enable two ethernet interfaces

Daniel WANG hao-daniel.wang at se.com
Thu Jul 4 21:50:29 PDT 2019


Hello Guys,

I find a statement in session-overview.txt:
"
Multiple per-session routing tables
===================================
.....
By default, ConnMan maintains only one online service. So it is impossible to send external traffic (routed through a gateway) on multiple interfaces.
In order to enable this functionality, an application needs to issue the
following API calls:
- create multiple sessions, one for each interface to be used
- set each session's AllowedInterface config field to the required interface  name (eth0, eth1, wlan0, ppp0, etc.)
- set each session's SourceIPRule config field to true
- connect each session (or the service it is using)

That will instruct ConnMan to create multiple routing tables, with default routes in them. After that, the application can issue a bind() call on each
socket, using required interface's source IP address. The bind() call must be made before a connect() call on a socket.
"

My issue:
I am wondering if my issue is related to this statement.
Now I have two network interfaces: eth0, eth1. They are connected to different networks.
I observe that by default only eth0 can get IP address from DHCP server. For eth1, IP is an APIPA address, as below:

[cid:image003.jpg at 01D53330.378F6990]

Question:

  1.  For the same type of ethernet interfaces, does connman only maintain one interface, like eth0?
  2.  Shall I use session API to enable another interface, like eth1? And create another route table for eth1?
  3.  If yes, where can I find the user guide to use session API?
Thank you in advance for your reply.

Best Regards,
Daniel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.01.org/pipermail/connman/attachments/20190705/f7573c14/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 18075 bytes
Desc: image003.jpg
URL: <http://lists.01.org/pipermail/connman/attachments/20190705/f7573c14/attachment-0001.jpg>


More information about the connman mailing list