Linux Getting Started Basics (12) Linux Network infrastructure configuration

Source: Internet
Author: User
Tags network troubleshooting ping network linux

Ethernet Connection

In Linux, the Ethernet interface is named: eth0,eth1, 0, 1 for network card number

The LSPCI command allows you to view the hardware information for your network card (if you are a USB card, you may need to use the LSUSB command)

Ifconfig command (interface configuration) to view interface information:

$ ifconfig-a View All interfaces

$ ifconfig eth0 View the specified interface

Command Ifup,ifdown to enable, disable an interface

$ ifup Wlan0

$ Ifdown Wlan0

Network Test command

Test network connectivity:

$ ping 192.168.1.1

$ ping baidu.com

Testing DNS Resolution

$ host Www.baidu.com

$ dig www.baidu.com

View the routing table

$ IP route

Track the network path to the destination address

(Ubuntu installation $sudo apt-get install traceroute)

$ traceroute www.baidu.com

Network quality testing using MTR (combined with traceroute and ping)

$ mtr www.baidu.com

Modify Host Name

Modify host name in real time:

$ hostname Shuangde

Permanently modify host Name

/etc/hostname (Ubuntu): Directly modify the name

/etc/sysconfig/network (RedHat): HOSTNAME = Shuangde

Troubleshooting

Network troubleshooting follows the process from bottom to top, from itself to the outside

Check that the network configuration information is correct first:

-ip Address

-Subnet mask

-Network Management

-dns

To see if the network management is connected

Ping Network Management IP address

To see if DNS resolution is normal:

$ host Www.baidu.com

$ host Www.douban.com

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

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.