Linux Getting Started basic--linux network configuration

Source: Internet
Author: User
Tags network troubleshooting

Linux Network configuration Ethernet connection in Linux, the Ethernet interface is named: eth0, eth1, etc., 0, 1 represents the network card number
Pass LSPCI command to view NIC hardware information(if it is a USB card, you need to use the LSUSB command)
Command ifconfig to view interface information
Ifconfig-a View All interfaces
Ifconfig Interface Name eth0 View information for a specific interface
Command Ifup, Ifdown to enable, disable an interface
Ifup eth0
Ifdown eth0
Configure Network information Use the Setup command to configure network information
Network-related profile NIC configuration file (this file is not available in this directory of Ubuntu)
/etc/sysconfig/network-scripts/ifcfg-eth0
DNS configuration file
/etc/resolv.conf
Host name configuration file
/etc/sysconfig/network
Static Host name configuration file
/etc/hosts
Network Test commands Test network Connectivity
Ping 192.168.1.1
Ping www.baidu.com
Test DNS Resolution
Host www.google.com
Dig www.google.com
The result of the host command is simple, just show the IP address of the domain name
The dig command displays a relatively detailed result.
Show route Table
IP route
track the network path to the destination address
Traceroute www.google.com
using MTR for network quality testing(combined with tracerout and ping)
Troubleshooting network troubleshooting follows a process from the bottom to the top, from itself to the outside.
Check that the network configuration information is correct first:
IP Address
Subnet mask
Gateway
Dns
Check to see if the gateway is connected:
Ping Gateway IP Address
To see if DNS resolution is OK:
Host www.google.com


Linux Getting Started basic--linux network configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.