Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionRalf Spenneberg
2011-06-20 14:54:06 UTC
Description of problem:
Version-Release number of selected component (if applicable):
initscripts-9.03.23-1.el6.x86_64
How reproducible:
every time
Steps to Reproduce:
1. Define a network device with the following definitions in ifcfg-eth0
PREFIX=29
IPADDR=x.61.58.51
GATEWAY=x.61.58.49
2. Up the device
3. Inspect broadcast address
Actual results:
Broadcast x.61.58.255
Expected results:
Broadcast x.61.58.55
Additional info:
Initscripts documentation states that BROADCAST parameter is deprecated. Using this parameter BROADCAST=x.61.58.55 solves the problem.
I disagree. This is not a duplicate. The netmask is set correctly in my scenario.
I use the following ifcfg-eth0:
DEVICE=eth0
HWADDR=00:26:55:e7:20:ad
ONBOOT=yes
BOOTPROTO=none
TYPE=Ethernet
IPADDR=172.16.128.22
PREFIX=24
GATEWAY=172.16.128.30
USERCTL=no
IPV6INIT=no
This results in the following nic configuration:
# ip a s dev eth0
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 00:26:55:e7:20:ad brd ff:ff:ff:ff:ff:ff
inet 172.16.128.22/24 brd 172.16.255.255 scope global eth0
Please note, that the prefix/netmask is set correctly, but the broadcast is calculated for a class b.
The command ifconfig states the same:
eth0 Link encap:Ethernet Hardware Adresse 00:26:55:E7:20:AD
inet Adresse:172.16.128.22 Bcast:172.16.255.255 Maske:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
The netmask is set correctly to 255.255.255.0 according to the prefix 24. Only the broadcast is set wrong.
Setting BROADCAST=172.16.128.255 corrects the broadcast address. The documenation states that this parameter is deprecated.
It's fixed by the same patch, hence why it was marked as a duplicate.
The reason you get the right netmask is because the address is actually added with the prefix instead of the netmask; the internal calculation for the netmask that the scripts use is still wrong.
*** This bug has been marked as a duplicate of bug 705367 ***