пятница, 14 октября 2011 г.

хокку

вчера зайдя ко мне без спроса
 разбив окно и выпив джин
 аркадий кончился как личность
 и начался как пидарас

илья старается скорее
 уравновесить зло добром
 увидел парни бьют мальчишку
 красиво рядом станцевал

давайте трахаться почаще
 кричал на площади илья
 а люди шли не глядя мимо
 но каждый думал а давай

олег за всё берётся смело
 всё превращается в говно
 а если за говно берётся
 то просто тратит меньше сил

висит на сцене в первом акте
 бензопила ведро и ёж
 заинтригован станиславский
 боится выйти в туалет

вы так мне отказали в сексе
 как будто он у вас один
 как будто он у вас последний
 и просто кончится на мне

геннадий был метафоричен
 когда он говорил пиздец
 то это значило какао
 или сегодня будет дождь

включаю плёнку задним ходом
 и всё стараюсь рассмотреть
 момент где мерзкая скотина
 опять становится тобой

я никогда не спал с мужчиной
 ну то есть нет конечно спал
 но просто спал вобще без секса
 ну то есть что считать за секс

семен задумался о жызни
 грустит и пъёт десятый день
 а николай веселый ходит
 все время думает про смерть

искусствоведов группа тихо
 восторженно глядит на холст
 и вдруг один седой и строгий
 отчетливо сказал говно

зарой меня под абрикосом
 я буду плакать и просить
 не зарывай меня не надо
 и ты тогда не зарывай

купил айфон а чо с ним делать
 где кнопки чтобы нажимать
 и как мне позвонить сереге
 а вот и он звонит и чо

олег не любит николая
 он так ему и говорит
 ты сука грязный извращенец
 я не люблю тебя прости

когда я стал половозрелый
 то женщин сразу поделил
 на тех которых недостоин
 и тех которых не хочу

ты рассказал мне просто правду
 а я ужасную хочу
 такую чтобы обосраться
 завыть забиться захрипеть

олегу голос из розетки
 позволил убивать людей
 олег включает телевизор
 запоминает имена

не так уж много мне и надо
 готовь еду стирай бельё
 не отвлекай когда я занят
 и никогда не умирай

исус спросил у николая
 чего ты хочешь человек
 проходит день неделя месяц
 а николай всё говорит

Бесконечный цикл на bash

while true; do ./my_scripts; sleep 10; done;

воскресенье, 18 сентября 2011 г.

четверг, 15 сентября 2011 г.

Моторные масла и эксплуатационные жидкости, рекомендованные Peugeot.

Peugeot рекомендует TOTAL

Масла на синтетической основе должны соответствовать классам не ниже указанных в стандартах ACEA A3/B3 и API SL/CF

Заправочная емкость (включая масленый фильтр):
Двигатель 1.1 – 3,4 литра
Двигатель 1.4 – 3,25 литра
Двигатель 1.6 – 3,2 литра
Двигатель 1.6 16 V – 3,4 литра
Двигатель 2.0 16 V – 5,3 литра
Двигатель 1.4 HDI – 3,8 литра
Двигатель 1.6 HDI – 3,85 литра

Разница между отметками "min" и "max" составляет 1,0 литр

Коробка передач:
механическая Total Transmission BV 75W80-PR 9730.A2
объем:
дв. 1.1, 1.4, 1.6 - 2,0 литра
дв. 2.0 - 1,9 литра
автоматическая 4HP20-AL4-PR 9736.22
замена - 4,5 литра
полный объем - 6,0 литра

Гидроусилитель руля Total Fluide AT42-PR 9730.A6
примерно 1,0 литра

Тормозная жидкость Peugeot DOT4
объем - ??? литра

Охлаждающая жидкость Procor TM108/Glysantin G33 или Revkogel 2000
дв. 1.1, 1.4, 1.6 8V - 7.0 литра
дв. 1.6 16V - 6,2 литра
дв. 2.0 - 5,3 литра

G-30, Глисантин, он же REVKOGEL 2000 можно приобрести у официалов по Пежо или в Exist.ua
каталожные номера:
2 литра 9735.K1
5 литров 9735.K0

понедельник, 15 августа 2011 г.

Как заблокировать Skype в Cisco IOS.

Начиная с IOS версии 12.4 (4) в Cisco стало возможным блокировать Skype. Для этого нужно создать простое правило. Также можно блокировать другие p2p приложения.
Пример:

class−map match−any p2p
match protocol skype
policy−map block−p2p
class p2p 
drop

int FastEthernet0
description PIX−facing interface
service−policy input block−p2p
Если вы хотите посмотреть какие протоколы съедают ваш канал, то можно добавить в конфиг настройку:
ip nbar protocol-discovery
И потом смотреть с разбивкой по протоколам, какой тип трафика преобладает:
show ip nbar protocol-discovery stats bit-rate top-n 10
Так же можно посмотреть какие порты используют протоколы:
ip nbar port-map protocol-name [tcp | udp] port-number
 
 
via http://sysadminblog.ru 

воскресенье, 3 июля 2011 г.

Как заставить Linux перезагрузиться при возникновении panic ошибки?

Для этого достаточно задать параметр kernel.panic в файле /etc/sysctl.conf и применить изменения. При установке данного параметра в нулевое значение перезагрузки при panic происходить не будет, при установке в любое положительное значение (строго больше нуля) будет происходить перезагрузка через заданное количество секунд.

Итого, добавляем в файл /etc/sysctl.conf строку
kernel.panic = 15
После этого применяем изменения:
sysctl -p

пятница, 3 июня 2011 г.

Secret MIB's & Secret way to upgrade cable modem via BITFILE

The following text was compiled by
Dshocker (of TCNISO)


Look down at the bottom you will see secret MIB's for the modems.
Like getting and setting your modem cert... Dshocker

Well here it is everything you will need for you're modem
You can upgrade modem firmware do what ever, Read the Read me.
Under this text because if you don't I will not help you.
Hope you have fun
Dshocker

PS: for each modem if you wanna use it on Sb5100.
You name the bitfile SB5100.bit SB4100, SB4100.bit, SBG900,
SBG900.bit etc...

Officially Released by Dshocker

18a. Factory Mode

Before I talk about bit files I should explain what factory mode is:

Factory mode, when enabled, gives you access via SNMP to the factory MIB.
The factory MIB is a list of OID's, each OID having a unique function.
Here is a very small list of things you can do remote via SNMP when in, factory mode,
" get/set the HFC, Ethernet and USB MAC addresses.
" get/set the modem serial number.
" get/set the modem cert.'s (cm, vendor, and secure code).
" ping IP address'.
" execute shell commands
" execute injected code (see cmFactoryBCMGroup 'CommandType, AddressOrOpcode, ByteCount and Data')

18b. Bit Files
The bit file method works on firmware 0.4.5.0 and up on SB3100, SB4100, SB4101
And, SB4200.
And on any SB5100, SB5101 and SBG900.

The bitfile method works like this.
1) Using SNMP you set the OID 1.3.6.1.4.1.1166.1.19.3.1.18.0 to the interger.
The value of your HFC MAC address. (Calc.exe)
2) The modem then TFTP gets a 'bitfile' from 192.168.100.10
4100 modem will TFTP get SB4100.bit, and 4200 modem will TFTP get SB4200.bit

3) If the bit file is the correct size and contains the exact sequence of, bytes, then factory mode is enabled and the modem reboots!

4) When the modem reboots you have full access to all the factory MIB and OID's, within it.

NOTE: Factory mode will stay enabled until you turn it off by setting
1.3.6.1.4.1.1166.1.19.4.29.0 to integer 1 and reboot the modem!

Sorry no source code for you :P - a compiled bitfile is in the rar.

18c. Enable Factory MIB
This tutorial will show you how to enable the factory MIB on a modem and change the
MAC and serial, via SNMP

1) Put the .bit file into your TFTP server's directory.

2) Use SNMP to set the OID 1.3.6.1.4.1.1166.1.19.3.1.18.0 to the decimal of your HFC MAC address
Example: snmpset -v2c -c public 192.168.100.1 1.3.6.1.4.1.1166.1.19.3.1.18.0 i
12345678
The modem will now get the bit file and if it's correct it will enable factory mode and reboot!
Once the modem is rebooted....

3) You can now set the OID 1.3.6.1.4.1.1166.1.19.4.3.0 to your NEW ETHERNET MAC address
Example: snmpset -v2c -c public 192.168.100.1 1.3.6.1.4.1.1166.1.19.4.3.0 s
"12:34:56:78:9a:00"

4) You can now set the OID 1.3.6.1.4.1.1166.1.19.4.4.0 to your NEW HFC MAC address.
Example: snmpset -v2c -c public 192.168.100.1 1.3.6.1.4.1.1166.1.19.4.4.0 s
"12:34:56:78:9a:0a"

5) You can now set the OID 1.3.6.1.4.1.1166.1.19.4.6.0 to your NEW SERIAL NUMBER.
Example: snmpset -v2c -c public 192.168.100.1 1.3.6.1.4.1.1166.1.19.4.6.0 s
"12345678901234567890"

6) To finish up disable the factory MIB by setting the OID
1.3.6.1.4.1.1166.1.19.4.29.0 to int 1
Example: snmpset -v2c -c public 192.168.100.1 1.3.6.1.4.1.1166.1.19.4.29.0 i

Now reboot your modem and all is done.

18d. Factory mode OID list for Motorola cable modems
AKA FACTORY MIB's for Factory mode
This list is generic among Motorola cable modems
SB3100, SB4100, SB4101, SB4200, SB4220, SB5100, SB5101, SBG900 and probably more, HOWEVER some OID's will not exist on some modems, E.g. (cmFactoryBCMGroup oid's)
To execute code, only exist in SB5100, SB5101 and SBG900)

cmPrivateArpFilterGroup
1.3.6.1.4.1.1166.1.19.2
1.3.6.1.4.1.1166.1.19.2.1.0 cmArpFilterEnabled
1.3.6.1.4.1.1166.1.19.2.2.0 cmArpFilterInterval
1.3.6.1.4.1.1166.1.19.2.3.0 cmArpFilterLimit
1.3.6.1.4.1.1166.1.19.2.4.0 cmArpFilterInArps
1.3.6.1.4.1.1166.1.19.2.5.0 cmArpFilterOutArps
1.3.6.1.4.1.1166.1.19.2.6.0 cmArpFilterInArpsThisFilter

cmConfigPrivateBaseGroup
1.3.6.1.4.1.1166.1.19.3
cmConfigFreqObjectsGroup
1.3.6.1.4.1.1166.1.19.3.1
1.3.6.1.4.1.1166.1.19.3.1.1.0 cmConfigFreq1
1.3.6.1.4.1.1166.1.19.3.1.2.0 cmConfigFreq2
1.3.6.1.4.1.1166.1.19.3.1.3.0 cmConfigFreq3
1.3.6.1.4.1.1166.1.19.3.1.8.0 cmFreqPlanType
1.3.6.1.4.1.1166.1.19.3.1.11.0 cmUpstreamChannelId1
1.3.6.1.4.1.1166.1.19.3.1.12.0 cmCarrierFrequencyOffset
1.3.6.1.4.1.1166.1.19.3.1.14.0 cmSnmpHFCPort
1.3.6.1.4.1.1166.1.19.3.1.15.0 cmSnmpHFCTrapPort
1.3.6.1.4.1.1166.1.19.3.1.17.0 cmSnmpDisplayHtml
1.3.6.1.4.1.1166.1.19.3.1.18.0 cmResetToDefaults
1.3.6.1.4.1.1166.1.19.3.1.19.0 cmStandbyMode
1.3.6.1.4.1.1166.1.19.3.1.20.0 cmHybridMode
1.3.6.1.4.1.1166.1.19.3.1.21.0 cmUpstreamChannelId3
1.3.6.1.4.1.1166.1.19.3.1.22.0 cmUpstreamPower1
1.3.6.1.4.1.1166.1.19.3.1.23.0 cmUpstreamPower2
1.3.6.1.4.1.1166.1.19.3.1.24.0 cmUpstreamPower3
1.3.6.1.4.1.1166.1.19.3.1.25.0 cmDocsis20Capable
1.3.6.1.4.1.1166.1.19.3.1.26.0 cmUpstreamChannelId2

cmPrivateFactoryGroup
1.3.6.1.4.1.1166.1.19.4
1.3.6.1.4.1.1166.1.19.4.1.0 cmFactoryVersion
1.3.6.1.4.1.1166.1.19.4.2.0 cmFactoryDbgBootEnable
1.3.6.1.4.1.1166.1.19.4.3.0 cmFactoryEnetMacAddr
1.3.6.1.4.1.1166.1.19.4.4.0 cmFactoryHfcMacAddr
1.3.6.1.4.1.1166.1.19.4.6.0 cmFactorySerialNumber
1.3.6.1.4.1.1166.1.19.4.9.0 cmFactoryClearFreq1
1.3.6.1.4.1.1166.1.19.4.10.0 cmFactoryClearFreq2
1.3.6.1.4.1.1166.1.19.4.11.0 cmFactoryClearFreq3
1.3.6.1.4.1.1166.1.19.4.12.0 cmFactorySetReset
1.3.6.1.4.1.1166.1.19.4.13.0 cmFactoryClrConfigAndLog
1.3.6.1.4.1.1166.1.19.4.14.0 cmFactoryPingIpAddr
1.3.6.1.4.1.1166.1.19.4.15.0 cmFactoryPingNumPkts
1.3.6.1.4.1.1166.1.19.4.16.0 cmFactoryPingNow
1.3.6.1.4.1.1166.1.19.4.17.0 cmFactoryPingCount
1.3.6.1.4.1.1166.1.19.4.28.0 cmFactoryCliFlag
1.3.6.1.4.1.1166.1.19.4.29.0 cmFactoryDisableMib
1.3.6.1.4.1.1166.1.19.4.30.0 cmFactoryUpstreamPowerCalibration1
1.3.6.1.4.1.1166.1.19.4.50.0 cmFactoryBigRSAPublicKey
1.3.6.1.4.1.1166.1.19.4.51.0 cmFactoryBigRSAPrivateKey
1.3.6.1.4.1.1166.1.19.4.52.0 cmFactoryCMCertificate
1.3.6.1.4.1.1166.1.19.4.53.0 cmFactoryManCertificate
1.3.6.1.4.1.1166.1.19.4.54.0 cmFactoryRootPublicKey
1.3.6.1.4.1.1166.1.19.4.55.0 cmFactoryCodeSigningTime
1.3.6.1.4.1.1166.1.19.4.56.0 cmFactoryCVCValidityStartTime
1.3.6.1.4.1.1166.1.19.4.58.0 cmFactoryCMManufacturerName
1.3.6.1.4.1.1166.1.19.4.59.0 cmFactoryHtmlReadOnly
1.3.6.1.4.1.1166.1.19.4.60.0 cmFactoryCmUsbMacAddr
1.3.6.1.4.1.1166.1.19.4.61.0 cmFactoryCpeUsbMacAddr
1.3.6.1.4.1.1166.1.19.4.62.0 cmFactoryCmAuxMacAddr
1.3.6.1.4.1.1166.1.19.4.63.0 cmFactoryTunerId
1.3.6.1.4.1.1166.1.19.4.64.0 cmFactoryHwRevision
1.3.6.1.4.1.1166.1.19.4.65.0 cmFactoryUsAmpId
1.3.6.1.4.1.1166.1.19.4.66.0 cmFactory80211RegDomain
1.3.6.1.4.1.1166.1.19.4.67.0 cmFactoryResidentialGatewayEnable
1.3.6.1.4.1.1166.1.19.4.70.0 cmFactoryFWFeatureID
1.3.6.1.4.1.1166.1.19.4.90.0 cmFactorySwServer
1.3.6.1.4.1.1166.1.19.4.91.0 cmFactorySwFilename
1.3.6.1.4.1.1166.1.19.4.92.0 cmFactorySwDownloadNow
1.3.6.1.4.1.1166.1.19.4.93.0 cmFactoryGwAppPublicKey
1.3.6.1.4.1.1166.1.19.4.94.0 cmFactoryGwAppPrivateKey
1.3.6.1.4.1.1166.1.19.4.95.0 cmFactoryGwAppRootPublicKey
1.3.6.1.4.1.1166.1.19.4.31 cmFactoryDownstreamCalibrationGroup
1.3.6.1.4.1.1166.1.19.4.31.1.0 cmFactorySuspendStartup
1.3.6.1.4.1.1166.1.19.4.31.2.0 cmFactoryDownstreamFrequency
1.3.6.1.4.1.1166.1.19.4.31.3.0 cmFactoryDownstreamAcquire
1.3.6.1.4.1.1166.1.19.4.31.4.0 cmFactoryTunerAGC
1.3.6.1.4.1.1166.1.19.4.31.5.0 cmFactoryIfAGC
1.3.6.1.4.1.1166.1.19.4.31.6.0 cmFactoryQamLock
1.3.6.1.4.1.1166.1.19.4.31.7.0 cmFactoryDownstreamCalibrationTableMaxSum
1.3.6.1.4.1.1166.1.19.4.31.8.0 cmFactoryDownstreamCalibrationTableMinSum
1.3.6.1.4.1.1166.1.19.4.31.9.0 cmFactoryTop
1.3.6.1.4.1.1166.1.19.4.31.10.0 cmFactoryDownstreamCalibrationOffset
1.3.6.1.4.1.1166.1.19.4.31.100 cmFactoryCalibrationEntry
1.3.6.1.4.1.1166.1.19.4.31.100.1.1 cmFrequencyCalibrationIndex
1.3.6.1.4.1.1166.1.19.4.31.100.1.2 cmFactoryCalibrationFrequencyData

cmFactoryBCMGroup
1.3.6.1.4.1.1166.1.19.4.32
1.3.6.1.4.1.1166.1.19.4.32.1.0 cmFactoryBCMCommandType
1.3.6.1.4.1.1166.1.19.4.32.2.0 cmFactoryBCMAddressOrOpcode
1.3.6.1.4.1.1166.1.19.4.32.3.0 cmFactoryBCMByteCount
1.3.6.1.4.1.1166.1.19.4.32.4.0 cmFactoryBCMData

cmRegPrivateGroup
1.3.6.1.4.1.1166.1.19.5

cmStatsGroup
1.3.6.1.4.1.1166.1.19.9
cmStatsObjectsGroup
1.3.6.1.4.1.1166.1.19.9.1
1.3.6.1.4.1.1166.1.19.9.1.5.0 cmResetIfCmStatusCounters
1.3.6.1.4.1.1166.1.19.9.1.6.0 cmResetCMSignalQualityCounters
1.3.6.1.4.1.1166.1.19.9.1.7.0 cmQam256PowerFactorTableVersion

cmTftpConfigPrivateGroup
1.3.6.1.4.1.1166.1.19.6
1.3.6.1.4.1.1166.1.19.6.1
1.3.6.1.4.1.1166.1.19.6.1.1.1 cmCfgClassId
1.3.6.1.4.1.1166.1.19.6.1.1.2 cmCfgMaxDsRate
1.3.6.1.4.1.1166.1.19.6.1.1.3 cmCfgMaxUsRate
1.3.6.1.4.1.1166.1.19.6.1.1.4 cmCfgUsChannelPriority
1.3.6.1.4.1.1166.1.19.6.1.1.5 cmCfgMinUsDataRate
1.3.6.1.4.1.1166.1.19.6.1.1.6 cmCfgMaxUsChannelXmitBurst
1.3.6.1.4.1.1166.1.19.6.1.1.7 cmCfgCovPrivacyEnable

cmCfgBpiTimeOutGroup
1.3.6.1.4.1.1166.1.19.6.2
1.3.6.1.4.1.1166.1.19.6.2.1.0 cmCfgAuthorWaitTimeOut
1.3.6.1.4.1.1166.1.19.6.2.2.0 cmCfgReauthorWaitTimeOut
1.3.6.1.4.1.1166.1.19.6.2.3.0 cmCfgAuthorGraceTime
1.3.6.1.4.1.1166.1.19.6.2.4.0 cmCfgOperWaitTimeOut
1.3.6.1.4.1.1166.1.19.6.2.5.0 cmCfgRekeyWaitTimeOut
1.3.6.1.4.1.1166.1.19.6.2.6.0 cmCfgTekGraceTime
1.3.6.1.4.1.1166.1.19.6.2.7.0 cmCfgAuthorRejectWaitTimeOut

cmOtherConfigGroup
1.3.6.1.4.1.1166.1.19.6.3
1.3.6.1.4.1.1166.1.19.6.3.1.0 cmCfgDsFreq
1.3.6.1.4.1.1166.1.19.6.3.2.0 cmCfgUsChannelId
1.3.6.1.4.1.1166.1.19.6.3.3.0 cmCfgNetAccessCtrl
1.3.6.1.4.1.1166.1.19.6.3.4.0 cmCfgSoftUpgradeFile
1.3.6.1.4.1.1166.1.19.6.3.5.0 cmCfgTotalSnmpWriteAccessCtrl
1.3.6.1.4.1.1166.1.19.6.3.6.0 cmCfgTotalSnmpMibObj
1.3.6.1.4.1.1166.1.19.6.3.7.0 cmCfgVendorId
1.3.6.1.4.1.1166.1.19.6.3.8.0 cmCfgVendorSpecific
1.3.6.1.4.1.1166.1.19.6.3.9.0 cmCfgModemCapabilities
1.3.6.1.4.1.1166.1.19.6.3.10.0 cmCfgModemIp
1.3.6.1.4.1.1166.1.19.6.3.11.0 cmCfgTotalEthernetMacAddrs
1.3.6.1.4.1.1166.1.19.6.3.12.0 cmCfgEthernetMacAddrs
1.3.6.1.4.1.1166.1.19.6.3.13.0 cmCfgTelcoSetting
1.3.6.1.4.1.1166.1.19.6.3.14.0 cmCfgSnmpIpAddr
1.3.6.1.4.1.1166.1.19.6.3.15.0 cmCfgMaxCpe
1.3.6.1.4.1.1166.1.19.6.3.16.0 cmCfgTftpServerTimeStamp
1.3.6.1.4.1.1166.1.19.6.3.17.0 cmCfgTftpServerProvModAddr
1.3.6.1.4.1.1166.1.19.6.3.18.0 cmCfgUuFlashParms
1.3.6.1.4.1.1166.1.19.6.3.19.0 cmCfgMulticastPromiscuous
1.3.6.1.4.1.1166.1.19.6.3.20.0

cmDhcpGroup
1.3.6.1.4.1.1166.1.19.10

cmDhcpObjectsGroup
1.3.6.1.4.1.1166.1.19.10.1

1.3.6.1.4.1.1166.1.21.1 cmTrapObjectValueChange
1.3.6.1.4.1.1166.1.21.62.1 ?
1.3.6.1.4.1.1166.1.21.62.2 ?
1.3.6.1.4.1.1166.1.21.62.3 ?
1.3.6.1.4.1.1166.1.21.62.4 ?
1.3.6.1.4.1.1166.1.21.2 cmTrapLog
1.3.6.1.4.1.1166.1.21.62.5 ?
1.3.6.1.4.1.1166.1.21.62.6

понедельник, 16 мая 2011 г.

Скорость в обратном канале.


Символьные и битовые скорости при использовании A-TDMA в зависимости от ширины канала и схемы модуляции.
Символьная
скорость
(кбод)
Ширина
канала
(кГц)
битовая скорость (кбит/с)
QPSKQAM
8
QAM
16
QAM
32
QAM
64
160200320480640800960
320400640960128016001920
64080012801920256032003840
1280160025603840512064007680
2560320051207680102401280015360
512064001024015360204802560030720


Символьные и битовые скорости в зависимости от ширины канала, схемы модуляции и наличия треллистного кодирования при использовании S-CDMA.
Символьная
скорость
(кбод)
ширина
канала
(кГц)
скорость передачи (кбит/с)
QPSKQAM
8
QAM
16
QAM
32
QAM
64
QAM
128
1280160025603840 640064007680-
1280
(Тр. код)
1600128025605120512064007680
2560320051207680128001280015360
2560
(Тр.код.)
32002560512010240102401280015360
512064001024015360256002560030720
5120
(Тр.код)
640051201024020480204802560030720

Micro-reflections

What are micro-reflections?
A phenomenon that has been observed on many upstream links is micro-reflections. Micro-reflections are caused by impedance mismatches at both the source and load in a transmission line, and they create many small reflections between devices in the coaxial plant, such as between amplifiers and taps, or between power inserters and splitters, or between taps etc.
Micro-reflections were predicted on the downstream path, but were relatively benign because the high attenuation of the downstream cable damps out the reflections between devices. In the upstream however, the cable loss is so low that the micro-reflections have become an observable phenomena as well as a problem. If the vector diagram of Figure 1 were showing micro-reflections, the vector sum would comprise several smaller echoes, each with a different magnitude and rate of rotation with frequency.
Linear distortion is a problem for digital transmissions because it creates a problem called inter-symbol interference (or ISI). Figure 2 is a plot of two symbols that were transmitted one symbol period apart. The first symbol goes positive, and the second goes negative. The plot axes are voltage versus time.
Normally, on an oscilloscope you would see only one trace, but the single trace has been decomposed to show the two individual symbols. The symbols are sin(x)/(x) waveforms (impulse response of a “brick wall” filter), and the timing ticks at the top of the plot show the correct sampling times. Small circles on the plot also note correct sampling time.
Note that the first symbol component hits a positive peak just to the left of center, and the second symbol peak hits a negative peak just to the right of center, as noted by “x.” Observe that while any symbol is going through a peak, the other symbol is going through zero. If the channel has linear distortion, the waveforms will be “smeared” and no longer cross through zero at the sampling instant. A composite plot of many symbols that have been laid one atop the other is called an “eye” diagram, and will be described in detail later. A measure of inter-symbol interference is modulation error ratio (MER), which is a combination of linear distortions plus any additive interference, such as random noise or ingress, in the channel. MER also will be described in detail later.
A good place to observe echoes is on a magnitude plot. An echo’s amplitude can be calculated from the peak-to-peak excursions in the magnitude response that are caused by the echo. As an example, if the amplitude varies by plus and minus 7 percent, the peak-to-valley ripple will be 20*log(1.07/0.93)= 1.22 dB. The echo is down 20*log(.07)=23.09 dB relative to a carrier. One problem with observing echoes is that many conventional sweep systems have a frequency resolution that is much too coarse to display ripple.

понедельник, 2 мая 2011 г.

Как ускорить Firefox 4

Как ускорить Firefox 4

Скорость работы в интернете зависит не только от скорости подключения к сети, а еще и от возможностей браузера. В этом материале представлены советы по оптимальной настройке Firefox 4, собранные сотрудниками lifehacker.ru, чтобы доступ к ресурсам всемирной паутины был наиболее быстрым.
1.    Базовая тема
Пользователи Firefox могут менять внешний вид и оформление браузера. Но наилучшую скорость работы обеспечивает именно базовая тема. Поэтому если пользователь хочет получить максимальную скорость при работе в сети, то ему лучше не менять внешность программной оболочки.
2.    Анимация вкладок
В новой версии браузера разработчике существенное внимание уделили его оформлению. К примеру, анимация при открытии и закрытии вкладок выглядит эффектно, но может замедлять работу программы. Отключить анимацию можно следующим образом:
  • ввести в адресной строке about:config;
  • в поле Фильтр набрать browser.tabs.animate;
  • дважды клацнуть мышью в поле «Значение», чтобы поменять его на false:
3.    Количество запросов
Интернет-протокол IPv4, который сейчас используется для объедения ресурсов в сеть, позволяет отправлять на сервер несколько запросов одновременно. Это позволяет быстрее загружать страницы, но по умолчанию данная возможность отключена, поскольку некоторые ресурсы могут неадекватно реагировать на множественные запросы. Чтобы увеличить число запросов, пользователю необходимо проделать следующие манипуляции:
  • ввести about:config в адресную строку;
  • в поле Фильтр набрать network.http.pipelining. Появятся три записи, две из них надо изменить;
  • двойным щелчком на строке network.http.pipelining поменять значение на true;
  • в строке network.http.pipelining.maxrequests, в окне с полем для ввода, ввести число от 8 до 12:
4.    Отрисовка страниц
По умолчанию браузер начинает отображать страницу, лишь загрузив определенную часть данных. Особенно заметно это при использовании низкоскоростного подключения. Чтобы заставить Firefox 4 отображать страницу непрерывно по мере ее загрузки, необходимо сделать следующее:
  • ввести about:config в адресную строку;
  • правой кнопкой мыши нажать в любом пустом месте;
  • в открывшемся контекстном меню выбрать «Создать/Целое»;
  • ввести nglayout.initialpaint.delay и значение 0:
5.    Дополнения
«Чистый» Firefox 4 сравнительно быстро открывается и выполняет основные функции. Но любое установленное дополнение существенно замедляет его. Так, разработчики даже создали топ-9 дополнений, которые больше всего влияют на скорость работы браузера:
Поэтому если пользователю критична скорость работы, то ему следует отключить те дополнения, которыми он не пользуется или может «пожертвовать» ради скорости работы.
6.    Блокировщики
Несмотря на то, что дополнения к браузеру  замедляют его работу, некоторые могут существенно ускорить загрузку страниц. Например, Adblock Plus и NoScript, которые блокируют загрузку некоторых баннеров и скриптов сторонних сайтов.
Изображение: pctweak.tk

Photo editor online

пятница, 22 апреля 2011 г.

Удаленный рабочий стол

LACP FreeBSD

31.6 Link Aggregation and Failover

Written by Andrew Thompson.

31.6.1 Introduction

The lagg(4) interface allows aggregation of multiple network interfaces as one virtual interface for the purpose of providing fault-tolerance and high-speed links.

31.6.2 Operating Modes


Failover
Sends and receives traffic only through the master port. If the master port becomes unavailable, the next active port is used. The first interface added is the master port; any interfaces added after that are used as failover devices.
Cisco® Fast EtherChannel®
Cisco Fast EtherChannel (FEC), is a static setup and does not negotiate aggregation with the peer or exchange frames to monitor the link. If the switch supports LACP then that should be used instead. FEC balances outgoing traffic across the active ports based on hashed protocol header information and accepts incoming traffic from any active port. The hash includes the Ethernet source and destination address, and, if available, the VLAN tag, and the IPv4/IPv6 source and destination address.
LACP
The IEEE® 802.3ad Link Aggregation Control Protocol (LACP) and the Marker Protocol. LACP will negotiate a set of aggregable links with the peer in to one or more Link Aggregated Groups (LAG). Each LAG is composed of ports of the same speed, set to full-duplex operation. The traffic will be balanced across the ports in the LAG with the greatest total speed, in most cases there will only be one LAG which contains all ports. In the event of changes in physical connectivity, Link Aggregation will quickly converge to a new configuration. LACP balances outgoing traffic across the active ports based on hashed protocol header information and accepts incoming traffic from any active port. The hash includes the Ethernet source and destination address, and, if available, the VLAN tag, and the IPv4/IPv6 source and destination address.
Loadbalance
This is an alias of FEC mode.
Round-robin
Distributes outgoing traffic using a round-robin scheduler through all active ports and accepts incoming traffic from any active port. This mode violates Ethernet Frame ordering and should be used with caution.

31.6.3 Examples

Example 31-1. LACP aggregation with a Cisco® Switch
This example connects two interfaces on a FreeBSD machine to the switch as a single load balanced and fault tolerant link. More interfaces can be added to increase throughput and fault tolerance. Since frame ordering is mandatory on Ethernet links then any traffic between two stations always flows over the same physical link limiting the maximum speed to that of one interface. The transmit algorithm attempts to use as much information as it can to distinguish different traffic flows and balance across the available interfaces.
On the Cisco switch add the FastEthernet0/1 and FastEthernet0/2 interfaces to the channel-group 1:
interface FastEthernet0/1
 channel-group 1 mode active
 channel-protocol lacp
!
interface FastEthernet0/2
 channel-group 1 mode active
 channel-protocol lacp
On the FreeBSD machine create the lagg(4) interface using fxp0 and fxp1:
# ifconfig lagg0 create 
# ifconfig lagg0 up laggproto lacp laggport fxp0 laggport fxp1
View the interface status by running:
# ifconfig lagg0
Ports marked as ACTIVE are part of the active aggregation group that has been negotiated with the remote switch and traffic will be transmitted and received. Use the verbose output of ifconfig(8) to view the LAG identifiers.
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:05:5d:71:8d:b8
        media: Ethernet autoselect
        status: active
        laggproto lacp
        laggport: fxp1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
        laggport: fxp0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
To see the port status on the switch, use show lacp neighbor:
switch# show lacp neighbor 
Flags:  S - Device is requesting Slow LACPDUs 
        F - Device is requesting Fast LACPDUs
        A - Device is in Active mode       P - Device is in Passive mode     

Channel group 1 neighbors

Partner's information:

                  LACP port                        Oper    Port     Port
Port      Flags   Priority  Dev ID         Age     Key     Number   State
Fa0/1     SA      32768     0005.5d71.8db8  29s    0x146   0x3      0x3D  
Fa0/2     SA      32768     0005.5d71.8db8  29s    0x146   0x4      0x3D
For more detail use the show lacp neighbor detail command.
Example 31-2. Failover mode
Failover mode can be used to switch over to a secondary interface if the link is lost on the master interface. Create and configure the lagg0 interface, with fxp0 as the master interface and fxp1 as the secondary interface:
# ifconfig lagg0 create
# ifconfig lagg0 up laggproto failover laggport fxp0 laggport fxp1
The interface will look something like this, the major differences will be the MAC address and the device names:
# ifconfig lagg0
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:05:5d:71:8d:b8
        media: Ethernet autoselect
        status: active
        laggproto failover
        laggport: fxp1 flags=0<>
        laggport: fxp0 flags=5<MASTER,ACTIVE>
Traffic will be transmitted and received on fxp0. If the link is lost on fxp0 then fxp1 will become the active link. If the link is restored on the master interface then it will once again become the active link.
Example 31-3. Failover mode between wired and wireless interfaces
For laptop users, it is usually desirable to make wireless as a secondary interface, which is to be used when the wired connection is not available. With lagg(4), it is possible to use one IP address, prefer the wired connection for both performance and security reasons, while maintaining the ability to transfer data over the wireless connection.
In this setup, we will need to override the underlying wireless interface's MAC address to match the lagg(4)'s, which is inherited from the master interface being used, the wired interface.
In this setup, we will treat the wired interface, bge0, as the master, and the wireless interface, wlan0, as the failover interface. The wlan0 was created from iwn0 which we will set up with the wired connection's MAC address. The first step would be to obtain the MAC address from the wired interface:
# ifconfig bge0
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
    ether 00:21:70:da:ae:37
    inet6 fe80::221:70ff:feda:ae37%bge0 prefixlen 64 scopeid 0x2 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
You can replace the bge0 to match your reality, and will get a different ether line which is the MAC address of your wired interface. Now, we change the underlying wireless interface, iwn0:
# ifconfig iwn0 ether 00:21:70:da:ae:37
Bring up the wireless interface but don't set up any IP address on it:
# ifconfig wlan0 create wlandev iwn0 ssid my_router up
Create the lagg(4) interface with bge0 as master, and failover to wlan0 if necessary:
# ifconfig lagg0 create
# ifconfig lagg0 up laggproto failover laggport bge0 laggport wlan0
The interface will look something like this, the major differences will be the MAC address and the device names:
# ifconfig lagg0
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:21:70:da:ae:37
        media: Ethernet autoselect
        status: active
        laggproto failover
        laggport: wlan0 flags=0<>
        laggport: bge0 flags=5<MASTER,ACTIVE>
To avoid having to do this after every reboot, one can add something like the following lines to the /etc/rc.conf file:
ifconfig_bge0="up"
ifconfig_iwn0="ether 00:21:70:da:ae:37"
wlans_iwn0="wlan0"
ifconfig_wlan0="WPA"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport bge0 laggport wlan0 DHCP"
 

FreeBSD: NIC Bonding / Link Aggregation / Trunking / Link Failover Tutorial

by Vivek Gite on February 13, 2009 · 15 comments
I've two Intel gigabit network card installed in HP server. I know how to setup bounding under CentOS Linux, but I'd like to do same under FreeBSD. How do I setup link aggregation of multiple network interfaces as one virtual trunk interface for the purpose of providing fault-tolerance and high-speed links under FreeBSD 7.x server?

FreeBSD has lagg - link aggregation and link failover interface. The lagg interface allows aggregation of multiple network interfaces as one virtual lagg interface for the purpose of providing fault-tolerance and high-speed links.

How do I load lagg driver?

First, you need to load the lagg driver into the memory. To load the driver as a module at boot time, place the following line in loader.conf:
if_lagg_load="YES"
Type the following command to add line to /boot/loader.conf file, enter:
# echo 'if_lagg_load="YES"' >> /boot/loader.conf
To load driver for current session use kldload command, type:
# kldload if_lagg
# kldstat

A note about custom FreeBSD kernels

If you have custom compiled kernel, you need to compile this driver into the kernel, place the following line in your FreeBSD kernel configuration file:
device lagg

How do I create a lagg interface?

A lagg interface can be created using the following command:
# ifconfig laggN create
# ifconfig lagg0 create

It can use different link aggregation protocols specified using the laggproto proto option. The driver currently supports the following aggregation protocols:
Aggregation Protocols Description
failover Sends and receives traffic only through the master port. If the master port becomes unavailable, the next active port is used. The first interface added is the master port; any interfaces added after that are used as failover devices.
fec Supports Cisco EtherChannel. This is a static setup and does not negotiate aggregation with the peer or exchange frames to monitor the link.
lacp Supports the IEEE 802.3ad Link Aggregation Control Protocol (LACP) and the Marker Protocol. LACP will negotiate a set of aggregable links with the peer in to one or more Link Aggregated Groups. Each LAG is composed of ports of the same speed, set to full-duplex operation. The traffic will be balanced across the ports in the LAG with the greatest total speed, in most cases there will only be one LAG which contains all ports. In the event of changes in physical connectivity, Link Aggregation will quickly converge to a new configuration.
loadbalance Balances outgoing traffic across the active ports based on hashed protocol header information and accepts incoming traffic from any active port. This is a static setup and does not negotiate aggregation with the peer or exchange frames to monitor the link. The hash includes the Ethernet source and destination address, and, if available, the VLAN tag, and the IP source and destination address.
roundrobin Distributes outgoing traffic using a round-robin scheduler through all active ports and accepts incoming traffic from any active port.
none This protocol is intended to do nothing: it disables any traffic without disabling the lagg interface itself.

An Example - Create link aggregation using LACP

To create a 802.3ad link aggregation using LACP with two em Intel PRO/1000 Gigabit Ethernet adapter driver Gigabit Ethernet interfaces use the following procedure. First, you do not need to assign any IPs to em0 and em1 interfaces. Do not configure them via /etc/rc.conf. Next, bring up both interfaces, enter:
# ifconfig em0 up
# ifconfig em1 up

Create a lagg interface called lagg0, enter:
# ifconfig lagg0 create
Finally, assign an IP address to lagg0:
# ifconfig lagg0 laggproto lacp laggport em0 laggport em1 10.24.116.2 netmask 255.255.255.192
If you need to create failover between NIC instead of lacp , enter:
# ifconfig lagg0 up laggproto failover laggport em0 laggport em1 10.24.116.2 netmask 255.255.255.192
To verify status of your links, enter:
# ifconfig
You may also need to add a default gateway, enter:
# route add default 10.24.116.100
# netstat -nr

Where,
  • lagg0 : Bounding interface name.
  • laggproto lacp : Bounding protocol. See above tables for possible values.
  • laggport em0 : Your first Ethernet interface name.
  • laggport em1 : Your second Ethernet interface name.
  • 10.24.116.2 : IP address for lagg0 interface.
  • netmask 255.255.255.192 : Netmask address for lagg0 interface.

How do I create an active failover interface?

The following example uses an active failover interface to set up roaming between wired and wireless networks using two network devices. Whenever the wired master interface is unplugged, the wireless failover device will be used:
# ifconfig em0 up
# ifconfig ath0 nwid my_ssid up
# ifconfig lagg0 laggproto failover laggport em0 laggport ath0 192.168.1.1 netmask 255.255.255.0

How do I make link aggregation configuration persistent?

To make link aggregation configuration persistent use cloned_interfaces variable in /etc/rc.conf. Open /etc/rc.conf file, enter:
# vi /etc/rc.conf
Append the following configuration:
ifconfig_em0="up"
ifconfig_em1="up"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport em0 laggport em1"
ipv4_addrs_lagg0="10.24.116.2/32"
defaultrouter="10.24.116.100"

Save and close the file. Now, FreeBSD will remember your configuration after the system reboot.

Apache .htaccess

<VirtualHost *:80>
        ServerAdmin webmaster@site.ru
        ServerName  site.ru
        ServerAlias www.site.ru

        DocumentRoot /home/site.ru/www/
        <Directory />
                Options FollowSymLinks
                AllowOverride All
        </Directory>
        <Directory /home/site.ru/www/>
                Options -Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        ErrorLog /var/log/apache2/site.ru-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/site.ru-access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost

LACP Debian

Quick update: I built a Debian Squeeze box recently and the same steps worked for me.
So you need a fat network connection on your Debian 5 server, but a 10 GoE infrastructure is not in your budget? No fear! Link Aggregation Control Protocol is here to save the day!
This was both the problem I had, and the solution I learned to implement thanks to a question posted on serverfault.com (Multiplexed 1 Gbps Ethernet?) and some hours of research & experimentation. Here's what I did:
  • Purchase a NIC capable of LACP with solid Linux driver support. I went with an Intel PRO/1000 PT Quad Port Server Adapter.
  • Purchase a Switch capable of LACP. It should be more than capable of handeling the bandwidth. We opted for an HP ProCurve 2510G-24.
  • Install ifenslave-2.6: apt-get install ifenslave-2.6
  • Purchase some network cables. Cat 6 if you can, Cat 5e if not.
  • Edit /etc/modules and add bonding mode=4 miimon=100 max_bonds=2. This will load the module at boot time in the future. The value of max_bonds is the number of bonding devices your system will have. The default is 1.
  • Load the module, so we can proceed. modprobe bonding. There should be no errors. Confirm it is loaded with modprobe -l | grep bond
  • Edit /etc/network/interfaces to look something like this:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    auto  bond0
    iface bond0 inet static
        address     192.168.1.131
        gateway     192.168.1.1
        broadcast   192.168.1.255
        netmask     255.255.255.0
        up   /sbin/ifenslave    bond0 eth0 eth1 eth2 eth3
        down /sbin/ifenslave -d bond0 eth0 eth1 eth2 eth3
    
    #similar configuration for bond1
    
  • Add to /etc/modprobe.d/arch/X86_64.conf something like this for a 64-bit installation:
    
    alias bond0 bonding
    alias bond1 bonding
    
    
  • Plug in the network cables
  • Restart the network: /etc/init.d/network restart
  • Configure the switch to use the four ports as a single trunk.