Six-learning Linux system, IP addresses of network infrastructure -Linux

1, ifconfig command to temporarily assign an IP address

2, setup tool permanently configured IP address

3, modify the network configuration file

4, a graphical interface to configure the IP address

 

 

 

ifconfig command to temporarily assign an IP address

The main role is to view the network information, you can temporarily set the IP address of the network card

 

The first line of output information:
First, identify the MAC address of the Ethernet card and the current computer

The second line information:

Identifies the IP address, subnet mask and gateway

The third line information:

Marked IPv6 addresses

The fourth line information:

Some parameter describes the information card

The fifth line information:

Statistical accepted the number of data packets,

The sixth line information:

Send statistics of how many packets

The total size and the total size of the received packet following the packet transmitted

The last line:

The current memory card in which the address

               

In Windows, a network adapter is allowed to add multiple IP addresses

Linux can also be

But when bind multiple IP addresses of the same card is shared total bandwidth.

 

ifconfig eth0 192.168.0.200 netmask 255.255.255.0 # temporarily set eth0 NIC IP address and subnet mask

 

You can also configure a virtual network card

ifconfig eth0:0 192.168.1.200

 

At this time, the two addresses are normal use (NIC binding a plurality of IP addresses)

Close method:

ifconfig eth0:0 down

 

To get him active again, straight up on it, do not have to configure.

 

setup tool (Red Hat proprietary graphical tool)

The case of a minimal installation (Minimal) that do not have this tool, you can choose Basic server in the installation of the system.

 

Linux network configuration file

1, NIC information file

 

Then the following is

IP addresses

Subnet Mask

Gateway

DNS

as well as

IPV6NIT = no # IPv6 does not start

USERCTL = no # do not allow non-root users to control this card.

 

When used to configure other IP network card configuration file, copy the file directly to configure on the line.

 

2, hostname file

vi /etc/sysconfig/network

 

NIC

CPU name

In addition to Windows, there are IP host name can not be the same, but Linux can.

在修改后重启整个系统才会显示修改后的主机名。(直接改文件是永久生效)

hostname [主机名]          #临时生效,重新登录后前面的提示符才会改变

 

3、DNS配置文件

 

 

这是所有的Linux的配置文件的路径,需要牢记。

 

 

 

 

Guess you like

Origin www.cnblogs.com/Yuuki-/p/11906881.html