I got a /29 IP allocation from my ISP.
I added them using ifcfg to the range file for my interface: ifcfg-eth0-range:0
(NOTE: I replaced my actual IPs with private IPs here.)
IPADDR_START=192.168.2.0
IPADDR_END=192.168.2.7
NETMASK=255.255.255.255
The IPs in these range show 192.168.2.0 as broadcast address when using ip or ifconfig, but this can't be right? Broadcast address would be 192.168.2.7 if I added them using netmask=255.255.255.248. I checked whether I could reach my host using IP 192.168.2.0 and it works fine.
So this makes me believe it's not really the broadcast address for this IP range.
Have I configured this correctly?
My main IP is 192.168.1.25 Netmask=255.255.255.224 Gateway=192.168.1.1 Broadcast=192.168.1.31
I thought about setting 192.168.1.31 as broadcast address for these additional IPs, but I was told the broadcast address needs to be in the same subnet. Also manually setting the broadcast in ifcfg is deprecated.
What should I do?
EDIT: Added output of ip a and ip r
#ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.25/27 brd 192.168.1.31 scope global eth0
valid_lft forever preferred_lft forever
inet 192.168.2.0/29 brd 192.168.2.0 scope global eth0:1
valid_lft forever preferred_lft forever
inet 192.168.2.1/29 brd 192.168.2.0 scope global secondary eth0:2
valid_lft forever preferred_lft forever
inet 192.168.2.2/29 brd 192.168.2.0 scope global secondary eth0:3
valid_lft forever preferred_lft forever
inet 192.168.2.3/29 brd 192.168.2.0 scope global secondary eth0:4
valid_lft forever preferred_lft forever
inet 192.168.2.4/29 brd 192.168.2.0 scope global secondary eth0:5
valid_lft forever preferred_lft forever
inet 192.168.2.5/29 brd 192.168.2.0 scope global secondary eth0:6
valid_lft forever preferred_lft forever
inet 192.168.2.6/29 brd 192.168.2.0 scope global secondary eth0:7
valid_lft forever preferred_lft forever
inet 192.168.2.7/29 brd 192.168.2.0 scope global secondary eth0:8
valid_lft forever preferred_lft forever
inet6 fe80::225:90ff:fea6:127e/64 scope link
valid_lft forever preferred_lft forever
#ip r
default via 192.168.1.1 dev eth0
192.168.1.0/27 dev eth0 proto kernel scope link src 192.168.1.25
169.254.0.0/16 dev eth0 scope link metric 1002
192.168.2.0/29 dev eth0 proto kernel scope link src 192.168.2.0
192.168.2.0/29related to192.168.1.0/27? You mention both without explanation. Are they configured on and routed to the same interface (or IP, respectively)?ip aandip rto your question. Is192.168.1.0/27a public subnet? And see the subnet routing block I added to my answer.192.168.2.0/29addresses from the Internet now?