| Summary: | ifup calculates wrong broadcast address when using PREFIX with subnetting | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Ralf Spenneberg <ralf> |
| Component: | initscripts | Assignee: | initscripts Maintenance Team <initscripts-maint-list> |
| Status: | CLOSED DUPLICATE | QA Contact: | qe-baseos-daemons |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.1 | CC: | notting |
| Target Milestone: | rc | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-06-21 18:47:13 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Ralf Spenneberg
2011-06-20 14:54:06 UTC
*** This bug has been marked as a duplicate of bug 705367 *** 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 *** |