8.Linux Network infrastructure configuration
• In Linux , the Ethernet interface is named eth0,eth1 , etc.,0, 1 represents the NIC number,
View
• View the NIC hardware information through LSPCI, if it is a USB card, you can run lsusb,
· ifconfig-a View all interfaces, ifconfig eth0 View specific interfaces,
· ifup eth0 start the interface, Ifdown eth0 disable the interface,
• Configuration: run Setup To configure the NIC,
• NIC configuration file /etc/sysconfig/network-scripts/ifcfg-eth0,
· DNS configuration file /etc/resolv.conf ,
• Hostname profile /etc/sysconfig/network,hostname View or temporary modification,
• Static hostname configuration file hosts file :/etc/hosts,
Test
· Ping [ options ] 192.168.1.1 , test connectivity, - C 4 , Ping4 Times, - s 60000 Change the test package size,
· Host or Dig www.baidu.com , Test DNS parsing,
· IP Route , display the routing table,
· netstat Display Network-related information, parameters -tluan , service port number, etc.,
· traceroute www.baidu.com trace the network path,
· mtr www.baidu.com , the network quality test, combined with the traceroute and the Ping ,
8.Linux Network Infrastructure configuration