1. ifconfig
command
ifconfig
(interface configurator) command is use to initialize an interface, assign IP Address to interface and enable or disable interface on demand.
1 | ifconfig |
2. ping
command
PING
(Packet INternet Groper) command is the best way to test connectivity between two nodes. Whether it is Local Area Network (LAN) or Wide Area Network (WAN). Ping use ICMP (Internet Control Message Protocol) to communicate to other devices. You can ping host name of ip address using below command.
1 | ping ip |
3. traceroute
command
traceroute
is a network troubleshooting utility which shows number of hops taken to reach destination also determine packets traveling path.
1 | traceroute 4.2.2.2 |
4. NETSTAT
command
Netstat
(Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.
1 | netstat -r |
5. dig
command
dig
(domain information groper) query DNS related information like A Record, CNAME, MX Record etc. This command mainly use to troubleshoot DNS related query.
1 | dig domainName |
6. nslookup
command
nslookup
command also use to find out DNS related query.
1 | nsloopup domainName |
7. route
command
route
command also shows and manipulate ip routing table.
1 | route |
8. host
command
host
command to find name to IP or IP to name in IPv4 or IPv6 and also query DNS records.
1 | host domainName |
9. arp
command
ARP
(Address Resolution Protocol) is useful to view / add the contents of the kernel’s ARP tables.
查看局域网所有IP地址的设备,且获取相应的MAC
1 | arp -a |
10. hostname
command
hostname
is to identify in a network. Executhostname
command to see the hostname of your box. You can set hostname permanently in /etc/sysconfig/network. Need to reboot box once set a proper hostname.
1 | hostname |
11. GUI tool system-config-network
1 | system-config-network |
12. ethtool
command
ethtool
is a replacement of mii-tool
. It is to view, setting speed and duplex of your Network Interface Card (NIC). You can set duplex permanently in /etc/sysconfig/network-scripts/ifcfg-eth0 with ETHTOOL_OPTS variable.
1 | ethtool eth0 |
13. iwconfig
command
iwconfig
command in Linux is use to configure a wireless network interface. You can see and set the basic Wi-Fi details like SSID channel and encryption. You can refer man page of iwconfig
to know more.
1 | iwconfig [interface] |