subnet

How can I determine network and broadcast address from the IP address and subnet mask?

我怕爱的太早我们不能终老 提交于 2019-12-17 17:36:08
问题 For example: IP Address: 130.45.34.36 Mask: 255.255.240.0 What would be Net ID/Subnet Address, and Broadcast Address? 回答1: Let's write both in binary: 130.45.34.36 = 10000010.00101101.00100010.00100100 255.255.240.0 = 11111111.11111111.11110000.00000000 A bitwise AND between the two would give us the network address: 10000010.00101101.00100010.00100100 (ip address) AND 11111111.11111111.11110000.00000000 (subnet mask) = 10000010.00101101.00100000.00000000 = 130.45.32.0 (the resulting network

Function that return a list of IP addresses for a given IP adress and subnetmask

三世轮回 提交于 2019-12-14 03:25:02
问题 I need help in writing a function in C/C++ that receives two parameters: IP address and subnetmask . The function needs to reutrn a list of all IP addresses that are in the associated network. For example: Given two parameters: IP address = 192.168.33.72 and mask = 255.255.255.192 the function will return a list that contain the IP's 192.168.33.65 to 192.168.33.126. 回答1: 1) first you can transform the ipaddress and the subnetmask from string format to binary format with inet_pton() . 2) make

Obtaining an ipv4 subnetmask with Java

烈酒焚心 提交于 2019-12-13 06:57:53
问题 I'm writing because I've some problems finding a correct SubnetMask of my own PC. I've already read the question How to get subnet mask of local system using java? but if I try: InetAddress thiscomputer = InetAddress.getLocalHost(); NetworkInterface thisNetworkInterface = NetworkInterface.getByInetAddress(thiscomputer); int thiscomputerSubnetMask = thisNetworkInterface.getInterfaceAddresses().get(0).getNetworkPrefixLength(); System.out.println("This pc subnetmask: "+thiscomputerSubnetMask);

redis store 128 bit number

半腔热情 提交于 2019-12-12 04:19:09
问题 I want to efficiently search IPv6 subnet range using redis . i thought of storing the IPv6 numeric addresses in redis and search them by range. those are 128-bit ints , e.g: import ipaddress int(ipaddress.ip_address(u'113f:a:2:3:4:1::77')) > 22923991422715307029586104612626104439L and query by range: ZRANGEBYSCORE numerics <subnet-S-start> <subnet-S-end> HOWEVER , redis sorted-sets can hold score of up to 2^53, so all my large ints are being trimmed and I'm losing precision. Is there a way to

proxmox KVM routed network with multiple public IPs

杀马特。学长 韩版系。学妹 提交于 2019-12-12 04:17:07
问题 I have a dedicated hosting with hetzner. Additionally i have bought a 6IP subnet. My main IP is: 88.198.60.125 My main subnet is: 255.255.255.224 My additional IPs are 46.4.214.81 to 46.4.214.86 the internet access work on windows servers . but centos give me invalid host I cannot use bridged mode, since hetzner does not allow multiple MACs on same external ip, so I have to use routing mode. Here is my /etc/network/interfaces file for the host: auto lo iface lo inet loopback auto eth0 iface

Understanding of host route table

Deadly 提交于 2019-12-11 08:30:37
问题 I have the host computer with Ethernet adapter configured by this way: IP address 192.170.100.10, subnet mask 255.255.255.0. There is also hardware device which works like IP server, configured as: 192.170.100.20, 255.255.255.0. When I connect this device to the host Ethernet adapter, the following information is added to route print command output (Windows): Active Routes: Network Destination Netmask Gateway Interface Metric 192.170.100.0 255.255.255.0 192.170.100.10 192.170.100.10 20 192

Setting up the network for Kubernetes

混江龙づ霸主 提交于 2019-12-11 04:27:43
问题 I'm reading the Kubernetes "Getting Started from Scratch" Guide and have arrived at the dreaded Network Section, where they state: Kubernetes imposes the following fundamental requirements on any networking implementation (barring any intentional network segmentation policies): * all containers can communicate with all other containers without NAT * all nodes can communicate with all containers (and vice-versa) without NAT * the IP that a container sees itself as is the same IP that others

Private IP address in reserved subnet range

筅森魡賤 提交于 2019-12-11 02:21:50
问题 I have an arm template that has a vNet with 2 subnets. I am trying to deploy a Nic to one of these with a static private IP address. It used to be dynamic, and it worked fine. Now it is static, I have set the IP I want the nic to have, but when I deploy, it says the IP is invalid. I tried changing the IP I set, but it still doesn't work... Extracts from my template: (subnetPart is a parameterised number as we have several vnets that will be connected, but the subnets need to not clash)

How to find IP address range

倖福魔咒の 提交于 2019-12-11 00:38:12
问题 When I use this command which IP addresed are scanned # nmap -sP 192.168.0.120/25 CAn you please help me how to get the IP range when I have the addres and subnet. Because I am trying to understand this, but no result till now..Thanks in advance 回答1: The network in your command is in CIDR notation. The first part (before the / ) defines which network, and the second part defines how many bits of netmask are set. An IPv4 address is 4 bytes, or 32 bits of information. /25 means that 25 bits of

Proper way to scan a range of IP addresses

て烟熏妆下的殇ゞ 提交于 2019-12-10 18:08:38
问题 Given a range of IP addresses entered by a user (through various means), I want to identify which of these machines have software running that I can talk to. Here's the basic process: Ping these addresses to find available machines Connect to a known socket on the available machines Send a message to the successfully established sockets Compare the response to the expected response Steps 2-4 are straight forward for me. What is the best way to implement the first step in .NET? I'm looking at