Search code examples
iprouter

IP address configuration (kathara)


When you configurate some interface for a device using 'ifconfig eth0 xxx.xxx.xxx.xxx up' what's the difference bettween using IP like '192.168.0.2' and '192.168.0.2/30'.

I understand the idea of a submask and that it's good use for redirect datagrams only taking part of the IP address but I dont get why using it when assinging the IP for some interface.


Solution

  • I found out that using the submask when for assigning the IP address establish the range for the broadcast direction. So using direction like '192.168.0.2' will establish broadcast on '192.168.0.255' but using '192.168.0.2/30' will use '192.168.0.3' since its the last avaible direction when you taking the first 30 bits.