Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to connect from one machine to the other (for Postgres), and I'm confused about how to configure my IP address, both from a allow connections from IP address X and from a connect to machine A on IP address X standpoint, assuming there could be a difference.

If I use ifconfig, the output says my bcast is 10.0.2.255 and inet addr is 10.0.2.15. A related query on this subject pertains to the selected answer to this question, wherein the use of /24 (24 bit IP) in the actual IP address confuses me. How/when should /24 be used when specifying an IP address?

share|improve this question

closed as off topic by mdpc, Ward, Khaled, Lucas Kauffman, dunxd Jan 2 '13 at 9:29

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

    
ifconfig is deprecated on Linux. Use ip addr (or just ip a) instead. –  BatchyX Jan 1 '13 at 21:25
    
@batchyx - would you please stop propogating this invalid information. I have seen this specific comment more than once and again, I must comment on how this is wrong. –  mdpc Jan 1 '13 at 23:13
    

1 Answer 1

up vote 5 down vote accepted

10.0.2.15 is your system's address, .255 is the broadcast address for the subnet.

/24 is CIDR notation for the subnet mask; it means that 24 bits of the 32 bit IPv4 address are the network and the other 8 bits are the addresses within the subnet.

See this question for more information.

share|improve this answer
    
Thanks Shane. That's helpful. –  Johnny 5 Jan 2 '13 at 22:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.