Questions tagged [subnet]

A part of the IP address identifying the whole local network (high bits as defined by netmask). The remainder of the IP address (host id) identifies devices that are connected to this network. Can also mean the local network itself, if addressed by IP address in a described way.

Read more on wikipedia: https://en.wikipedia.org/wiki/Subnetwork

893 questions
11
votes
2 answers

Why does an AWS RDS subnet group require multiple availability zones?

When creating a new RDS MS SQL instance it requires a subnet group that spans multiple availability zones. I understand that this is different to Multi A-Z replication and that my instance will exist within a single availability region. So what is…
smuff
  • 452
  • 6
  • 14
11
votes
4 answers

convert cidr to subnet mask in python

I have a python dictionary that I've created, this dictionary contains a list of subnets in the following format: x.x.x.x/24 y.y.y,y/25 z.z.z.z/26 a.a.a.a/27 etc... I would like to take the items in this dictionary, parse it, then spit out the…
just1han85
  • 313
  • 1
  • 4
  • 14
11
votes
4 answers

Using SQL to determine cidr value of a subnet mask

I'd like to find a way to do a SQL query that will calculate the cidr (bit representation) of a subnet mask stored in the database. So for example, I've got either 255.255.255.0 or its decimal value (4294967040) stored in the database. I'd like to…
Matt P
  • 5,447
  • 4
  • 23
  • 20
11
votes
1 answer

Finding network addresses

Consider a router that interconnects three subnets: Subnet1, Subnet2, and Subnet3. Suppose all of the interfaces in each of these three subnets are required to have the prefix 223.1.17/24. Also suppose that Subnet #1 is to support at least 60…
Anonymous
  • 121
  • 1
  • 2
  • 6
10
votes
3 answers

Reference an existing AWS VPC Id in CloudFormation script when creating subnets

How do you reference the VPC Id of an existing VPC (which has been created before in a separate CloudFormation script) in CloudFormation script in order to create subnets in the VPC?
Roobie
  • 1,346
  • 4
  • 14
  • 24
9
votes
4 answers

Calculating all addresses within a subnet...for IPv6

I have seen plenty of great C# examples which demonstrate how to convert IPv4 addresses provided in CIDR notation (e.g. 192.168.0.1/25) into their relevant ranges (192.168.0.1 - 192.168.0.126). My program needs to be able to do this (to compute all…
DaveUK
  • 1,440
  • 3
  • 18
  • 31
9
votes
3 answers

problem calculating subnet mask

Question in some competition exam: The subnet mask for a particular network is 255.255.31.0. Which of the following pairs of IP addressed could belong to this network? 1: 172.57.88.62 & 172.56.87.23 2: 10.35.28.2 & 10.35.29.4 3: 191.203.31.87 &…
codeomnitrix
  • 4,179
  • 19
  • 66
  • 102
8
votes
3 answers

Test with Java if two IPs are in the same network

How can I test if two IPs are in the same network according to the subnet mask? For example I have the IPs 1.2.3.4 and 1.2.4.3: Both are in the same network if the mask is 255.0.0.0 or 255.255.0.0 or even 255.255.248.0 but not if the mask is…
xZise
  • 2,321
  • 5
  • 22
  • 31
8
votes
2 answers

AWS CloudFormation: How to get subnet list from VPC?

In CloudFormation, I'm creating a VPC, two EC2 instances, and an Elasticache in front of them. In the template, I'm trying to add the elasticache to the vpc. The problem's happening in creating the AWS::Elasticache::SubnetGroup …
8
votes
5 answers

Calculate IP range by subnet mask

If I have a subnet mask e.g. 255.255.255.0 and an ip address 192.168.1.5, is there an easy way to determine all the possible ip addresses within this subnet? In this…
Neurodefekt
  • 899
  • 2
  • 10
  • 18
8
votes
5 answers

Check if IP is in subnet

I have a table A with IP addresses (ipNumeric) stored as unsigned ints and a table B with subnets (subnetNumeric): INET_NTOA(ipNumeric) = 192.168.0.1 INET_NTOA(subnetNumeric) = 192.168.0.0 I'd like to check if this IP is a member of a subnet. The…
matiasf
  • 1,098
  • 1
  • 9
  • 17
7
votes
1 answer

ip_conntrack_tcp_timeout_established not applied to entire subnet

I've got a nat setup with thousands of devices connected to it. The gateway has its internet provided by eth0 and the devices on the LAN side connect to eth1 on the gateway. I have the following setup with iptables: /sbin/iptables -t nat -A…
Stephen Hankinson
  • 271
  • 2
  • 4
  • 6
7
votes
4 answers

Determine the network and host ID portion of an IP address

I need to work out the algorithm regarding how you calculate the network and host portion of an IP address. Is the host ID the public part? Is the network ID the private part for locating the computer within the local network? If the subnet mask is…
fwc
  • 331
  • 2
  • 5
  • 11
7
votes
1 answer

Reroute mDNS query from WSL subnet to windows host subnet

Heya fellow coders/developers/networkers/Devops/... I have an issue with an mDNS/DNS-SD setup in the context of WSL2 (Windows 10 2004 version) I have a pretty simple setup at home with a main server and a Raspberry Pi, and I would like to activate…
Sisyphe
  • 4,626
  • 1
  • 25
  • 39
7
votes
3 answers

Docker get a list of created networks' IP addresses (IP range of subnets)

If you use command: docker network ls you'll get the output that lists all Docker networks but lacking the IP range of these networks. how to get all created sub networks IP ranges? for example if I use command: docker network create --subnet…
Jimmix
  • 5,644
  • 6
  • 44
  • 71
1 2
3
59 60