Default Gateway subnet mask broadcast address

Source: Internet
Author: User

Tag: In this example, two locks return ref strictly implementing window

Directory

  • Default Gateway
  • Network Address, host address
  • Gateway
  • Subnet Mask
  • Broadcast address
  • Special IP Address
  • Refer:
Default Gateway

A configuration item used for TCP/IP protocol is the IP address of an IP router that can be directly reached. To configure the default gateway, you can create a default path in the IP route table. A host can have multiple gateways. The default gateway means that if a host cannot find an available gateway, it sends data packets to the default gateway, which processes data packets. The gateway currently used by the host generally refers to the default gateway. The default gateway of a computer cannot be specified at will, and must be correctly specified. Otherwise, a computer will send data packets to a computer that is not the gateway, and thus cannot communicate with other networks. The default gateway can be set manually or automatically.

Network Address, host address

The IP address is divided into two parts: the network address is in the front, and the host address is in the back. The subnet mask is used to distinguish and calculate the IP address. For example, if the subnet mask of ip192.168.1.1 is 255.255.0, the network address is 192.168.1.0 and the host address is 0.0.0.1.

Gateway

So what is the gateway? A gateway is essentially an IP address from a network to another network. For example, if Network A and Network B exist, the IP address range of Network A is "192.168.1.1 ~ 192. 168.1.254 ", The subnet mask is 255.255.255.0, And the IP address range of Network B is" 192.168.2.1 ~ 192.168.2.254 ", and the subnet mask is 255.255.255.0. Without a router, the two networks cannot communicate with each other through TCP/IP, even if the two networks are connected to the same vswitch (or hub, the TCP/IP protocol also determines that the hosts in the two networks are in different networks based on the subnet mask (255.255.255.0. To realize the communication between the two networks, you must use the gateway. If the host in Network A finds that the destination host of the data packet is not in the local network, it forwards the data packet to its own gateway, and then the gateway forwards the data packet to the gateway of Network B, the gateway of Network B is then forwarded to a host of Network B. The same is true for packet forwarding from Network B to Network. Therefore, only the IP address of the gateway can communicate with each other through the TCP/IP protocol. Which machine is the IP address? The IP address of a gateway is the IP address of a device with the routing function. A device with the routing function has a router and a server with the routing protocol enabled (essentially equivalent to a router), proxy server (also equivalent to a vro ).

Subnet Mask

The subnet mask is a 32-bit address, which is used in combination with an IP address. It has two main functions: one is to shield 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 network. Second, it is used to divide a large IP network into several small subnetworks.
Subnet is used to reduce IP waste. With the development of the Internet, more and more networks are generated. Some networks have hundreds of machines and some have only a few districts. This wastes a lot of IP addresses, so we need to divide subnets. Using subnets can improve the efficiency of network applications.
The IP address and subnet mask are used to determine the network address and host number of a device. That is, the Network part and host part of a network are distinguished by the subnet mask. Once the subnet mask is set, the network address and host address are fixed. One of the most notable features of a subnet is that it has a subnet mask. The subnet mask length is also 32 bits, which can also be in decimal format. For example, the subnet mask in the binary format: 1111 1111.1111 1111.1111 1111.0000 0000, in decimal format: 255.255.255.0.
To determine whether two computers belong to the same network segment through the subnet mask of a computer, convert the computer's decimal IP address and subnet mask to a binary format, and then perform the binary "and) calculate (1 for all 1, 0 for incomplete 1). If the result is the same, the two computers belong to the same network segment.

Broadcast address

Broadcast address (broadcast address) is an address used to send messages to all workstations in the network at the same time. In a network using the TCP/IP protocol, the IP address of host ID 1 in the host identification segment is the broadcast address, and the broadcast group is sent to all computers involved in the host ID segment. For example, for the 10.1.1.0 (255.255.255.0) network segment, the broadcast address is 10.1.1.255 (255 is a binary 11111111). When a packet whose destination address is 10.1.1.255 is sent, it will be distributed to all computers on the CIDR block.

Special IP Address
0.0.0.0

Strictly speaking, 0.0.0.0 is no longer a real IP address. It represents a set of unknown hosts and destination networks. The "unclear" here means that no specific entries in the local route table indicate how to arrive. If the default gateway is set in the network settings, the system automatically generates a default route with the destination address 0.0.0.0. for the local machine, it is a "Shelter", and all the "Three none" people that do not know are sent in by law. If you set the default gateway in the network settings, the Windows system will automatically generate a default route with the destination address 0.0.0.0.

Restrict broadcast addresses

Restrict the broadcast address (broadcast bandwidth limit 255 ). For the local machine, this address refers to all hosts in this segment (the same broadcast domain) (may vary depending on the implementation ). This address cannot be forwarded by the router. Wan transmission is supported, but is generally blocked.

Return address (loopback address)

Class A network address 127 is a reserved address for network software testing and communication between local processes. It is called loopback address ). No matter what program, once data is sent using the return address, the protocol software returns immediately without any network transmission. Groups with network No. 127 cannot appear on any network.

IP address in LAN

When the host number is all 0, it indicates the network segment, which is a network number. A network number is an address used for layer-3 addressing. It represents the entire network;
When the host number is 255, the broadcast address represents all hosts on the network.
The network number is the first address in the network segment, and the broadcast address is the last address in the network segment. The two addresses cannot be configured on the Computer Host.
For example, in a CIDR block such as 192.168.0.0 and 255.255.255.0, the network number is 192.168.0.0 and the broadcast address is 192.168.0.255. Therefore, in a LAN, the addresses configured in the computer are two fewer than those in the CIDR Block (network number and broadcast address). These addresses are called host addresses. In the above example, the host address is only 192.168.0.1 to 192.168.0.254 and can be configured on the computer.

Refer:

Https://www.liupeng.mobi/archives/1127

Default Gateway subnet mask broadcast address

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.