Re: howto determine network device unit number? device.hints?

2009-01-15 Thread H.fazaeli
Liss Subject: Re: howto determine network device unit number? device.hints? you may not change unit numbers as they are strictly controlled by kernel. However, on freebsd 5.3+, you may use 'ifconfig name your-name-here' to achieve the same affect Sorry, I don't understand the usage of ifconfig

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread H.fazaeli
-...@freebsd.org; freebsd-questions@freebsd.org Subject: Re: howto determine network device unit number? device.hints? for example, say you have 2 interface em0 and em1 which you like to swap their minor numbers: ifconfig em0 name tmp ifconfig em1 name em0 ifconfig em0 name em1 or to assign cisco-like names

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Olivier Nicole
Hi, Sorry to jump in but... Problem is, this unit number is not constant and changing arbitrarily every time I reload the driver (card A unit number=0 card B un=1 or the other way around). Since I have been using FreeBSD, the NIC had always been given the same unit number (that is, unless I

RE: howto determine network device unit number? device.hints?

2009-01-15 Thread Yony Yossef
Yony Yossef wrote: Thanks for the explanation. So there's no way to determine this in advance.. What do you mean by 'in advance'? Assuming a fixed hardware configuration, when the kernel is loaded, you know all the interface names and can rename them, i.e., in rc.local. From

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Mykola Dzham
H.fazaeli wrote: for example, say you have 2 interface em0 and em1 which you like to swap their minor numbers: ifconfig em0 name tmp ifconfig em1 name em0 ifconfig em0 name em1 or to assign cisco-like names to you interfaces: ifconfig xl0 name fastEthernet0

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Julian Elischer
_ From: H.fazaeli [mailto:faza...@sepehrs.com] Sent: Thursday, January 15, 2009 10:26 AM To: Yony Yossef Cc: freebsd-...@freebsd.org; freebsd-questions@freebsd.org Subject: Re: howto determine network device unit number? device.hints? for example, say you have 2 interface em0 and em1 which you

RE: howto determine network device unit number? device.hints?

2009-01-15 Thread Yony Yossef
-...@freebsd.org; freebsd-questions@freebsd.org Subject: Re: howto determine network device unit number? device.hints? for example, say you have 2 interface em0 and em1 which you like to swap their minor numbers: ifconfig em0 name tmp ifconfig em1 name em0 ifconfig em0 name em1

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Eygene Ryabinkin
Yony, good day. Thu, Jan 15, 2009 at 11:26:34AM +0200, Yony Yossef wrote: All I'm doing is unloading and reloading the driver. Unit numbers change and it makes my automatic subnet configuration (/etc/rc.conf) assign bad IPs. You're using your own driver, aren't you? If yes, could you show

RE: howto determine network device unit number? device.hints?

2009-01-15 Thread Yony Yossef
: howto determine network device unit number? device.hints? Yony, good day. Thu, Jan 15, 2009 at 11:26:34AM +0200, Yony Yossef wrote: All I'm doing is unloading and reloading the driver. Unit numbers change and it makes my automatic subnet configuration (/etc/rc.conf) assign bad IPs. You're

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Eygene Ryabinkin
Thu, Jan 15, 2009 at 01:15:53PM +0200, Yony Yossef wrote: You're using your own driver, aren't you? If yes, could you show your device_method_t structure and the corresponding identify, probe, attach and detach routines? You're setting the unit numbers via 'if_initname(ifp,

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Bruce M. Simpson
Yony Yossef wrote: Thanks for the explanation. So there's no way to determine this in advance.. I must build a script that contains my own mapping between MAC addresses and the wanted interface names and run it after each driver load, rename the interfaces if necessary. It seems quite wrong,

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Bruce M. Simpson
Yony, Bruce M. Simpson wrote: And how come the unit number is given an arbitrary value? Is there a good reason for that? ... In your case I'm not sure why your two cards would flip order. Could it be how your BIOS and hardware set up the PCI IDSEL lines at boot? If this is the case

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Bruce M. Simpson
Eygene Ryabinkin wrote: ... I wanted to stress only one point: simple 'kldunload driver' and 'kldload driver' makes devices to flip for Yony's case. This means that unless some PCI hotplug stuff is here (which I don't believe to be present, because no physical cards are touched and there is

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Eygene Ryabinkin
Bruce, good day. Thu, Jan 15, 2009 at 03:01:37PM +, Bruce M. Simpson wrote: Bruce M. Simpson wrote: In your case I'm not sure why your two cards would flip order. Could it be how your BIOS and hardware set up the PCI IDSEL lines at boot? If this is the case on your system, then you

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Yony Yossef
Thu, Jan 15, 2009 at 01:15:53PM +0200, Yony Yossef wrote: You're using your own driver, aren't you? If yes, could you show your device_method_t structure and the corresponding identify, probe, attach and detach routines? You're setting the unit numbers via 'if_initname(ifp,

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Yony Yossef
Eygene Ryabinkin wrote: ... I wanted to stress only one point: simple 'kldunload driver' and 'kldload driver' makes devices to flip for Yony's case. This means that unless some PCI hotplug stuff is here (which I don't believe to be present, because no physical cards are touched and

Re: howto determine network device unit number? device.hints?

2009-01-15 Thread Brooks Davis
On Thu, Jan 15, 2009 at 08:07:35PM +0200, Yony Yossef wrote: Eygene Ryabinkin wrote: ... I wanted to stress only one point: simple 'kldunload driver' and 'kldload driver' makes devices to flip for Yony's case. This means that unless some PCI hotplug stuff is here (which I don't

Re: howto determine network device unit number? device.hints?

2009-01-14 Thread H.fazaeli
you may not change unit numbers as they are strictly controlled by kernel. However, on freebsd 5.3+, you may use 'ifconfig name your-name-here' to achieve the same affect Yony Yossef wrote: Hi, I would like to determine the unit number of my network cards, e.g. make the device on pci0:16 be

RE: howto determine network device unit number? device.hints?

2009-01-14 Thread Yony Yossef
-Original Message- From: H.fazaeli [mailto:faza...@sepehrs.com] Sent: Wednesday, January 14, 2009 6:24 PM To: Yony Yossef Cc: freebsd-...@freebsd.org; freebsd-questions@freebsd.org; Eitan Shefi; Oleg Kats; Liran Liss Subject: Re: howto determine network device unit number

RE: howto determine network device unit number? device.hints?

2009-01-14 Thread Yony Yossef
you may not change unit numbers as they are strictly controlled by kernel. However, on freebsd 5.3+, you may use 'ifconfig name your-name-here' to achieve the same affect Sorry, I don't understand the usage of ifconfig you suggested and the effect it will cause. Can you please explain