For an assignment I'm setting up a router in Linux and I have to edit the p7p1 config file to set the network up. One thing I have to do is set the local subnet to 172.27.13.0/24. I'm assuming this isn't the same as the subnet mask, so what would I put in the configuration file to set this? If it's needed I'm using an older Fedora distro.
Asked
Active
Viewed 8,523 times
1 Answers
2
You're correct. The 172.27.13.0/24 tells us that you are using the 172.27.13.0 network, and the /24 tells us your subnet mask is 24-bits. If you don't want to get much deeper into how subnet masks and networking at large work, you can reference a table like the one currently found on Wikipedia's Subnetwork article to convert from CIDR notation (with a slash and a number) to dotted-decimal notation (ie 255.255.255.0).
Jason Rush
- 1,808
- 1
- 11
- 12
-
Alright, so do I have to do anything for this other than do IPADDR=172.27.13.1 and NETMASK=255.255.255.0, or will that suffice? – Alex5775 Dec 08 '17 at 11:57
-
If 172.27.13.1 is the IP address they want (it is a legitimate IP address in that subnet). That is the correct NETMASK= statement, and I don't think we can get any other useful information in this context from what was provided. – Jason Rush Dec 08 '17 at 12:06
-
I think a better way to word what I'm asking would be "does using the ip address 172.27.13.1 automatically set the subnet to 172.27.13.0, or is there another line I have to use for setting the subnet?" Thanks by the way, you've been really helpful – Alex5775 Dec 08 '17 at 12:10
-
The computer/server easily calculates the subnet from the IP address and subnet mask, so you don't specify the subnet (just the mask). – Jason Rush Dec 08 '17 at 12:13
-
To be properly configured, an interface requires an address and subnet mask. The combination is used to calculate the subnet (aka network address of the subnet). – Jeter-work Dec 08 '17 at 17:37