typekerop.blogg.se

Network command line mac cheat sheet
Network command line mac cheat sheet





  1. #Network command line mac cheat sheet install
  2. #Network command line mac cheat sheet plus
  3. #Network command line mac cheat sheet free

You can also capture traffic to and from a specific network using the command below: ~]# tcpdump -i eth0 net 10.1.0.0 mask 255.255.255.0 For example, to find traffic coming from and going to 8.8.8.8, use the command: ~]# tcpdump -i eth0 -c 10 host 8.8.8.8įor traffic coming from 8.8.8.8, use: ~]# tcpdump -i eth0 src host 8.8.8.8įor outbound traffic going to 8.8.8.8, use: ~]# tcpdump -i eth0 dst host 8.8.8.8 Capture traffic to and from a network You can filter out traffic coming from a specific host. If you want to capture traffic on eth0, you can initiate that with tcpdump -i eth0 sample output: ~]# tcpdump -i ~]# tcpdump -i eth0 -c 10 Capture traffic to and from one host You will need to use sudo or have root access in this case.

#Network command line mac cheat sheet install

You can install tcpdump with the command below: ~]# dnf install -y tcpdumpīefore starting any capture, you need to know which interfaces tcpdump can use.

network command line mac cheat sheet

The tcpdump command is designed for capturing and displaying packets. Print to XML output: ~]# mtr –xml tcpdump Set the maximum amount of hops: ~]# mtr -m 35 216.58.223.78ĭefine the packet size: ~]# mtr -r -s 50 Or: ~]# mtr -rw -c 10 > mtr-command-google-outputįorce the use of the TCP instead of the ICMP: ~]# mtr –tcp įorce the use of the UDP instead of the ICMP: ~]# mtr –udp Get a report of the mtr command result: ~]# mtr -r -c 10 > mtr-command-google-output Set the number of pings that you want to send: ~]# mtr -c 10 Show the numeric IP addresses and hostnames, too: ~]# mtr -b

network command line mac cheat sheet

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.

  • vrf - manage virtual routing and forwarding devices.
  • The OBJECT is the most important part of the synopsis, and the following are supported (some omitted for brevity):Īddress - protocol (IPv4 or IPv6) address on a device.

    #Network command line mac cheat sheet plus

    The ip command can show address information, manipulate routing, plus display network various devices, interfaces, and tunnels. The ip command is one of the basic commands every administrator will need in daily work, from setting up new systems and assigning IPs to troubleshooting existing systems.

    network command line mac cheat sheet network command line mac cheat sheet

    Hybrid cloud strategy for dummies eBook.

    #Network command line mac cheat sheet free

  • Free course: Red Hat OpenStack technical overview.






  • Network command line mac cheat sheet