View previous topic :: View next topic |
Author |
Message |
sgmattk n00b
Joined: 16 Sep 2002 Posts: 9 Location: Nashville, TN
|
Posted: Tue Sep 17, 2002 12:51 am Post subject: Bug or operator error? Problems with broadcast_eth0 |
|
|
Howdy,
I'm tearing my hair out. My /etc/conf.d/net file is as follows:
Quote: |
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.5 2002/09/07 13:31:29 azarah Exp $
# Global config file for net.* rc-scripts
# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth0="x.x.x.194 broadcast x.x.x.207 netmask 255.255.255.240"
iface_eth1="x.x.x.203 broadcast x.x.x.207 netmask 255.255.255.240"
# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
#iface_eth0="dhcp"
#dhcpcd_eth0="..."
# For adding aliases to a interface
#
alias_eth0="x.x.x.195
x.x.x.196
x.x.x.197
x.x.x.198
x.x.x.199
x.x.x.200
x.x.x.201
x.x.x.202"
# NB: The next is only used for aliases.
#
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly. Leave commented to assign
# defaults for that interface.
#
broadcast_eth0="x.x.x.207
x.x.x.207
x.x.x.207
x.x.x.207
x.x.x.207
x.x.x.207
x.x.x.207
x.x.x.207"
netmask_eth0="255.255.255.240
255.255.255.240
255.255.255.240
255.255.255.240
255.255.255.240
255.255.255.240
255.255.255.240
255.255.255.240"
# For setting the default gateway
#
gateway="eth0/x.x.x.193"
|
The resulting ifconfig looks like this:
Quote: |
eth0 Link encap:Ethernet HWaddr 00:E0:3F:04:55:C3
inet addr:x.x.x.194 Bcast:x.x.x.207 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:478939 errors:0 dropped:0 overruns:0 frame:0
TX packets:585321 errors:0 dropped:0 overruns:0 carrier:0
collisions:731 txqueuelen:100
RX bytes:66143873 (63.0 Mb) TX bytes:271044744 (258.4 Mb)
Interrupt:9 Base address:0xc000
eth0:0 Link encap:Ethernet HWaddr 00:E0:3F:04:55:C3
inet addr:x.x.x.207 Bcast:x.x.x.255 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xc000
eth0:1 Link encap:Ethernet HWaddr 00:E0:3F:04:55:C3
inet addr:x.x.x.196 Bcast:x.x.x.207 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xc000
eth0:2 Link encap:Ethernet HWaddr 00:E0:3F:04:55:C3
inet addr:x.x.x.197 Bcast:x.x.x.207 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xc000
eth0:3 Link encap:Ethernet HWaddr 00:E0:3F:04:55:C3
inet addr:x.x.x.198 Bcast:x.x.x.207 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xc000
eth0:4 Link encap:Ethernet HWaddr 00:E0:3F:04:55:C3
inet addr:x.x.x.199 Bcast:x.x.x.207 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xc000
eth0:5 Link encap:Ethernet HWaddr 00:E0:3F:04:55:C3
inet addr:x.x.x.200 Bcast:x.x.x.207 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xc000
eth0:6 Link encap:Ethernet HWaddr 00:E0:3F:04:55:C3
inet addr:x.x.x.201 Bcast:x.x.x.207 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xc000
eth0:7 Link encap:Ethernet HWaddr 00:E0:3F:04:55:C3
inet addr:x.x.x.202 Bcast:x.x.x.207 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:9 Base address:0xc000
eth1 Link encap:Ethernet HWaddr 00:E0:3F:05:03:0A
inet addr:x.x.x.203 Bcast:x.x.x.207 Mask:255.255.255.240
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:35 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:1008 (1008.0 b)
Interrupt:11 Base address:0xc400
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5283 errors:0 dropped:0 overruns:0 frame:0
TX packets:5283 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:532098 (519.6 Kb) TX bytes:532098 (519.6 Kb)
|
Note the very weird entry for eth0:0.
Yes, I did put all those x's in all the addresses on purpose.
In case you're wondering, putting the addresses on their own lines instead of just using spaces doesn't make a difference -- I've tried it both ways. It's just easier to read this way.
Also, if I comment out the broadcast_eth0 and netmask_eth0 lines I get broadcasts of x.x.x.255 and netmasks of x.x.x.0 for everything except for eth0:0, which comes up with the proper x.x.x.207 and x.x.x.240 -- another weirdness.
I've tried a lot of combinations. Is there something I'm doing wrong or is there a bug in the net startup script? (I'm looking through that next)
Thanks in advance. |
|
Back to top |
|
|
pilla Bodhisattva
Joined: 07 Aug 2002 Posts: 7729 Location: Underworld
|
Posted: Tue Sep 17, 2002 2:39 am Post subject: |
|
|
I tried to do simulate your problem and had similar symptons.... aditionally, I had problems to shut down the network plus some SIO.... errors.
It seems that something is wrong there --- the scripts or the sintax to write the configuration file... |
|
Back to top |
|
|
Naan Yaar Bodhisattva
Joined: 27 Jun 2002 Posts: 1549
|
Posted: Tue Sep 17, 2002 3:02 am Post subject: |
|
|
It is seemingly a bug in /etc/init.d/net.eth0. Lines that say something like:
Code: |
aliasbcast="$(eval echo \$\{broadcast_${IFACE}\} \| awk
\'\{ print \$${num} \}\')"
...
aliasnmask="$(eval echo \$\{netmask_${IFACE}\} \| awk \'
\{ print \$${num} \}\')"
|
should actually be:
Code: |
aliasbcast="$(eval echo \$\{broadcast_${IFACE}\} \| awk
\'\{ print \$$((num+1)) \}\')"
...
aliasnmask="$(eval echo \$\{netmask_${IFACE}\} \| awk \'
\{ print \$$((num+1)) \}\')"
|
Note: for a single alias the code in net.eth0 will work OK. It breaks when there are multiple aliases, as you do.
Last edited by Naan Yaar on Tue Sep 17, 2002 8:26 pm; edited 1 time in total |
|
Back to top |
|
|
pilla Bodhisattva
Joined: 07 Aug 2002 Posts: 7729 Location: Underworld
|
Posted: Tue Sep 17, 2002 12:40 pm Post subject: |
|
|
Thus, I think you should submit a bug report. |
|
Back to top |
|
|
Naan Yaar Bodhisattva
Joined: 27 Jun 2002 Posts: 1549
|
Posted: Tue Sep 17, 2002 1:25 pm Post subject: |
|
|
Reported to bugs.gentoo.org. Follow url for more details. |
|
Back to top |
|
|
|