Bug 35726

Summary: [patch] [rc.network] can't use ifconfig on the interfaces after upgrade to 4.5
Product: Base System Reporter: Peter Kieser <peter>
Component: confAssignee: Andre Oppermann <andre>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.5-STABLE   
Hardware: Any   
OS: Any   

Description Peter Kieser 2002-03-10 06:00:01 UTC
I had 3 network cards in my FreeBSD 4.5-STABLE box before I upgraded to the latest stable, due to the SSH bug. After I upgrade, I am no longer able to use ifconfig on my network cards, or get an IP address from my DHCP server. If I take out 2 of the network cards, it will work. I have produced this exact problem on several of my boxes.

Fix: 

None?
How-To-Repeat: To repeat this problem just stick more then 1 ethernet card in your computer.
Comment 1 Peter Pentchev 2002-03-10 14:46:24 UTC
On Sat, Mar 09, 2002 at 09:59:17PM -0800, Peter Kieser wrote:
> 
> >Number:         35726
> >Category:       i386
> >Synopsis:       Won't let me use ifconfig on the interfaces after upgrade to latest OS
> >Originator:     Peter Kieser
> >Release:        4.5-STABLE
> >Organization:
> Striked Internet Services
> >Environment:
> FreeBSD haven.digital-base.net 4.5-STABLE FreeBSD 4.5-STABLE #0: Sat Mar  9 15:13:18 PST 2002     root@haven.digital-base.net:/usr/src/sys/compile/HAVEN  i386
> 
> >Description:
> I had 3 network cards in my FreeBSD 4.5-STABLE box before I upgraded to the latest stable, due to the SSH bug. After I upgrade, I am no longer able to use ifconfig on my network cards, or get an IP address from my DHCP server. If I take out 2 of the network cards, it will work. I have produced this exact problem on several of my boxes.
> 
> >How-To-Repeat:
> To repeat this problem just stick more then 1 ethernet card in your computer.
> >Fix:
> None?

OK, we will need a bit more info here.

1. What kind of Ethernet cards do you have?  (make, model, driver name)

2. What exactly happens when you try to use ifconfig?  Does it produce
   any error messages?

3. What exactly happens when you try to obtain an IP address via DHCP?
   Does dhclient produce any error messages?  Is a request logged in
   the DHCP server logs?

Please keep the subject line of this message, and CC a copy to
bug-followup@FreeBSD.org, so the GNATS bug tracking system can
keep track of the various replies in the problem report's audit trail.

G'luck,
Peter

-- 
Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
If I had finished this sentence,
Comment 2 dwmalone 2002-03-10 17:06:58 UTC
On Sat, Mar 09, 2002 at 09:59:17PM -0800, Peter Kieser wrote:
> >Description:
> I had 3 network cards in my FreeBSD 4.5-STABLE box before I upgraded to the latest stable, due to the SSH bug. After I upgrade, I am no longer able to use ifconfig on my network cards, or get an IP address from my DHCP server. If I take out 2 of the network cards, it will work. I have produced this exact problem on several of my boxes.

Is it possible that you upgraded the userland programs without
recompiling your kernel? This might possibly cause ifconfig to
fail.

	David.
Comment 3 Peter Kieser 2002-03-10 17:34:43 UTC
I kinda stuck everything in between the questions you asked, scroll down.

--Peter
Peter on efnet - #freebsdhelp

----- Original Message -----
From: "Peter Pentchev" <roam@ringlet.net>
To: "Peter Kieser" <peter@striked.net>
Cc: <bug-followup@FreeBSD.org>
Sent: Sunday, March 10, 2002 6:46 AM
Subject: Re: i386/35726: Won't let me use ifconfig on the interfaces after
upgrade to latest OS


> On Sat, Mar 09, 2002 at 09:59:17PM -0800, Peter Kieser wrote:
> >
> > >Number:         35726
> > >Category:       i386
> > >Synopsis:       Won't let me use ifconfig on the interfaces after
upgrade to latest OS
> > >Originator:     Peter Kieser
> > >Release:        4.5-STABLE
> > >Organization:
> > Striked Internet Services
> > >Environment:
> > FreeBSD haven.digital-base.net 4.5-STABLE FreeBSD 4.5-STABLE #0: Sat Mar
9 15:13:18 PST 2002
root@haven.digital-base.net:/usr/src/sys/compile/HAVEN  i386
> >
> > >Description:
> > I had 3 network cards in my FreeBSD 4.5-STABLE box before I upgraded to
the latest stable, due to the SSH bug. After I upgrade, I am no longer able
to use ifconfig on my network cards, or get an IP address from my DHCP
server. If I take out 2 of the network cards, it will work. I have produced
this exact problem on several of my boxes.
> >
> > >How-To-Repeat:
> > To repeat this problem just stick more then 1 ethernet card in your
computer.
> > >Fix:
> > None?
>
> OK, we will need a bit more info here.
>
> 1. What kind of Ethernet cards do you have?  (make, model, driver name)

SiS 900 10/100BaseTX, LC82C115 PNIC II 10/100BaseTX, RealTek 8139
10/100BaseTX, 3Com 3C509B-TPO EtherLink III (PnP)

>
> 2. What exactly happens when you try to use ifconfig?  Does it produce
>    any error messages?

haven# ifconfig
lnc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet6 fe80::250:56ff:fe50:b495%lnc0 prefixlen 64 scopeid 0x1
        ether 00:50:56:50:b4:95
lnc1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        inet6 fe80::250:56ff:fe50:b496%lnc1 prefixlen 64 scopeid 0x2
        inet 24.82.66.245 netmask 0xfffffc00 broadcast 24.82.67.255
        ether 00:50:56:50:b4:96
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500

Notice how I dont have a "inet" section on my first ethernet adapter.  There
should be one. There isnt, even if it would only be 0.0.0.0

>
> 3. What exactly happens when you try to obtain an IP address via DHCP?
>    Does dhclient produce any error messages?  Is a request logged in
>    the DHCP server logs?

haven# /sbin/dhclient lnc1 lnc0
ifconfig: ioctl (SIOCAIFADDR): File exists
dhclient: New IP Address(lnc0): 24.82.66.238
dhclient: New Subnet Mask (lnc0): 255.255.252.0
dhclient: New Broadcast Address(lnc0): 24.82.67.255
dhclient: New Routers: 24.82.64.1
haven#

Then I get locked out of the box, and cant reconnect. If I remove the other
ethernet adapter it works (out of /etc/rc.conf)

>
> Please keep the subject line of this message, and CC a copy to
> bug-followup@FreeBSD.org, so the GNATS bug tracking system can
> keep track of the various replies in the problem report's audit trail.
>
> G'luck,
> Peter
>
> --
> Peter Pentchev roam@ringlet.net roam@FreeBSD.org
> PGP key: http://people.FreeBSD.org/~roam/roam.key.asc
> Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
> If I had finished this sentence,
>
>
Comment 4 Peter Kieser 2002-03-10 17:52:47 UTC
If I've done it on 3 boxes, yes. But I dont think so.

I use the following to do my kernels:

cd /usr/src/sys/i386/conf
config <kernelconfig>
cd <kerntempdir>
make depend
make
make install
reboot -q
mergemaster

Could be though.

--Peter
Peter on efnet - #freebsdhelp

----- Original Message -----
From: "David Malone" <dwmalone@maths.tcd.ie>
To: "Peter Kieser" <peter@striked.net>
Cc: <freebsd-gnats-submit@FreeBSD.org>
Sent: Sunday, March 10, 2002 9:06 AM
Subject: Re: i386/35726: Won't let me use ifconfig on the interfaces after
upgrade to latest OS


> On Sat, Mar 09, 2002 at 09:59:17PM -0800, Peter Kieser wrote:
> > >Description:
> > I had 3 network cards in my FreeBSD 4.5-STABLE box before I upgraded to
the latest stable, due to the SSH bug. After I upgrade, I am no longer able
to use ifconfig on my network cards, or get an IP address from my DHCP
server. If I take out 2 of the network cards, it will work. I have produced
this exact problem on several of my boxes.
>
> Is it possible that you upgraded the userland programs without
> recompiling your kernel? This might possibly cause ifconfig to
> fail.
>
> David.
>
>
Comment 5 temp1274 2002-05-17 07:32:00 UTC
The originators email seems to be fubared... DNS problems.

Sorry to interject, but I've got something similar, though I think it may
not be related to the reported problem....

FreeBSD 4.5-RELEASE-p4

Two NICs. rl0 and xl0.

relevant statements in /etc/rc.conf
ifconfig_rl0="inet 192.168.0.254"
ifconfig_xl0="DHCP"

xl0 is always DHCP configured without problems, but rl0 is never configured
at all. I haven't tried two non-DHCP configurations.... let me do that now.
Okay, it works fine.

To the originator : Try leaving all three NICs in, and doing non-DHCP
configuration on them. I'm thinking that /etc/rc.network sees a DHCP option,
processes it on perhaps only one NIC, and then stops processing interface
configuration entirely.

Andrew
Comment 6 Giorgos Keramidas freebsd_committer freebsd_triage 2002-05-17 20:09:32 UTC
On 2002-05-16 23:40, Andrew Fremantle wrote:
> Sorry to interject, but I've got something similar, though I think
> it may not be related to the reported problem....

Don't be.  Any feedback that is relevant is necessary, and welcome.
On the other hand, when you think that this is not related to the
problem described in the original PR, you should file a new PR.

> FreeBSD 4.5-RELEASE-p4
>
> Two NICs. rl0 and xl0.
>
> relevant statements in /etc/rc.conf
> ifconfig_rl0="inet 192.168.0.254"
> ifconfig_xl0="DHCP"
>
> xl0 is always DHCP configured without problems, but rl0 is never configured
> at all. I haven't tried two non-DHCP configurations.... let me do that now.

What happens if you explicitly set network_interfaces to "lo0 xl0 rl0"?

	% grep network_interfaces /etc/rc.conf
	network_interfaces="lo0 xl0 rl0"

- Giorgos
Comment 7 laurent.bouvet 2002-08-13 13:55:57 UTC
Try to make an 

ifconfig lnc0 down 

before any other ifconfig command. Well, if this is done by a script
(rc.network) try to edit and add this just before any ifconfig.

This problem is the same with aliases.
My patch to rc.network for aliases:

220a221
> 				ifconfig ${ifn} down

has solved the problem.

Laurent
Comment 8 Bruce M Simpson freebsd_committer freebsd_triage 2003-11-25 16:59:20 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

Air this out on -net for discussion/bikeshedding.
Comment 9 Max Laier 2003-11-25 18:21:40 UTC
> haven# /sbin/dhclient lnc1 lnc0
> ifconfig: ioctl (SIOCAIFADDR): File exists
> dhclient: New IP Address(lnc0): 24.82.66.238
> dhclient: New Subnet Mask (lnc0): 255.255.252.0
> dhclient: New Broadcast Address(lnc0): 24.82.67.255
> dhclient: New Routers: 24.82.64.1
> haven#

The EEXISTS above comes from in.c (rtinit) when one tries to add an
address in an already existing prefix: ("inet 24.82.66.245 netmask
0xfffffc00" on lnc0 has the same prefix as the address your dhcp is
trying to give to lnc1)

http://pf4freebsd.love2party.net/in.c.diff originally done for my CARP
port should fix/work around it. Can you, please give it a try?

The code was obtained from WIDE via OpenBSD.

-- 
Best regards,
 Max                          mailto:max@love2party.net
Comment 10 Andre Oppermann freebsd_committer freebsd_triage 2003-12-30 09:58:27 UTC
Responsible Changed
From-To: freebsd-net->andre

Take over.
Comment 11 Andre Oppermann freebsd_committer freebsd_triage 2003-12-30 10:42:43 UTC
Peter,

do you still have the ifconfig problem described in the PR with 4.9R
or 5.2PR2?

-- 
Andre
Comment 12 Matteo Riondato 2005-03-28 18:36:54 UTC
Shouldn't this PR be closed, as we no longer use rc.network, it's
related to unsupported releases and there are no news about it since
December 2003?
Best Regards

-- 
Rionda aka Matteo Riondato
G.U.F.I. Staff Member (http://www.gufi.org)
FreeSBIE Developer (http://www.freesbie.org)
Comment 13 Andre Oppermann freebsd_committer freebsd_triage 2005-09-10 08:46:19 UTC
State Changed
From-To: open->closed

Close this PR.  ETOOOLD.