Troubleshooting the IP configuration and network problems of Linux

Source: Internet
Author: User

1.6 IP configuration,

The first thing to do is to use:

ifconfig and plus related parameters such as:

ifconfig-a, to view, your own computer network configuration.

Again it is necessary to know where the default IP configuration files are:

cd/etc/sysconfig/network-scripts/ under this path, and then, to find the relevant configuration file, the default is:

After the vim Ifcfg-eth0 is opened, the parameters in the inside must be remembered as follows:

Device=name,name is the name of the physical device, the name of the Ifcfg-eth0, the suffix eth0 the same
Ipaddr=addr, addr is the IP address
Netmask=mask, Mask is a network mask
BROADCAST=ADDR, fill in the broadcast address (i.e. the network segment where the IP address is located)
GATEWAY=ADDR, fill in the gateway address here.
onboot=#, fill in # here to take the following options:
#=yes the device will start using when it is started.
#= no the device is not used at boot time.
bootproto=# here, #取下列选项:
#= None-no boot-time protocol is used
#=bootp using the BOOTP protocol
#= DHCP using DHCP protocol

Type=ethernet indicates the type of NIC

Uuid= "******" can be understood as, the unique identification code of the physical device on the computer

The above formulation is correct, theoretically can be internet, but this is for the cable network.


Then, what you need to use is:

Service Network restart or Start command, that is, restart the network service

or with

/etc/init.d/network start or the following
Usage:/etc/init.d/network {start|stop|status|restart|reload|force-reload}

To this, basically can, connect the network.

Wireless network to learn to use

iwconfig command to see if the driver for the wireless card is installed, if any

Lo no wireless extensions.

Eth0 no wireless extension. The table does not have a wireless card or is not available on the wireless network.

If this occurs:

wlp1s0    IEEE 802.11  ESSID: "sctu"  
           mode:managed  frequency:2.437 ghz  Access point:0a:69:6c:36:7a:37   
           Bit rate=57.8 mb/s   tx-power=22 dbm   
          Retry Short limit:7   RTS thr:off   Fragment thr:off
          Power management:on
           Link quality=68/70  Signal level=-42 dBm  
           Rx Invalid nwid:0  rx invalid crypt:0  rx Invalid frag:0
           Tx Excessive retries:0  Invalid misc:342   Missed beacon:0

lo        No wireless extensions.

It means that it can be connected, and that it is already connected.

Tearful wireless card models are used:

LSPCI |grep-i Network,

such as the wireless network card model on my computer:

[Email protected]:/$ lspci |grep-i Network
01:00.0 Network Controller:intel Corporation Wireless 3165 (rev 81)
Then, look at the kernel version:

Uname-r

Then according to the system kernel version and network card model, download the relevant network card driver, then install (compile and install, also need other runtime support).


1.7 Troubleshooting of Network problems

Wired network: The general problem arises, in ifcfg-eth#, the formulation or the configuration of the DNS file or hostname:

/etc/resolv.conf ,/etc/hostname may be on the firewall and SELinux configuration, the firewall and SELinux shut down the command:


systemctl Stop Firewalld.service temporarily closed (Start|stop|restart)
systemctl Disable Firewalld.service no boot start

firewall-cmd--state View run status

# or you can use iptables to manage

The SELinux shutdown,

getenforce View the operation status of SELinux, or use (sestatus-v or Sestatus-b)

setenforce 0 command set temporary shutdown (Setenforce 1 is on)

Vi/etc/sysconfig/selinux permanently closed, change the selinux=# to 0 or disabled. (1 or enabled)

selinux=disabled, save the reboot.

If there is a problem with the network, it may be that there is a problem with the external network connected.


Troubleshoot IP configuration and network problems with Linux

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.