5

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?

Johnny 5
  • 183
  • 1
  • 1
  • 4
  • 1
    `ifconfig` is deprecated on Linux. Use `ip addr` (or just `ip a`) instead. – BatchyX Jan 01 '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 01 '13 at 23:13
  • 2
    @mdpc: http://serverfault.com/questions/458628/should-i-quit-using-ifconfig – BatchyX Jan 02 '13 at 19:26

1 Answers1

7

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.

Shane Madden
  • 114,520
  • 13
  • 181
  • 251