Re: Cloning VLAN interfaces

2012-03-20 Thread Gustau Perez Querol

On Mon, 19 Mar 2012 12:11:10 -0400, jammin2night wrote:

FreeBSD charon 9.0-STABLE FreeBSD 9.0-STABLE #14 r233107: Sun Mar 18
05:26:58 EDT 2012 root@charon:/usr/obj/usr/src/sys/CHARON  amd64

Hello:

I have a machine that has a 802.1q trunk attached which works fine.
I can create VLAN interfaces, apply an IP address to them and all is
good.

I have VirtualBox running on this machine and need to present an
interface to a VM that does not support trunking natively.  I've
googled and searched the archive trying to figure out how to create 
an

interface that VirtualBox will use where the 802.1Q tags are removed
but have not had any success.


  If I understood you correctly, you want to bridge the interface 
without 802.1q, so the tag/untag would be done by the host machine?


  If that's the case you can bridge the guest's virtual interface to 
the vlan interface, so the guest won't see the tags.  You can't do with 
the VBox GUI, but the VBox TUI (VBoxManage ) is able to do what you 
want. Let's suppose you want to bridge the host's vlan10 interface with 
the first virtual interface of a virtual machine named "FreeBSD virtual 
machine" and let's suppose it will be a virtio interface:


 VBoxManage modifyvm "FreeBSD virtual machine" --nic1 bridge 
--nictype bridge virtio --bridgeadapter vlan10


  Actually I'm using this kind of setup with around 10 virtual 
machines, each one serving 5 vlans. It is a very flexible setup because 
the virtual machines don't need to worry about the physical segmentation 
of my network, but only the logical segmentation (at IP level).


  Gustau





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


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


Assign a large number of IPv6 addresses

2012-03-20 Thread Alexandr Matveev

Hello.

  I have a IPv6 subnet and I have a number of servers, that act like a 
accelerator with nginx. Those are behind load-balancers.
I give each website a unique combination of IP addresses from a pool (so 
each website has a different set of four IP addresses).
I need to assign those IP addresses to accelerators, so they accept the 
packets that comes from the balancers. I need to assign
all of addresses (500,000 IPs) from IPv6 subnet to a single FreeBSD 
interface. If I do that, FreeBSD hangs. Right now this is working with
IPv4 addresses, but there are only 100 of them. Since IPv6 networks are 
bigger - more addresses can be added to unique combination.
On Linux I can mark this network as 'local', so it accepts all packets 
that come to those addresses. Can I do this on FreeBSD and how?


  This is the linux command I use:
ip -6 route add local 2a00:15f8:f000::/64 dev eth0

--
Alexandr Matveev



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


netstat: memstat_sysctl_all: Too many CPUs

2012-03-20 Thread Ihsan Junaidi Ibrahim
Hi folks,

While trying to poke around my mbuf stats, I ran across the following error 
message.

ihsan@sv01:~ $ netstat -m
netstat: memstat_sysctl_all: Too many CPUs

It's an E3-1230 CPU on a Supermicro X9SCM-F with 4G RAM.

I'm on 9.0-RELEASE.

Has anybody encountered this before?


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


Re: Intel 82574L interface wedging - em7.3.2/8.2-STABLE

2012-03-20 Thread Jason Wolfe
On Thu, Mar 15, 2012 at 11:17 AM, John Baldwin  wrote:
> On Sunday, March 11, 2012 3:47:07 am Hooman Fazaeli wrote:
>> On 3/11/2012 5:31 AM, Adrian Chadd wrote:
>> > Are you able to post the patch here?
>> > Maybe Jack can look at what's going on and apply it to the latest
>> > intel ethernet driver.
>> >
>> >
>> > Adrian
>> >
>>
>> Below is the patch for if_em.c (7.2.3). It simply checks driver's
>> queue status when the link state changes (inactive -> active) and
>> start transmit task if queue(s) are not empty.
>>
>> It also contains stuff I have added to compile on 7 plus some code
>> for test and diagnostics.
>
> Hmm, so I have yet to test this, but I found several bugs related to transmit
> in em(4) and igb(4) recently just reading the code.  (Mostly unnecessary
> scheduling of tasks for transmit.)  I've included your change of restarting
> TX when link becomes active.  I've also updated it to fix resume for em
> and igb to DTRT when buf_ring is used, and to not include old-style start
> routines at all when using multiq.  It is at
> http://www.freebsd.org/~jhb/patches/e1000_txeof2.patch
>
> --
> John Baldwin

John/Hooman,

Thank for the patch sirs, so far it does look like it did the trick.
I'll know for certain here in a few days if I'm still in the clear.
I'm guessing after it goes through some more testing it'll be too late
to slip it into 8.3?

Adrian, Sounds like you might be all set on hardware, but if anything
falls through let me know.

Jason
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: netstat: memstat_sysctl_all: Too many CPUs

2012-03-20 Thread Sergey Kandaurov
On 20 March 2012 21:16, Ihsan Junaidi Ibrahim  wrote:
> Hi folks,
>
> While trying to poke around my mbuf stats, I ran across the following error 
> message.
>
> ihsan@sv01:~ $ netstat -m
> netstat: memstat_sysctl_all: Too many CPUs
>
> It's an E3-1230 CPU on a Supermicro X9SCM-F with 4G RAM.
>
> I'm on 9.0-RELEASE.
>
> Has anybody encountered this before?
>

Well, that means that you are likely running libmemstat(3) library from
RELENG_8. This error message (and a reason for it) was removed in 9.0.
In 8.x and earlier this error was possible when kernel is compiled
with MAXCPU kernel option value greater than 32.
If you upgraded to 9.0 from an earlier release than please
make sure you have kernel and world in sync.

-- 
wbr,
pluknet
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: Intel 82574L interface wedging - em7.3.2/8.2-STABLE

2012-03-20 Thread John Baldwin
On Tuesday, March 20, 2012 1:45:32 pm Jason Wolfe wrote:
> On Thu, Mar 15, 2012 at 11:17 AM, John Baldwin  wrote:
> > On Sunday, March 11, 2012 3:47:07 am Hooman Fazaeli wrote:
> >> On 3/11/2012 5:31 AM, Adrian Chadd wrote:
> >> > Are you able to post the patch here?
> >> > Maybe Jack can look at what's going on and apply it to the latest
> >> > intel ethernet driver.
> >> >
> >> >
> >> > Adrian
> >> >
> >>
> >> Below is the patch for if_em.c (7.2.3). It simply checks driver's
> >> queue status when the link state changes (inactive -> active) and
> >> start transmit task if queue(s) are not empty.
> >>
> >> It also contains stuff I have added to compile on 7 plus some code
> >> for test and diagnostics.
> >
> > Hmm, so I have yet to test this, but I found several bugs related to 
transmit
> > in em(4) and igb(4) recently just reading the code.  (Mostly unnecessary
> > scheduling of tasks for transmit.)  I've included your change of 
restarting
> > TX when link becomes active.  I've also updated it to fix resume for em
> > and igb to DTRT when buf_ring is used, and to not include old-style start
> > routines at all when using multiq.  It is at
> > http://www.freebsd.org/~jhb/patches/e1000_txeof2.patch
> >
> > --
> > John Baldwin
> 
> John/Hooman,
> 
> Thank for the patch sirs, so far it does look like it did the trick.
> I'll know for certain here in a few days if I'm still in the clear.
> I'm guessing after it goes through some more testing it'll be too late
> to slip it into 8.3?

Yes, this is too late for 8.3, but thanks for testing!

-- 
John Baldwin
___
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"


Re: netstat: memstat_sysctl_all: Too many CPUs

2012-03-20 Thread Ihsan Junaidi Ibrahim
Sergey,

It was upgraded from 8.2-RELEASE via freebsd-update so I'd assume the kernel 
and world are in sync.

Since I'm already on 9.0, is there a way to fix this without going through the 
whole buildworld thing?

This box is on a GENERIC kernel.

ihsan

On Mar 21, 2012, at 2:39 AM, Sergey Kandaurov wrote:

> On 20 March 2012 21:16, Ihsan Junaidi Ibrahim  wrote:
>> Hi folks,
>> 
>> While trying to poke around my mbuf stats, I ran across the following error 
>> message.
>> 
>> ihsan@sv01:~ $ netstat -m
>> netstat: memstat_sysctl_all: Too many CPUs
>> 
>> It's an E3-1230 CPU on a Supermicro X9SCM-F with 4G RAM.
>> 
>> I'm on 9.0-RELEASE.
>> 
>> Has anybody encountered this before?
>> 
> 
> Well, that means that you are likely running libmemstat(3) library from
> RELENG_8. This error message (and a reason for it) was removed in 9.0.
> In 8.x and earlier this error was possible when kernel is compiled
> with MAXCPU kernel option value greater than 32.
> If you upgraded to 9.0 from an earlier release than please
> make sure you have kernel and world in sync.
> 
> -- 
> wbr,
> pluknet

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