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

Соеденение двух модемов между собой

 Оригинальная статья

Подключение двух компьютеров при помощи модемов, без телефонной линии.

Один из методов подключения двух компьютеров между собой для передачи данных, это подключение от одного модема к другому.
 Случаи когда может понадобиться такой не тривиальный случай:
  • Нет свободных сетевых и СОМ портов.
  • Нет других вариантов подключения устройства.
  • Отправлять факс на факс-машину с компьютера.
 В любом случае это попахивает лёгким извращением. Первое что нужно сделать, это "симулятор линии". Симулятор создаст напряжение в линии и позволит открыть диодный мостик для передачи сигнала в линию.
Простейшая схема подключения примерно следующая:

GREEN----------+---||||---/\/\/--+-------------RED
                            |   | |     R     |           
                            |  9 to 24V       |            
                            |                 |           
                            +---||------------+          
                                C .47uF     

             RED-----------------------------------------------GREEN
Если схема собирается на коленке и для теста, то можно её ещё упростить:

GREEN----------+---||||---/\/\/--+-------------RED
                                 | |
                              9 to 24V
             RED-----------------------------------------------GREEN
Или даже так:

GREEN----------+---||||-------------+-------------RED
                                 | |
                              9 to 24V
             RED-----------------------------------------------GREEN
Сопротивление резистора при этом зависит от подаваемого напряжения. Для 9В - 380Ом, 12В - 500Ом, 24В - 1КОм. Я использовал 4х 3В батарейки без сопротивления и конденсатора.
Более грамотная схема выглядит так:
78L12           380 Ohm 1/2 Watt
                                  _________
                                 |         |
        +VDC IN >--------+-----|IN     + |----+--/\/\/\/--+--------GREEN
                         +_|_    |___GND___|   _|_         _|_
          -DC  IN >--+    _ _         |        _ _ .1uF    _ _ .47uF
                     |     |  10uF    |         |           |
        RED----------+-----+----------+---------+-----------+
        

        GREEN----------------------------------------------------------RED

После этого подаёте одному модему команду ATA другому ATX1D. При этом у вас должны послышится характерные звуки подключения. Ну а дальше думаю разберётесь :)

понедельник, 18 апреля 2011 г.

VMWare и ЯДРОные процессоры

Setting the number of cores per CPU in a virtual machine

Purpose

This article provides information on setting number of cores per CPU in a virtual machine.
 

Resolution

Some operating system SKUs are hard-limited to run on a fixed number of CPUs. For example, Windows Server 2003 Standard Edition is limited to run on up to 4 CPUs. If you install this operating system on an 8-socket physical box, it runs on only 4 of the CPUs. The operating system takes advantage of multi-core CPUs so if your CPUs are dual core, Windows Server 2003 SE runs on up to 8 cores, and if you have quad-core CPUs, it runs on up to 16 cores, and so on.
Virtual CPUs (vCPU) in VMware virtual machines appear to the operating system as single core CPUs. So, just like in the example above, if you create a virtual machine with 8 vCPUs (which you can do with vSphere) the operating system sees 8 single core CPUs. If the operating system is Windows 2003 SE (limited to 4 CPUs) it only runs on 4 vCPUs.
 
Note: Remember that 1 vCPU maps onto a physical core not a physical CPU, so the virtual machine is actually getting to run on 4 cores.
 
Considering that 1 vCPU is equal to 1 CPU is an assumption for the sake of simplification, since vCPUs are scheduled on logical CPUs which are hardware execution contexts. These tasks can take a while in the case of a single core CPU, CPUs that have only 1 thread per core, or could be just a thread in the case of a CPU that has hyperthreading.
 
Consider this scenario:
 
In the physical world you can run Windows 2003 SE on up to 8 cores (using a 2-socket quad-core box) but in a virtual machine they can only run on 4 cores because VMware tells the operating system that each CPU has only 1 core per socket.
VMware now has a setting which provides you control over the number of cores per CPU in a virtual machine.
This new setting, which you can add to the virtual machine configuration (.vmx) file, lets you set the number of cores per virtual socket in the virtual machine.
 
To implement this feature:
  1. Power off the virtual machine.
  2. Right-click on the virtual machine and click Edit Settings.
  3. Click Hardware and select CPUs.
  4. Choose the number of virtual processors.
  5. Click the Options tab.
  6. Click General, in the Advanced options section.
  7. Click Configuration Parameters.
  8. Include cpuid.coresPerSocket in the Name column.
  9. Enter a value (try 2, 4, or 8) in the Value column.
    Note: Ensure that the number of vCPUs is divisible by the number of  cpuid.coresPerSocket in the virtual machine. That is, when you divide the number of vCPUs by the number of cpuid.coresPerSocket, it must return an integer value. For example, if your virtual machine is created with 8 vCPUs, coresPerSocket can only be 1, 2, 4, or 8.

    The virtual machine now appears to the operating system as having multi-core CPUs with the number of cores per CPU given by the value that you provided in step 9.
  10. Click OK.
  11. Power on the virtual machine.
For example:
Create an 8 vCPU virtual machine and set cpuid.coresPerSocket = 2. Window Server 2003 SE running in this virtual machine now uses all 8 vCPUs. Under the covers, Windows sees 4 dual-core CPUs. The virtual machine is actually running on 8 physical cores.
 
Note:
  • Only values of 1, 2, 4, 8 for the cpuid.coresPerSocket are supported for the multi-core vCPU feature in ESX 4.x.
  • In ESX 4.0, if multi-core vCPU is used, hot-plug vCPU is not permitted, even if it is available in the UI.
  • Only HV 7 virtual machines support the multi-core vCPU feature.
Important: When using cpuid.coresPerSocket, you should always ensure that you are in compliance with the requirements of your operating system EULA (Regarding the number of physical CPUs on which the operating system is actually running).

Windows 7 Firewall

Выяснилась интересная особенность с Windows 7 и встроенным брандмаурем. Если просто выключить службу, то все правила остаются и продалжают блокировать трафик. По этому для корректроного отключения лучше оствить службу включённой, но при этом указать "не блокировать траффик"

Статья про терминальный сервер.

Давно использовал эту статью. Статья эта статья описывает создание терминального сервера приложений на примеие 1с. Как оказалось всё описанное справедливо и для 2008 винды.

среда, 16 марта 2011 г.

Настройка подключения клиент VPN Win XP L2TP IPSec, если сервер за натом.

По умолчанию Windows XP с пакетом обновления 2 (SP2) не поддерживает подключений IPsec NAT-T к серверам, расположенным за устройством преобразования сетевых адресов. Таким образом, клиент VPN под управлением Windows XP с пакетом обновления 2 (SP2) не сможет установить подключение L2TP/IPsec к серверу виртуальной частной сети (VPN) за устройством преобразования сетевых адресов. Это утверждение справедливо и для сервера VPN под управлением Windows Server 2003.

Кроме того, такой подход не позволяет компьютерам под управлением Windows XP с пакетом обновления 2 (SP2) подключаться к удаленному рабочему столу по протоколу L2TP/IPsec, если компьютер назначения расположен за устройством преобразования сетевых адресов.

Из-за особенностей обработки сетевого трафика устройствами NAT возможно получение неожиданных результатов в случае использования IPsec NAT-T, когда сервер находится за таким устройством. По этой причине, если существует необходимость в организации обмена данными с помощью функции IPsec, рекомендуется применять общие IP-адреса для всех серверов, к которым подключение устанавливается из Интернета напрямую.

Для создания и настройки параметра реестра AssumeUDPEncapsulationContextOnSendRule выполните следующие действия.
  1. Выберите в меню Пуск пункт Выполнить, введите команду regedit и нажмите кнопку ОК.
  2. Найдите и выделите следующий раздел реестра:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IPsec
  3. В меню Правка выберите пункт Создать, а затем — Параметр DWORD.
  4. В поле «Новый параметр #1» введите AssumeUDPEncapsulationContextOnSendRule и нажмите клавишу ВВОД.
  5. Щелкните параметр AssumeUDPEncapsulationContextOnSendRule правой кнопкой мыши и выберите команду Изменить.
  6. В поле Значение введите одно из следующих значений.
    • 0 (по умолчанию)
      Windows не поддерживает подключений к серверам, расположенным за устройством преобразования сетевых адресов.
    • 1
      Windows поддерживает подключения к серверам, расположенным за устройством преобразования сетевых адресов.
    • 2
      Windows поддерживает подключение, если и сервер, и клиентский компьютер под управлением Windows XP с пакетом обновления 2 (SP2) расположены за устройством преобразования сетевых адресов.
  7. Нажмите кнопку ОК и закройте редактор реестра.
  8. Перезагрузите компьютер.

Добавление фитчи Copy\Paste для Sphere Client

To enable this option for a specific virtual machine:
  1. Log into a vCenter Server system using the vSphere Client and power off the virtual machine.
  2. Select the virtual machine and click the Summary tab.
  3. Click Edit Settings.
  4. Navigate to Options > Advanced > General and click Configuration Parameters.
  5. Click Add Row and type the following values in the Name and Value columns:
    • isolation.tools.copy.disable – false
    • isolation.tools.paste.disable – false
      Note: These options override any settings made in the VMware Tools control panel of the guest operating system.
  6. Click OK to close the Configuration Parameters dialog, and click OK again to close the Virtual Machine Properties dialog.
  7. Power on the virtual machine.
Note: If you vMotion a virtual machine to a host where the isolation.tools.*="FALSE" is already set, the copy and paste options are automatically activated for that virtual machine.
To enable this option for all the virtual machines in the ESX/ESXi host:
  1. Log in to the ESX/ESXi host as a root user and open the /etc/vmware/config file using a text editor.
  2. Add these entries to the file:

    isolation.tools.copy.disable="FALSE"
    isolation.tools.paste.disable="FALSE"

  3. Save and close the file. The Copy and Paste options are only enabled when the virtual machines restart or resume the next time.
Ссылка на KB VMWare

среда, 9 февраля 2011 г.

Сервер Windows 2003 VPN L2TP IPSec PSK

There are a number of details for configuring L2TP/IPSec. Without more
information, a very basic\short description would be:

- Under Routing and Remote Access, go to "Ports" to confirm that there
are L2TP ports configured (this is dependent on how you originally
setup Routing and Remote Access)
- On the client side, create a new VPN connection from "Network
Connections"

If you want to use IPSec on the L2TP connection, you have two options,
certificates or pre-shared keys. Certificates are more secure, but
require more setup where as pre-shared keys are less secure, but are
easier to setup, it all depends on your remote access needs. Below are
the instructions for setting up pre-shared keys:

How to Configure a Preshared Key on a VPN Client

1. In Control Panel, double-click Network Connections.
2. Under the Virtual Private Network section, right-click the
connection for which you want to use a preshared key, and then click
Properties.
3. Click the Security tab.
4. Click IPSec Settings.
NOTE: IPSec Settings may be shaded if on the Networking tab, Type of
VPN is set to PPTP VPN. A preshared key can only be configured if this
option is set to L2TP IPSec VPN or Automatic.
5. Click to select the Use preshared key for authentication check box.
6. In the Key box, type the preshared key value. This value must match
the preshared key value that is entered on the VPN-based server.
7. Click OK two times.

How to Configure a Preshared Key on a VPN Server

1. Start the Routing and Remote Access snap-in. To do this, click
Start, point to Administrative Tools, and then click Routing and
Remote Access.
2. Right-click the server that you will configure with the preshared
key, and then click Properties.
3. Click Security.
4. Click to select the Allow Custom IPSec Policy for L2TP connection
check box.
5. In the Preshared key box, type the preshared key value. This value
must match the preshared key value entered on the VPN-based client.
6. Click OK.

There are a number of other considerations you want to think about,
i.e. firewall rules, remote access policies, etc. but this was as
short of a description as I could provide.