Saturday, December 26, 2009
Source Routing in Linux
For this we'll be using 'iproute2'.
The first file we'll be looking at is 'rt_tables' file. The default complete path for this file is,
'/etc/iproute2/rt_tables'.
Use your favorite editor (gedit, or vi editor) to edit this file. In this file you will see some default values, which are all commented. You will also see some number appearing in them.
The lower the value, the higher the precedence of these numbers will be.
Actually this file holds the name of the routing tables that should looked up for specific instances.
We'll create a routing table name 'my_routes'.
Add the following line to the 'rt_tables' file.
1 my_routes
The next step is to add routes to the table. For this we will use the 'ip route add ' command.
For example we'll say, for all traffic going to 192.168.12.0/24 the next hop is 192.168.12.254 and this entry belongs to the table 'my_routes'.
'ip route add 192.168.12.0/24 via 192.168.1.254 table my_routes'
To add a default route (say the default route is 10.0.0.254)
'ip route add default via 10.0.0.254 table my_routes'
The next step is to say for traffic with a specific source to look-up the table 'my_routes' for routing entries.
'ip rule add from 10.0.0.0/24 table my_routes'
To view the entries,
'ip route show tables'
'ip rule show'
That's it.
Happy Source Routing!!!!
Saturday, February 28, 2009
Virtual Private Networks (VPN)
The following features are needed for a well-designed VPN:
- Security
- Reliability
- Scalability
- Network and Policy Management
- Remote-Access VPN
- Site-to-Site VPN
- MPLS based VPN
These are also called Virtual Private Dial-up Networks (VPDN).
Tuesday, January 13, 2009
BIOS Beep Codes
When a computer is first turned on, or rebooted, its BIOS performs a power-on self test (POST) to test the system's hardware, checking to make sure that all of the system's hardware components are working properly. Under normal circumstances, the POST will display an error message; however, if the BIOS detects an error before it can access the video card, or if there is a problem with the video card, it will produce a series of beeps, and the pattern of the beeps indicates what kind of problem the BIOS has detected.
Here a few Beep codes are listed. Mainly for AMD motherboards, but also applicable to Intel systems too.
AMI Beep Codes
1 beep - DRAM refresh failure. There is a problem in the system memory or the motherboard.
2 beeps Memory parity error. The parity circuit is not working properly.
3 beeps - Base 64K RAM failure. There is a problem with the first 64K of system memory.
4 beeps - System timer not operational. There is problem with the timer(s) that control functions on the motherboard.
5 beeps - Processor failure. The system CPU has failed.
6 beeps - Gate A20/keyboard controller failure. The keyboard IC controller has failed, preventing gate A20 from switching the processor to protect mode.
7 beeps - Virtual mode exception error.
8 beeps - Video memory error. The BIOS cannot write to the frame buffer memory on the video card.
9 beeps - ROM checksum error. The BIOS ROM chip on the motherboard is likely faulty.
10 beeps - CMOS checksum error. Something on the motherboard is causing an error when trying to interact with the CMOS.
11 beeps - Bad cache memory. An error in the level 2 cache memory.
1 long beep, 2 short - Failure in the video system.
1 long beep, 3 short - A failure has been detected in memory above 64K.
1 long beep, 8 short - Display test failure.
Continuous beeping - A problem with the memory or video
Phoenix Beep Codes
Phoenix uses sequences of beeps to indicate problems. The "-" between each number below indicates a pause between each beep sequence. For example, 1-2-3 indicates one beep, followed by a pause and two beeps, followed by a pause and three beeps. Phoenix version before 4.x use 3-beep codes, while Phoenix versions starting with 4.x use 4-beep codes.
4-Beep Codes :
1-1-1-3 Faulty CPU/motherboard. Verify real mode.
1-1-2-1 Faulty CPU/motherboard.
1-1-2-3 Faulty motherboard or one of its components.
1-1-3-1 Faulty motherboard or one of its components. Initialize chipset registers with initial POST values.
1-1-3-2 Faulty motherboard or one of its components.
1-1-3-3 Faulty motherboard or one of its components. Initialize CPU registers.
1-1-3-2 Failure in the first 64K of memory.
1-1-3-3 Failure in the first 64K of memory.
1-1-3-4 Failure in the first 64K of memory.
1-1-4-1 Level 2 cache error.
1-1-4-3 I/O port error.
1-2-1-1 Power management error.
1-2-1-2 Faulty motherboard or one of its components.
1-2-1-3 Faulty motherboard or one of its components.
1-2-2-1 Keyboard controller failure.
1-2-2-3 BIOS ROM error.
1-2-3-1 System timer error.
1-2-3-3 DMA error.
1-2-4-1 IRQ controller error.
1-3-1-1 DRAM refresh error.
1-3-1-3 A20 gate failure.
1-3-2-1 Faulty motherboard or one of its components.
1-3-3-1 Extended memory error.
1-3-3-3 Error in first 1MB of system memory.
1-3-4-1 Error in first 1MB of system memory.
1-3-4-3 Error in first 1MB of system memory.
1-4-1-3 CPU error.
1-4-2-4 CPU error.
1-4-3-1 BIOS ROM shadow error.
2-1-4-1 BIOS ROM shadow error.
1-4-3-2 Level 2 cache error.
1-4-3-3 Level 2 cache error.
1-4-4-1 Faulty motherboard or one of its components.
1-4-4-2 Faulty motherboard or one of its components.
2-1-1-1 Faulty motherboard or one of its components.
2-1-1-3 IRQ failure.
2-1-2-1 IRQ failure.
2-1-2-3 BIOS ROM error.
2-1-2-4 I/O port failure.
2-1-3-2 I/O port failure.
2-1-3-1 Video system failure.
2-1-3-3 Video system failure.
2-1-1-3 IRQ failure.
2-1-2-1 IRQ failure.
2-1-2-3 BIOS ROM error.
2-1-2-4 I/O port failure.
2-1-4-3 Video card failure.
2-2-1-1 Video card failure.
2-2-1-3 Keyboard controller failure.
2-2-2-1 Keyboard controller failure.
2-2-2-3 Keyboard controller failure.
2-2-3-1 IRQ error.
2-2-4-1 Error in first 1MB of system memory.
2-3-1-1 Extended memory failure.
2-3-3-3 Extended memory failure.
2-3-2-1 Faulty motherboard or one of its components.
2-3-2-3 Level 2 cache error.
2-3-3-1 Level 2 cache error.
2-3-4-1 Motherboard or video card failure.
2-3-4-3 Motherboard or video card failure.
2-3-4-1 Motherboard or video card failure.
2-3-4-3 Motherboard or video card failure.
2-4-1-1 Motherboard or video card failure.
2-4-1-3 Faulty motherboard or one of its components.
2-4-2-1 RTC error.
2-4-2-3 Keyboard controller error.
2-4-4-1 IRQ error.
3-1-1-1 I/O port error.
3-1-1-3 I/O port error.
3-1-2-1 I/O port error.
3-1-2-3 I/O port error.
3-1-3-1 Faulty motherboard or one of its components.
3-1-3-3 Faulty motherboard or one of its components.
3-1-4-1 Floppy drive or hard drive failure.
3-2-1-1 Floppy drive or hard drive failure.
3-2-1-2 Floppy drive or hard drive failure.
3-2-1-3 Faulty motherboard or one of its components.
3-2-2-1 Keyboard controller error.
3-2-2-3 Faulty motherboard or one of its components.
3-2-3-1 Faulty motherboard or one of its components.
3-2-4-1 Faulty motherboard or one of its components.
3-2-4-3 IRQ error.
3-3-1-1 RTC error.
3-3-1-3 Key lock error.
3-3-3-3 Faulty motherboard or one of its components.
3-3-4-1 Faulty motherboard or one of its components.
3-3-4-3 Faulty motherboard or one of its components.
3-4-1-1 Faulty motherboard or one of its components.
3-4-1-3 Faulty motherboard or one of its components.
3-4-2-1 Faulty motherboard or one of its components.
3-4-2-3 Faulty motherboard or one of its components.
3-4-3-1 Faulty motherboard or one of its components.
3-4-4-1 Faulty motherboard or one of its components.
3-4-4-4 Faulty motherboard or one of its components.
4-1-1-1 Floppy drive or hard drive failure.
4-2-1-1 IRQ failure.
4-2-1-3 IRQ failure.
4-2-2-1 IRQ failure.
4-2-2-3 Faulty motherboard or one of its components.
4-2-3-1 Faulty motherboard or one of its components.
4-2-3-3 Faulty motherboard or one of its components.
4-2-4-1 Faulty motherboard or one of its components.
4-2-4-3 Keyboard controller error.
4-3-1-3 Faulty motherboard or one of its components.
4-3-1-4 Faulty motherboard or one of its components.
4-3-2-1 Faulty motherboard or one of its components.
4-3-2-2 Faulty motherboard or one of its components.
4-3-3-1 Faulty motherboard or one of its components.
4-3-4-1 Faulty motherboard or one of its components.
4-3-4-3 Faulty motherboard or one of its components.
4-3-3-2 IRQ failure.
4-3-3-4 IRQ failure.
4-3-3-3 Floppy drive or hard drive failure.
4-3-4-2 Floppy drive or hard drive failure.
3-Beep Codes
1-1-2 Faulty CPU/motherboard.
1-1-3 Faulty motherboard/CMOS read-write failure.
1-1-4 Faulty BIOS/BIOS ROM checksum error.
1-2-1 System timer not operational. There is a problem with the timer(s) that control functions on the motherboard.
1-2-2 Faulty motherboard/DMA failure.
1-2-3 Faulty motherboard/DMA failure.
1-3-1 Memory refresh failure.
1-3-2 Failure in the first 64K of memory.
1-3-3 Failure in the first 64K of memory.
1-3-4 Failure in the first 64K of memory.
1-4-1 Address line failure.
1-4-2 Parity RAM failure.
1-4-3 Timer failure.
1-4-4 NMI port failure.
2-_-_ Any combination of beeps after 2 indicates a failure in the first 64K of memory.
3-1-1 Master DMA failure.
3-1-2 Slave DMA failure.
3-1-3 Interrupt controller failure.
3-1-4 Interrupt controller failure.
3-2-4 Keyboard controller failure.
3-3-1 CMOS error.
3-3-2 CMOS error.
3-3-4 Video card failure.
3-4-1 Video card failure.
4-2-1 Timer failure.
4-2-2 CMOS shutdown failure.
4-2-3 Gate A20 failure.
4-2-4 Unexpected interrupt in protected mode.
4-3-1 RAM test failure.
4-3-3 Timer failure.
4-3-4 Time of day clock failure.
4-4-1 Serial port failure.
4-4-2 Parallel port failure.
4-4-3 Math coprocessor.
Friday, January 9, 2009
Telephone Ring Detection
On-hook - 40 – 50 VDC (usually 48V)
Off-hook - 4 – 6 VDC (usually 5V)
Ringing - 90 – 100 VAC
As for the literature the ring detection circuit used in modems is as follows.
The purpose of the two Zener diodes is to avoid detection of small AC transients as ringing. The capacitor used here will block the DC and allow only the AC ringing signal to pass. The diode used in parallel with the photo diode in the opto-isolator is to protect photo diode being damaged by the reverse current.
The frequency of the AC ringing signal is usually 20 – 40 Hz. The transistor in the opto-isollator can be used as a switch. If you connect an LED to see how the switching occurs, you can witness that the LED blinks in either positive or negative half of the ringing signal. If you are planning to get the ringing signal as a logic signal this is not desirable.
To get the ringing signal as a logic signal we can use a full-bridge rectifier circuit to rectify the AC ringing signal.
Lifting the receiver or going off-hook
After detecting the ringing, most of us need our circuitry to answer the call in order carry out further processing like detecting the DTMF entered.
Usually when we lift the receiver the two telephone lines are connected thus closing the loop. When the loop is closed a current around 40mA flows in the line. The Central Office (CO) senses this current.
The standard impedance of a telephone when off-hook is 680 ohms. Hanging a 680 ohms resistor across the telephone line will drop the voltage from 48 V to about 5 V. This will cause the line to go active.