Sunday, April 22, 2007

Serial to USB converter


kernel configure options:
USB=m # USB subsystem
USB_SERIAL=m # USB serial port support
USB_SERIAL_GENERIC=m # USB serial port generic driver
USB_SERIAL_PL2303=m # USB serial port driver

menuconfig path:
- Device Drivers ->
-- USB Support ->
--- USB Serial Converter support ->
---- USB Generic Serial Driver
---- (hardware specific driver)
---- e.x. USB Prolific 2303 Single Port Serial Driver

lsmod Listing (modules loaded):
usbcore pl2303,usbserial,...
- usbserial pl2303

Minicom serial port settings:
Serial Device: /dev/ttyUSB0
Bps/Par/Bits: 9600 8N1
Hardware Flow Control: No
Software Flow Control: No

Saturday, April 14, 2007

iproute commands

iproute2 package

kernel configure options:


menuconfig path:
- Networking -->
-- Networking Support -->
--- Networking options -->
---- TCP/IP networking
----- IP: Advanced router
----- IP: policy routing
----- IP: equal cost multipath

Enable IP Forwarding
echo "1" > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter

(cmd subset)

Show hardware address

ip link
ip link [show|ls|list|sh]

Take an interface up/down
ip link set dev (device) up
ip link set (device) up
ip link set dev (device) down
ip link set (device) up

Change the MAC address of the interface
ip link set dev (device) address (arp address)

IP ADDRESS (cmd subset)

Show ip address
ip addr
ip addr [show|sh|list|ls]
ip addr show dev eth0 # show specific device

Show ip addresses (the old "ifconfig" way)
ifconfig -a

Assign IP address to interface
ip addr [add|a] (address)/(mask) dev (device)
ex: ip addr add dev eth0

Assign IP address to interface (the old "ifconfig" way)
ifconfig eth0 netmask

Remove IP address from interface
ip addr [delete|del|d] (address)/(mask) dev (device)
ex: ip addr del dev eth0

IP NEIGHBOR (cmd subset)

Show ip Layer 2 neighbors (arp table)
ip neigh

Show ip Layer 2 netighbors (the old "arp" way)
arp -a

Add new ARP mapping
ip neigh add dev eth0 lladdr (mac address)
ip neigh add dev eth0 lladdr (mac address) nud reachable

NUD Statuses
--permanent (perm) # administrative mapping
--noarp # neighbor valid but no attempt to rearp will be made
--reachable # neighbor entry valid until timeout
--stale # old arp entry

Remove ARP mapping
ip neigh del dev eth0

Flush arp table
ip neigh flush

(cmd subset)

Show ip routing tables

ip route

Show ip routing tabes (the old "route" way)

Add Static Route
ip route add (network)/(mask) via (ip to route through)
e.x. ip route add via
ip route add (network)/(mask) src INTERFACE_IP dev (device)
ip route add (network)/(mask) dev (device) protocol static

Add Static Route (old "route" method)
route add -net netmask dev eth0

Add Default Route
ip route add default via GATEWAY_IP

Add Default Route (old "route" method)
route add default gw

Del Route
ip route del

Delete all routes on an interface
ip route flush dev eth0

Saturday, April 07, 2007

Date Time Clocks

Setting the timezone:
ln -sf /usr/share/zoneinfo/your/zone /etc/localtime

Setting the timezone for a particular user:
export TZ=America/Chicago

Show time in a given timezone:
# relative to the /usr/share/zoneinfo/ directory
zdump Japan
zdump America/Chicago
zdump US/Central

# absolute path to zonefile
zdump /etc/localtime
zdump /usr/share/zoneinfo/America/Chicago

View date and time:
date --utc #universal time

Set the date and time:
date -s "16:15:00" # just the time
date -s "16:15:00 April 7, 2007" # date and time
date 040716552007.00 # the fields being

Verify connectivity with NTP server:
ntpdate -q

Several common time servers:

Manually use NTP to set time:
ntpdate -v # verbose output

Use NTPd to automatically set date and time:
/etc/init.d/ntpd start #ntpd must be installed, of course

Monitor NTPd:
ntpdc -p
ntpdc -p -n

Sunday, April 01, 2007

Fake RAID links

Wikipedia FakeRAID Def
Not transparent to the OS like real RAID. Not controlled entirely by the operating system either like softRAID. However, it uses hardware and needs an OS driver.

LINUX FakeRAID drivers

List of FaikRAID hardware devices/controllers

My MoBo

This Mobo uses the following kernel modules:
sata_nv: for the 4 nForce4 controllers

kernel configure option:

menconfig path:
- Device Drivers -->
-- Serial ATA (prod) and ... -->
--- ATA device support -->
---- NVIDIA SATA support
----- sata_sil: for the 4 Sillicon Image 3314 controllers

kernel configure option:

menuconfig path:
- Device Drivers -->
-- Serial ATA (prod) and ... -->
--- ATA device support -->
---- Silicon Image SATA support
----- ahci: generic Open standard (I don't have this, but worth a mention)

kernel configure option:

menuconfig path:
- Device Drivers -->
-- Serial ATA (prod) and ... -->
--- ATA device support -->
---- AHCI SATA support

Both of these modules depend on the module:

Libata depends on the following module:

kernel configure option:

menuconfig path:
- Device Drivers -->
-- SCSI device support -->
--- SCSI device support