/etc/nf specifies the DNS nameserver IP of the system./etc/hosts this file contains custom host/domain to IP mappings./etc/sysconfig/network-scripts/ is an interface configuration file used to set IP, network, gateway, etc.systemctl restart network restarts a network service for the system.ifdown shuts down the specified interface.ifup starts up the specified interface.ethtool -S checks the statistics for a particular interface.The -vvv flag provides "triple-verbose" details of the processes going on while SSH'ing to the server. ssh -vvv enables you to SSH to another server with the specified IP/domain and username.ip addr/ifconfig -a provides IP addresses and related info on all the interfaces of a system.nmap, which stands for Network Mapper, scans network ports, discovers hosts, detects MAC addresses, and much more.ss is a utility for dumping socket statistics.Here is a summary of the necessary commands and files used to troubleshoot interface connectivity or related network issues. nslookup -type=any shows all the available records for the specified website/domain.nslookup shows the IP address of your DNS server in the Server field, and, below that, gives the IP address of the website you are trying to reach.A similar tool to nslookup is the dig (Domain Information Groper) utility. It can also be used to obtain information on your DNS server, such as all DNS records on a website (see the example below). The nslookup tool is used to obtain IP address mapping of a website or domain. The following commands allow loopback access to the system: iptables -A OUTPUT -o -p tcp -sport -m state – state ESTABLISHED -j ACCEPT.iptables -A INPUT -i -p tcp –dport -m state –state NEW,ESTABLISHED -j ACCEPT.The following commands allow traffic from the specified port number to the specified interface: iptables -F deletes all existing rules.iptables -L lists all existing iptables rules.The scope of this utility is very wide here are some of its most common uses. Iptables is a firewall-like packet-filtering utility that can allow or block certain traffic. tcpdump -i captures traffic for a particular protocol, like TCP, UDP, etc.tcpdump -i port captures traffic for a specific port number like 53, 80, 8080, etc.tcpdump -i dst captures packets from a particular destination IP.tcpdump -i src captures packets from a particular source IP.netstat -a shows all ports to specify only TCP, use -at (for UDP use -au).netstat -l shows the list of all the ports that are in listening mode.The network statistics ( netstat) utility is used to troubleshoot network-connection problems and to check interface/port statistics, routing tables, protocol stats, etc. telnet / is used to telnet into any server.traceroute is usually is the second step after ping for network connection debugging. Where ping checks end-to-end connectivity, the traceroute utility tells you all the router IPs on the path you travel to reach the end system, website, or server. This is a nice utility for tracing the full network path from your system to another. Free online course: RHEL Technical Overview.You can also use ping to resolve names of websites to their corresponding IP address, as shown below: (Read my article " How to find your IP address in Linux" to learn more about IP addresses.) You can use the ping command with IPv4 and IPv6 addresses. It's also a good first step to check system/network connectivity. It uses ICMP echo packets that travel back to your system when a ping is successful. PingĪs the name suggests, ping is used to check the end-to-end connectivity from your system to the one you are trying to connect to. In several of these commands, you'll see, which stands for "fully qualified domain name." When you see this, substitute your website URL or your server (e.g., ), as the case may be. The following Linux utilities and commands-from basic to advanced-will help make network management easier. If you're a sysadmin, your daily tasks include managing servers and the data center's network.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |