0

I have multiple network interfaces and I am not sure which interface is being used for the internet connection.

I tried the methods which are listed in the question How to find out which interface am I using for connecting to the internet?, howerver I'm getting multiple "default" network interfaces when I use suggested solutions.

output of route

smc
  • 591
  • 3
  • 11
  • 25

1 Answers1

2

for ipv4:

ip -o route get 8/8 | grep --color=always 'dev [^ ]*'

for ipv6:

ip -o route get 2000::/3 | grep --color=always 'dev [^ ]*'