Skip to content

Instantly share code, notes, and snippets.

@liviaerxin
Last active March 8, 2023 06:51
Show Gist options
  • Save liviaerxin/9e74c4d622470e6a3f9e722ede75bb57 to your computer and use it in GitHub Desktop.
Save liviaerxin/9e74c4d622470e6a3f9e722ede75bb57 to your computer and use it in GitHub Desktop.
Linux Network Diagnosis #network

Network Diagnosis

understand routing table entry

route diagnosis

An explanation on the USB virtual ethernet

Knowing simultaneously these three things for failing and working circumstances would be quite useful.

  • ifconfig to show ip address;
  • route to show which gateways or directly routes would be used(netstat -rn for osx);
  • traceroute to show what devices are being traversed;

Add a route,

# osx
route -n add 10.0.0.0/24 10.0.0.1
# linux
route -n add -net 10.0.0.0/24 gw 10.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment