β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ WORKING LASTEST NORDVPN :
gaming_yeti@hotmail.com:sasquatch10
brianleong96@gmail.com:19961025b
nguyen.richard@hotmail.com:manchester7
the_griff_2003@hotmail.com:cCk2ghd86
grim-eyes@live.com:bmf1mbm00
Mannyd0719@gmail.com:Math8000
rjy2281@gmail.com:fisher222
keaton2800@hotmail.co.uk:Rachel2800
enriquewilliams20@yahoo.com:Imadome123
lexandjason@gmail.com:slater69
joninwm@yahoo.com:hooters2
idahogeology@yahoo.com:Richard1
danjshapiro@yahoo.com:Adin1023
drasia10@yahoo.com:dthvPA123
randysesariojr@gmail.com:ninja3221
k_leepearce@hotmail.com:nokiae71
jooga02@gmail.com:copperbird4
jwylie22@hotmail.com:dookie22
fulhamhamster09@googlemail.com:hamster123
quentinde3i1103@gmail.com:Quentinde3
rplim.b@gmail.com:Q1yfe5G5
jaspertchang@gmail.com:Casperc811
bethsharae@gmail.com:bsc10785
ply_1234@yahoo.com:Royalty9
nstonetile@aol.com:m5a9r8c0
ygagne@gmail.com:gu1doune
cynthg2834@gmail.com:orangeblue
smacchesney@gmail.com:ruffryders
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ WORKING LASTEST NORDVPN :
gaming_yeti@hotmail.com:sasquatch10
brianleong96@gmail.com:19961025b
nguyen.richard@hotmail.com:manchester7
the_griff_2003@hotmail.com:cCk2ghd86
grim-eyes@live.com:bmf1mbm00
Mannyd0719@gmail.com:Math8000
rjy2281@gmail.com:fisher222
keaton2800@hotmail.co.uk:Rachel2800
enriquewilliams20@yahoo.com:Imadome123
lexandjason@gmail.com:slater69
joninwm@yahoo.com:hooters2
idahogeology@yahoo.com:Richard1
danjshapiro@yahoo.com:Adin1023
drasia10@yahoo.com:dthvPA123
randysesariojr@gmail.com:ninja3221
k_leepearce@hotmail.com:nokiae71
jooga02@gmail.com:copperbird4
jwylie22@hotmail.com:dookie22
fulhamhamster09@googlemail.com:hamster123
quentinde3i1103@gmail.com:Quentinde3
rplim.b@gmail.com:Q1yfe5G5
jaspertchang@gmail.com:Casperc811
bethsharae@gmail.com:bsc10785
ply_1234@yahoo.com:Royalty9
nstonetile@aol.com:m5a9r8c0
ygagne@gmail.com:gu1doune
cynthg2834@gmail.com:orangeblue
smacchesney@gmail.com:ruffryders
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ Grab and analyze :
crawl and analyze a file is very simple. This tutorial will lead you step by step through an example. let's start!
1) γγFirst, I must decide the URL address that we will crawl. It can be set in the script or passed through $ QUERY_STRING. For simplicity, let's set the variables directly in the script.
<?
$ Url = 'http://www.php.net' ;
?>
2) γγThe second step, we crawl the specified file, and by file () function it exists in an array.
<?
$ url = 'http://www.php.net' ;
$ lines_array = file ( $ url );
?>
3) γγOkay, now there are already files in the array. However, the text we want to analyze may not be all in one line. To understand this file, we can simply convert the array $ lines_array into a string. We can use the implode (x, y) function to achieve it. If you want to use explode (array of string variables) later, it may be better to set x to "|" or "!" Or other similar delimiters. But for our purposes, it is best to set x to a space. y is another necessary parameter because it is the array you want to process with implode ().
<?
$ url = 'http:;
$ lines_array = file ( $ url );
$ lines_string = implode ( '' , $ lines_array );
?>
4) γγNow that the crawling work is done, it is time to analyze it. For the purpose of this example, we want to get everything from <head> to </ head>. In order to parse out strings, we also need something called regular expressions.
<?
$ url = 'http://www.php.net' ;
$ lines_array = file ( $ url );
$ lines_string = implode ( '' , $ lines_array );
eregi ( "<head> (. *) </ head> " , $ lines_string ,$ head );
?>
5) γγLet's take a look at the code. As you can see, the eregi () function is executed in the following format:
eregi ("<head> (. *) </ Head>", $ lines_string, $ head);
γγ"(. *)" Means everything and can be explained For, "Analyze all things between <head> and </ head>". $ lines_string is the string we are analyzing, and $ head is the array where the analyzed results are stored.
6) γγFinally, we can lose data. Because there is only one instance between <head> and </ head>, we can safely assume that there is only one element in the array, and that is what we want. Let's print it.
<?
$ url = 'http://www.php.net' ;
$ lines_array = file ( $ url );
$ lines_string = implode ( '' , $ lines_array );
eregi ( "<head> (. *) </ head> " ,);
echo $ head [ 0 ];
?>
7) γγThis is all the code.
<? php
$ url = 'http://www.php.net' ;
$ lines_array = file ( $ url );
$ lines_string = implode ( '' , $ lines_array );
preg_match_all ( "/ <body ([^>] . +?)> (. *) <\ / body> / is " , $ lines_string , $ m );
echo " <xmp> " ;
echo $ m [ 2 ] [ 0 ];
?>
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ Grab and analyze :
crawl and analyze a file is very simple. This tutorial will lead you step by step through an example. let's start!
1) γγFirst, I must decide the URL address that we will crawl. It can be set in the script or passed through $ QUERY_STRING. For simplicity, let's set the variables directly in the script.
<?
$ Url = 'http://www.php.net' ;
?>
2) γγThe second step, we crawl the specified file, and by file () function it exists in an array.
<?
$ url = 'http://www.php.net' ;
$ lines_array = file ( $ url );
?>
3) γγOkay, now there are already files in the array. However, the text we want to analyze may not be all in one line. To understand this file, we can simply convert the array $ lines_array into a string. We can use the implode (x, y) function to achieve it. If you want to use explode (array of string variables) later, it may be better to set x to "|" or "!" Or other similar delimiters. But for our purposes, it is best to set x to a space. y is another necessary parameter because it is the array you want to process with implode ().
<?
$ url = 'http:;
$ lines_array = file ( $ url );
$ lines_string = implode ( '' , $ lines_array );
?>
4) γγNow that the crawling work is done, it is time to analyze it. For the purpose of this example, we want to get everything from <head> to </ head>. In order to parse out strings, we also need something called regular expressions.
<?
$ url = 'http://www.php.net' ;
$ lines_array = file ( $ url );
$ lines_string = implode ( '' , $ lines_array );
eregi ( "<head> (. *) </ head> " , $ lines_string ,$ head );
?>
5) γγLet's take a look at the code. As you can see, the eregi () function is executed in the following format:
eregi ("<head> (. *) </ Head>", $ lines_string, $ head);
γγ"(. *)" Means everything and can be explained For, "Analyze all things between <head> and </ head>". $ lines_string is the string we are analyzing, and $ head is the array where the analyzed results are stored.
6) γγFinally, we can lose data. Because there is only one instance between <head> and </ head>, we can safely assume that there is only one element in the array, and that is what we want. Let's print it.
<?
$ url = 'http://www.php.net' ;
$ lines_array = file ( $ url );
$ lines_string = implode ( '' , $ lines_array );
eregi ( "<head> (. *) </ head> " ,);
echo $ head [ 0 ];
?>
7) γγThis is all the code.
<? php
$ url = 'http://www.php.net' ;
$ lines_array = file ( $ url );
$ lines_string = implode ( '' , $ lines_array );
preg_match_all ( "/ <body ([^>] . +?)> (. *) <\ / body> / is " , $ lines_string , $ m );
echo " <xmp> " ;
echo $ m [ 2 ] [ 0 ];
?>
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ Crawling and analysis by Undercode :
> Grabbing and analyzing a file is very simple. This tutorial will lead you step by step through an example. let's start!
1) First, I must decide the URL address that we will crawl. It can be set in the script or passed through $ QUERY_STRING. For simplicity, let's set the variables directly in the script.
<?
$ url = 'http://www.php.net'
;?> In the
2) second step, we grab the specified file and store it in an array through the file () function.
<?
$ url = 'http://www.php.net';
$ lines_array = file ($ url);
?>
γ3) γOkay, now there are already files in the array. However, the text we want to analyze may not be all in one line. To understand this file, we can simply convert the array $ lines_array into a string. We can use the implode (x, y) function to achieve it. If you want to use explode (array of string variables) later, it may be better to set x to "|" or "!" Or other similar delimiters. But for our purposes, it is best to set x to a space. y is another necessary parameter because it is the array you want to process with implode ().
<?
$ url = 'http://www.php.net';
$ lines_array = file ($ url);
$ lines_string = implode ('', $ lines_array);
?>
4) γNow that the crawling is done, it's time to analyze it. For the purpose of this example, we want to get everything from <head> to </ head>. In order to parse out strings, we also need something called regular expressions.
<?
$ url = 'http://www.php.net';
$ lines_array = file ($ url);
$ lines_string = implode ('', $ lines_array);
eregi ("<head> (. *) </ head> ", $ lines_string, $ head);
?>
π¦ Let us look at the code. As you can see, the eregi () function is executed in the following format:
eregi ("<head> (. *) </ Head>", $ lines_string, $ head);
γγ"(. *)" Means everything and can be explained For, "Analyze all things between <head> and </ head>". $ lines_string is the string we are analyzing, and $ head is the array where the analyzed results are stored.
π¦ γFinally, we can lose data. Because there is only one instance between <head> and </ head>, we can safely assume that there is only one element in the array, and that is what we want. Let's print it.
<?
$ url = 'http://www.php.net';
$ lines_array = file ($ url);
eregi ("<head> (. *) </ head>", $ lines_string, $ head);
echo $ head [0];
?>
γγThis is all the code.
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β
π¦ Crawling and analysis by Undercode :
> Grabbing and analyzing a file is very simple. This tutorial will lead you step by step through an example. let's start!
1) First, I must decide the URL address that we will crawl. It can be set in the script or passed through $ QUERY_STRING. For simplicity, let's set the variables directly in the script.
<?
$ url = 'http://www.php.net'
;?> In the
2) second step, we grab the specified file and store it in an array through the file () function.
<?
$ url = 'http://www.php.net';
$ lines_array = file ($ url);
?>
γ3) γOkay, now there are already files in the array. However, the text we want to analyze may not be all in one line. To understand this file, we can simply convert the array $ lines_array into a string. We can use the implode (x, y) function to achieve it. If you want to use explode (array of string variables) later, it may be better to set x to "|" or "!" Or other similar delimiters. But for our purposes, it is best to set x to a space. y is another necessary parameter because it is the array you want to process with implode ().
<?
$ url = 'http://www.php.net';
$ lines_array = file ($ url);
$ lines_string = implode ('', $ lines_array);
?>
4) γNow that the crawling is done, it's time to analyze it. For the purpose of this example, we want to get everything from <head> to </ head>. In order to parse out strings, we also need something called regular expressions.
<?
$ url = 'http://www.php.net';
$ lines_array = file ($ url);
$ lines_string = implode ('', $ lines_array);
eregi ("<head> (. *) </ head> ", $ lines_string, $ head);
?>
π¦ Let us look at the code. As you can see, the eregi () function is executed in the following format:
eregi ("<head> (. *) </ Head>", $ lines_string, $ head);
γγ"(. *)" Means everything and can be explained For, "Analyze all things between <head> and </ head>". $ lines_string is the string we are analyzing, and $ head is the array where the analyzed results are stored.
π¦ γFinally, we can lose data. Because there is only one instance between <head> and </ head>, we can safely assume that there is only one element in the array, and that is what we want. Let's print it.
<?
$ url = 'http://www.php.net';
$ lines_array = file ($ url);
eregi ("<head> (. *) </ head>", $ lines_string, $ head);
echo $ head [0];
?>
γγThis is all the code.
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β
β β β ο½ππ»βΊπ«Δπ¬πβ β β
π¦ Make an xbm picturexbm is a simple two-color image bitmap format, which is used more in the early cgi. It is currently used for counters.
<? php
t.me/undercodeTesting
setXBM (1234567890,0);
function setXBM ($ num, $ mode = 0) {
settype ( $ num, "string");
$ mode = $ mode? 0xff: 0x00;
$ int_width = strlen ($ num); // digits
$ count_width = 8; // single digit width
$ count_height = 16; // height
$ bitmap = array (
0 => array (0xff, 0xff, 0xff, 0xc3, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xff, 0xff, 0xff),
1 => array (0xff, 0xff , 0xff, 0xcf, 0xc7, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xff, 0xff, 0xff),
2 => array (0xff, 0xff, 0xff, 0xc3, 0x99, 0x9f, 0x9f, 0x , 0xe7, 0xf3, 0xf9, 0xf9, 0x81, 0xff, 0xff, 0xff),
3 => array(0xff, 0xff, 0xff, 0xc3, 0x99, 0x9f, 0x9f, 0xc7, 0x9f, 0x9f, 0x9f, 0x99, 0xc3, 0xff, 0xff, 0xff),
4 => array(0xff, 0xff, 0xff, 0xcf, 0xcf, 0xc7, 0xc7, 0xcb, 0xcb, 0xcd, 0x81, 0xcf, 0x87, 0xff, 0xff, 0xff),
5 => array(0xff, 0xff, 0xff, 0x81, 0xf9, 0xf9, 0xf9, 0xc1, 0x9f, 0x9f, 0x9f, 0x99, 0xc3, 0xff, 0xff, 0xff),
6 => array(0xff, 0xff, 0xff, 0xc7, 0xf3, 0xf9, 0xf9, 0xc1, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xff, 0xff, 0xff),
7 => array(0xff, 0xff, 0xff, 0x81, 0x99, 0x9f, 0x9f, 0xcf, 0xcf, 0xe7, 0xe7, 0xf3, 0xf3, 0xff, 0xff, 0xff),
8 => array(0xff, 0xff, 0xff, 0xc3, 0x99, 0x99, 0x99, 0xc3, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xff, 0xff, 0xff),
9 => array(0xff, 0xff, 0xff, 0xc3, 0x99, 0x99, 0x99, 0x99, 0x83, 0x9f, 0x9f, 0xcf, 0xe3, 0xff, 0xff, 0xff)
);
echo "#define counter_width " .($count_width * $int_width)."\r\n";
echo "#define counter_height " .$count_height. "\r\n";
echo "static unsigned char counter_bits[] = {\r\n";
for($i=0; $i<$count_height; ++$i) {
for($j = 0; $j < $int_width; ++$j) {
printf("0x%2x, ",$bitmap[$num[$j]][$i]^$mode);
}
}
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β
π¦ Make an xbm picturexbm is a simple two-color image bitmap format, which is used more in the early cgi. It is currently used for counters.
<? php
t.me/undercodeTesting
setXBM (1234567890,0);
function setXBM ($ num, $ mode = 0) {
settype ( $ num, "string");
$ mode = $ mode? 0xff: 0x00;
$ int_width = strlen ($ num); // digits
$ count_width = 8; // single digit width
$ count_height = 16; // height
$ bitmap = array (
0 => array (0xff, 0xff, 0xff, 0xc3, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xff, 0xff, 0xff),
1 => array (0xff, 0xff , 0xff, 0xcf, 0xc7, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xcf, 0xff, 0xff, 0xff),
2 => array (0xff, 0xff, 0xff, 0xc3, 0x99, 0x9f, 0x9f, 0x , 0xe7, 0xf3, 0xf9, 0xf9, 0x81, 0xff, 0xff, 0xff),
3 => array(0xff, 0xff, 0xff, 0xc3, 0x99, 0x9f, 0x9f, 0xc7, 0x9f, 0x9f, 0x9f, 0x99, 0xc3, 0xff, 0xff, 0xff),
4 => array(0xff, 0xff, 0xff, 0xcf, 0xcf, 0xc7, 0xc7, 0xcb, 0xcb, 0xcd, 0x81, 0xcf, 0x87, 0xff, 0xff, 0xff),
5 => array(0xff, 0xff, 0xff, 0x81, 0xf9, 0xf9, 0xf9, 0xc1, 0x9f, 0x9f, 0x9f, 0x99, 0xc3, 0xff, 0xff, 0xff),
6 => array(0xff, 0xff, 0xff, 0xc7, 0xf3, 0xf9, 0xf9, 0xc1, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xff, 0xff, 0xff),
7 => array(0xff, 0xff, 0xff, 0x81, 0x99, 0x9f, 0x9f, 0xcf, 0xcf, 0xe7, 0xe7, 0xf3, 0xf3, 0xff, 0xff, 0xff),
8 => array(0xff, 0xff, 0xff, 0xc3, 0x99, 0x99, 0x99, 0xc3, 0x99, 0x99, 0x99, 0x99, 0xc3, 0xff, 0xff, 0xff),
9 => array(0xff, 0xff, 0xff, 0xc3, 0x99, 0x99, 0x99, 0x99, 0x83, 0x9f, 0x9f, 0xcf, 0xe3, 0xff, 0xff, 0xff)
);
echo "#define counter_width " .($count_width * $int_width)."\r\n";
echo "#define counter_height " .$count_height. "\r\n";
echo "static unsigned char counter_bits[] = {\r\n";
for($i=0; $i<$count_height; ++$i) {
for($j = 0; $j < $int_width; ++$j) {
printf("0x%2x, ",$bitmap[$num[$j]][$i]^$mode);
}
}
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ Speed ββoptimization-use virtual memory (virtual memory, VM) file system and binding installation :
instagram.com/undercodeTesting
π¦ Uses virtual memory (virtual memory, VM) filesystem and bind mounts
Introducing tmpfs
If I had to make tmpfs clear at once, I would say that tmpfs is like a ramdisk, but not the same. Like a virtual disk, tmpfs can use your RAM, but it can also use your swap partition for storage. And the traditional virtual disk is a block device, and requires a command like mkfs to actually use it. Tmpfs is a file system, not a block device; you just install it and it can be used. All in all, this makes tmpfs the best RAM-based file system I have come across.
tmpfs and VM
Let's take a look at some of the more interesting features of tmpfs. As I mentioned earlier, tmpfs can use both RAM and swap partitions. This may seem a bit arbitrary at first, but remember that tmpfs is also known as the "virtual memory file system". Moreover, you may also know that the virtual memory resources of the Linux kernel come from both your RAM and swap partition. The VM subsystem in the kernel allocates these resources to other parts of the system and is responsible for managing these resources in the background, usually transparently moving RAM pages to or from the swap partition to the RAM page.
The tmpfs file system requires pages of the VM subsystem to store files. tmpfs does not know whether these pages are in the swap partition or in RAM; it is the job of the VM subsystem to make this decision. All the tmpfs file system knows is that it is using some form of virtual memory.
Not a block device
Here is another interesting feature of the tmpfs file system. Unlike most "standard" file systems, such as ext3, ext2, XFS, JFS, ReiserFS, and other systems, tmpfs does not exist on an underlying block device. Because tmpfs is built directly on the VM, you can create a tmpfs file system with a simple mount command.
# mount tmpfs / mnt / tmpfs -t tmpfs After
executing this command, a new tmpfs file system is mounted on / mnt / tmpfs, ready to use. Note that there is no need to run mkfs.tmpfs; in fact, that is not possible because no such command exists. Immediately after the mount command is executed, the file system is mounted and ready for use. The type is tmpfs. This is very different from how Linux virtual disks are used; standard Linux virtual disks are block devices, so you must format them with the file system of your choice before using them. Instead, tmpfs is a file system. So, you can simply install it and use it.
Advantages of Tmpfs
The size of the dynamic file system
You may be wondering how big the tmpfs file system we installed earlier in / mnt / tmpfs. The answer to this question is a bit unexpected, especially when compared to disk-based file systems. / mnt / tmpfs will initially have very little space, but as files are copied and created, the tmpfs file system driver will allocate more VMs and dynamically increase the file system space as needed. Moreover, when the file in / mnt / tmpfs is deleted, the tmpfs file system driver will dynamically reduce the file system and release the VM resources. This will return the VM to the loop for other parts of the system to use as needed. Because VMs are valuable resources, you must not want to waste anything more than it actually needs. One of the benefits of tmpfs is that these are handled automatically. See Resources.
π¦ Speed ββoptimization-use virtual memory (virtual memory, VM) file system and binding installation :
instagram.com/undercodeTesting
π¦ Uses virtual memory (virtual memory, VM) filesystem and bind mounts
Introducing tmpfs
If I had to make tmpfs clear at once, I would say that tmpfs is like a ramdisk, but not the same. Like a virtual disk, tmpfs can use your RAM, but it can also use your swap partition for storage. And the traditional virtual disk is a block device, and requires a command like mkfs to actually use it. Tmpfs is a file system, not a block device; you just install it and it can be used. All in all, this makes tmpfs the best RAM-based file system I have come across.
tmpfs and VM
Let's take a look at some of the more interesting features of tmpfs. As I mentioned earlier, tmpfs can use both RAM and swap partitions. This may seem a bit arbitrary at first, but remember that tmpfs is also known as the "virtual memory file system". Moreover, you may also know that the virtual memory resources of the Linux kernel come from both your RAM and swap partition. The VM subsystem in the kernel allocates these resources to other parts of the system and is responsible for managing these resources in the background, usually transparently moving RAM pages to or from the swap partition to the RAM page.
The tmpfs file system requires pages of the VM subsystem to store files. tmpfs does not know whether these pages are in the swap partition or in RAM; it is the job of the VM subsystem to make this decision. All the tmpfs file system knows is that it is using some form of virtual memory.
Not a block device
Here is another interesting feature of the tmpfs file system. Unlike most "standard" file systems, such as ext3, ext2, XFS, JFS, ReiserFS, and other systems, tmpfs does not exist on an underlying block device. Because tmpfs is built directly on the VM, you can create a tmpfs file system with a simple mount command.
# mount tmpfs / mnt / tmpfs -t tmpfs After
executing this command, a new tmpfs file system is mounted on / mnt / tmpfs, ready to use. Note that there is no need to run mkfs.tmpfs; in fact, that is not possible because no such command exists. Immediately after the mount command is executed, the file system is mounted and ready for use. The type is tmpfs. This is very different from how Linux virtual disks are used; standard Linux virtual disks are block devices, so you must format them with the file system of your choice before using them. Instead, tmpfs is a file system. So, you can simply install it and use it.
Advantages of Tmpfs
The size of the dynamic file system
You may be wondering how big the tmpfs file system we installed earlier in / mnt / tmpfs. The answer to this question is a bit unexpected, especially when compared to disk-based file systems. / mnt / tmpfs will initially have very little space, but as files are copied and created, the tmpfs file system driver will allocate more VMs and dynamically increase the file system space as needed. Moreover, when the file in / mnt / tmpfs is deleted, the tmpfs file system driver will dynamically reduce the file system and release the VM resources. This will return the VM to the loop for other parts of the system to use as needed. Because VMs are valuable resources, you must not want to waste anything more than it actually needs. One of the benefits of tmpfs is that these are handled automatically. See Resources.
Speed
Another major benefit of tmpfs is its lightning speed. Because a typical tmpfs file system will reside entirely in RAM, reading and writing can be almost instantaneous. Even if some swap partitions are used, the performance is still excellent. When more free VM resources are available, this part of the tmpfs file system will be moved to RAM. Having the VM subsystem automatically move part of the tmpfs file system to the swap partition is actually good for performance, because doing so allows the VM subsystem to free up space for processes that require RAM. This, together with its ability to dynamically resize, allows the operating system to have much better overall performance and flexibility than choosing to use a traditional RAM disk.
No persistence
This may not seem like a positive factor, tmpfs data will not be retained after a restart, because virtual memory is inherently volatile. I think you may have guessed one reason why tmpfs is called "tmpfs", right? However, this can actually be a good thing. It makes tmpfs an excellent file system for storing data that you don't need to keep (such as temporary files, which can be found in / tmp, and certain parts of the / var file system tree).
Use tmpfs
In order to use tmpfs, all you need is a 2.4 series kernel with the "Virtual memory file system support (formerly shm fs)" option enabled; this option is in the "File systems" section of the kernel configuration options. Once you have a kernel with tmpfs enabled, you can start installing the tmpfs file system. In fact, it is a good idea to turn on the tmpfs option in all your 2.4 kernels, whether or not you plan to use tmpfs. This is because you need kernel tmpfs support to use POSIX shared memory. However, System V shared memory does not require tmpfs in the kernel to work. Note that you don't need to install the tmpfs file system in order for POSIX shared memory to work; you only need to support tmpfs in the kernel. POSIX shared memory is not used much now, but this situation may change over time.
Avoid low VM situations
. The fact that tmpfs dynamically increases or decreases as needed is confusing: if your tmpfs file system grows to such an extent that it runs out of all virtual memory, and you have no remaining RAM or swap partition, then What will happen? Generally speaking, this situation is a bit annoying. If it is a 2.4.4 kernel, the kernel will lock immediately. In the case of the 2.4.6 kernel, the VM subsystem has been fixed in many ways. Although exhausting the VM is not a good experience, things will not fail completely. If the 2.4.6 kernel has reached a point where more VMs cannot be allocated, you are obviously reluctant to write any new data to the tmpfs file system. In addition, some other things may happen. First, some other processes in the system will be unable to allocate more memory; usually, this means that the system will become extremely slow and almost unresponsive. In this way, the super user will take the necessary steps to alleviate this low VM situation will be very difficult, or unusually time-consuming.
In addition, the kernel has a built-in final defense system to release memory when there is no available memory, it will find the process that occupies VM resources and terminate the process. Unfortunately, this "terminating process" solution usually leads to undesirable consequences when the use of tmpfs increases and the VM is exhausted. The following are the reasons. tmpfs itself cannot (and should not) be terminated because it is part of the kernel rather than a user process, and there is no easy way for the kernel to find out which process is filling the tmpfs file system. Therefore, the kernel will erroneously attack the largest VM-consuming process it can find, usually the X server, if you happen to use it. Therefore, your X server will be terminated, but the root cause (tmpfs) of the low VM situation has not been resolved. Ick.
Another major benefit of tmpfs is its lightning speed. Because a typical tmpfs file system will reside entirely in RAM, reading and writing can be almost instantaneous. Even if some swap partitions are used, the performance is still excellent. When more free VM resources are available, this part of the tmpfs file system will be moved to RAM. Having the VM subsystem automatically move part of the tmpfs file system to the swap partition is actually good for performance, because doing so allows the VM subsystem to free up space for processes that require RAM. This, together with its ability to dynamically resize, allows the operating system to have much better overall performance and flexibility than choosing to use a traditional RAM disk.
No persistence
This may not seem like a positive factor, tmpfs data will not be retained after a restart, because virtual memory is inherently volatile. I think you may have guessed one reason why tmpfs is called "tmpfs", right? However, this can actually be a good thing. It makes tmpfs an excellent file system for storing data that you don't need to keep (such as temporary files, which can be found in / tmp, and certain parts of the / var file system tree).
Use tmpfs
In order to use tmpfs, all you need is a 2.4 series kernel with the "Virtual memory file system support (formerly shm fs)" option enabled; this option is in the "File systems" section of the kernel configuration options. Once you have a kernel with tmpfs enabled, you can start installing the tmpfs file system. In fact, it is a good idea to turn on the tmpfs option in all your 2.4 kernels, whether or not you plan to use tmpfs. This is because you need kernel tmpfs support to use POSIX shared memory. However, System V shared memory does not require tmpfs in the kernel to work. Note that you don't need to install the tmpfs file system in order for POSIX shared memory to work; you only need to support tmpfs in the kernel. POSIX shared memory is not used much now, but this situation may change over time.
Avoid low VM situations
. The fact that tmpfs dynamically increases or decreases as needed is confusing: if your tmpfs file system grows to such an extent that it runs out of all virtual memory, and you have no remaining RAM or swap partition, then What will happen? Generally speaking, this situation is a bit annoying. If it is a 2.4.4 kernel, the kernel will lock immediately. In the case of the 2.4.6 kernel, the VM subsystem has been fixed in many ways. Although exhausting the VM is not a good experience, things will not fail completely. If the 2.4.6 kernel has reached a point where more VMs cannot be allocated, you are obviously reluctant to write any new data to the tmpfs file system. In addition, some other things may happen. First, some other processes in the system will be unable to allocate more memory; usually, this means that the system will become extremely slow and almost unresponsive. In this way, the super user will take the necessary steps to alleviate this low VM situation will be very difficult, or unusually time-consuming.
In addition, the kernel has a built-in final defense system to release memory when there is no available memory, it will find the process that occupies VM resources and terminate the process. Unfortunately, this "terminating process" solution usually leads to undesirable consequences when the use of tmpfs increases and the VM is exhausted. The following are the reasons. tmpfs itself cannot (and should not) be terminated because it is part of the kernel rather than a user process, and there is no easy way for the kernel to find out which process is filling the tmpfs file system. Therefore, the kernel will erroneously attack the largest VM-consuming process it can find, usually the X server, if you happen to use it. Therefore, your X server will be terminated, but the root cause (tmpfs) of the low VM situation has not been resolved. Ick.
Low VM: Solution
Fortunately, tmpfs allows you to specify the maximum upper limit of the file system capacity when installing or remounting the file system. In fact, from the 2.4.6 kernel to the 2.11g kernel, these parameters can only be set during installation, not during reinstallation, but we can expect to set these parameters during reinstallation in the near future. The optimal setting of the maximum tmpfs capacity depends on the resources and usage patterns of your specific Linux host; the idea is to prevent a tmpfs file system that fully uses resources from exhausting all virtual memory. Happening. A good way to find a good tmpfs upper limit is to use top to monitor the usage of your system's swap partition during peak usage. Then, make sure that the specified upper limit of tmpfs is slightly less than the sum of all free swap partitions and free RAM during these peak usage times.
It is easy to create a tmpfs file system with maximum capacity. To create a new tmpfs file system with a maximum size of 32 MB, type:
# mount tmpfs / dev / shm -t tmpfs -o size = 32m
This time, instead of mounting the tmpfs file system in / mnt / tmpfs, we created it in / dev / shm, which happens to be the "official" mount point for the tmpfs file system. If you happen to be using devfs, you will find that this directory has been created for you.
Also, if we want to limit the capacity of the file system to 512 KB or 1 GB, we can specify size = 512k and size = 1g, respectively. In addition to limiting capacity, we can also limit inodes (file system objects) by specifying the nr_inodes = x parameter. When using nr_inodes, x can be a simple integer, followed by a k, m, or g to specify thousands, millions, or billions (!) Of index nodes.
Moreover, if you want to add the equivalent function of the above mount tmpfs command to / etc / fstab, it should be like this:
tmpfs / dev / shm tmpfs size = 32m 0 0
installed on the existing installation point
when previously used 2.2 , Trying to install anything again at the installation point where something is already installed will cause an error. However, the rewritten kernel installation code makes the use of mount points multiple times no longer a problem. Here is an example scenario: suppose we have an existing file system installed in / tmp. However, we decided to start using tmpfs for / tmp storage. In the past, your only option is to uninstall / tmp and reinstall your new tmpfs / tmp file system in its place, as follows:
# umount / tmp
# Mount tmpfs / tmp -t tmpfs -o size = 64M
However, this The solution may not work for you. There may be many running processes with open files in / tmp; if so, you will encounter the following error when trying to uninstall / tmp:
umount: / tmp: device is busy
However, with the latest 2.4 kernel, you can mount your new / tmp file system without encountering a "device is busy" error:
# mount tmpfs / tmp -t tmpfs -o size = 64m
with a command, your new The tmpfs / tmp file system is mounted on / tmp and mounted on the partition that is already installed and can no longer be accessed directly. However, although you cannot access the original / tmp, any process that has open files on the original file system can continue to access them. Moreover, if you unmount / tmp based on tmpfs, the originally installed / tmp file system will reappear. In fact, you can install any number of file systems on the same mount point, the mount point is like a stack; unmount the current file system, the last recently installed file system will reappear.
Bind installation
Using bind installation, we can install all or even part of the installed file system to another location, and the file system can be accessed at both installation points. For example, you can use bind installation to mount your existing root file system to / home / drobbins / nifty as follows:
# mount --bind / / home / drobbins / nifty
Fortunately, tmpfs allows you to specify the maximum upper limit of the file system capacity when installing or remounting the file system. In fact, from the 2.4.6 kernel to the 2.11g kernel, these parameters can only be set during installation, not during reinstallation, but we can expect to set these parameters during reinstallation in the near future. The optimal setting of the maximum tmpfs capacity depends on the resources and usage patterns of your specific Linux host; the idea is to prevent a tmpfs file system that fully uses resources from exhausting all virtual memory. Happening. A good way to find a good tmpfs upper limit is to use top to monitor the usage of your system's swap partition during peak usage. Then, make sure that the specified upper limit of tmpfs is slightly less than the sum of all free swap partitions and free RAM during these peak usage times.
It is easy to create a tmpfs file system with maximum capacity. To create a new tmpfs file system with a maximum size of 32 MB, type:
# mount tmpfs / dev / shm -t tmpfs -o size = 32m
This time, instead of mounting the tmpfs file system in / mnt / tmpfs, we created it in / dev / shm, which happens to be the "official" mount point for the tmpfs file system. If you happen to be using devfs, you will find that this directory has been created for you.
Also, if we want to limit the capacity of the file system to 512 KB or 1 GB, we can specify size = 512k and size = 1g, respectively. In addition to limiting capacity, we can also limit inodes (file system objects) by specifying the nr_inodes = x parameter. When using nr_inodes, x can be a simple integer, followed by a k, m, or g to specify thousands, millions, or billions (!) Of index nodes.
Moreover, if you want to add the equivalent function of the above mount tmpfs command to / etc / fstab, it should be like this:
tmpfs / dev / shm tmpfs size = 32m 0 0
installed on the existing installation point
when previously used 2.2 , Trying to install anything again at the installation point where something is already installed will cause an error. However, the rewritten kernel installation code makes the use of mount points multiple times no longer a problem. Here is an example scenario: suppose we have an existing file system installed in / tmp. However, we decided to start using tmpfs for / tmp storage. In the past, your only option is to uninstall / tmp and reinstall your new tmpfs / tmp file system in its place, as follows:
# umount / tmp
# Mount tmpfs / tmp -t tmpfs -o size = 64M
However, this The solution may not work for you. There may be many running processes with open files in / tmp; if so, you will encounter the following error when trying to uninstall / tmp:
umount: / tmp: device is busy
However, with the latest 2.4 kernel, you can mount your new / tmp file system without encountering a "device is busy" error:
# mount tmpfs / tmp -t tmpfs -o size = 64m
with a command, your new The tmpfs / tmp file system is mounted on / tmp and mounted on the partition that is already installed and can no longer be accessed directly. However, although you cannot access the original / tmp, any process that has open files on the original file system can continue to access them. Moreover, if you unmount / tmp based on tmpfs, the originally installed / tmp file system will reappear. In fact, you can install any number of file systems on the same mount point, the mount point is like a stack; unmount the current file system, the last recently installed file system will reappear.
Bind installation
Using bind installation, we can install all or even part of the installed file system to another location, and the file system can be accessed at both installation points. For example, you can use bind installation to mount your existing root file system to / home / drobbins / nifty as follows:
# mount --bind / / home / drobbins / nifty
Now, if you look inside / home / drobbins / nifty, you will see your root file system (/ home / drobbins / nifty / etc, / home / drobbins / nifty / opt, etc.). Moreover, if you modify the file in the root file system, you can also see the changes in / home / drobbins / nifty. This is because they are the same file system; the kernel simply maps the file system to two different mount points for us. Note that when you install a file system at another location, any file system installed at the mount point inside the bound installation file system will not move with it. In other words, if you have / usr on a separate file system, the bind installation we performed earlier will leave / home / drobbins / nifty / usr empty. You will need an additional bind mount command allows you to browse content located / home / drobbins / nifty / usr in / usr are:
# Mount --bind / usr / home / drobbins / nifty / usr
binding part of the file system installation
Bundled installation makes even better things possible. Suppose you have a tmpfs file system mounted in its traditional location / dev / shm, and you decide to start using tmpfs at / tmp, which is currently in the root file system. Although you can install a new tmpfs file system in / tmp (which is possible), you can also decide to have the new / tmp share the currently installed / dev / shm file system. However, although you can install / dev / shm in / tmp, your / dev / shm also contains some directories that you do not want to appear in / tmp. So, what do you do? How about this:
# mkdir / dev / shm / tmp
# chmod 1777 / dev / shm / tmp
# mount --bind / dev / shm / tmp / tmp
In this example, we first create a / dev / shm / tmp directory, and then give it 1777 permissions, appropriate permission for / tmp. Now that our directory is ready, we can install it, and we can only install / dev / shm / tmp to / tmp. So, although / tmp / foo will be mapped to / dev / shm / tmp / foo, you have no way to access the / dev / shm / bar file from / tmp.
As you can see, the binding installation is very powerful, allowing you to easily modify the file system design without any hassle. In the next article, we will talk about devfs. As for now, you may want to take a look at the following references.
References
* Read Daniel βs previous articles in this series, where he introduced the benefits of creating logs and using ReiserFS, and showed how to install a solid ReiserFS system based on Linux 2.4.
* Linux Weekly News is a good reference for keeping up with the latest kernel development.
* util-linux (the latest link) collects various important Linux applications, including mount and unmount. You may want to upgrade to the latest available version so that you can use the mount --bind syntax (instead of using mount -o bind).
* Because tmpfs and binding installation are relatively new, most of them are new kernel features that are not documented. The best way to learn them is to learn the relevant parts of the Linux kernel source code.
* The Namesys page is where to learn more about ReiserFS.
* The ReiserFS mailing list is a great resource for a deeper understanding of current ReiserFS information. You must also take a look at the ReiserFS mailing list archive.
* In the review of Linux Gazette Journal File Systems by Juan I. Santos Florido, you can find a very in-depth explanation of the metadata differences between UFS, ext2 and ReiserFS and some other content.
* Jedi's ReiserFS / Qmail tuning page contains a lot of useful information for qmail users. You must also take a look at ReiserSMTP, where Jedi has collected many qmail components that provide powerful qmail performance.
* Read the JFS overview of Steve Best on developerWorks.
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β
# Mount --bind / usr / home / drobbins / nifty / usr
binding part of the file system installation
Bundled installation makes even better things possible. Suppose you have a tmpfs file system mounted in its traditional location / dev / shm, and you decide to start using tmpfs at / tmp, which is currently in the root file system. Although you can install a new tmpfs file system in / tmp (which is possible), you can also decide to have the new / tmp share the currently installed / dev / shm file system. However, although you can install / dev / shm in / tmp, your / dev / shm also contains some directories that you do not want to appear in / tmp. So, what do you do? How about this:
# mkdir / dev / shm / tmp
# chmod 1777 / dev / shm / tmp
# mount --bind / dev / shm / tmp / tmp
In this example, we first create a / dev / shm / tmp directory, and then give it 1777 permissions, appropriate permission for / tmp. Now that our directory is ready, we can install it, and we can only install / dev / shm / tmp to / tmp. So, although / tmp / foo will be mapped to / dev / shm / tmp / foo, you have no way to access the / dev / shm / bar file from / tmp.
As you can see, the binding installation is very powerful, allowing you to easily modify the file system design without any hassle. In the next article, we will talk about devfs. As for now, you may want to take a look at the following references.
References
* Read Daniel βs previous articles in this series, where he introduced the benefits of creating logs and using ReiserFS, and showed how to install a solid ReiserFS system based on Linux 2.4.
* Linux Weekly News is a good reference for keeping up with the latest kernel development.
* util-linux (the latest link) collects various important Linux applications, including mount and unmount. You may want to upgrade to the latest available version so that you can use the mount --bind syntax (instead of using mount -o bind).
* Because tmpfs and binding installation are relatively new, most of them are new kernel features that are not documented. The best way to learn them is to learn the relevant parts of the Linux kernel source code.
* The Namesys page is where to learn more about ReiserFS.
* The ReiserFS mailing list is a great resource for a deeper understanding of current ReiserFS information. You must also take a look at the ReiserFS mailing list archive.
* In the review of Linux Gazette Journal File Systems by Juan I. Santos Florido, you can find a very in-depth explanation of the metadata differences between UFS, ext2 and ReiserFS and some other content.
* Jedi's ReiserFS / Qmail tuning page contains a lot of useful information for qmail users. You must also take a look at ReiserSMTP, where Jedi has collected many qmail components that provide powerful qmail performance.
* Read the JFS overview of Steve Best on developerWorks.
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β
π¦ Speed optimization-use virtual memory (virtual memory, VM) file system and binding installation FULL WRITTEN BY UNDERCODE
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦First steps for anonymously : Configuration example of proxy server and router in LAN FULL BY UNDERCODE
t.me/undercodeTesting
rapid development of network technology, so that enterprises LAN access INTERNET more and more ways to share resources, For the most part, DDN special line with its stable performance, expansion The advantage of good performance has become the commonly used method. The DDN connection is simple in terms of hardware requirements. Only a router (router) and proxy server (proxy server) are required, but many system configuration Network managers are a more difficult problem. Taking CISCO routers as an example, the author introduces several successful configuration methods for the reference of peers:
1. Configuration of accessing Internet resources directly through the router
1. The general idea and the equipment connection method
In general, Internal LAN use reserved addresses on the INTERNET:
10.0.0.0/8:10.0.0.0~10.255.255.255
172.16.0.0/12:172.16.0.0~172.31.255.255
192.168. 0.0 / 16: 192.168.0.0 ~ 192.168.255.255
Under normal circumstances, when the workstations inside the unit directly use routing to access externally, they will be filtered by the router because the workstations use reserved addresses on the Internet, resulting in inaccessibility Internet resources. The solution to this problem is to use the NAT (Network Address Translation) address translation function provided by the routing operating system to convert the private address of the internal network into a legal address on the Internet, so that users who do not have a legal IP address can access it through NAT. External Internet. The advantage of this is that there is no need to be equipped with a proxy server, which reduces investment, but also saves legitimate IP addresses and improves the security of the internal network.
There are two types of NAT: Single mode and global mode.
Using the single mode of NAT, just like its name, it can map many local LAN hosts to an Internet address. All hosts in the local area network are regarded as an Internet user to the external Internet network. Hosts in the local area network continue to use the local address.
Using the global mode of NAT, the interface of the router maps many local LAN hosts to a certain range of Internet addresses (IP address pool). When the local host port is connected to a host on the Internet, an IP address in the IP address pool is automatically assigned to the local host. After the connection is interrupted, the dynamically assigned IP address will be released, and the released IP address can be used by other local hosts. use.
Taking the network environment of my unit as an example, the configuration method and process are listed below for your reference.
Our unit uses Unicom optical cable (V.35) to connect to the Internet. The router is CISCO2610. The LAN uses INTEL550 100M switch. Unicom provides us with the following four IP addresses:
211.90.137.25 (255.255.255.252) for local The WAN port of the router is
211.90.137.26 (255.255.255.252) . The port 211.90.139.41 (255.255.255.252) used by the other party (Unicom) is
for its own control.
211.90.139.42 (255.255.255.252) for its own control
2. Router configuration
(1) Schematic diagram of network connection:
π¦First steps for anonymously : Configuration example of proxy server and router in LAN FULL BY UNDERCODE
t.me/undercodeTesting
rapid development of network technology, so that enterprises LAN access INTERNET more and more ways to share resources, For the most part, DDN special line with its stable performance, expansion The advantage of good performance has become the commonly used method. The DDN connection is simple in terms of hardware requirements. Only a router (router) and proxy server (proxy server) are required, but many system configuration Network managers are a more difficult problem. Taking CISCO routers as an example, the author introduces several successful configuration methods for the reference of peers:
1. Configuration of accessing Internet resources directly through the router
1. The general idea and the equipment connection method
In general, Internal LAN use reserved addresses on the INTERNET:
10.0.0.0/8:10.0.0.0~10.255.255.255
172.16.0.0/12:172.16.0.0~172.31.255.255
192.168. 0.0 / 16: 192.168.0.0 ~ 192.168.255.255
Under normal circumstances, when the workstations inside the unit directly use routing to access externally, they will be filtered by the router because the workstations use reserved addresses on the Internet, resulting in inaccessibility Internet resources. The solution to this problem is to use the NAT (Network Address Translation) address translation function provided by the routing operating system to convert the private address of the internal network into a legal address on the Internet, so that users who do not have a legal IP address can access it through NAT. External Internet. The advantage of this is that there is no need to be equipped with a proxy server, which reduces investment, but also saves legitimate IP addresses and improves the security of the internal network.
There are two types of NAT: Single mode and global mode.
Using the single mode of NAT, just like its name, it can map many local LAN hosts to an Internet address. All hosts in the local area network are regarded as an Internet user to the external Internet network. Hosts in the local area network continue to use the local address.
Using the global mode of NAT, the interface of the router maps many local LAN hosts to a certain range of Internet addresses (IP address pool). When the local host port is connected to a host on the Internet, an IP address in the IP address pool is automatically assigned to the local host. After the connection is interrupted, the dynamically assigned IP address will be released, and the released IP address can be used by other local hosts. use.
Taking the network environment of my unit as an example, the configuration method and process are listed below for your reference.
Our unit uses Unicom optical cable (V.35) to connect to the Internet. The router is CISCO2610. The LAN uses INTEL550 100M switch. Unicom provides us with the following four IP addresses:
211.90.137.25 (255.255.255.252) for local The WAN port of the router is
211.90.137.26 (255.255.255.252) . The port 211.90.139.41 (255.255.255.252) used by the other party (Unicom) is
for its own control.
211.90.139.42 (255.255.255.252) for its own control
2. Router configuration
(1) Schematic diagram of network connection:
Note: All workstations in the school are connected to the switch, and the router is also connected to the internal switch through the Ethernet port. The Ethernet port on the router uses the internal private address, and the two effective IP addresses assigned by Unicom are used at both ends of the fiber. In this connection mode, as long as the NAT is set inside the router, all workstations within the unit can access INTERNTE. On each workstation, only need to set the gateway to the router's Ethernet port (192.168.0.3) to access the Internet, no need Set up an agent, and save two effective IP addresses for your own discretion (such as setting up your own WEB and E-MAIL server). But there are also disadvantages: you can not enjoy the CACHE service provided by the proxy server to improve access speed. Therefore, this configuration scheme is suitable for units with a small number of workstations. For a large number of workstations in a unit, the following two methods can be used. The specific configuration on the router is as follows:
(2) The configuration of the router
en
config t
ip nat pool c2610 211.90.139.41 211.90.139.42 netmask 255.255.255.252
(define an address pool c2601, which contains two free legal IP addresses for NAT Used during conversion)
int e0 / 0
ip address 192.168.0.3 255.255.255.0
ip nat inside
exit
(set the IP address of the Ethernet port and set it as the port connected to the internal network)
interface s0 / 0
ip address 211.90.137.25 255.255.255.252
ip nat outside
exit
(Set the IP address of the WAN port and set it as the port connected to the external network)
ip route 0.0.0.0 0.0.0.0 211.90.137.26
(set the dynamic route)
access-list 2 permit 192.168.0.1 0.0.0.255
(establish the access control list )
! Dynamic NAT
!
Ip nat inside source list 2 pool c2610 overload
(establish dynamic address translation)
line console 0
exec-timeout 0 0
!
Line vty 0 4
end
wr
(save the settings made)
3οΌWorkstation configuration
requires static IP address, set in the TCP / IP properties and set off to network 192.168.0.3 (the IP address of the router Ethernet port), the address is provided, the Internet browser and other tools to provide access to the DNS in No special settings are required.
Second, access to INTERNET resources through a proxy server configuration
1. General idea and equipment connection method
The advantage of using proxy server to access INTERNET resources is that the CACHE service provided by the proxy server can be used to improve the access speed and efficiency of INTERNET. It is more suitable for units with more workstations. The disadvantage is that it needs to be equipped with a computer as a proxy server, which increases the investment cost; and it requires two more legal IP addresses than the first legal method, and the network security is not high.
To use this scheme to access the Internet, the device connection method is as follows:
two network cards are installed on the proxy server, one is connected to the internal network, and the internal private address is set; the other is connected to the router Ethernet port, and the legal address assigned by Unicom (211.90.139.42) is set, And set its gateway to 211.90.139.41 (router Ethernet port)
router Ethernet port also set the legal IP address (211.90.139.41) assigned by Unicom
. After connecting the device, install the proxy software on the proxy server and set it on the workstation An agent can access INTERNET.
(2) The configuration of the router
en
config t
ip nat pool c2610 211.90.139.41 211.90.139.42 netmask 255.255.255.252
(define an address pool c2601, which contains two free legal IP addresses for NAT Used during conversion)
int e0 / 0
ip address 192.168.0.3 255.255.255.0
ip nat inside
exit
(set the IP address of the Ethernet port and set it as the port connected to the internal network)
interface s0 / 0
ip address 211.90.137.25 255.255.255.252
ip nat outside
exit
(Set the IP address of the WAN port and set it as the port connected to the external network)
ip route 0.0.0.0 0.0.0.0 211.90.137.26
(set the dynamic route)
access-list 2 permit 192.168.0.1 0.0.0.255
(establish the access control list )
! Dynamic NAT
!
Ip nat inside source list 2 pool c2610 overload
(establish dynamic address translation)
line console 0
exec-timeout 0 0
!
Line vty 0 4
end
wr
(save the settings made)
3οΌWorkstation configuration
requires static IP address, set in the TCP / IP properties and set off to network 192.168.0.3 (the IP address of the router Ethernet port), the address is provided, the Internet browser and other tools to provide access to the DNS in No special settings are required.
Second, access to INTERNET resources through a proxy server configuration
1. General idea and equipment connection method
The advantage of using proxy server to access INTERNET resources is that the CACHE service provided by the proxy server can be used to improve the access speed and efficiency of INTERNET. It is more suitable for units with more workstations. The disadvantage is that it needs to be equipped with a computer as a proxy server, which increases the investment cost; and it requires two more legal IP addresses than the first legal method, and the network security is not high.
To use this scheme to access the Internet, the device connection method is as follows:
two network cards are installed on the proxy server, one is connected to the internal network, and the internal private address is set; the other is connected to the router Ethernet port, and the legal address assigned by Unicom (211.90.139.42) is set, And set its gateway to 211.90.139.41 (router Ethernet port)
router Ethernet port also set the legal IP address (211.90.139.41) assigned by Unicom
. After connecting the device, install the proxy software on the proxy server and set it on the workstation An agent can access INTERNET.
2. Router configuration
(1) Network connection diagram:
Description: In the above figure, all computers in the unit communicate directly with the internal network card (192.168.0.4) on the proxy server through the switch, and then pass under the control of the proxy service software The router accesses the Internet.
(2) Configuration of the router
en
config t
int e0 / 0
ip address 211.90.139.41 255.255.255.252
exit
(set the IP address of the Ethernet port)
interface s0 / 0
ip address 211.90.137.25 255.255.255.252
exit
(set the IP address of the WAN port)
ip route 0.0.0.0 0.0.0.0 211.90.137.26
ip routing
(set the dynamic route and activate the route)
end
wr
(save the settings made)
3οΌProxy settings
proxy server must be installed by two network cards, one for connection to the internal LAN, the IP address set for the internal private address (eg: 192.168.0.4 netmask 255.255.255.0) without providing a gateway. The other is used to connect to the router, set the legal address assigned by Unicom (211.90.139.42 netmask 255.255.255.252), and set its gateway to: 211.90.139.41 (router Ethernet port).
After setting up the network card according to the above method, install another set of agent softwarewritten by undercode . (Eg: installation method MS PROXY SERVER 2.0, WINGATE, etc., agent software, please refer to other information)
4. Workstation setup
(1) INTERNET EXPLORER set
Tools menu -> internet options -> Connections -> LAN Settings -> Use a proxy server -> Address: 192.168.0.4 port: 80> OK
(2) other software settings, please refer to the software Instructions.
Third, direct access to the proxy access configuration coexistence
1. General idea and equipment connection method
Through the two methods described above, you can successfully achieve Internet access, but each method has advantages and certain disadvantages, and the advantages of the two methods are complementary. How can you combine the advantages of the two methods into one, and the third method is a solution that can have both fish and bear paws. Integrate the advantages of one or two methods, that is, save the IP address, and can improve the Internet access efficiency through the CACHE provided by the proxy server.
To use this scheme to access the Internet, the device connection method is as follows:
two network cards are installed on the proxy server, and both network cards are connected to the switch. When setting the IP address, both network cards are set with internal private addresses, but these two addresses Should not belong to a network (that is, the network address of the IP address is different), one is used to communicate with the internal network (network card 1), and one is used to communicate with the router (network card 2), otherwise the proxy cannot be realized.
Do not install NETBEUI protocol on the proxy server, only install TCP / IP protocol. (Note: This step must be done, otherwise the connection between the proxy server and the switch will be redundant and the proxy server NETBIOS computer name conflict will affect the normal communication.) The
router Ethernet port also sets an internal private address, which is due to the network card. 2. The address of 2 is on the same network (that is, the network address of the IP address is the same as that of the network card 2)
2. Router settings
(1) Network connection diagram
(1) Network connection diagram:
Description: In the above figure, all computers in the unit communicate directly with the internal network card (192.168.0.4) on the proxy server through the switch, and then pass under the control of the proxy service software The router accesses the Internet.
(2) Configuration of the router
en
config t
int e0 / 0
ip address 211.90.139.41 255.255.255.252
exit
(set the IP address of the Ethernet port)
interface s0 / 0
ip address 211.90.137.25 255.255.255.252
exit
(set the IP address of the WAN port)
ip route 0.0.0.0 0.0.0.0 211.90.137.26
ip routing
(set the dynamic route and activate the route)
end
wr
(save the settings made)
3οΌProxy settings
proxy server must be installed by two network cards, one for connection to the internal LAN, the IP address set for the internal private address (eg: 192.168.0.4 netmask 255.255.255.0) without providing a gateway. The other is used to connect to the router, set the legal address assigned by Unicom (211.90.139.42 netmask 255.255.255.252), and set its gateway to: 211.90.139.41 (router Ethernet port).
After setting up the network card according to the above method, install another set of agent softwarewritten by undercode . (Eg: installation method MS PROXY SERVER 2.0, WINGATE, etc., agent software, please refer to other information)
4. Workstation setup
(1) INTERNET EXPLORER set
Tools menu -> internet options -> Connections -> LAN Settings -> Use a proxy server -> Address: 192.168.0.4 port: 80> OK
(2) other software settings, please refer to the software Instructions.
Third, direct access to the proxy access configuration coexistence
1. General idea and equipment connection method
Through the two methods described above, you can successfully achieve Internet access, but each method has advantages and certain disadvantages, and the advantages of the two methods are complementary. How can you combine the advantages of the two methods into one, and the third method is a solution that can have both fish and bear paws. Integrate the advantages of one or two methods, that is, save the IP address, and can improve the Internet access efficiency through the CACHE provided by the proxy server.
To use this scheme to access the Internet, the device connection method is as follows:
two network cards are installed on the proxy server, and both network cards are connected to the switch. When setting the IP address, both network cards are set with internal private addresses, but these two addresses Should not belong to a network (that is, the network address of the IP address is different), one is used to communicate with the internal network (network card 1), and one is used to communicate with the router (network card 2), otherwise the proxy cannot be realized.
Do not install NETBEUI protocol on the proxy server, only install TCP / IP protocol. (Note: This step must be done, otherwise the connection between the proxy server and the switch will be redundant and the proxy server NETBIOS computer name conflict will affect the normal communication.) The
router Ethernet port also sets an internal private address, which is due to the network card. 2. The address of 2 is on the same network (that is, the network address of the IP address is the same as that of the network card 2)
2. Router settings
(1) Network connection diagram
(2) Router configuration
en
config t
ip nat pool c2610 211.90.139.41 211.90.139.42 netmask 255.255.255.252
(define an address pool c2601, which contains two free legal IP addresses , For NAT conversion)
int e0 / 0
ip address 192.168.1.1 255.255.255.0
ip nat inside
exit
(set the IP address of the Ethernet port and set it as the port to connect to the internal network)
interface s0 / 0
ip address 211.90.137.25 255.255.255.252
ip nat outside
exit
(set the WAN port IP address and set it as the port to connect to the external network)
ip route 0.0.0.0 0.0.0.0 211.90.137.26
(set dynamic routing)
access-list 2 permit 192.168.0.1 0.0.0.255
(establish access control list)
! Dynamic NAT
!
ip nat inside source list 2 pool c2610 overload
(establish dynamic address translation)
line console 0
exec-timeout 0 0
!
line vty 0 4
end
wr
(save the settings made)
2οΌProxy server settings
Two network cards are installed on the proxy server, and both network cards are connected to the switch. The network card 1 sets the IP address as 192.168.0.4, no gateway; the network card 2 sets the IP address as 192.168.1.2, and sets its gateway as 192.168.1.1 (Router Ethernet port).
After setting up the network card according to the above method, install another set of agent software. (For example: MS PROXY SERVER 2.0, WINGATE, etc., please refer to other materials for the installation and debugging methods of the agent software)
Note: When installing the agent software (using MS-PROXY 2.0 as an example), when specifying the LAT table, the address range should be 192.168 .0.0-192.168.255.255 is excluded, otherwise the proxy will not work properly.
3. The workstation is provided
under this configuration, the workstation may be provided by a proxy access may also be provided directly to the Internet through a gateway.
If you only access the Internet through a proxy, the setting method is exactly the same as Method 2.
If accessing the Internet only through the gateway, the workstation must be set with a static IP address, the IP address should be set to 192.168.1.X, which
is on the same network segment as the router Ethernet port, and the gateway should be set to: 192.168.1.1, and DNS to be the access provider The address provided.
If you want two methods to coexist, you need to set two static IP addresses in TCP / IP: 192.168.0.X and 192.168.1.X, and set the gateway to: 192.168.1.1, DNS is the address provided by the access provider . When in use, you only need to open or close the proxy settings in the browser and other software to switch between the proxy and the gateway.
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β
en
config t
ip nat pool c2610 211.90.139.41 211.90.139.42 netmask 255.255.255.252
(define an address pool c2601, which contains two free legal IP addresses , For NAT conversion)
int e0 / 0
ip address 192.168.1.1 255.255.255.0
ip nat inside
exit
(set the IP address of the Ethernet port and set it as the port to connect to the internal network)
interface s0 / 0
ip address 211.90.137.25 255.255.255.252
ip nat outside
exit
(set the WAN port IP address and set it as the port to connect to the external network)
ip route 0.0.0.0 0.0.0.0 211.90.137.26
(set dynamic routing)
access-list 2 permit 192.168.0.1 0.0.0.255
(establish access control list)
! Dynamic NAT
!
ip nat inside source list 2 pool c2610 overload
(establish dynamic address translation)
line console 0
exec-timeout 0 0
!
line vty 0 4
end
wr
(save the settings made)
2οΌProxy server settings
Two network cards are installed on the proxy server, and both network cards are connected to the switch. The network card 1 sets the IP address as 192.168.0.4, no gateway; the network card 2 sets the IP address as 192.168.1.2, and sets its gateway as 192.168.1.1 (Router Ethernet port).
After setting up the network card according to the above method, install another set of agent software. (For example: MS PROXY SERVER 2.0, WINGATE, etc., please refer to other materials for the installation and debugging methods of the agent software)
Note: When installing the agent software (using MS-PROXY 2.0 as an example), when specifying the LAT table, the address range should be 192.168 .0.0-192.168.255.255 is excluded, otherwise the proxy will not work properly.
3. The workstation is provided
under this configuration, the workstation may be provided by a proxy access may also be provided directly to the Internet through a gateway.
If you only access the Internet through a proxy, the setting method is exactly the same as Method 2.
If accessing the Internet only through the gateway, the workstation must be set with a static IP address, the IP address should be set to 192.168.1.X, which
is on the same network segment as the router Ethernet port, and the gateway should be set to: 192.168.1.1, and DNS to be the access provider The address provided.
If you want two methods to coexist, you need to set two static IP addresses in TCP / IP: 192.168.0.X and 192.168.1.X, and set the gateway to: 192.168.1.1, DNS is the address provided by the access provider . When in use, you only need to open or close the proxy settings in the browser and other software to switch between the proxy and the gateway.
written by undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β