User Tools

Site Tools


network:get_network_details

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
network:get_network_details [2020/07/20 13:31] – old revision restored (2016/10/07 16:31) 95.91.74.120network:get_network_details [2020/07/20 13:32] (current) – old revision restored (2016/10/19 09:28) 95.91.74.120
Line 10: Line 10:
  
 <code> <code>
-2: <color red>eth0</color>: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000+2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
     inet 198.51.100.45/18 brd 45.55.191.255 scope global eth0     inet 198.51.100.45/18 brd 45.55.191.255 scope global eth0
        valid_lft forever preferred_lft forever        valid_lft forever preferred_lft forever
Line 17: Line 17:
        valid_lft forever preferred_lft forever        valid_lft forever preferred_lft forever
 </code> </code>
 +
 +The highlighted output above shows two interfaces (eth0 and eth1) and the addresses assigned to each.
 +
 +To find out which of these interfaces is your public interface, type:
 +
 +<code bash>
 +ip route show | grep default
 +</code>
 +
 +Returns
 +
 +<code>
 +default via 111.111.111.111 dev <color red>eth0</color>
 +</code>
 +
 +The interface shown (eth0 in this example) will be the interface connected to your default gateway.  This is almost certainly your public interface.
 +
network/get_network_details.1595251912.txt.gz · Last modified: 2020/07/20 13:31 by 95.91.74.120

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki