Terms
1, IP address: is a 32-bit binary decimal number representation
such as: 192.168.1.1--11000000.10101000.00000001.00000001
2, Subnet mask: is a network bit full ' 1 ', host bit full ' 0 ' dotted decimal notation
such as: 255.255.255.0--11111111.11111111.11111111.00000000
3, network address: In the IP address
/*** Function name: validatemask* Function: verify the validity of the subnet mask.* Function Author: 236f (fuwei236 # gmail.com)* Input parameter: maskstr: The subnet mask in dotted decimal format (for example, 255.255.255.192)* Main function:* Call the function: _ checkiput_fomartip (
One, the IP division of the standard classificationThis division of IP in the form of IP in accordance with the network number + host number, each type of IP network number in the first few different, the rest of you except special IP (for example, all 0 and all 1, loopback
The example of this article describes the approach of PHP for IP address mask operation. Share to everyone for your reference, specific as follows:
IP Resolution:
function Ip_parse ($ip _str) {
$mark _len =;
if (Strpos ($ip _str, "/") > 0) {
list ($
If we want to quickly get an IP address segment has how many IP, quickly get IP address segment subnet mask, or quickly get a binary IP address, then you can learn.This article uses a Python I
Q: Our school machine room began to build a campus network, the router is selected CISCO 2514, In the settings, the problem is that on CISCO 2514 if there is no "IP SUBNET-ZERO ", if the ethernet interface mask is used, it cannot be set up. IP address and subnet
I. Set IP addresses, masks, gateways, and DNS using commands
1. Set the IP address and subnet mask of the network adapter eth0: sudo ifconfig eth0 192.168.0.50 netmask 255.255.255.02. Set the gateway sudo route add default GW 192.168.0.13. Set DNS modification/etc/resolv. conf and addNameserver 8.8.8.8Nameserver DNS
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.