11/28/2023 0 Comments Linux network monitor![]() Show the numeric IP addresses and hostnames, too: ~]# mtr -b Show numeric IP addresses (if you use -g, you will get IP addresses (numbers) instead of hostnames): ~]# mtr -g The basic mtr command shows you the statistics, including each hop (hostnames) with time and loss%: ~]# mtr If you see a sudden increase in response time or packet loss, then obviously, there is a bad link somewhere. With the mtr command, you will get more information about the route and be able to see problematic devices along the way. mtr provides a lot of statistics about each hop, such as response time and percentage. Just like a traceroute, the mtr command will show the route from a computer to a specified host. This command combines the functionality of the ping and traceroute commands. MTR (Matt's traceroute) is a program with a command-line interface that serves as a network diagnostic and troubleshooting tool. However, if you would like more information on it, check out our previously published article here. It has since been replaced by the ip command discussed above. The ifconfig command was/is a staple in many sysadmin's tool belt for configuring and troubleshooting networks. To delete an IP on an interface: ~]# ip address del 192.168.1.254/24 dev enps03Īlter the status of the interface by bringing the interface eth0 online: ~]# ip link set eth0 upĪlter the status of the interface by bringing the interface eth0 offline: ~]# ip link set eth0 downĪlter the status of the interface by changing the MTU of eth0: ~]# ip link set ethĪlter the status of the interface by enabling promiscuous mode for eth0: ~]# ip link set eth0 promisc onĪdd a default route (for all addresses) via the local gateway 192.168.1.254 that can be reached on device eth0: ~]# ip route add default via 192.168.1.254 dev eth0Īdd a route to 192.168.1.0/24 via the gateway at 192.168.1.254: ~]# ip route add 192.168.1.0/24 via 192.168.1.254Īdd a route to 192.168.1.0/24 that can be reached on device eth0: ~]# ip route add 192.168.1.0/24 dev eth0ĭelete the route for 192.168.1.0/24 via the gateway at 192.168.1.254: ~]# ip route delete 192.168.1.0/24 via 192.168.1.254ĭisplay the route taken for IP 10.10.1.4: ~]# ip route get 10.10.1.4 ifconfig To assign an IP to an interface, for example, enps03: ~]# ip address add 192.168.1.254/24 dev enps03 ![]() To show the IP addresses assigned to an interface on your server: ~]# ip address show Here are some common use cases for the ip command. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |