I have a public ip as below which is static (my isp provided) as below:
IP Address: x.x.146.50
Subnet Mask: 255.255.255.240
Default Gateway: x.x.146.49
DNS1: x.x.1.196
DNS2: x.x.7.196
But what is my Network, Broadcast and DNS (this scared me for ages, looking for a easy way to do 100% accurate calculating/math).
iface eth0 inet static
address x.x.146.50
netmask 255.255.255.240
network ????????????
gateway x.x.146.49
broadcast ?????????
Follow up: (short cut)
$ ipcalculator 8.8.8.8/28
Address: 8.8.8.8 00001000.00001000.00001000.0000 1000
Netmask: 255.255.255.240 = 28 11111111.11111111.11111111.1111 0000
Wildcard: 0.0.0.15 00000000.00000000.00000000.0000 1111
=>
Network: 8.8.8.0/28 00001000.00001000.00001000.0000 0000
HostMin: 8.8.8.1 00001000.00001000.00001000.0000 0001
HostMax: 8.8.8.14 00001000.00001000.00001000.0000 1110
Broadcast: 8.8.8.15 00001000.00001000.00001000.0000 1111
Hosts/Net: 14 Class A
1) It tells me Broadcast what to copy and paste
2) It tells me Netmask what to copy and paste
3) It tells me Network what to copy and paste
Now its Easy! i was always finding them complex in my head to do manual calculation and server is down for 20 days :P. Not not anymore.