Exercise 4-5 IP network (IP Networks, ACM/ICPC NEERC 2005, UVa1590)You can describe a subnet (that is, a contiguous range of IP addresses) with a network address and a subnet mask. One of the subnetsThe mask contains 32 bits, the front 32-n bit is 1, the last n bit is 0, the first 32-n bit of the network address is arbitrary, and the last n bit is 0.All
One, add a single IP address:In/etc/sysconfig/network-s/, the new file ifcfg-eth0:*,* is a numeric ordinal, and multiple IPs are incrementedTake 0 As an example to establish a file ifcfg-eth0:0cd/etc/sysconfig/network-s/VI ifcfg-eth0:0Input content format:device=eth0:0Type=ethernetOnboot=yesBootproto=staticIpaddr= to add the IP address of the bindingnetmask= Subnet Maskgateway= Gateway AddressSecond, batch
storage space Comparison:
VARCHAR type storage 0.0.0.0-255.255.255.255 is 7-15 bytes
int Type storage is 4 bytes 1 bytes 8 bits 2^31-1
IPv4 Essence is a 32-bit binary string can be stored with int
The IPv4 address (10-in-4) is converted to a 32-bit 2-in-system.
1. Convert to 2 first, then connect
2. Left 3*8 2*8 1*8 0 Bits
Conversion:
Conversion Mode
PHP built-in Functions
Mysql Built-in Functions
string int
PHP Long2ip (118.190.3.21
Tags: linux mysqlCount the total number of MySQL connections for each IP:Mysql> Select Substring_index (Host, ': ', 1) as IP, COUNT (*) from the information_schema.processlist group by IP;The status is as follows:+----------------+----------+
| ip | count (*) |
+----------------+----------+
||3 |
| 10.182.41.191 |1 |
| 10.190.249.204 |1 |
| 10.204.161.60 |10 |
|
Tags: link knowledge map location Working principle NIC local answer conflict soYes, from the first computer network class on March 6, I still have my own doubts about the knowledge points in this book for the first time today. Well, it seems like a good idea to read a book before, um, well, maybe a few more chapters will tell you what it's talking about.But today has been self-taught to the network layer, this chapter mainly introduces the IP address
TCP/IP stack attacksTwo of the following types:
Scanning: scanning or tracking footprints are part of the hacker's initial information collection process. Before hackers can attack a system, they need to collect information about the system, such as network layout, operating system type, available system services, and system users. Hackers can deduce possible vulnerabilities Based on the collected information and select the best attack method for the
Share the PHP implementation of the IP access restrictions of two pieces of code, divided into a limited number of single IP access and restrict access to the IP segment of the two code, the need for a friend reference.
Add IP Access Restrictions
if (getenv (' http_client_ip ') strcasecmp
Acquiring a place of attribution via IP
Get IP Address
$ip = $_server[' remote_addr '); Automatically get the IP of the client
IP-Corresponding region
if (!empty ($_post[' IP ')) {
$i
Common linux practicesIptables reference rules The code is as follows:Copy code Iptables-I INPUT-p tcp-dport 80-m-mac-soruce $ MAC-j DROPIptables-I INPUT-p tcp-dport 80-s $ IP-j DROP IP address-based Method 1,First, create the following configuration file and place it under the nginx conf directory, and name it blocksip. conf:Add the following code: The code is as follows:Copy code # Shielding soso
I. Configuring a static IP for a wireless networkEdit the/etc/network/interfaces file as follows:192.168. 1.120 255.255. 255.0 192.168. 1.1 # (depending on the situation) DNS 8.8. 8.8 8.8.4.4 # (fill in the details)4. Restart the Network Service command as follows:#/etc/init.d/networking restart5. Set up extranet access DNS editing/etc/resolv.conf as follows:8.8. 8.8 8.8. 4.4This configuration disappears after each restart of the computer, so see t
IP Address | Convert
IP address to Long integer converts a string IP address ("192.168.0.1") to a Long number (3232235521). One of the reasons to does this would is to store IP addresses in databases. Numbers greatly reduce the size required to store this information.
inputs:asnewip-string
In the campus network, the most convenient way to make trouble is to steal someone else's IP address, the computer that is embezzled IP address not only can not use the campus network normally, but also will frequently appear the IP address is occupied the prompt dialog box, to the campus network security and the user application brings the extremely hidden dange
Shenzhou Digital switch uses MAC-IP access control list function to realize the binding of multiple Mac-ip under single port
1. Description:
A company office network, the core switch for the digital Shenzhou dcrs-5950-28t, according to the office floor division of several VLANs, for each floor divided into different IP segment and set the gateway. Interface Eth
Build DHCP service on Linux system server, realize two basic functions: 1, automatically assign IP address, 2, specify IP address manually.First prepare two virtual machines as the experimental object, a Linux system as a server, a windows7 system as a client, both using the same virtual NIC Vmnet1, and using only host mode.Determine if the disc status on the server is connected,Use commands to view and Mou
operating system and protocol software to manage the main tasks related to the network access layer. The modularization of the protocol stack enables software components in the network access layer dealing with hardware to provide interfaces for the upper layers unrelated to hardware.
Network access layer and OSI model-- The physical layer in the OSI model is responsible for converting data frames into bit streams suitable for transmission media. The data link layer completes two independent ta
The IP protocol is the most important protocol in the family of TCP/IP protocols, which provides unreliable, non-connected datagram transport services. So understanding IP protocols is critical to our learning network.IP headerImportant Field Introduction:4bit First ministerial degree: in 4 bytes, determines the IP hea
International regulations: divide all IP addresses into A, B, C, D, and E. Class
DefaultSubnet Mask: Class A is 255.0.0.0; Class B is 255.255.0.0; Class C is 255.255.255.255.0. The subnet mask is a 32-bit address. It is used to shield a part of the IP address to distinguish the network ID and host ID, and shows whether the IP address is on the LAN or on a remote
Version (4bit)
Header Length (4bit)
Priority and service type (8bit)
Total Length (16bit)
Logo (16bit)
Logo (3bit)
Segmented offset (13bit)
Survival Period (8bit)
Protocol (8bit)
Header Checksum (16bit)
Source IP address (32bit)
Destination IP address (32bit)
Option (0 or 32bit, if any)
Dat
CentOS7 Linux can not be used to solve the internet?After installing Linux under CentOS VMware, it is sometimes not possible to connect directly to the network, share the experience summarized below, hope to be useful to the noviceTools/Materials
XP system vmware.workstation.v7.0 above
Centos-5.5-i386-bin-dvd.iso other different versions should be the same
Method/Step
Virtual machine installation does not say, from the installation of Linux after the test found that th
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.