ubuntu:network:get_network_details
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:network:get_network_details [2019/11/30 18:59] – peter | ubuntu:network:get_network_details [2021/01/08 14:50] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Ubuntu - Network - Get Network Details ====== | ||
- | |||
- | To get the details of your own systems, begin by finding your network interfaces. You can find the interfaces on your machines and the addresses associated with them by typing: | ||
- | |||
- | <code bash> | ||
- | ip -4 addr show scope global | ||
- | </ | ||
- | |||
- | returns: | ||
- | |||
- | <code bash> | ||
- | 2: eth0: < | ||
- | inet 198.51.100.45/ | ||
- | | ||
- | 3: eth1: < | ||
- | inet 192.168.1.5/ | ||
- | | ||
- | </ | ||
- | |||
- | 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 | ||
- | </ | ||
- | |||
- | returns: | ||
- | |||
- | <code bash> | ||
- | default via 111.111.111.111 dev eth0 | ||
- | </ | ||
- | |||
- | The interface shown (eth0 in this example) will be the interface connected to your default gateway. | ||
ubuntu/network/get_network_details.1575140369.txt.gz · Last modified: 2020/07/15 09:30 (external edit)