Archive for August, 2005

Network Card Teaming on LINUX (How to)

Maybe it’s just me, but I found it incredibly hard to find how to NIC Teaming in linux similar to compaq network card teaming.

Now I’m fully aware that hp provide an official “pack” (Google Search Results Here), but what if you don’t have a supported server ? – Like me ! I’ve actually got an old hp netserver lp1000r.

Well after an age of searching, I found redhat’s page on the issue. , it was the usual scenario, if you don’t know the right word, how can the search engine find it ?

For those that just want to get it working, below are the 3 config files you need ( Save them in /etc/sysconfig/network-scripts/) once you’ve created them add

alias bond0 bonding

to /etc/modules.conf

ifcfg-bon0

DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.2.0
NETMASK=255.255.255.0
IPADDR=192.168.1.1
USERCTL=no

ifcfg-eth0

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

ifcfg-eth1

DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

Once I’d updated modules.conf & created the above files I did a reboot (to ensure bond0 get loaded into the kernel) . When the box finishes rebooting you’ll have a load balanced team. In my case a 200mb Ethernet connection :cool:

[nick@WhiteBox nick]$ ifconfig -a
bond0     Link encap:Ethernet  HWaddr 00:30:6E:05:64:D7
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:373134 errors:0 dropped:0 overruns:0 frame:0
          TX packets:274144 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:38984323 (37.1 Mb)  TX bytes:37004178 (35.2 Mb)

eth0      Link encap:Ethernet  HWaddr 00:30:6E:05:64:D7
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:186460 errors:0 dropped:0 overruns:0 frame:0
          TX packets:137072 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19476584 (18.5 Mb)  TX bytes:18475825 (17.6 Mb)
          Interrupt:11 Base address:0x1800 Memory:fb001000-fb001038

eth1      Link encap:Ethernet  HWaddr 00:30:6E:05:64:D7
          inet addr:192.168.2.101  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:186674 errors:0 dropped:0 overruns:0 frame:0
          TX packets:137072 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19508259 (18.6 Mb)  TX bytes:18530361 (17.6 Mb)
          Interrupt:11 Base address:0x1840 Memory:fb003000-fb003038

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:698888 errors:0 dropped:0 overruns:0 frame:0
          TX packets:698888 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:80164429 (76.4 Mb)  TX bytes:80164429 (76.4 Mb)

I Don’t think google are being particularly original

News on googleblog a new version of google desktop search.

Now the screen shot has been irritating my mind all morning…

Google Desktop SideBar

Where have I seen this before ? Oh yeah, Gnome Dashboard !

Screen-shot of Dashboard

Now I know the concept of sidebars isn’t exactly new but still google shame on you !

PHP – Nagios Simple CFG Gen.

Nagios
.. or nagios ;) is great, I use it a lot.

In my continuing quest to cure command line phobia I’ve written a small (& Basic) php script that can generate some sample configs. Simply type in the IP of what you want to monitor , tick a couple of boxes, and copy & paste what you get into the end of your config files – nice :cool:

There’s a Demo Site here : http://www.linickx.com/index.php?content=nagios
and the Source here: http://www.linickx.com/files/php/nagios-simple-gen_php.txt

UPDATE:
Also available at nagiosexchange.org: http://www.nagiosexchange.org/Configuration.20.0.html?&tx_netnagext_pi1[p_view]=327

Security Update: INFOCon = Yellow

This post on Slashdot.org has prompted me to make a long awaited 1st update to my security section.

You can now see the current INFOCon status on my security page :cool:

FC3 X11 On a Sony PCG-C1F

So I’ve been clearing out some stuff and I found another thing of use.

When I had a Sony Vaio, I remember the most annoying thing to get working was X11, specifically finding the right Fedora Core xorg.conf. I’ve uploaded my working xorg.conf here , now if you’re a really newbie and need some steps read-on, else you’re probably done ;)

Firstly, if you boot the PCG-C1F from the CD-ROM, and just hit enter at the install prompt, anaconda will try and start X, and when it does it can’t set the resolution right. So, the best thing to do is install in text mode. Text mode is started at the install prompt with:

linux text

The install should go fine, upon 1st reboot, Fedora will try to load X (assuming you’ve installed it) , and you won’t be able to go any further as you need to select I agree on the user agreement, but the button is off the screen :’(

To go further you’re probably gonna need a USB disk, copy my xorg.conf onto the disk, and boot the Vaio from the Fedora Core Install CD with your USB disk plugged in (If the disk isn’t plugged in, the drivers won’t be loaded), But this time from the install prompt go into rescue mode….

linux rescue

Copy the xorg.conf from the USB disk to /etc/X11 and reboot.

X11 will boot up and now you can accept the user agreement, you’ll hit next, next, next and find on your 2nd reboot that X is broken again :mad:

This time hold down ctrl & alt at the same time and hit F2 and you’ll get a shell prompt, log in as root, mount your USB disk and overwrite /etc/xorg.conf again, final reboot, and all is good :D

Look a screen-shot to prove I got it working ! :cool:

Sony Vaio PCG-C1F

B4 I forget – SSL XMMS

A while ago I put some effort into getting SSL support working with XMMS on Fedora Core 3, unfortunatley I didn’t get very far :(

Ages a go Dustin Kirkland was kind enough to help me out (he wrote an SSL patch for XMMS), but I never got a change to finish, Since this message has been flagged for follow up for soooooo long now, I thought it only fair to share what Dustin sent me, when (& if) I get this finished I’ll publish an rpm :cool: good luck !

———- message ———-
From: Dustin kirkland
Date: May 27, 2005 1:15 PM
Subject: Re: [Bug 1579] – Https / SSL support for streaming mp3 and ogg
To: “bugzilla-daemon@bugs.xmms.org”

Nick-

I, too, am running Fedora Core 3 and I also cannot build the version
straight out of CVS. I’ve tried a handful of different back- and
forward-level auto* tools and I still get problems with some of the
macros.

You can try this, though, as it did work on my FC3 system:

> cd /tmp
> wget http://www.xmms.org/files/1.2.x/xmms-1.2.10.tar.gz
> tar zxvf xmms-1.2.10.tar.gz
> cd xmms-1.2.10
> wget http://bugs.xmms.org/attachment.cgi?id=320&action=view
> patch -p1 < attachment.cgi\?id\=320

At this point, I have 1 minor hunk that fails. It's like 4 lines that
you can manually plop in. Take a look at Input/mpg123/mpg123.c.rej
and at the lines that start with + into Input/mpg123/mpg123.c. I
replaced lined 927 with:

#ifdef HTTP_SSL
if (strncasecmp(filename, "http:// " , 7 ) &&
strncasecmp(filename, "https://", 8 ))
#else
if (strncasecmp(filename, "http:// " , 7 ) )
#endif

> ./configure
> make
> make install

Hope that takes care of you. If anyone else figures out how to
extract from CVS and compile XMMS on FC3, I’m all ears. I asked this
question earlier on the mailing list and didn’t find a silver bullet:

http://lists.xmms.org/pipermail/xmms-devel/2005-January/002965.html

———- end of message ———-

thanks again Dustin