Re: Quagga as border router

2007-09-20 Thread Cristian KLEIN
Steve Bertrand wrote:
>> But OpenBGPD doesn't look like an alternative for you, if you are using
>> ipv6 as it only supports ipv4 route distribution (according to man pages)
> 
> IPv6 is an absolute MANDATORY requirement. If a recommendation does not
> support IPv6, than it will NOT fit into my environment.

I'm curious. Has anybody tried xorp? Is it competitive when used in environments
with many routes? It does support both IPv4 and IPv6.
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Quagga as border router

2007-09-20 Thread Alfred Perlstein
* Steve Bertrand <[EMAIL PROTECTED]> [070919 21:14] wrote:
> >>> Essentially, I'd like a board with at *least* 6 PCI-X slots, and perhaps
> >>> 8 RAM slots (if I can find justification that my router will work better
> >>> with up to 16GB of memory).
> > 
> > Why would you go with PCI-X? it's slow and getting end-of life..
> > 
> > go for PCI-Express.
> > there are quad PCI-E gigabit cards available.
> > Much lower packet latency.
> 
> As per my last email to Sten and the list...
> 
> I'm not a hardware person. PCI-E, PCI-X, I don't know the difference.
> 
> It was assumed that others would understand what I wanted and be able to
> make recommendations to me, and correct me on my terminology.
> 
> All I do know is that there is something more than ISA slots, and 386's
> now ;)
> 
> My request wasn't for clarification on motherboard technicalities, it
> was essentially a request on a recommendation for a hardware/software
> platform based on FreeBSD, that could possibly replace a Cisco 7206-VXR
> based on the NPE-G2 processing engine (or equivalent).

Juniper is based on FreeBSD. ;-)

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


Creation of carp interface on amd64 spins

2007-09-20 Thread Christopher Chen
Hi:

I'm running 6.2-RELEASE on some Pentium D's running and amd64 port.

I'm doing some mildly interesting things with vlan tagging, etc, and I
want to also set up carp. On identical machines running the i386 port,
this works correctly, but when running

ifconfig carp0

For instance, the process just spins and can't be killed. The rest of
the machine is fine, though!

This is 6.2-RELEASE/amd64 running in SMP mode.

Any ideas?

-- 
Chris Chen <[EMAIL PROTECTED]>
"I want the kind of six pack you can't drink."
-- Micah
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Creation of carp interface on amd64 spins

2007-09-20 Thread Max Laier
On Thursday 20 September 2007, Christopher Chen wrote:
> Hi:
>
> I'm running 6.2-RELEASE on some Pentium D's running and amd64 port.
>
> I'm doing some mildly interesting things with vlan tagging, etc, and I
> want to also set up carp. On identical machines running the i386 port,
> this works correctly, but when running
>
> ifconfig carp0
>
> For instance, the process just spins and can't be killed. The rest of
> the machine is fine, though!
>
> This is 6.2-RELEASE/amd64 running in SMP mode.
>
> Any ideas?

Can you tell me what "^T" or ps gives for the spinning process?  Does it 
hang in userland or kernel?  Can you try to trace the ifconfig, or - if 
the hang is in the kernel - break into the kernel debugger and get a back 
trace for the process?

-- 
/"\  Best regards,  | [EMAIL PROTECTED]
\ /  Max Laier  | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | [EMAIL PROTECTED]
/ \  ASCII Ribbon Campaign  | Against HTML Mail and News


signature.asc
Description: This is a digitally signed message part.


Re: Creation of carp interface on amd64 spins

2007-09-20 Thread Christopher Chen
On 9/20/07, Max Laier <[EMAIL PROTECTED]> wrote:
> On Thursday 20 September 2007, Christopher Chen wrote:
> > Hi:
> >
> > I'm running 6.2-RELEASE on some Pentium D's running and amd64 port.
> >
> > I'm doing some mildly interesting things with vlan tagging, etc, and I
> > want to also set up carp. On identical machines running the i386 port,
> > this works correctly, but when running
> >
> > ifconfig carp0
> >
> > For instance, the process just spins and can't be killed. The rest of
> > the machine is fine, though!
> >
> > This is 6.2-RELEASE/amd64 running in SMP mode.
> >
> > Any ideas?
>
> Can you tell me what "^T" or ps gives for the spinning process?  Does it
> hang in userland or kernel?  Can you try to trace the ifconfig, or - if
> the hang is in the kernel - break into the kernel debugger and get a back
> trace for the process?

Max:

load: 1.62  cmd: ifconfig 920 [runnable] 0.00u 96.02s 98% 920k

That's what ^T says. I'm going to reboot and ktrace it now. So here's
the last few lines of the ktrace:

   944 ifconfig CALL  modstat(0x10a,0x7fffe280)
   944 ifconfig RET   modstat 0
   944 ifconfig CALL  modfnext(0x10a)
   944 ifconfig RET   modfnext 267/0x10b
   944 ifconfig CALL  modstat(0x10b,0x7fffe280)
   944 ifconfig RET   modstat 0
   944 ifconfig CALL  socket(0x2,0x2,0)
   944 ifconfig RET   socket 3
   944 ifconfig CALL  ioctl(0x3,SIOCIFCREATE,0x514ce0)

l# lsof -p 944
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
ifconfig 944 root  cwd   VDIR   0,77  512 16525 /root
ifconfig 944 root  rtd   VDIR   0,77  512 2 /
ifconfig 944 root  txt   VREG   0,778029648 /sbin/ifconfig
ifconfig 944 root  txt   VREG   0,77   192688   116
/libexec/ld-elf.so.1
ifconfig 944 root  txt   VREG   0,77 7424 24794 /lib/libipx.so.3
ifconfig 944 root  txt   VREG   0,77  1083208 24786 /lib/libc.so.6
ifconfig 944 root0u  VCHR   0,93   0t210193 /dev/ttyp0
ifconfig 944 root1u  VCHR   0,93   0t210193 /dev/ttyp0
ifconfig 944 root2u  VCHR   0,93   0t210193 /dev/ttyp0
ifconfig 944 root3u  IPv4 0xff002d459130  0t0   UDP *:*

Sorry I don't have physical access so I can't break into the kernel
debugger right now.

cc

Your #1 Fan

-- 
Chris Chen <[EMAIL PROTECTED]>
"I want the kind of six pack you can't drink."
-- Micah
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Quagga as border router

2007-09-20 Thread Sten Daniel Soersdal

Steve Bertrand wrote:
 > Can you please explain in a technical way how polling can benefit me

here in a dual-stacked situation? In all honesty, the last few months,
I've been seeing many mails to the lists saying 'polling' has caused
issues. (I'm not arguing, I'm just looking for reason ;)


I'm not saying you should use polling. I'm saying that not using polling 
makes for more context switches. 64bit registers are twice as large as 
32bit registers. There will be a bigger penalty on stack/memory usage 
and therefore slower transitions from one context to another (read: 
handling a packet).

This might be mitigated by having a very large cpu cache.

It may or may not make much of a difference considering stacks are 
aligned, i was just theorizing.



But that could imply that you are going to do attempt active load
balancing on those two peer links. If so, you should be aware that such
load balancing must be done manually by some other method (pf? ng?)


No plan on load balancing. It's all based on 100% failover.

Thank you for the input, so if I ever do need to do load balancing, it
has been already planned in a manual configuration as you stated,
however via BGP. I'll break up my aggregate as an absolute LAST resort.
(Essentially, in regards to v4, I will NOT advertise anything smaller
than my allocated block...period).


Just curious: Is there a reason you can't advertise your entire 
allocated block and receive two full feeds?


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


ifconfig patch

2007-09-20 Thread Andrew Thompson
Hi,


I have been digging into why the edsc module wasnt being loaded by
ifconfig and now have a patch.

A few printfs showed the problem.

# ifconfig edsc0 create
ifmaybeload(edsc0)
trying to find if_edsc or edsc0
found @ ed

Its comparing using the string length of the module name so any partial
matches are going through. I have changed it so it strips the number
from the interface name and uses the full string to match.

I want to ask re@ soon so any feedback would be great.


Andrew
Index: ifconfig.c
===
RCS file: /home/ncvs/src/sbin/ifconfig/ifconfig.c,v
retrieving revision 1.133
diff -u -p -r1.133 ifconfig.c
--- ifconfig.c  13 Jun 2007 18:07:59 -  1.133
+++ ifconfig.c  20 Sep 2007 23:47:28 -
@@ -897,7 +897,7 @@ ifmaybeload(const char *name)
 {
struct module_stat mstat;
int fileid, modid;
-   char ifkind[35], *dp;
+   char ifkind[35], ifname[32], *dp;
const char *cp;
 
/* loading suppressed by the user */
@@ -911,6 +911,12 @@ ifmaybeload(const char *name)
*dp = *cp;
*dp = 0;
 
+   /* trim the interface number off the end */
+   strcpy(ifname, name);
+   for (dp = ifname; *dp != 0; dp++)
+   if (isdigit(*dp))
+   *dp = '\0';
+
/* scan files in kernel */
mstat.version = sizeof(struct module_stat);
for (fileid = kldnext(0); fileid > 0; fileid = kldnext(fileid)) {
@@ -926,8 +932,8 @@ ifmaybeload(const char *name)
cp = mstat.name;
}
/* already loaded? */
-   if (strncmp(name, cp, strlen(cp)) == 0 ||
-   strncmp(ifkind, cp, strlen(cp)) == 0)
+   if (strncmp(ifname, cp, strlen(ifname)) == 0 ||
+   strncmp(ifkind, cp, strlen(ifkind)) == 0)
return;
}
}
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: ifconfig patch

2007-09-20 Thread Andrew Thompson
On Fri, Sep 21, 2007 at 11:54:27AM +1200, Andrew Thompson wrote:
> Hi,
> 
> 
> I have been digging into why the edsc module wasnt being loaded by
> ifconfig and now have a patch.
> 
> A few printfs showed the problem.
> 
> # ifconfig edsc0 create
> ifmaybeload(edsc0)
> trying to find if_edsc or edsc0
> found @ ed
> 
> Its comparing using the string length of the module name so any partial
> matches are going through. I have changed it so it strips the number
> from the interface name and uses the full string to match.
> 
> I want to ask re@ soon so any feedback would be great.
> 
> 
> Andrew

>   *dp = 0;
>  
> + /* trim the interface number off the end */
> + strcpy(ifname, name);

oops, that should have been

strlcpy(ifname, name, sizeof(ifname));

> + for (dp = ifname; *dp != 0; dp++)
> + if (isdigit(*dp))
> + *dp = '\0';
> +


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


Re: ifconfig patch

2007-09-20 Thread Brooks Davis
On Fri, Sep 21, 2007 at 11:54:27AM +1200, Andrew Thompson wrote:
> Hi,
> 
> 
> I have been digging into why the edsc module wasnt being loaded by
> ifconfig and now have a patch.
> 
> A few printfs showed the problem.
> 
> # ifconfig edsc0 create
> ifmaybeload(edsc0)
> trying to find if_edsc or edsc0
> found @ ed
> 
> Its comparing using the string length of the module name so any partial
> matches are going through. I have changed it so it strips the number
> from the interface name and uses the full string to match.
> 
> I want to ask re@ soon so any feedback would be great.

Conceptually the patch seems right.  A couple comments below (I saw the strlcpy
change).

-- Brooks

> Index: ifconfig.c
> ===
> RCS file: /home/ncvs/src/sbin/ifconfig/ifconfig.c,v
> retrieving revision 1.133
> diff -u -p -r1.133 ifconfig.c
> --- ifconfig.c13 Jun 2007 18:07:59 -  1.133
> +++ ifconfig.c20 Sep 2007 23:47:28 -
> @@ -897,7 +897,7 @@ ifmaybeload(const char *name)
>  {
>   struct module_stat mstat;
>   int fileid, modid;
> - char ifkind[35], *dp;
> + char ifkind[35], ifname[32], *dp;
>   const char *cp;

Any reason ifname[32] shouldn't be ifname[IF_NAMESIZE]?

>   /* loading suppressed by the user */
> @@ -911,6 +911,12 @@ ifmaybeload(const char *name)
>   *dp = *cp;
>   *dp = 0;
>  
> + /* trim the interface number off the end */
> + strcpy(ifname, name);
> + for (dp = ifname; *dp != 0; dp++)
> + if (isdigit(*dp))
> + *dp = '\0';
> +

Should the if statement terminate the loop?

>   /* scan files in kernel */
>   mstat.version = sizeof(struct module_stat);
>   for (fileid = kldnext(0); fileid > 0; fileid = kldnext(fileid)) {
> @@ -926,8 +932,8 @@ ifmaybeload(const char *name)
>   cp = mstat.name;
>   }
>   /* already loaded? */
> - if (strncmp(name, cp, strlen(cp)) == 0 ||
> - strncmp(ifkind, cp, strlen(cp)) == 0)
> + if (strncmp(ifname, cp, strlen(ifname)) == 0 ||
> + strncmp(ifkind, cp, strlen(ifkind)) == 0)
>   return;
>   }
>   }



pgpbbQkrpdO2D.pgp
Description: PGP signature


Re: ifconfig patch

2007-09-20 Thread Andrew Thompson
On Thu, Sep 20, 2007 at 07:39:27PM -0500, Brooks Davis wrote:
> On Fri, Sep 21, 2007 at 11:54:27AM +1200, Andrew Thompson wrote:
> > Hi,
> > 
> > 
> > I have been digging into why the edsc module wasnt being loaded by
> > ifconfig and now have a patch.
> > 
> > A few printfs showed the problem.
> > 
> > # ifconfig edsc0 create
> > ifmaybeload(edsc0)
> > trying to find if_edsc or edsc0
> > found @ ed
> > 
> > Its comparing using the string length of the module name so any partial
> > matches are going through. I have changed it so it strips the number
> > from the interface name and uses the full string to match.
> > 
> > I want to ask re@ soon so any feedback would be great.
> 
> Conceptually the patch seems right.  A couple comments below (I saw the 
> strlcpy
> change).
> 
> -- Brooks
> 
> > Index: ifconfig.c
> > ===
> > RCS file: /home/ncvs/src/sbin/ifconfig/ifconfig.c,v
> > retrieving revision 1.133
> > diff -u -p -r1.133 ifconfig.c
> > --- ifconfig.c  13 Jun 2007 18:07:59 -  1.133
> > +++ ifconfig.c  20 Sep 2007 23:47:28 -
> > @@ -897,7 +897,7 @@ ifmaybeload(const char *name)
> >  {
> > struct module_stat mstat;
> > int fileid, modid;
> > -   char ifkind[35], *dp;
> > +   char ifkind[35], ifname[32], *dp;
> > const char *cp;
> 
> Any reason ifname[32] shouldn't be ifname[IF_NAMESIZE]?
> Should the if statement terminate the loop?

fixed.

I have found that the loop to create ifkind does not properly check the
bounds of the passed string. I have reorganised the code to fix this,
patch attached.


Andrew
Index: ifconfig.c
===
RCS file: /home/ncvs/src/sbin/ifconfig/ifconfig.c,v
retrieving revision 1.133
diff -u -p -r1.133 ifconfig.c
--- ifconfig.c  13 Jun 2007 18:07:59 -  1.133
+++ ifconfig.c  21 Sep 2007 00:49:45 -
@@ -897,19 +897,24 @@ ifmaybeload(const char *name)
 {
struct module_stat mstat;
int fileid, modid;
-   char ifkind[35], *dp;
+   char ifkind[IFNAMSIZ + 3], ifname[IFNAMSIZ], *dp;
const char *cp;
 
/* loading suppressed by the user */
if (noload)
return;
 
+   /* trim the interface number off the end */
+   strlcpy(ifname, name, sizeof(ifname));
+   for (dp = ifname; *dp != 0; dp++)
+   if (isdigit(*dp)) {
+   *dp = 0;
+   break;
+   }
+
/* turn interface and unit into module name */
strcpy(ifkind, "if_");
-   for (cp = name, dp = ifkind + 3;
-   (*cp != 0) && !isdigit(*cp); cp++, dp++)
-   *dp = *cp;
-   *dp = 0;
+   strlcpy(ifkind + 3, ifname, sizeof(ifkind) - 3);
 
/* scan files in kernel */
mstat.version = sizeof(struct module_stat);
@@ -926,8 +931,8 @@ ifmaybeload(const char *name)
cp = mstat.name;
}
/* already loaded? */
-   if (strncmp(name, cp, strlen(cp)) == 0 ||
-   strncmp(ifkind, cp, strlen(cp)) == 0)
+   if (strncmp(ifname, cp, strlen(ifname)) == 0 ||
+   strncmp(ifkind, cp, strlen(ifkind)) == 0)
return;
}
}
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Quagga as border router

2007-09-20 Thread Yuri Lukin
On Thu, 20 Sep 2007 00:24:09 -0700, Alfred Perlstein wrote
> 
> Juniper is based on FreeBSD. ;-)
> 

On old code from the 4.x days I think, right?


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


Re: Quagga as border router

2007-09-20 Thread Alfred Perlstein
* Yuri Lukin <[EMAIL PROTECTED]> [070920 16:49] wrote:
> On Thu, 20 Sep 2007 00:24:09 -0700, Alfred Perlstein wrote
> > 
> > Juniper is based on FreeBSD. ;-)
> > 
> 
> On old code from the 4.x days I think, right?

In the current release, yes.

Would you like a router based on 5.x? :)

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


Re: Quagga as border router

2007-09-20 Thread Richard A Steenbergen
On Thu, Sep 20, 2007 at 07:49:11AM -0400, Yuri Lukin wrote:
> On Thu, 20 Sep 2007 00:24:09 -0700, Alfred Perlstein wrote
> > 
> > Juniper is based on FreeBSD. ;-)
> 
> On old code from the 4.x days I think, right?

Technically no, they've been updating large portions of the FreeBSD code 
over time. I believe the current build is a late 5.x and a 6.x is due for 
public release soon in JUNOS 8.5.

But at any rate, it really doesn't matter, because the FreeBSD part has 
absolutely bubkiss to do with routing the packets. Juniper simply took 
FreeBSD as an existing mature and stable OS, heavily modified it for their 
purposes, and slapped it onto an off-the-shelf PC for use as a control 
plane (running routing protocols, cli, chassis management, etc). The 
routes are calculated and pushed out to the forwarding hardware via 
Ethernet, and the packets never touch the FreeBSD based part unless they 
are destined for it locally (as though it was an ordinary host).

Honestly, FreeBSD routing code is pretty poor as far as a modern router 
goes. If you throw enough CPU at it you can brute force your way through 
plenty of things, but in the context of modern commercial routers it 
doesn't even play in the same league (even for a software-only router).

-- 
Richard A Steenbergen <[EMAIL PROTECTED]>   http://www.e-gerbil.net/ras
GPG Key ID: 0xF8B12CBC (7535 7F59 8204 ED1F CC1C 53AF 4C41 5ECA F8B1 2CBC)
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: kern/116330: [nfe]: network problems under -current, nfe(4) and jumbo packets

2007-09-20 Thread remko
Old Synopsis: network problems under -current, nfe(4) and jumbo packets
New Synopsis: [nfe]: network problems under -current, nfe(4) and jumbo packets

Responsible-Changed-From-To: freebsd-bugs->freebsd-net
Responsible-Changed-By: remko
Responsible-Changed-When: Fri Sep 21 06:14:55 UTC 2007
Responsible-Changed-Why: 
Reassign to networking group

http://www.freebsd.org/cgi/query-pr.cgi?pr=116330
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: kern/116328: [bge]: Solid hang with bge interface

2007-09-20 Thread remko
Old Synopsis: Solid hang with bge interface
New Synopsis: [bge]: Solid hang with bge interface

Responsible-Changed-From-To: freebsd-bugs->freebsd-net
Responsible-Changed-By: remko
Responsible-Changed-When: Fri Sep 21 06:15:58 UTC 2007
Responsible-Changed-Why: 
Reassign to networking team

http://www.freebsd.org/cgi/query-pr.cgi?pr=116328
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"