Sunday, March 27, 2011

Linux-based network test system design (2)

Linux system configuration of chapter II, section 1, Linux network settings TCP/IP is the most widely used UNIX networking protocol, Linux as a kind of UNIX operating systems are no exception.

Linux since the result of it as part of their own are inseparable. Linux system kernel directly on to the network provides a strong support, it supports many network devices (from the network card, Modem, ISDN adapter to various routers, etc.), and it inherits from many Unix performance network software, so that Linux has a good network performance. Linux not only support existing network protocol, and because the Internet thousands of networks of experts involved in its development, it also supports some future new protocol such as IPv6 ready with beta version. As a result of this experiment system is Linux-based network lab systems and thus become familiar with the system after the work is to study Linux network configuration and the configuration and management methods. Network card installation: Linux in the kernel has on various Ethernet network card is supported, as long as the time to compile the kernel to support the network and the network model of driver compiled into the kernel. In General, on the network card support code is compiled into a dynamically loaded module. There is a kernel support, we must also put NIC i/o port number (for the network card 0x320) and interrupt number (this card is 11) passed to the kernel, so the system can really control adapter for network communication. We must get it loads in the file/etc/conf.modules (this system is also loaded with a sound card module), the contents of this document are as follows: aliaset0ne optionsneio = 0x320irq = 11 aliassoundsb aliasmidiopl3 optionsopl3io = 0x388 optionssbio = 0x220irq = 7dma = 1mpu_io = 0x201 we can also be integrated GUI programs are configured to run in a Terminal window, linuxconf system most of the settings. IP address and network adapter settings we will use the control panel to load the configuration program, run the following window will appear controlpanel, it contains many of the configuration tool, from system daemons, network settings, user management, software packages installed on the www server Apache configuration program. In Control Panel, select network configuration, the following window will appear in the diagram above click on the Add the following window appears: the IP of a bar is filled in with the IP address of 172.31.0.10 computer, the network mask of 255.255.255.0, and the other is the default. Select Done to exit. In addition, we can also directly in the configuration file, add the appropriate content. In the build file/etc/sysconfig Network, which reads as follows: NETWORKING = yes FORWARD_IPV4 = false HOSTNAME = linuxserver.ec.edu DOMAINNAME = ec.edu GATEWAY = "172.31.0.200" GATEWAYDEV = "et0", access gateway settings: in the network configuration window, select the Routing, as shown in the picture: in the above diagram click Add, the following window will appear. The device fills in a bar, in the Network is filled in with the eth0 network (network mask, and gateway and), fill in the Netmask 255.255.255.0 netmask, fill in a bar Geteway gateway address 172.31.0.200 (laboratory of gateway addresses). Select Done to exit. Another way is to directly write to the configuration file, create a file in/etc/sysconfig static-routes, its content is: eth0net172.31.0.0netmask255.255.255.0gw172.31.0.200 III test network connection and operation of 1, testing, and subnets other client communication. Use the ping command to test for the IP address for example: 172.31.0.105 in a Terminal window, type "ping172.31.0.105", Linux host will send a message to 172.31.0.105 host and make it return the package as shown in the following diagram: see time values greater than 0, then the basic network settings are correct. If the time value is equal to-1 the network setting is problematic. Then, you can use telnet, ftp, and other programs and then test it. The second section of the file system, user, user interface management, file system, user management, user management, file system, RedHat system provides an integrated management program Linuxconf divided into character interface mode, the graphic interface mode and the Web interface management mode (at the back of the experimental system management will further introduce). It not only can handle the file system, user management, will also be able to deal with network devices to load and start the program settings, and so on. You can call it linuxconf, it automatically determines whether to x-windows graphic graphic environment, and then calls the appropriate program, were as follows for the graphics mode of Linuxcon: in the integrated management program, we can be initialized in an experimental setting, to join the user group IT; add experimental management account and test user account (user1 ~ user50); at the same time set disk quota management. 1, the disk quota settings on the file system settings, disk quota management is very important. For this experiment, because to many students with experimental service and system of hard disk space. So every student experiments are for disk quota allocation. Also a good Linux system offers quota to set disk quotas, and so on the user account is assigned the appropriate disk space, more than a certain amount on the alarm, to a certain amount to do not allow users to upload files. In this way and experiment management programs combine to make the system does not consume disk space and stop working. The following settings for specific (each user of the bottom line is 5 megabytes of warning, flexible space is 2 megabytes): available quota, quotaon and quotaoff command for quota management disk quotas in several areas of the hard drive using the restricted amount. We can use the GID of a group of users, or to restrictions for a single user. Manage hard disk quota used various command as follows: quota--generated report quotaon-hard disk quotas for a user to open a disk-quota feature and set hard disk quota quotaoff-a user closes the disk quotas feature repquot--also generates reports on the hard disk quota edquota--edit adjust user quota quotacheck--check file system quota usage first logged on with the root, and on the file system table/etc/fstab for editing, because our experimental system to make the disk quota of/dev/had management, so we have to modify the options on it, the entire file as follows:/dev/hda1/ext2defaults11/dev/hda5/userext2exec, dev, suid, rw, usrquota, grpquota12/dev/hda6swapswapdefaults00/dev/fd0/mnt/floppyautosync, user, noauto, nosuid, nodev, unhide00/dev/cdrom/mnt/cdromautouser, noauto, nosuid, nodev, exec, ro00 none/procprocdefaults00 then we generate a/user quota.user and quota.group files to, and make their permissions to 600. Following the use of touch and chmod command: # touch/user/quota.user # chmod600/etc/quota.user # touch/user/quota.group # chmod600/etc/quota.group, now restart your computer, the system of quota began work. Next, we use the edquota-uusername on user username for disk quota settings are as follows (on user user1): # edquota-uuser1 edquota will invoke an editor reading into/user/quota.user let's edit as follows: the first soft parameters to hard drive (in KB) the minimum number of warnings, first argument is a hard disk (in KB) the maximum amount of the distribution; the second parameter is the number of files, soft minimum warning number, the second parameter is the number of files, hard. Now, the user user1 early stage settings, the system default is one week (7 days), it is clear that this is a long time. We will set it for 5 minutes, so that in the time period for excess user alarm. The following use edquota (or user user1): # edquota-tuser1 edquota or/user/quota.user, we set it in the appropriate place, appear as follows: Finally, check the user's quota is correct, use quota commands to check the user's disk quotas are set with Linuxconf/dev/hda5 for quota disk set as Accesslocaldrviceà/dev/hda5 double-click: down the disk quota program work, such as figure makes its role userquotaenabled and groupquotaenabled: and then, on each user disk quota settings, in the settings the lowest Diskspacesoftlimt warning disk quota within the Diskspacehardlimit sets the maximum amount of disk, set the warning time within Diskspacegraceperiod, set within the Filessoftlimit lowest number of files within the Fileshardlimit sets the maximum number of files, set the warning time within Filesgraceperiod: practical test for a disk quota for an account and login, the system copies some large files (more than 7 trillion) to see whether the system has a warning message and does not allow the user to upload the file again. The following figure is in the shell, exceeding the disk quota warning level warning information: in addition, use FTP to upload a large number of files for testing, more than the amount after system deny user to upload files. Second, the user interface to manage because our system for the experimental system, therefore, necessary to the user interface to change something, add some essential tips to help test. 1. telnet login interface settings change/etc/rC.local, the corresponding statement on issue.net commented out. : # Echo "" >/etc/issue.net # echo "LinuxMandrake $ R" > >/etc/issue.net

No comments:

Post a Comment