openvswitch and OpenFlow

Posted on Fri 04 September 2015 in Linux • Tagged with ovs, linux, notepad, openflow, openvswitch • 2 min read

openflow

Layer 1

ovs-ofctl del-flow BRIDGE
ovs-ofctl add-flow BRIDGE priority=500,in_port=1,actions=output:2
ovs-ofctl add-flow BRIDGE priority=500,in_port=2,actions=output:1
ovs-ofctl dump-flows BRIDGE

Layer 2

ovs-ofctl del-flow BRIDGE
ovs-ofctl add-flow BRIDGE dl_src=00:00:00:00:00:01,dl_dst=00:00:00:00:00:02 …

Continue reading

Gentoo - initramfs with busybox, lvm and some more...

Posted on Tue 11 August 2015 in Linux • Tagged with Gentoo, linux, notepad, initrd • 1 min read

Preparations

mkdir -p /usr/src/initramfs/{bin,lib/modules,dev,etc,mnt/root,proc,root,sbin,sys}
cp -a /dev/{null,console,tty,sda*} /usr/src/initramfs/dev/

busybox

USE="static make-symlinks -pam -savedconfig" emerge --root=/usr/src/initramfs/ -av busybox

LVM
LVM provides already a static binary :)

cp /sbin …

Continue reading

ldap initial configuration

Posted on Fri 06 March 2015 in Linux • Tagged with ldap, Linux, notepad • 1 min read

A more or less initial configuration for openldap (>2.4)

##
# to import run:
# ldapmodify -Y EXTERNAL -H ldapi:/// -f $filename
#
# to verfiy run:
# ldapsearch -Y EXTERNAL -H ldapi:/// -b "olcDatabase={1}hdb,cn=config"
#
# to create a password:
# slappasswd -h {SSHA} -s admin
##

dn: olcDatabase={1}hdb,cn=config
changetype …

Continue reading

Monitoring a fritzbox via upnp - FritzOS 6.20 // FritzBox 7490

Posted on Wed 11 February 2015 in Linux • Tagged with fritzbox, upnp, notepad, linux • 1 min read

curl "http://fritz.box:49000/igdupnp/control/WANCommonIFC1" -H "Content-Type: text/xml; charset="utf-8"" -H "SoapAction:urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1#GetAddonInfos" sion='1.0' encoding='utf-8'?> <s:Envelope s:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'> <s:Body> <u:GetAddonInfos xmlns …

Continue reading

apache and tomcat - packetsize per request

Posted on Mon 05 January 2015 in Linux • Tagged with jboss, linux, notepad • 1 min read

During a consulting project i had some trouble with the following environment

Infrastructure

Loadbalancer >> Apache >> Tomcat / JBoss

Each request ended in a 400 Bad Request but the configuration looks good and works fine with other projects.

In the end we made some configuration modifications to the apache and tomcat.

Configuration …


Continue reading

Retrieve Windows key from ACPI MSDM table

Posted on Thu 19 June 2014 in Linux • Tagged with windows, hex, msdm, linux, notepad • 1 min read

[root@localhost ~]# hexdump -C /sys/firmware/acpi/tables/MSDM
00000000 4d 53 44 4d 55 00 00 00 03 d3 4c 45 4e 4f 56 4f |MSDMU.....LENOVO|
00000010 54 50 2d 47 32 20 20 20 70 25 00 00 50 54 4c 20 |TP-G2   p%..PTL |
00000020 02 …

Continue reading

Syncing a fork with git/github

Posted on Mon 16 June 2014 in Linux • Tagged with git, HowTo, Linux, github, notepad • 1 min read

Configure a remote

git remove -v
# git remote add  
git remote add upstream https://github.com/foo/bar.git
git remove -v

Pull "upstream"

# git fetch 
git fetch upstream

Checkout the master

git checkout master

Merge "upstream" master to local master

# git merge /
git merge upstream/master

(optional) Delete old …


Continue reading

[notepad] curl & SOAP

Posted on Tue 28 January 2014 in Linux • Tagged with soap, linux, notepad • 1 min read

curl -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:" -d @data.txt -w "%{http_code}\n" -s -o /dev/null  -X POST  

Choosing the right scheduler on a virtual maschine (kvm)

Posted on Tue 20 August 2013 in Linux • Tagged with KVM, Linux, VMware, Notepad • 1 min read

The default i/o scheduler is the Completely Fair Queuing (cfq) in the 2.6 kernel. This is not the first choice for a virtual machine/hypervisor. The combination of the noop and the deadline scheduler is much better for a virtualization host.

virtual machine: noop
hypervisor: deadline

Set the …


Continue reading

[notepad] vmbuilder command

Posted on Tue 13 August 2013 in Linux • Tagged with kvm, libvirt, notepad, xen, vms • 1 min read

vmbuilder kvm ubuntu -a amd64 --suite=precise --cpu=2 --libvirt qemu:///system \
   --mem=2048 --user=root --pass=random --hostname=testsystem --dest=/tmp/test \
   --raw=/dev/vgdata1/test_root --rootsize=16384 --swapsize=2048  --addpkg=openssh-server \
   --bridge=virbr0 --ip=192.168.122.110 --mask=255.255.255.0 --gw=192.168.122.1 …

Continue reading