Re: Possible regression in ifconfig under7.0 - removes validdefault route

2008-11-17 Thread Steven Hartland
- Original Message - 
From: "Jeremy Chadwick" <[EMAIL PROTECTED]>

I can try to reproduce this if you'd like, on a VMware session.

One case where the default route could be (I haven't checked) removed:
some NIC drivers in the past, when changing the "primary IP" (first IP
shown in ifconfig for an interface), would actually bring down the
entire interface (e.g. ifconfig XXX down) then back up again a second or
two later.  dmesg on your machine would be able to confirm whether or
not this is happening.



Thanks Jeremy, no such down up here is show so I believe this is not
the case, here anyway. The interface in question was em0 details:-
em0:  port 0xd400-0xd43f mem 0xfea6-0xfea7,0xfea4-0xfea5 irq 
23 at device 8.0 on pci1

em0: Ethernet address: 00:30:48:71:b6:b7
em0: [FILTER]

FreeBSD test 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386


Would be most interested in the results of you vm test if you would
be so kind.

   Regards
   Steve 




This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone +44 845 868 1337
or return the E.mail to [EMAIL PROTECTED]

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Possible regression in ifconfig under7.0 - removes validdefault route

2008-11-17 Thread Jeremy Chadwick
On Mon, Nov 17, 2008 at 08:45:43PM -, Steven Hartland wrote:
> - Original Message - From: "Jeremy Chadwick" <[EMAIL PROTECTED]>
>> I can try to reproduce this if you'd like, on a VMware session.
>>
>> One case where the default route could be (I haven't checked) removed:
>> some NIC drivers in the past, when changing the "primary IP" (first IP
>> shown in ifconfig for an interface), would actually bring down the
>> entire interface (e.g. ifconfig XXX down) then back up again a second or
>> two later.  dmesg on your machine would be able to confirm whether or
>> not this is happening.
>
>
> Thanks Jeremy, no such down up here is show so I believe this is not
> the case, here anyway. The interface in question was em0 details:-
> em0:  port 
> 0xd400-0xd43f mem 0xfea6-0xfea7,0xfea4-0xfea5 irq 23 at 
> device 8.0 on pci1
> em0: Ethernet address: 00:30:48:71:b6:b7
> em0: [FILTER]
>
> FreeBSD test 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 
> 2008 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386
>
> Would be most interested in the results of you vm test if you would
> be so kind.

No problem.  I'm testing on VMware Workstation 6.5.0 build 118116,
RELENG_7 amd64 (world/kernel dated 2008/10/23).


rc.conf (showing DHCP is not in use):

ifconfig_em0="inet 192.168.1.190 netmask 255.255.255.0"
defaultrouter="192.168.1.1"

em0: flags=8843 metric 0 mtu 1500
options=9b
ether 00:0c:29:0a:c9:37
inet 192.168.1.190 netmask 0xff00 broadcast 192.168.1.255
media: Ethernet autoselect (1000baseTX )
status: active

DestinationGatewayFlagsRefs  Use  Netif Expire
default192.168.1.1UGS 00em0
127.0.0.1  127.0.0.1  UH  00lo0
192.168.1.0/24 link#1 UC  00em0
192.168.1.1link#1 UHLW20em0
192.168.1.51   00:30:48:d2:22:d0  UHLW2   50em0   1107


Command executed: ifconfig em0 inet 10.0.0.1 netmask 255.0.0.0
Aftermath:

em0: flags=8843 metric 0 mtu 1500
options=9b
ether 00:0c:29:0a:c9:37
inet 10.0.0.1 netmask 0xff00 broadcast 10.255.255.255
media: Ethernet autoselect (1000baseTX )
status: active

DestinationGatewayFlagsRefs  Use  Netif Expire
10.0.0.0/8 link#1 UC  00em0
127.0.0.1  127.0.0.1  UH  00lo0


Command executed: route add default 10.0.0.128
Aftermath:

DestinationGatewayFlagsRefs  Use  Netif Expire
default10.0.0.128 UGS 00em0
10.0.0.0/8 link#1 UC  00em0
10.0.0.128 link#1 UHLW20em0
127.0.0.1  127.0.0.1  UH  00lo0

Command executed: ifconfig em0 inet 10.10.10.10 netmask 255.0.0.0
Aftermath:

em0: flags=8843 metric 0 mtu 1500
options=9b
ether 00:0c:29:0a:c9:37
inet 10.10.10.10 netmask 0xff00 broadcast 10.255.255.255
media: Ethernet autoselect (1000baseTX )
status: active

DestinationGatewayFlagsRefs  Use  Netif Expire
10.0.0.0/8 link#1 UC  00em0
127.0.0.1  127.0.0.1  UH  00lo0


Summary: confirmed.  Above two tests show that even if changing the IP
to something else within the same network block, the default route is
removed and not put back.

This is pretty major, if you ask me.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Possible regression in ifconfig under7.0 - removes validdefault route

2008-11-17 Thread Steven Hartland

Thanks for the confirmation on that its not a regression Jo. It really
is a nasty little bug so I'll raise a PR for it, hopefully someone
with the power will then fix it :)

   Regards
   Steve
- Original Message - 
From: "Jo Rhett" <[EMAIL PROTECTED]>



This is a bug in my mind, but it's not a regression.  FreeBSD has done  
this for at least 10 years now.  If you are changing the IP of an  
interface, you *must* do a semicolon chained command to a route add  
default.  It's been true for as long as I can remember.




This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone +44 845 868 1337
or return the E.mail to [EMAIL PROTECTED]

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Possible regression in ifconfig under7.0 - removes validdefault route

2008-11-17 Thread Jim Pingle
Jeremy Chadwick wrote:
> Summary: confirmed.  Above two tests show that even if changing the IP
> to something else within the same network block, the default route is
> removed and not put back.
> 
> This is pretty major, if you ask me.

I've encountered similar issues before, and typically just added ";
/etc/rc.d/routing restart" or "&& /etc/rc.d/routing restart" after the
ifconfig statement just to be safe.

Typically I had adjusted rc.conf, then used "/etc/rc.d/netif restart;
/etc/rc.d/routing restart"

Jim

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Possible regression in ifconfig under7.0 - removes validdefault route

2008-11-17 Thread sthaug
> Thanks for the confirmation on that its not a regression Jo. It really
> is a nasty little bug so I'll raise a PR for it, hopefully someone
> with the power will then fix it :)

This leads to the question - what do people *want* with respect to
static routes? I know what *I* want: The static route behavior that
Cisco, Juniper and other big router vendors have, i.e.

- A configured static route exists in the routing table as long as
the nexthop IP address is valid. If the nexthop becomes invalid (for
instance if you lose link on an Ethernet interface), the static
route is also removed from the routing table.

- But (and here's the big difference) - *if the nexthop comes back*,
for instance because your Ethernet interface gets link again, the
configured static route is inserted into the routing table again.

Note that with this behavior, changing the IP address of an interface
would not result in the default route being deleted, as long as the
nexthop for the default route remained valid.

Oh yeah, since we're in wishful thinking mode, I want interface
descriptions too...

Steinar Haug, Nethelp consulting, [EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Possible regression in ifconfig under7.0 - removes validdefault route

2008-11-18 Thread Peter Jeremy
On 2008-Nov-17 23:36:19 +0100, [EMAIL PROTECTED] wrote:
>Oh yeah, since we're in wishful thinking mode, I want interface
>descriptions too...

Have you looked at the 'name' and 'group' keywords in ifconfig(8)?
If this isn't what you want, please expand on your wish.

-- 
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.


pgpUQ9NRz3MHu.pgp
Description: PGP signature


Re: Possible regression in ifconfig under7.0 - removes validdefault route

2008-11-18 Thread sthaug
> >Oh yeah, since we're in wishful thinking mode, I want interface
> >descriptions too...
> 
> Have you looked at the 'name' and 'group' keywords in ifconfig(8)?
> If this isn't what you want, please expand on your wish.

It is not what I want.

On routers, switches and lots of other boxes from most vendors you can
associate a description string with each interface - where interface 
can be a physical port, or for instance a VLAN based interface. This
description string is useful to document things like

- what is the box at the other end of the cable connected to this port
- what is the port at the other end of the cable connected to this port
- what is the circuit id for the circuit this port is connected to
- what is this port used for

etc. Typical example, from one of our switches (Cisco syntax):

interface GigabitEthernet0/12
 description TO: fs1.td  ID: BTN-11510092  TXT: gi1/0/7 EoSDH 50 Mbps
 switchport trunk allowed vlan 123,770,1024,1500,1504,1528,1536

showing the first three points I mentioned above.

Such a description string is can normally be retrieved using SNMP.

Steinar Haug, Nethelp consulting, [EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"