UNIX foundation TCP / IP management and use
TCP / IP Management
The IP (Internet Protocol) address is the basis of the data selection path (exchange) between the TCP / IP online for the host, but
Yes, users usually don't like the use of IP addresses consisting of numbers, and more likely to use multi-English letters.
Machine name -ur (Uniform Resource Location). However, the host name must be imaged to the IP address, and
The law is done through the / etc / hosts file.
Configuration / etc / hosts
The format of / etc / hosts is: Address - Name - Alias.
E.g:
127.0.0.1 Localhost Localhost
132.147.18.1 Vision vision.sco.com
IP addresses must be the first one, there should be no characters, such as space characters or tabs in front of it;
single
Host name; alias is not needed in many cases, but the full-throw name, simple host name and jurisdiction name
word
They are classified into the alias.
Detect TCP / IP configuration
The software part of the TCP / IP protocol includes the top three levels of the TCP / IP protocol masonry, that is, the application level (Application Protoco)
l), Transport Protocol and Internet Protocol. Specific host name
"LocalHost" is the alias of the local host on the special network "loopback". To detect the softness of the TCP / IP protocol masonry
Part part, use the PING instruction:
#PING LOCALHOST
If ping localhost fails, use netstat -i [n], check the status of the network interface, display the network interface
The statistical message transmitted on the upper group, the instructions are as follows:
#Netstat -i [N]
n option Forced the number instead of the name. NetStat View the Bicyclic Drive LO0, if LO0 fails,
/ etc / tcp "Ifconfig LO0" line indicates that it is broken or there is an error.
Test TCP / IP hardware
During the audit boot process, the configuration report generated by the identified network interface, and the hardware part of the TCP / IP protocol includes
The bottom level of the TCP / IP protocol masonry, namely network interface level and physical / hardware level. Any communication to another host
It is transmitted on the "physical" network interface and does not cause data to be transferred to the "cyclic" network. Use the PING instruction
The hardware part of the TCP / IP protocol masonry is detected.
#Ping hostname
or
#Ping ip-address
If the Ping instruction fails, use the NetStat -i [N] audit network interface.
Understand the output of NetStat -i
If you use ping on the remote host, OPKTS and IPKTS are still zero, then the network interface is probably not used.
The same interruption (Interrupt), not its device driver. If IPKTS is not zero, OPKTS is equal to
Oerrs, then the I / O address of the NIC may not be correct. If IPKTS is zero, OPKTS is equal to Oerrs, then
, It may be unqualified by the network cable connection. In addition to CLOOIS with OPKTS, use the result of 100 by 100.
Calculate the conflict. If the conflict is less than 5 to ten, then all network interfaces are effective. If the ping fails, and if there is a problem with the network interface, then the network media operation is verified.
Adjust the core parameters of TCP / IP
There is not enough stream parameter, and the network program cannot communicate; if the stream resource is not fully,
through
It is often leading to a slower throughput rate. To verify the flow of resources, use netstat -m; you can also use the Crash instruction to inspect the stream.
Resources, when a Crash issued prompt '>, it is entered into "strStat".
If there is an item that is not equal to zero below the Fail column, then item items in the same row may need to be adjusted. Such as
fruit
The number below the fail is greater than or equal to 100 of the number of Total columns, which should be added one or two each time, but cannot
will
This number is doubled. Because streaming resources use RAM, be careful when adding streaming resources. Users can also use Confi
GURE or SYSADMSH add specific stream resources to reconnect the core or reboot.
Limit the permissions of the FTP access system
For those who do not want to use FTP across network access systems, they can build / etc / ftpusers files and setup system accounts.
The method of the name of the households, preventing him from using the FTP access system. If / etc / ftpusers do not exist,
First build. In a separate line, add the name of the system account, indicating that you cannot use FTP access to the network.
System, in the security system, the FTP is not allowed to access the user right and uucp, list any users who limit the use of FTP
first name.
Use TCP / IP
It is very useful to distinguish the distance from the distance, it allows us to run the program on the remote host without going to the remote system.
, The Executive
Live system management, there are two instructions to be used by remote host registration, which is Rlogin and Telnet.
Register with Rlogin from far host
Rlogin allows registration to any system with UNIX job system and TCP / IP protocol, and rlogin can only register
UNIX job system environment, the instructions are as follows:
$ rlogin recot-host-name
To avoid rlogin, you can use the following instructions because you do not provide the same name account from the remote host:
$ ROLGIN Remote-Host-Name -1 Remote-User-Name
-1 option is used to point out a remote user account.
To stop rlogin, you have to enter ~., Press Enter / Return> key; you can use the logout or EXIT instruction.
Register to remotely using Telnet
Regardless of its homework system type, as long as the TCP / IP protocol can support the TCP / IP protocol, you can use Telnet instructions to be registered.
$ Telnet Hostname
or
$ TELNET IP-Address
Use FTP to copy or transfer files
FTP (File Transfer Protocol) Allows users to replicate files from the remote host, users are not required to consider the operating system type
In order to copy files or from any system with TCP / IP. FTP instruction allows a copy of the directory or all
File, but you cannot copy a multi-level directory. When using FTP, you must have an account on the remote host. When FTP is registered
When the system is system, the shell is not obtained, but the program is communicating as far from the FTP instruction interpreter.
$ FTP Remote-Host-Name
or
$ ftp remote-host-ip-address
Once the registration is successful, the prompt of the FTP instruction interpreter will appear.
FTP>
The user can use the open instruction to connect the host.
FTP> Open Remote-host-name
Copy a file back to your own system, use:
FTP> Get FileName
If you just want to transfer a file to a remote host, use:
FTP> PUT FileName
You need to copy all files from the remote host to your own system, you can use the following instructions:
FTP> MGET *
Instead, if you want to transfer your own files, use the following instructions:
FTP> MPUT *
RCMD allows users to register remotely, and directly run the instructions on the host, actually, also registration.
only
However, the user is not required to do other operations. When using RCMD runs any instructions in a remote host, its output is the default device
meeting
Changed to the terminal.
$ RCMD Remote-Host-Name Man SH
Request a special terminal processing instruction, will not contain the device itself, because the type of the terminal is not defined by the remote instruction,
Claim
Configure the trusted access on the remote host. To list the use of the disk on the disk from the list, use the following instructions:
$ RCMD Remote-Host-Name DF
To list the directory on the remote host, use the following instructions:
$ RCMD Remote-Host-Name LS / USR / GAMES
To back up the files on the remote host to the pocket tape on the remote host, the instructions are as follows:
#RCMD Remote-Host-Name Tar CVF / DEV / RCT0 / USR
or
#rcmd remote-host-name "find / usr -depth -print | cpio -oc> / dev / rct0
Use the following instructions to back up files on the local system to the pocket tape on the remote host:
#TAR CVF - / USR | RCMD Remote-Host-Name DD of = / DEV / RCT0
or
#find / usr -depth -print | cpio -oc | rcmd remote-host-name DD of = / dev / rct0
On the other hand, if you want to back up files on the remote host to the pocket magnetic belt on the local system, you can use the following.
make:
#RCMD Remote-host-name "TAR CVF - / USR"> / dev / rct0
or
#RCMD Remote-host-name "Find / usr -depth -print | cpio -oc"> / dev / rct0