wildcard address

来源:互联网 发布:云锁安全软件 编辑:程序博客网 时间:2024/06/06 02:56

From the docs: The wildcard is a special local IP address. It usually means "any" and can only be used for bind operations.

The value of this IP address is 0.0.0.0. If you have two network adapters, one with IP address 1.1.1.1 and one with IP address 2.2.2.2, then you can create a listening socket and bind it to 1.1.1.1 so that the socket will not bind to 2.2.2.2. You can also create a listening socket and bind it to 2.2.2.2, so that it will not bind to 1.1.1.1. If you do not care and want your socket to bind to all network cards, then you bind it to the wildcard address.

Another special value would be 127.0.0.1, meaning that only clients on the same computer could connect to your server.


A wildcard mask is a mask of bits that indicates which parts of an IP address can assume any value. In the Cisco IOS, they are used in several places, for example:

  • To indicate the size of a network or subnet for some routing protocols, such as OSPF.
  • To indicate what IP addresses should be permitted or denied in access control lists (ACLs).

0 0
原创粉丝点击