Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
How many ways can 1 IPv4 address be interpreted, considering subnet masks? According to wikipedia, it seems like there are 32 possible subnet masks to 1 IP address, but I don't know.
It's not clear to me if a "network mask" is the same as a "subnet mask"; is there such a thing as applying more than 1 mask to an IP address?
network mask and subnet mask are essentially the same thing although there may be different representations. 255.255.255.0 or /24 are both mask representations. A give IP address can fall under different net masks, but there are some standard guidelines. Class A networks are generally lower numbers in the first octet. 10.0.0.0 is a Class A private space with a mask of 255.0.0.0 What that means is 10.anything is part of that network and should not be routed outside that network. you can do things like superneting which means change the subnet to something like 255.252.0.0 which limits the addresses in the network but is not a class a b or c. class B network is 255.255.0.0 . Class C is 255.255.255.0 . Class C is more commonly seen in home environments with a private address space of 192.168.x.0-255. as far as interpreting an ip address, any address is 1 address. the subnet mask tells you if it is a broadcast address(highest address) or a prefix(lowest address) or a valid address in the address space. it also tells a router if it should route the packet or not.
Related
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 months ago.
Improve this question
A company is granted a static address 192.168.10.0.
The Company wants to have four subnets for four of its departments. Each Department is having 50-60 computers.
Design Subnetwork using sub netting concepts.
Identify Number of IP addresses on required in each Subnetwork.
Write their starting and ending addresses.
I am not getting, how to approach this problem.
Thanks in Advance
The company is granted a static address of 192.168.10.0. The company wants to have four subnets for four of its departments. Each department is having 50-60 computers.
To design the subnetwork, we will use the subnetting concepts. The company has been granted a static address of 192.168.10.0. This is a Class C IP address. The first octet (192) is the network address and the last three octets (168.10.0) are the host addresses.
To create four subnets, we will need to borrow two bits from the host addresses. This will give us four subnets, each with 62 host addresses. The first subnet will have the network address of 192.168.10.0 and the last subnet will have the network address of 192.168.10.192.
The first subnet will have the starting address of 192.168.10.1 and the ending address of 192.168.10.62.
The second subnet will have the starting address of 192.168.10.65 and the ending address of 192.168.10.126.
The third subnet will have the starting address of 192.168.10.129 and the ending address of 192.168.10.190.
The fourth subnet will have the starting address of 192.168.10.193 and the ending address of 192.168.10.254.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 months ago.
Improve this question
How can we determine if an IPv6 address is within a private CIDR?
On IPv4 it's straightforward, the subnet and the DNS mask are simple enough to understand.
With IPv6 every resource I find looks like the table below - but my own local IPv6 address starts with fe80, which doesn't seem to conform to the fd00 pattern indicated.
Can anyone help me understand private IPv6 ranges and why my own private IPv6 address would seem not to be in that range?
IPv6 does not have Private addresses the way IPv4 does. IPv6 used to have Site-Local addresses that were analogous to IPv4 Private addresses, but those were deprecated in favor of ULA (Unique Local Addressing), fc00::/7, of which the second half of the addressing, fd00::/8 is available for local assignment, but requires the next 40 bits to be randomly chosen. IPv4 Private addresses and the (deprecated) IPv6 Site-Local addressing were expected to have the same addresses used in multiple sites, but IPv6 ULA is expected to be unique with little chance for duplicate addresses.
What you are looking at is a Link-Local address (in the fe80::/10 range). Packets using Link-Local addresses are confined to a single link, unlike IPv6 Global and ULA addresses. You cannot route packets with Link-Local addresses as all links use the same Link-Local network. You can route ULA addresses, but not on the public Internet. Global addresses are globally routable.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
We have a computer that needs to communicate with two routers over one physical ethernet interface. I know this sounds weird, but each router is actually interfaced to an Iridium L Band receiver/transmitter, and we are hoping to double our bandwidth by using two.
I would like to be able to select which link to send data over at the application level, but I'm not quite sure how to do it. My first thought was to establish a virtual IP address in addition to the pre-configured static IP address and use two separate sockets to send() data out over each "interface" separately. My question is, how do I make it so that only one of the routers actually routes the data out to a remote host? The IP addresses and subnet masks of the Iridium transceivers are configurable. Is it possible to make one transceiver only listen to the data coming from one computer IP address? Subnets maybe?
Create vlan inter faces in your machine
ip link add link eth0 name eth0.1 type vlan id 10
ip link add link eth0 name eth0.2 type vlan id 20
assign ip address to eth0.1 and eth0.2 in two networks. Later you can choose which one to bind at application level.
say like this
ifconfig eth0.1 192.168.10.2/24 up
ifconfig eth0.2 192.168.20.2/24 up
Then configure your router in two networks rather than one. Your computer and the routers should be connected to trunk port in the switch. Configure your routers to be in two networks rather than same. Configure subinterfaces in routers so that they listen for vlan 10 and 20 respectively. (how exactly to do this depends on the type of router) I can give you commands only for cisco.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
MAC address are used for uniquely identifying my computer.
IP address are used for routing the packets to the network, as it has got a hierarchial structure, but it doesn't uniquely identifies a computer. So, after IPv6, each computer will have a unique IP address, so will there be any need of MAC address then?
Please do correct me, if I had understood something wrong.
No. MAC addresses operate at layer 2 ("data link layer"). The Internet Protocol (both IPv4 and IPv6) operates at layer 3 ("network layer").
These two layers are complimentary, and do not "replace" each other. For more information, read up on the TCP/IP suite.
IPv6 stateless address autoconfiguration (SLAAC) uses the MAC address to generate the address, but that does not mean they "replace" each other. It's simply a characteristic of the layer 2 interface being inherited by the layer 3 addressing. Other than that, completely complimentary.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I would like read netmask, network and broadcast address from an IP address. Basically I’m confused with netmask, CIDR, network and Broadcat terms, could anyone please help me to understand these terms.
Thanks,
Thomman
There is no intrinsic netmask, network and broadcast address for a given IP address. The three terms, combined with an IP address describe a network.
The (CIDR) netmask gives the number of bits that all IPs in the network share. For example, /15 means the first 15 bits are fixed. Because an IPv4 address has 32 bits, the next 32-15=17 bits are then variable. Since every number in an IPv4 address corresponds to 8 bits, that means the following addresses are in the network 1.2.0.0/15 (binary: 00000001.00000010.0.0/15):
1.2.0.1
1.2.0.2
1.2.0.255
1.2.1.2
1.2.255.255
1.3.1.1 # in binary: 00000001.00000011.0.0, i.e. the first 15 bits match
1.3.255.255
but not 1.4.1.1 (00000001.00000100.1.1) or 2.2.1.1 (00000010.10.1.1), since their first 15 bits differ from 00000001.0000001.
You can also express the netmask of a /x CIDR network in binary form by setting the first x bits. In our case, the first 15:
11111111.11111110.00000000.00000000 # binary
255. 254. 0. 0 # decimal
A network address is then the logical AND of any address in the network and the network mask, you set all the variable bits to zero. You can also think of it as the lowest address in the network. In our case: 1.2.0.0.
A broadcast address is the logical OR with the complement of the netmask. You set all the variable bits to one. You can also think of it as the highest address in the network. In our case: 1.3.255.255.
This terminology is equivalent for IPv6 addresses, although you'll usually specify only address and CIDR netmask. Also, a block between two colons now describes 16, not 8 bit. For example, 0001:0002:abcd::/48 contains 0001:0002:abcd::1 and 0001:0002:abcd:12::, but not 0001:0002:abce. You could express the netmask of this network as ffff:ffff:ffff:0 or even 1111111111111111:1111111111111111:1111111111111111::0, but /48 is shorter and easier to read. This network has 48 fixed and 128-48=80 variable bits.