Binding network interface to gRPC channel [python]

62 views
Skip to first unread message

Max

unread,
Jan 21, 2021, 1:19:24 PM1/21/21
to grpc.io
Is there a way to bind a gRPC channel to a network interface (e.g. eth0)?
The moment i configure a macsec interface it automatically tries to connect via that interface, which doesn't work.
Netns might work, however, it breaks my MySQL connection on localhost.

Richard Belleville

unread,
Jan 27, 2021, 3:35:05 PM1/27/21
to grpc.io
I'm assuming you're asking about a client channel, not a server channel because for a server channel, it's as simple as binding to an IP owned by the network interface you want.

On the client side, this is determined by your routing table. Check out your route table with `ip route sho` and ensure that the kernel will route traffic to your desired server using the desired network interface.
Reply all
Reply to author
Forward
0 new messages