errerr
 


date: 19:36:58, March 28, 2024
my ip: 51.38.50.160:80 (richiardone.eu)
your ip: 44.200.179.138:57748 ()
claudebot
Welcome, my name is Emmanuel Roberto Richiardone, this is my place on the web.

You can contact me at e(AT)richiardone.eu

My PGP/GPG public key
More about me here

Blog
  Projects
  Docs, Tips & tricks
  Freebsd tips
  GNU/Linux tips


Outside links:
  Photos on Smugmug
  Discogs
  Anobii
  LinkedIn

Other links:
  tollari.org
  linux.studenti.polito.it

login

RSS feed enabled!

  March 2024  
M T W T F S S
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

search with google
here
all the web

. o .
. . o
ooo


texts
go to page: 1 2 ->    single page
Asynchronous programming using Python 3 and asyncioFri, 6 Nov 20
Python 3 introduces asyncio library that implements an interesting way to manage parallel tasks (called coroutines) that have I/O or sleep delays.
Moreover the main websocket implementation in Python is based on asyncio.

Hereafter I present a sample Python 3 code that using asyncio implements:
  • a set of 5 TCP servers differentiated from the local listening port
  • each connection to the server starts a dedicated task to manage client communication
  • a websocket server that can manage different web clients and updates forever each client connection while they are connected
  • a simple task coroutine that works forever
# Python 3 asyncio sample
# E.Roberto-Richiardone

import asyncio
import websockets
import json
from datetime import datetime


serv_host = '192.168.0.100'
serv_base_port = 1000

ws_host = '192.168.0.100'
ws_port = 8081


# function for WS server coroutine, called for each client
async def ws_update(websocket, path):
   print("WS client connected")
   while True:
      try:
         out = "WS test content " + str(datetime.now().timestamp())
         await websocket.send(out)
         await asyncio.sleep(3)
         
      # catch exiting of the client to terminate this coroutine instance
      except Exception as e:
         print("WS client gone ", str(e))
         return


# task called from main loop
async def work_forever_task():
   print("Work forever task started")
   while True:
      await asyncio.sleep(3)
      print("Work forever task updated")


# task called from TCP server that continues after he finished
async def work_once_task(message):
   print("Work once task started")
   await asyncio.sleep(3)
   print("Work once task done")


# TCP server class for service coroutine
class ServiceProtocol(asyncio.Protocol):
   def __init__(self, loop):
      self.loop = loop
      print("Service called")
      
   def connection_made(self, transport):
      # save transport for socket management
      peername = transport.get_extra_info('peername')
      self.transport = transport
      
      # save service id got back from the local port
      sockname = transport.get_extra_info('sockname')
      self.id = sockname[1] - serv_base_port
      print("Service {} connection from {}".format(self.id, peername))
      
      
   def data_received(self, data):
      message = data.decode()
      print("Service {} received: {!r}".format(self.id, message))
      self.transport.close()
      
      # puts in the loop a task to start once now
      self.loop.create_task(work_once_task(message))
      
      print("Service {} done".format(self.id))



# main with asyncio loop creation
if __name__ == '__main__':
   try:
      # create loop
      loop = asyncio.get_event_loop()
      
      # setup a websocket server (it uses asyncio and returns a coroutine)
      wscoroutine = websockets.serve(ws_update, ws_host, ws_port)
      # run the websocket coroutine indefinitely in the loop
      loop.run_until_complete(wscoroutine)
      
      # puts in the loop a task with a forever while loop
      loop.create_task(work_forever_task())
      
      # creates 5 server coroutine
      for id in range(0, 5):
         servcoroutine = loop.create_server(lambda: ServiceProtocol(loop), serv_host, serv_base_port + id)
         # run the server corouting indefinitely in the loop
         loop.run_until_complete(servcoroutine)
         
      # loops forever the loop
      loop.run_forever()
      
   except KeyboardInterrupt:
      print("Exiting")
Guida per utilizzare telefono VoIP Cisco SMB su linea Fibra Telecom ItaliaMon, 30 Apr 18
La guida si applica con il router fornito da Telecom Italia con linea Fibra (in verità VDSL2), marca Technicolor, che normalmente integra due interni telefonici per telefoni PSTN tradizionali e una interfaccia DECT. I passi presentati illustrano come collegare un telefono di tipo VoIP al centralino integrato nel router Technicolor, utilizzando la medesima rete LAN WiFi o cablata che viene utilizzata per i dispositivi interni. Il telefono VoIP utilizzato è un Cisco SMB modello SPA303 ; la guida si dovrebbe applicare a tutti i modelli SPA30x e SPA50x.

La configurazione riportata è stata testata con la versione firmware del router AGVTF_5.3.3 . Si ringrazia http://www.giorgioravera.it/ per le informazioni di partenza.

Passo 0: verificare che il servizio di configurazione VoIP sia attivo e raggiungibile

Aprire la pagina web

https://modemtelecom.homenet.telecomitalia.it:8443/SIPGwConfig

Ignorare il certificato non valido, e fare il login con le seguenti credenziali:

username: 8Z6PlbuD6VFR8KLr
password: [PASSWORD]

La password [PASSWORD] è quella impostata per accedere alla normale pagina web di configurazione, per cui è "admin" se è stata lasciata di default, altrimenti è la normale password di accesso.
Deve comparire un messaggio XML vuoto.

Passo 1: recupero parametri linea VoIP dal router

Installare l'app "TIM Telefono di casa" su un cellulare collegato in WiFi al router.
Fare la procedura di registrazione sull'app, inserendo i dati richiesti della linea telefonica (principalmente numero di linea telefonica fissa).

Appuntarsi l'indirizzo MAC del cellulare collegato in WiFi indicato nella pagina di configurazione del router Technicolor, nella sezione "Collegamenti LAN".
La configurazione del router Technicolor si recupera tramite il programma curl da linea di comando.
Utilizzare la sintassi:

curl -k -u 8Z6PlbuD6VFR8KLr:[PASSWORD] --data "Action=GetConfig&ClientID;=[INDIRIZZO_MAC]&Cli;=[NUMERO_DI_TELEFONO]" https://modemtelecom.homenet.telecomitalia.it:8443/SIPGwConfig

Dove:
[PASSWORD] è la password del router utilizzata al passo 0 (di default admin)
[INDIRIZZO_MAC] e' l'indirizzo MAC del cellulare appuntato prima ma formattato con lettere maiuscole e con il trattino al posto dei due punti (esempio: 04-D6-AA-00-01-02)
[NUMERO_DI_TELEFONO] e' il numero di telefono della linea fissa (esempio: 0110102030)

Se funziona, la risposta e' un testo XML nel quale si recuperano i seguenti parametri:
 <AuthUserName>UTENTE</AuthUserName>
 <AuthPassword>PASSWORD</AuthPassword>
 <Registrar>INDIRIZZO_ROUTER_1</Registrar>
 <RegistrarPort>PORTA_1</RegistrarPort>
 <OutboundProxy>INDIRIZZO_ROUTER_2</OutboundProxy>
 <OutboundProxyPort>PORTA_2</OutboundProxyPort>
Dove:
UTENTE è l'identificativo utente, ad esempio **01 (lasciare i due asterischi iniziali)
PASSWORD è la password utente, ad esempio rdfDTEvCjqhPRTujNasdfgGDF2326UQqZMlNVy92eVfEBYg1IOaGhFqgjPzGJS
INDIRIZZO_ROUTER_1 e INDIRIZZO_ROUTER_2 sono indirizzi DNS del router, dovrebbero essere entrambi modemtelecom.homenet.telecomitalia.it
PORTA_1 e PORTA_2 sono le porte UDP, dovrebbero essere entrambe 5065

Passo 2: preparazione telefono VoIP

Accendere il telefono Cisco SMB SPA303 in DHCP e appuntarsi indirizzo IP e indirizzo MAC indicati nella pagina di configurazione del router Technicolor, nella sezione "Collegamenti LAN".

Per configurare il telefono si va sulla sua pagina web raggiunta all'indirizzo http://[INDIRIZZO IP], cliccando in alto a destra prima su "Admin Login" e poi su "advanced".

Aggiornare il firmware del telefono, la presente guida si riferisce alla versione 7.6.2SR4 .
Per l'aggiornamento ci vuole un PC Windows per eseguire il programma Cisco oppure un server TFTP impostando nella sezione Provisioning la "Upgrade Rule" con qualcosa del tipo "tftp:///", ad esempio "tftp://192.168.1.2/spa50x-30x-7-6-3.bin".

Passo 3: configurazione telefono VoIP

Nella sezione System:
- impostare server NTP ntp1.inrim.it e time.ien.it

Nella sezione Regional:
- impostare Time Zone a GMT+1 e poi "Daylight Saving Time Rule" con la stringa start=3/-1/7/2:0:0;end=10/-1/7/3:0:0;save=1
- sostituire la stringa del "Dial tone" con: 425@-5;10(.2/.2/1,.6/1/1)
- sostituire la stringa del "Busy tone" con: 25@-5;20(.5/.5/1)

Nella sezione Ext 1:
- Verificare Line Enable: yes
- Impostare il campo "Share Ext" a: private
- Impostare "SIP Port" secondo il campo PORTA_1 del precedente punto 1
- Impostare "Proxy" nel formato INDIRIZZO_ROUTER_1:PORTA_1 , con i parametri letti nel precedente punto 1 (esempio "modemtelecom.homenet.telecomitalia.it:5065")
- Impostare "Outbound Proxy" nel formato INDIRIZZO_ROUTER_2:PORTA_2 , con i parametri letti nel precedente punto 1 (esempio "modemtelecom.homenet.telecomitalia.it:5065")
- Verificare "Use Outbound Proxy": yes
- Verificare "Register": yes
- Verificare sia "Make Call Without Reg" che "Ans Call Without Reg" siano no
- Impostare "User ID" secondo il campo UTENTE del precedente punto 1 (eventuali asterischi inclusi)
- Impostare "Password" secondo il campo PASSWORD del precedente punto 1
- Use Auth ID: no
- I codec audio di default non vanno bene. Impostare "Preferred Codec" a G729a, "Second Preferred Codec" a G711u ed infine "Third Preferred Codec" a G722
- Impostare il "Dial Plan" ad esempio con: (*xx|00|11[2358]S0|0[1-9]xxxxxxxx.|3[234689]xxxxxxxxS0|800xxxxxxS0|803380S0|404S0|xxxxxxxxxxx.)

Passo 4: verifica del funzionamento

Sull'interfaccia web del router Telecom nella sezione "Configura - Telefonia" compare il telefono VoIP registrato con il numero interno che corrisponde al "AuthUserName" di cui sopra. Lo stato deve essere "attivo".

Sull'interfaccia web del telefono SPA303 nella prima sezione "Info" c'è una parte riguardante lo stato della registrazione "Ext 1 Status". Deve essere indicato Registered.

Effettuare una chiamata di prova.
Sull'interfaccia web del telefono SPA303 nella prima sezione "Info" c'è una parte riguardante la linea "Line 1 Call 1 Status" compaiono i parametri utilizzati per la chiamata.

Sul router tramite il comando curl è possibile scaricare un log delle chiamate:

curl -k -u 8Z6PlbuD6VFR8KLr: --data "Action=GetLog&Filter;=All" https://modemtelecom.homenet.telecomitalia.it:8443/SIPGwCallLog

Informazioni simili sono presenti sull'interfaccia web del router Telecom nella sezione "Configura - Telefonia - Statistiche chiamate"
Xperia U, Android Kitkat 4.4.2 Cyanogenmod 11, with led workingFri, 22 Jan 14
Complete guide to get Android Kitkat 4.4.2 Cyanogenmod 11.0 over Sony Xperia U, in a all-working configuration, that is more stable than official Sony 4.0 update. Other combinations of Cyanogenmod 11 versions and Google Apps I've checked so far, gives me bad results (ie. dialer not usable, or duplicated SMS messages, or low volume).
Pro: more stable, keyboard more usable, update android to last version with new Google apps
Cons: you lose Sony apps (walkman music player, speaker volume quality, some illumination events,...), illumation bar works only with the notifications (SMS, email, facebook, etc)

--- step 0 - Get software and images ---
  • Fastboot, to communicate with your phone bootloader using USB cable
    about, filename Fastboot.zip, download for windowsmirror, on Debian simply add backports in source.list and "apt-get install android-tools-fastboot".
  • Cyanogenmod 11.0 image for Xperia U (codename Kumquat) prepared by Maclaw
    filename cm11.0_kumquat.maclaw.20131226.zip, download
  • Google Apps for Xperia U and Android 4.4
    filename gapps-full-4.4-20131107-signed.zip, download
  • Illumination Bar, Illumination Bar Receiver and modified library
    filename xperia_u.zip, download mirror
--- step 1 - Preparing ---
  • unzip Fastboot to desktop
  • from cm11.0_kumquat.maclaw.20131226.zip, extract the file "boot.img" to the directory of fastboot.exe
  • copy the zip file cm11.0_kumquat.maclaw.20131226.zip and gapps-full-4.4-20131107-signed.zip to the xperia storage using USB cable
  • extract the xperia_u.zip content (two .apk files and one .so) to the xperia storage using USB cable
--- step 2 - Unlock the bootloader ---
Follow the Sony official guide that uses the diag menu and IMEI code: http://unlockbootloader.sonymobile.com/

--- step 3 - Install CWM Recovery image ---
Using Fastboot program, install the CWM Clockworkmod Recovery image to the phone using the USB cable.
  • Power off your Xperia U phone and, if it is the case, detach it from USB.
  • On your PC, open a command line on the directory where is present the fastboot executable.
  • Launch "fastboot devices" and you should see ">waiting for device<"
  • Keeping pressed the volume up button, connect the USB cable between Xperia U and PC. The led of the phone will lit in blue and the serial number of the phone should appear in the fastboot window; you can release the volume button.
  • Flash the CWM Recovery with command "fastboot flash boot boot.img" . It should copy the file briefly and finish with OK.
--- step 4 - Working with the CWM recovery program ---
  • In the fastboot window, reboot the phone with command "fastboot reboot". You can detach the USB cable.
  • When the phone reboots (SONY logo), continuously press for several times the volume up button to access CWM recovery v6
  • From the CWM recovery menu, choose "backup and restore -> backup" and save a copy of the current ROM
  • Clean the system with "wipe data/factory reset" and "wipe cache partition" then "advanced -> wipe Dalvik cache"
  • Install Cyanogenmod 11.0 selecting "install zip from SD card -> choose zip from SD card" and then select the file cm11.0_kumquat.maclaw.20131226.zip from the storage
  • Install Google Apps selecting "install zip from SD card -> choose zip from SD card" and then select the file gapps-full-4.4-20131107-signed.zip from the storage
  • In the CWM recovery menu choose "reboot system now" to restart phone
--- step 5 - Starting Cyanogenmod for the first time ---
The phone will take several minutes to start, displaying the Cyanogenmod logo. When it's done, it will show you a first time wizard: configure at your wishes.

--- step 6 - Make illumination bar working ---
Start the "File Manager" app in the xperia, in the Settings menu set the "Access Mode" to root mode.
  • Move to the path "/system/lib/hw" and rename the file "lights.montblanc.so" to "lights.montblanc.so.orig"
  • Move to the path "/storage/sdcard0" and select the file "lights.montblanc.so", then return to the path "/system/lib/hw" and paste it here.
  • Change the permissions of "lights.montblanc.so" to -rw-r-r-
  • Restart the Xperia U phone.
  • After the restart, still using the "File Manager", install the two .apk installer "illumationBar.apk" and "illumationReceiver.apk". If it complains about unknown origin of the installer, go to settings and disable check on app.
  • The illuminationBar app requires root privileges, accept it.
Perform an update of all the apps. It's done!

Thanks to:
www.cyanogenmod.org
maclaw.pl
forum.xda-developers.com
Project FreeXperia
Slide corso FreeBSD e GNU/LinuxDic 2013
Slide aggiornate per il corso base GNU/Linux Netstudent.
Introduzione al networking e rete IP, (sorgente .odp)

Slide aggiornate anche per il corso avanzato GNU/Linux e tecnologie aperte Netstudent.
Introduzione al mondo FreeBSD, (sorgente .odp)
Reset Motorola Symbol AP and RFS passwordMon, 21 Feb 11
Want to reset the lost password of a Motorola AP5131, AP7131 or AP7181?
Look for it in the manual, and don't find how?
Well. the procedure is:
  • Attach a Cisco-like console cable to the powered-off AP using protocol 19200 8N1;
  • Power on the AP and pay attention to the serial messages;
  • Press "Esc" key when you read about to do so to run the boot firmware;
  • You will arrive to a "boot>" prompt, enter the text "passwd default";
  • Restart the system using "reset system".
The AP will start with default password for user "admin", which should be "motorola".

Instead, are you looking to a way to reset the lost password of a Motorola RFS4000 or a RFS6000?
The procedure is:
  • Power on the RFS;
  • Attach a serial cable (a normal DTE to DCE 9 pin) to the RFS using protocol 19200 8N1;
  • At the "login" prompt, enter the login "cli";
  • When requested username enter "restore", for the password use "restoreDefaultPassword";
  • Respond to the question with "y" and poweroff the RFS.
At the next poweron, the default password for the user "admin" should be "motorola".
Amarok, last.fm, and KwalletSat, 24 Apr 10
Because I decided to stabily use KDE 4.3.5 (over FreeBSD 8.0 amd64), I needed to set up my desktop routines.
I've come among some problem with Amarok and his last.fm plugin: he doesn't works.
I cames out that the problem is that by default Amarok 2.2.2 want to keep your login details into Kwallet and doesn't ask you anything. I had Kwallet completely disabled, and so logon could not be performed.
To solve, you need to manually edit ~/.kde4/share/config/amarokrc, change the line ignoreWallet=no to ignoreWallet=yes, and add the lines username=YOURUSER and password=YOURPASSWORD.
HiperLAN, questo sconosciutoMon, 3 Aug 09
Ma qualcuno in Italia sa cosa si intende per HiperLAN? e HiperLAN/2?
Sono alcune volte perplesso nel leggere documenti tecnici che illustrano apparati WiFi 802.11 come HiperLAN/2... Vige piu` il passaparola che il leggere gli standard e verificare le caratteristiche.

Con l'espressione WLAN (Wireless Local Area Network) si indica un sistema per comunicazione dati tramite una rete locale wireless; ciò implica che i nodi di una rete dati sono in modo generico connessi senza l'impiego di cavi. Le tecnologie wireless disponibili sono varie, regolate da normative o standard, e possono utilizzare protocolli proprietari oppure pubblici.
Il nome “WiFi” rimanda ad una serie di protocolli e meccanismi di accesso wireless definiti a partire dai primi anni '90 dal gruppo di lavoro 802.11 dell'IEEE (Institute of Electrical and Electronics Engineers), una organizzazione promossa da diverse aziende del settore.
Le tecnologie definite dal gruppo 802.11 permettono di realizzare reti punto-multi-punto basandosi su una infrastruttura con controllore centrale oppure in modalità ad-hoc. Questa tecnologia si è evoluta nel tempo a partire dagli anni '90: l'idea di base è di riprodurre un sistema di contesa del canale trasmissivo per l'accesso multiplo simile al protocollo Ethernet cablato, che a sua volta derivava da un protocollo radio. La trasmissione è richiesta dai terminali secondo tempi di attesa casuali in intervalli prefissati; questi intervalli temporali sono divisi secondo diverse lunghezze, permettendo una divisione tra comunicazioni di servizio o dati più o meno importanti. Questo sistema prende il nome di CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) e si basa su un sistema di tempi di attesa variabili nei quali i nodi possono trasmettere.
Il gruppo 802.11 definisce non solo il livello fisico, comprendente codifiche radio, modulazioni e la contesa del canale, ma anche parte del livello datalink, comprendente MAC (Medium Access Control), allocazione delle risorse, frammentazione e assemblamento dati, e controllo di errore. Le tecnologie 802.11 si dividono per frequenza e modulazioni utilizzate: 802.11b definisce il funzionamento a 2.4GHz con modulazione DSSS ed una banda lorda da 1 a 11Mbps; del 2003 è l'802.11g che integra il protocollo precedente con modulazioni OFDM fino ad una banda lorda di 54Mbps. Indicati genericamente con la denominazione 802.11b/g, questi standard rispettano la normativa ETSI EN 300 328.
Del 2001 è invece lo standard 802.11a, che prevede il funzionamento a 5.4GHz con modulazioni OFDM con una banda lorda da 6 a 54Mbps; questo standard tuttavia non segue la regolamentazione ETSI EN 301 893 per il 5.4GHz, e gli apparati con questo standard vanno notificati al Ministero delle Comunicazioni, pena il divieto di commercializzazione in Italia. Per ovviare al problema nel 2003 è nata la versione 802.11h, che integra a 802.11a i requisiti di TPC e DFS richiesti dall'ETSI; questa integrazione è poi stata inclusa nell'ultima revisione IEEE 802.11-2007. In tutte le gamme di frequenza gli apparati lavorano con una larghezza di banda radio di 20MHz; con un solo terminale che comunica a 54Mbps, la banda tipicamente effettiva non sale oltre i 20Mbps, con una efficienza spettrale (il rapporto fra bit-rate effettivo e larghezza di canale radio occupato) minore di 1bps/Hz.

A cavallo del 2000 l'ETSI (European Telecommunications Standards Institute), l'ente europeo di standardizzazione per le comunicazioni, vista la difficoltà tecnologica di innovazione dell'802.11, ha definito una serie di standard per il trasporto di dati IP, ATM e backhauling UMTS. Un comitato, prima RES poi BRAN, ha suddiviso il progetto in 4 soluzioni (TR 101 031 V1.1.1): HiperLAN (HIgh PErformance Radio Local Area Network), HiperLAN type 2, HiperACCESS (type 3) e HiperLINK (type 4).
HiperLAN (EN 300 652 V1.2.1) propone una soluzione wireless locale per il trasporto IP, definendo un livello fisico a 5GHz con modulazioni FSK, e lasciando ai costruttori libertà sul livello datalink.
HiperLAN/2 (TR 101 031 V2.2.1, TS 101 475 V1.3.1, TR 101 683 V1.1.1) riprende il primo tipo e si propone per collegamenti sia punto-punto che punto-multi-punto a brevi distanze, definendo sia il livello fisico, sempre a 5GHz ma con modulazioni anche OFDM, sia il livello datalink, con un meccanismo di contesa del canale in TDMA. La soluzione è pensata per il trasporto di dati IP e trame ATM, e garantisce la Quality of Service (QoS).
HiperACCESS (TR 102 003 V1.1.1) illustra un sistema in OFDM su frequenze non definite per il trasporto dati ad elevata velocità e con bassa latenza per medie distanze, in configurazione punto-multi-punto a settori utilizzando TDMA e FDD; lo scopo sono le applicazioni multimediali e infrastrutture UMTS.
Infine HiperLINK definisce una soluzione punto-punto a banda larga per lunghe distanze (almeno 155Mbps).
Il mercato era però già saturo di prodotti WiFi, e pochi costruttori hanno investito in una nuova tecnologia per il trasporto dati non mobile, sebbene più performante.
I sistemi trasmissivi impiegati dai prodotti HiperLAN/2 utilizzano un sistema di comunicazione dati a 5GHz alternativo a IEEE 802.11. Per l'accesso condiviso si utilizza il TDMA (Time Division Multiple Access), a divisione di tempo, utilizzato anche per la separazione tra trasmissione e ricezione dati (TDD, Time Division Duplexing). Il meccanismo impiegato, utilizzato dal GSM e ripreso nel WIMAX (IEEE 802.16-2004), è quindi parecchio differente dal principio di Ethernet ed è più simile al funzionamento dei sistemi E1 o ATM.
In questo modo le risorse sono assegnate secondo le necessità ai terminali: questo permette un funzionamento garantito; nel caso di più moduli posti in vicinanza, non vi è interferenza fra di loro ed è possibile il riutilizzo delle frequenze. Questo meccanismo dettato dall'infrastruttura assicura ritardi constanti e la banda di rete indicata è un bitrate effettivo. Viene effettivamente gestita la Quality of Service, poiché ai dati con priorità maggiore è assicurata l'allocazione di un tempo apposito.

Insomma, come al solito la tecnologia va` da una parte e interessi ecnomici e commerciali dall'altra. Grazie alla non diffusione di questo protocollo (forse perche` arrivato tardi, e poi il futuro e` mobile, no?) gli apparati sono pochi, costosi, e non interoperabili.
Piu` PDF in unoThu, 9 Jul 09
Come concatenare assieme diversi file in formato PDF in un solo?
Avendo Ghostscript installato, e se non c'e` prima o poi vi servira` e installatelo, lanciare il comando:
gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=finale.pdf primo.pdf secondo.pdf ...
Fatto.
Cisco IOS + NAT + TCP port 2000 troubleSat, 20 Jun 09
I came across a strange behaviour of a Cisco router.
My problem arise using a basic NAT (I was using IOS IP-BB 12.4(15)), e.g.:
int fa0/0
 desc inside interface
 ip address 192.168.0.254 255.255.255.0
 ip nat inside
!
int fa0/1
 desc outside interface
 ip address 10.0.0.1 255.255.255.248
 ip nat outside
!
ip nat inside source list 1 interface fa0/1 overload
access-list 1 permit 192.168.0.0 0.0.0.255
Trying to use the TCP port 2000 as local port or destination port of the connection allow you to set it (TCP SYN, ACK...), but no data is actually trasferred.
Playing with netcat in lab with a local and an external machines:
ext# nc -l -p 2000
loc# nc -p 1025 10.0.0.123 2000
yourname#show ip nat translations 
Pro Inside global      Inside local       Outside local      Outside global
tcp 10.0.0.1:2000      192.168.0.123:2000 10.0.0.123:1025    10.0.0.123:1025
The NAT table is correct, and with tcpdump I saw TCP connection established. But data written won't pass across the NAT interface.
The same is with:
ext# nc -l -p 1025
loc# nc -p 2000 10.0.0.123 1025
yourname#show ip nat translations 
Pro Inside global      Inside local       Outside local      Outside global
tcp 10.0.0.1:1025      192.168.0.123:1025 10.0.0.123:2000    10.0.0.123:2000
Beginning to go crazy, Google has the answer for me (as always if properly asked). It cames out that Cisco is using TCP port 2000 for the "skinny" protocol, a proprietary NAT manager service for VoIP. (and they're some DoS issue: if you do what I was doing, under certain situation you could reboot the router)
Fortunately it's possible to disable this service and use the port 2000 freely:
no ip nat service skinny tcp port 2000
I remain a little perplexed about this way to work. Why don't enable that service if you need it, otherwise don't enable it as default? It should be listed as option in the configuration ("show running-config"), just to be aware of that thing!
SPARC OpenBoot and videoMon, 1 Jun 09
Here I report sequence command on Sun SPARC OpenBoot to change the default video output. This way you can change the primary video card and resolution output.

To step into OpenBoot CLI, if auto-boot it's enabled, press stop + A. Now you should have the ok prompt.
The OpenBoot shows you the devices present in a tree fashion: use cd and ls like in a shell; to show the physical properties of the current device digit .properties. With the show-devs you can look at the complete device tree.

To view the video card currently in use enter printenv and look for the variable output-device; the variable can contains the path of the device or an alias. For example screen is an alias.
To list the aliases present enter devalias without arguments; for example look at the screen alias (in my case /SUNW,ffb, a Sun Creator card).

My goal was to defaults to the integrated ATI VGA video card instead of the 13W3 UPA card. The integrated video card, connected to PCI, had this path: /pci@1f,0/pci@1,1/SUNW,m64B. In facts, if I enter the .properties command, I could see the device_type display line.

To add a new alias permanently use the command nvramrc with a new name different from "screen". I my example: nvramrc vga /pci@1f,0/pci@1,1/SUNW,m64B.
Then to register the new output device use setenv, i.e. setenv output-device vga.

Here you also can change resolution and frequency of video output, adding also this in the output-device variable. For example,setenv output-device screen:r1024x768x75 to set 1024x768 at 75Hz. Note that the availability of this setting may depend from card to card.

To apply the output mode you have to reboot (reset-all). To pass from your added video output to screen default you can type screen output .

top   go to page: 1 2 ->    single page
apache php i prefer firefox W3C html 4.0 compliant W3C css compliant
W3Counter
This website uses only essential technical cookies.
Emmanuel Roberto Richiardone (e AT richiardone DOT eu)

All contents, where applicable and except otherwise specified, are present under GPLv2 or GFDL licenses.
E. Richiardone (e AT richiardone DOT eu)

page viewed 11629 times and generated in 0.004502 s