How to use both bonding and bridge?

I have a server with two network adapters. I configured bonding and it works. Here’s the working configuration:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
bond-master bond0
bond-primary eth0

auto eth1
iface eth1 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
bond-mode balance-rr
bond-miimon 100
bond-slaves none
address 192.168.1.2
gateway 192.168.1.1
netmask 255.255.255.0
dns-nameservers 192.168.1.13

I try to add a bridge, but then, the machine loses connectivity.

I tried:

For example, the following configuration doesn’t work:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
bond-master bond0

auto eth1
iface eth1 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
bond-mode balance-rr
bond-miimon 100
bond-slaves none

auto br0
iface br0 inet static
bridge_ports bond0
bridge_maxwait 0
bridge_fd 0
post-up ifup bond0
post-down ifdown bond0
address 192.168.1.2
gateway 192.168.1.1
netmask 255.255.255.0
dns-nameservers 192.168.1.13

What else can I try to make it work?

Related:

Kernel panic after boot Centos 6.5 HP DL320 B120i HPVSA

Im working with a new HPDL320 micro server (gen8-2) with a HP Dynamic array B120i

My problem is after the setup.
I provided the DiskDrive to the installer and everything is fine. at first i used kick start version but now im having the same issue with a fresh centos 6.5 x86_64 install.

the boot dies in the initrd, I added rdshell and removed el quiet and rghb options from the grub option just to find that the root device was not found.

blkid shows nothing

I tried to create a software raid but the problem was the same. dracut could not see the md devices so it would not boot.

what i tried.

Fresh uninstall centos 6.5 DD
Kickstatt install centos 6.2 DD

Related:

virsh vcpu_period and vcpu_quota

I have been looking into ways to divide my CPU amongst KVM guests other than by just setting vCPU access limits. I understand the concept of cpu_shares which can be set/displayed with virsh schedinfo, but I also found vcpu_period and vcpu_quota listed with this command as shown below:

enter image description here

Looking at the man page, I know what the acceptable input values are but could somebody please explain in simple terms what these two parameters actually do?

Related:

Failed upgrade of PHP on Ubunutu 12.04, error: Sub-process /usr/bin/dpkg returned an error code (1)

I just tried to upgrade my version of PHP on Ubuntu 12.04 and now I have messed it up. First I did this:

sudo add-apt-repository ppa:ondrej/php5-oldstable

Then I did this:

sudo apt-get update

Then finally I did this:

sudo apt-get install php5

And now I am getting an error message about Sub-process /usr/bin/dpkg returned an error code (1)

What have I done wrong? How can I fix this problem? Thanks.

Here are the errors received:

Do you want to continue [Y/n]? Y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up libapache2-mod-php5 (5.4.28-1+deb.sury.org~precise+1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing libapache2-mod-php5 (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up php5-cli (5.4.28-1+deb.sury.org~precise+1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing php5-cli (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php5-curl:
 php5-curl depends on phpapi-20100525+lfs; however:
  Package phpapi-20100525+lfs is not installed.
  Package libapache2-mod-php5 which provides phpapi-20100525+lfs is not configured yet.
  Package php5-cli which provides phpapi-20100525+lfs is not configured yet.
dpkg: error processing php5-curl (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php5-gd:
 php5-gd depends on phpapi-20100525+lfs; however:
  Package phpapi-20100525+lfs is not installed.
  Package libapache2-mod-php5 which provides phpapi-20100525+lfs is not configured yet.
  Package php5-cli which provides phpapi-20100525+lfs is not configured yet.
dpkg: error processing php5-gd (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php5-mcrypt:
 php5-mcrypt depends on phpapi-20100525+lfs; however:
  Package phpapi-20100525+lfs is not installed.
  Package libapache2-mod-php5 which provides phpapi-20100525+lfs is not configured yet.
  Package php5-cli which provides phpapi-20100525+lfs is not configured yet.
dpkg: error processing php5-mcrypt (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php5-mysql:
 php5-mysql depends on phpapi-20100525+lfs; however:
  Package phpapi-20100525+lfs is not installed.
  Package libapache2-mod-php5 which provides phpapi-20100525+lfs is not configured yet.
  Package php5-cli which provides phpapi-20100525+lfs is not configured yet.
dpkg: error processing php5-mysql (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of php5:
 php5 depends on libapache2-mod-php5 (>= 5.4.28-1+deb.sury.org~precise+1) | libapache2-mod-php5filter (>= 5.4.28-1+deb.sury.org~precise+1) | php5-cgi (>= 5.4.28-1+deb.sury.org~precise+1) | php5-fpm (>= 5.4.28-1+deb.sury.org~precise+1); however:
  Package libapache2-mod-php5 is not configured yet.
  Package libapache2-mod-php5filter is not installed.
  Package php5-cgi is not installed.
  Package php5-fpm is not installed.
dpkg: error processing php5 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 libapache2-mod-php5
 php5-cli
 php5-curl
 php5-gd
 php5-mcrypt
 php5-mysql
 php5
E: Sub-process /usr/bin/dpkg returned an error code (1)

Related:

FreeRADIUS w/ MySQL backend. IP Pool

I have a pool of addresses (172.16.0.0/24) configured on my NAS (Cisco 2921 router) for my IPsec clients.

I have various subnet mask length subnetworks used for different user groups. For example I have 172.16.0.64/27 for one department, 172.16.0.96/28 for another department and so on. I use Framed-IP-Address attribute in user configuration, ex:

vpnclient01    ClearText-Password := "cisco"
               Service-Type = Outbound-User,
               Framed-IP-Address = 172.16.0.68,
               Framed-IP-Netmask = 255.255.255.255,
               Cisco-AVPair += "ipsec:inacl=IPSEC_ACL_FOR_SPECIFIC_DEPT",
               <other Cisco-AVPair params.>

I have to manually track if the IP address is not in use (I have even written a script for that), manually assign an IP address for each new user. Now that’s quite a pain in the butt.

My question is, can I somehow manage the IP address pools on the RADIUS server itself instead of Cisco router, for example using some web management tool like DaloRADIUS (or manually configuring) so that I could just assign the pool of addresses to all users and the radius server would figure out the dynamic allocation itself for each group?

If you need more specific information, please comment. Thank you!

PS. Yes, I do use MySQL backend.

Related:

PHP-FPM service status `stop/waiting` but workers are running?

Starting php5-fpm appears to work, but checking the status immediately shows that it is not running:

[root@server ~]# service php5-fpm start
php5-fpm start/running, process 4516

[root@server ~]# service php5-fpm status
php5-fpm stop/waiting

Even though I am able to load PHP pages (meaning that PHP-FPM must be running), the status sometimes reports as stop/waiting.

It appears that there are processes running, but are these only the worker processes?

ps -aux |grep php
www-data  3552  0.0  0.7 338108 14960 ?        S    05:43   0:00 php-fpm: pool www                                                       
www-data  3553  0.0  1.3 338168 27156 ?        S    05:43   0:00 php-fpm: pool www                                                       
www-data  3554  0.0  1.1 337948 23020 ?        S    05:43   0:00 php-fpm: pool www                                                       
www-data  3555  0.0  1.0 334108 20644 ?        S    05:43   0:00 php-fpm: pool www                                                       
www-data  3556  0.0  1.1 337952 23032 ?        S    05:43   0:00 php-fpm: pool www 

I’m concerned that the master process is not working correctly. There is nothing being reported in the PHP-FPM log though.

[root@server ~]# tail /var/log/php5-fpm.log
[03-May-2014 06:19:32] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful

Is service php-fpm status misreporting? Or is the master process actually stopped?

UPDATE: Rebooting the server causes PHP-FPM to start on boot and show as running, but issuing the reload or restart command causes it to go into the state described above. In it’s current condition, I have to reboot the server every time I change php.ini. The server is Ubuntu 14.04

Related:

TCP Window size increases drastically and sender don’t send until the receive buffer is not empty

I have a download stream over TCP in an application (running on Win2k12).
The problem is that the connection gets closed by the sender because it times out.

I used wireshark to see what happens on 2 different servers (on one server it works ok, on the other it gets timed out).
I have noticed the same behavior on both:
When the download starts, everything seems ok, window size is 64k and remains the same for some time, segments get acknowledged. Then at some point the window size starts to decrease until it is 0. (As far as I know this is ok, the receiver cannot keep up with the sender.) However, there is no ACK or Window update message from the receiver until the entire buffer is read by the app, then a Window update advertises 64k window size again. Then it starts over again. Window size decreases until zero.
This does not seem right for me. As the application reads from the buffer it should have free space in it and a Window update should be sent, so the sender can send the next segment.

The other thing I don’t understand is the behavior on the failing server. This server advertises larger and larger window sizes in every such cycle, in the last cycle before the timeout the window size was ~800 000. The timeout occures because the buffer is not emptied quick enough. But I have no clue why is the window size increasing on this server? Is there a setting on the server to prevent this?

Are my assumptions right, or I misunderstood something about the TCP protocol?
Any ideas to solve this issue is appreciated.

Thanks.

Related: