Posts Tagged ‘routine’

Configuring shared network with DHCP

Monday, August 20th, 2012

Say you have a DHCP server in the LAN serving /24 network and one day you’re running out of IP addresses. You want to add additional /24 network that should be distributed in the same LAN. Ugly, but what to do.

According to man dhcpd.conf:

The shared-network statement is used to inform the DHCP server that some IP subnets actually share the same physical network. Any subnets in a shared network should be declared within a shared-network statement. Parameters specified in the shared-network statement will be used when booting clients on those subnets unless parameters provided at the subnet or host level override them. If any subnet in a shared network has addresses available for dynamic allocation, those addresses are collected into a common pool for that shared network and assigned to clients as needed. There is no way to distinguish on which subnet of a shared network a client should boot.

Here is how you add additional network to be included into DHCP scope. Done on Ubuntu 9.10 (karmic) and ISC DHCP v3.1.2.

  1. shared-network "officea01" {
  2.   option domain-name "officea01.domain.org";
  3.   option domain-name-servers 192.168.1.1;
  4.     subnet 192.168.1.0 netmask 255.255.255.0 {
  5.       authoritative;
  6.       option routers 192.168.1.1;
  7.       allow unknown-clients;
  8.       range 192.168.1.10 192.168.1.254;
  9.     }
  10.     subnet 192.168.2.0 netmask 255.255.255.0 {
  11.       authoritative;
  12.       option routers 192.168.1.1;
  13.       allow unknown-clients;
  14.       range 192.168.2.10 192.168.2.254;
  15.     }
  16.   }

Instructions below are not necessary, however I decided to add an alias to the LAN interface so I can see 192.168.2.0/24 addresses in the ARP table.

  1. ifconfig eth1:0 192.168.2.1 netmask 255.255.255.0 up

And to make it permanent edit /etc/network/interfaces:

  1. auto eth1:0
  2. iface eth1:0 inet static
  3. address 192.168.2.1
  4. netmask 255.255.255.0
  5. broadcast 192.168.2.255
  6. network 192.168.2.0

Opening OpenOffice (odt) files without OO installed

Wednesday, October 8th, 2008

Got odt file and don’t want to install OpenOffice just to open it? Here is a nice piece of software that could allow you to open, view and print odt files (and many more!). It’s called TextMaker Viewer and it’s free. Here is the current list of supported file formats:

.doc (Microsoft Word 6.0 up to Word 2007), .rtf (Rich Text Format), .dot (Microsoft Word templates 6.0 up to 2007), .psw (Pocket Word (Pocket PC)), .tmd (TextMaker 6.0 up to 2008, .pwd (Pocket Word (Handheld PC)), .odt (OpenDocument Text), .htm/html (HTML documents), .sxw (OpenOffice.org/StarOffice Text), .txt (Text files (DOS, Windows, Unicode, UTF-8)).

Niiiice!

How to disable IPv6 in Windows Vista

Friday, August 8th, 2008

Disabling IPv6 in Windows Vista could be done using one of the following methods. Both methods will disable IPv6 on all networks adapters, excluding IPv6 loopback interface (excluding tunnel as well if you follow the first approach).

(more…)

How to insert image into PDF file

Saturday, July 19th, 2008

Yesterday, I’ve been asked a question about how to insert an image into PDF file with Adobe Acrobat installed? Well, it came out that it’s not as straightforward as it supposes to be. Anyway, here we go.

(more…)

How to disable autorun in Windows XP

Wednesday, July 2nd, 2008

With all these nasty worms going wild nowadays disabling autorun becomes a must-have decision. It’s all mainly because of USB flash drives getting infected with bunch of stuff. Not a big deal for office environment because no one should have administrative rights, however, in a home environment, where PCs are usually shipped with admin rights granted by default, people get into a mess almost immediately. Anyways, here is what I do to disable autorun in AD environment.

(more…)

Dealing with Cannot delete file: Access is denied error

Wednesday, June 25th, 2008

This morning I’ve been fighting with “Cannot delete file: Access is denied” error under Vista Enterprise while trying to reinstall Adobe Acrobat 7.0 Professional. Don’t know what went wrong initially but activation get corrupted and Adobe was closing immediately after opening any pdf file. While trying to uninstall the package it failed to delete several dll files leaving Adobe half-removed. There was nothing wrong with permissions, nor I was able to trace by whom this dlls were locked. After googling and reading several similar cases on Adobe forum I came across to small piece of code which did the trick for me. The software is called Unlocker and it’s free. Try it – it worked for me, so I was finally able to delete and reinstall Adobe.