Вы находитесь на странице: 1из 9

Getting Started

Pgina 1 de 9

Getting Started

When you start Serva for the first time you'll get the following window :

Now it is time for configuring the services you are interested in and re-start the application.
See settings

Serva Settings

HTTP

Protocol Description

Service Up/Down
HTTP Server
It turns the HTTP Server on and off
HTTP Server IP address
Bind HTTP to this address
By default the HTTP service (when enabled) is bound to all the available IP addresses.
If you want to bind it to an specific IP address please check the box and select one of
the
available IP options
HTTP Settings
HTTP Port
The port used to listen to incoming requests
Default Page
Filename appended by default to all the requested URLs that do not include a resource
name
Allow file Browsing
It allows browsing the server's directory structure
Truncate GET File Names longer than 64 char
It truncates requested file names to ISO9660-Joliet 64 characters limit.
Workaround used when offering Rock Ridge + ISO9660-Joliet CDs/Images to apps
expecting Rock Ridge media (i.e. Debian/Ubuntu install)
HTTP Server root directory
Top-level directory from where the service offers its resources

FTP

Protocol Description

Service Up/Down
FTP Server
It turns the FTP Server on and off
FTP Server IP address
Bind FTP to this address
By default the FTP service (when enabled) is bound to all the available IP addresses.
If you want to bind it to an specific IP address please check the box and select one of
the
available IP options
FTP Settings
FTP port

file:///C:/Users/Yony/AppData/Local/Temp/~hh6B43.htm

07/06/2016

Getting Started

Pgina 2 de 9

The port used to listen to incoming requests


Local ports pool
Pool of ports used by FTP file transfers. Parameter has to be expressed as P_low :
P_high
where P_low & P_high are numeric values between 1 and 65535 verifying that
P_low < P_high
FTP Server user accounts
Anonymous
It allows Anonymous log-in
User/Password
It allows to define up to 3 FTP Registered users. Please consider user names and
passwords are saved in Serva.ini in plain text
FTP Server Anonymous user root directory
Top-level directory from where the FTP service offers its resources for Anonymous users
FTP Server Registered user root directory
Top-level directory from where the FTP service offers its resources for Registered users

SITE CHMOD command & Unix file permissions


The FTP module implements the SITE CHMOD command when "Registered user root
directory"
points to a NTFS partition. Otherwise the command is unable to save Unix file
permissions
even when returning "200 SITE CHMOD Successful."
Files received from Unix systems using SITE CHMOD will keep its permissions as long
as they
are never moved out of NTFS partitions. Files received from other systems will be offered
by
default just with owner R/W permissions.

TFTP

Protocol Description

Service Up/Down
TFTP Server
It turns the TFTP Server on and off
TFTP Client
It turns the TFTP Client on and off
TFTP Server IP address
Bind TFTP to this address
By default the TFTP service (when enabled) is bound to all the available IP addresses.
If you want to bind them it an specific IP address please check the box and select one of
the available IP options
TFTP Server root directory
Top-level directory from where the TFTP service offers its resources
TFTP security
NONE
(Not recommended) read and write requests will be allowed on all disks/directories
Standard
Read and write requests will be allowed but limited to the current directory
High
Standard + write requests will be allowed only if the input file exists and is empty
Read only
Standard + write requests will be rejected

file:///C:/Users/Yony/AppData/Local/Temp/~hh6B43.htm

07/06/2016

Getting Started

Pgina 3 de 9

TFTP Configuration
Timeout
The maximum timeout between two retransmissions
Max Retransmit
The maximum number of retransmissions for the same packet
Tftp Port
The port used to listen to incoming requests
local ports pool
The range of ports (i.e. 3000:3030) that will be used by the file transfer process.
Advanced TFTP Options
Translate Unix file names
Serva will translate slash characters to a backslash
Allow \ as virtual root
A file name beginning with "\" will not point to the server disk root but to the TFTP's root
directory instead
Create dir.txt files
For each incoming read request, Serva will list the content of the directory and put the
result in a file named "dir.txt"
Create md5 files
For each successful read request, Serva will create a file with its MD5 signature
Limit negotiated window-size to
Negotiated Windowed TFTP overcomes the classic single-packet lock-step TFTP lack of
speed by sending up to "windows-size" consecutive blocks before expecting a window
ACK.
On clients request Serva will negotiate the parameter "window-size" before a transfer
begins. This option sets the top limit for the client proposed value. Microsoft WDS TFTP
clients (Vista SP1 and up) support "window-size" negotiation.

Expressed in blocks.

Enforced Windowed TFTP, window-size

Enforced Windowed TFTP overcomes the classic single-packet lock-step TFTP


lack of speed
by sending up to "windows-size" consecutive packets before expecting the sequence
of
ACKs. This feature may dramatically speed up TFTP transfers to classic RFC-1350
clients
but it might fail with some of them. Serva's "Negotiated Windowed" has always
precedence over "Enforced Windowed".
Reference value for the enforced "window-size" i.e. 4 blocks.
Error Simulator

Simulates errors by generating missing data blocks on fixed, evenly, or randomly


scatered locations i.e.
fix|block1,block2,...,block10
even|nErrors
random|nErrors
where:
0 < blockN < 4294967296
0 < nErrors < 11
WARNING: Only for testing error recovery on different modes. Un-check in
production

DHCP

Protocol Description

Service Up/Down
DHCP Server
It turns the DHCP Server on and off
proxyDHCP Server
It turns the proxyDHCP on and off.

During the proxyDHCP operation the service


offers
PXE information only. IP addresses and other DHCP related info has to be provided

file:///C:/Users/Yony/AppData/Local/Temp/~hh6B43.htm

07/06/2016

Getting Started

Pgina 4 de 9

by
a different DHCP server.
Service Add-On
BINL
It turns the BINL service Add-On on and off. This mode consist of the MS BINL
protocol (DHCP extension) plus the conversion (when required) of the stored
"Windows Distributions" (WDs) into Serva's menu driven set of PXE installable
"Windows Installation Assets" (WIAs).

This mode requires the TFTP server service on. On re-start the TFTP root directory
gets initially populated with a directory structure and instruction files.
DHCP Server / proxyDHCP IP address
Bind DHCP Server / proxyDHCP to this address
By default the DHCP Server / proxyDHCP service (when enabled) is bound to all the
available IP addresses. If you want to bind it to an specific IP address please check the
the box and select of the available IP options
DHCP Settings
Ping address before assignation
On init Serva will ping the entire IP address Pool before making its addresses available
for assignation to DHCP clients.
This option must be disabled if PXE or DHCP relays are used
Persistent Leases
Serva will save every assigned IP addresses and its correspondent client MAC
address into Serva.ini file. This table will be used in future requests allowing the
re-assignation of the same IP to the same DHCP client identified by its MAC address
Static Leases
It enables the processing of the Static Leases list
MAC Filter

It defines the policy rule to be applied on the "MAC Filter" address list:
Off: Do not process the MAC Filter list
Ignore: Silently drop request if client's MAC is in the list
Accept: Process request only if client's MAC is in the list
IP Pool 1st addr

First IP of a pool of consecutive addresses available for assignation to DHCP clients


Pool size

Number of consecutive IP addresses available for assignation to DHCP clients


Next Server

DHCP header "Next Server" IP address (RFC 2131). IP of the TFTP server hosting
the Boot File on a PXE Server.
Automatic: Serva assigns Serva's TFTP server IP if service is on and bound,
sequentially assigns interface IP on broadcast answers if Serva's TFTP service is on
but not bound, assigns host interface IP with the same subnet as client IP on
unicast answers if Serva's TFTP service is on but not bound, and assigns 0.0.0.0
when Serva's TFTP service is off.
None: Serva assigns 0.0.0.0
Edit...: Serva assigns manualy edited IP
Boot File
DHCP header "File" field (RFC 2131). Boot image file name sent to DHCP client stations.
PXE clients expect a boot image file name during their initial DHCP transactions.
The correspondent TFTP boot image file request is performed soon after. (this field
can be empty if PXE is not used)
Subnet Mask (1)
DHCP option #1 Subnet Mask (RFC 2132).
It specifies the client's subnet mask as per RFC 950. It accepts dotted decimal or
cidr notation.

i.e. 255.255.255.0 or /24


Router (3)
DHCP option #3 Router (RFC 2132).
Preference-ordered list of IP addresses for routers on the client's subnet.
(this field can be empty if not required)
i.e. 192.168.20.1 or 192.168.20.1,192.168.20.2, ...
Domain Name Server (6)
DHCP option #6 Domain Name Server (RFC 2132).

Preference-ordered list of name servers available to the client.


(this field can be empty if not required)
i.e. 192.168.20.1 or 192.168.20.1,192.168.20.2, ...

file:///C:/Users/Yony/AppData/Local/Temp/~hh6B43.htm

07/06/2016

Getting Started

Pgina 5 de 9

Domain Name (15)


DHCP option #15 Domain Name (RFC 2132).

Domain name that client should use when resolving hostnames.


(this field can be empty if not required)
i.e. mydomain
DHCP Options
It holds instances of additional DHCP options returned to DHCP clients.

Each option must begin with its decimal code (0-255) immediately followed by
the separator | and the option payload (w/o Length byte). i.e.
9|192.168.20.20

9|192.168.20.20,192.168.20.25,...

23|10
117|0,6,...

18|/dhcp/moreoptions
99|0x1234567890abcdefABCDEF...

etc.
Option format depends on option's code. Option format can be obtained by typing
<option code>| and pressing <up-arrow> or <down-arrow>
Static Leases
It holds instances of pairs MAC | IP addresses for MAC based fixed IP offerings.

i.e. 01:02:03:04:05:06|192.168.20.25
MAC Filter
It holds the MAC address list used by the MAC based service policy.

i.e. 01:02:03:04:05:06

Note 1: If the pool size is 0 Serva will not assign dynamic IP addresses. Only static ones (if
defined) will be provided. Static assignment are only logged at Serva's "Log" tab
Note 2: IP assignment is not provided in any way when proxyDHCP mode is selected.

DNS

Protocol Description

Service Up/Down
DNS Server
It turns the DNS Server on and off
DNS Server IP address
Bind DNS to this address
By default the DNS service (when enabled) is bound to all the available IP addresses.
If you want to bind it to an specific IP address please check the box and select one of
the
available IP options

DNS Host Table


Serva DNS service uses the API getaddrinfo to resolve the domain name. This API tries to
find the host name in the file:
%SystemRoot%\System32\drivers\etc\hosts

or in the file pointed by the registry key:


\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath

Populate the mentioned files with your hosts and Serva DNS will propagate the info

SNTP

Protocol Description

Service Up/Down

file:///C:/Users/Yony/AppData/Local/Temp/~hh6B43.htm

07/06/2016

Getting Started

Pgina 6 de 9

SNTP Server
It turns the SNTP Server on and off
SNTP Server IP address
Bind SNTP to this address
By default the SNTP service (when enabled) is bound to all the available IP addresses.
If you want to bind it to an specific IP address please check the box and select one of the
available IP options

SYSLOG

Protocol Description

Service Up/Down
SYSLOG Server
It turns the SYSLOG Server on and off
SYSLOG Server IP address
Bind SYSLOG to this address
By default the SYSLOG service (when enabled) is bound to all the available IP addresses.
If you want to bind it to an specific IP address please check the box and select one of
the
available IP options
Syslog Settings
Forward msg to pipe ServaSyslog
Each valid message received is forwarded into the named pipe ServaSyslog.
In this way some other application can also receive SYSLOG notifications
Save Syslog messages
Each valid message is time stamped and saved into the designated file.

The file is cached/flushed under OS control, it can be open for reading while
logging.

Using Serva's TFTP client

Download
To download a file (get it from a TFTP server) you need to know :
The name of the TFTP server or its IP address
The name of the file on that server
Complete the Host and Remote File fill-in fields then click the Get button to start the transfer. If you want to change the name of the file, you
can complete the field Local File.

Upload

file:///C:/Users/Yony/AppData/Local/Temp/~hh6B43.htm

07/06/2016

Getting Started

Pgina 7 de 9

To upload a file (put it on a TFTP server), you need to know


The name of the TFTP server or its IP address
The name of the file on your PC
Complete the Host and Local File fill-in fields then click the Put button to start the transfer.

Serva Logs

Serva Activity Logs


Serva was not designed for competing with standalone industrial grade servers. Serva's main strength relies on how easily and fast its stable multiprotocol server capabilities can be deployed on complex scenarios. One of these typical Serva scenarios is remote OS installation using PXE (Preboot
eXecution Environment).
As an example, a PXE session for network install of Windows, Debian or Ubuntu Linux requires the concurrent use of DHCP and TFTP services,
alternative SMB/CIFS, FTP or HTTP services, and optionally DNS and SNTP services. Troubleshooting an scenario like this one could well become a
nightmare if we do not know what is really going on when problems arise.
Serva provides an independent logging screen for each protocol being served where high level info is displayed. At the same time the last screen labeled
Log gathers lower level information for all the active protocols. Every service screen is able to hold the last 500 messages generated and the Log
screen is able to hold the last 1000 messages.
The Log pane has a quick way to find errors by holding depressed [CTRL] while going up/down with your keyboard arrows or mouse wheel. Alternative
holding depressed [CTRL]+[Shift] while going up/down will keep selected all the error lines found.
[CTRL]+E: allows browsing only Errors (default).
[CTRL]+W: allows browsing only Warnings.
[CTRL]+B: allows browsing both.
The variable SERVA_LogFile (on the ini file) can be manually defined if we want Log messages appended to a log file.
i.e. for Serva logging to a file called myServa.log located at Serva's current directory add the following line to Serva.ini
[SERVA]
...
SERVA_LogFile=.\myServa.log

...
i.e. for Serva logging to a file called myServa.log located at C:\LOG\ add the following line to Serva.ini
[SERVA]
...
SERVA_LogFile=C:\LOG\myServa.log
...

Serva Troubleshooting

Nothing Seems to Work


No errors, everything looks fine but there is not traffic at all or some particular protocol appears non-responsive?
Time to check your Firewall

Cryptic Binding Errors


The process of offering an IP service involves a binding call where the server application tells the OS its intentions of using a particular "socket".
A socket is a network abstraction characterized by a unique combination of the following:
Protocol: A transport protocol (e.g., TCP, UDP), raw IP, or others.
Local Socket Address: Local Network Address and Port Number
Remote Socket Address: Remote Network Address (only required for established TCP sockets)

When an application tries to use a particular socket already used by some other process it usually triggers an OS error.
i.e. Calling Serva32/64 on a Vista PC trying to offer SNTP services on every available IP it gives:

file:///C:/Users/Yony/AppData/Local/Temp/~hh6B43.htm

07/06/2016

Getting Started

Pgina 8 de 9

The former error tell us specifically where the problem is located but if we call Serva32/64 trying to offer SNTP services on just only one IP (i.e. 192.168.20.1) the OS says:

In this particular case the error message is a bit more cryptic not telling us much about who causes the error. On these situations we can just turn Serva services off one-by-one and
pinpoint the protocol is causing trouble.
A more methodic approach requires of a command console session running:
>netstat ao
In this case we also come to the conclusion SNTP was the Serva offending service. As we can see on the next image the UDP protocol/port 123 pair was already offered on
every available interface (IP= 0.0.0.0) of our PC while Serva was trying to bind exactly the same parameters.

The Process ID was 1504, invoking the task manager we can find who is PID=1504; in this case it was W32Time (Windows Time Service)
We can stop W32Time running a command console as administrator by typing
>net stop w32time

file:///C:/Users/Yony/AppData/Local/Temp/~hh6B43.htm

07/06/2016

Getting Started

Pgina 9 de 9

Stopping W32Time frees the taken socket resources. We can now call Serva with the SNTP service on and we'll see that the previous error is gone.
In order to leave everything as it was before we stop Serva and run
>net start w32time

This was just a troubleshooting example, other protocols and other binding errors can be handled in a similar way.

Multi-homed hosts and Serva's bound outgoing traffic


When Serva (running on a multi-homed host) binds a protocol to an specific interface IP, it does bind the "listening" and the "talking". But Microsoft does not behave like Linux here;
it is known that the binding to an specific IP when sending packets is only honored under Vista and later OSs (with some obscure exceptions). Former OSs (Win2K, XP, etc) have an
extra routing layer added by the OS that can finally alter the interface chosen for packet delivery. The way to "solve" this situation (if necessary) involves user defined static routes.

file:///C:/Users/Yony/AppData/Local/Temp/~hh6B43.htm

07/06/2016

Вам также может понравиться