Showing posts with label network. Show all posts
Showing posts with label network. Show all posts

2010-12-20

A walkaround: assign a static IP to eth0 for nfs remotely start system

I tried to boot the target board "armsys6410" by remotely loading a root file system through nfs. According to the given user manual, the argument of u-boot is

setenv bootargs "root=/dev/nfs nfsroot=192.168.253.2:/hom/localhost/armsys6410/root/ ip=192.168.253.12:192.168.253.2:192.168.253.2:255.255.255.0:armsys.hzlitai.com:eth0:off console=ttySAC0,115200"
Here /home/localhost/armsys6410/root is the file system located at my host machine. 192.168.253.12 is the static ip of board, while 192.168.253.2 should be static ip of host machine.

The problem of mine is I cannot fix a static IP to eth0, when I use at the same time wlan0. I didn't find a ultimate solution for the problem. Here is just walkaround:

Precondition: minicom has been correctly configured, serial port and cross-over cable have been correctly connected between host and target.

1) reset the board
2) press any key to suspend the booting (I use u-boot here)
3) >sudo ifconfig eth0 192.168.253.2 netmask 255.255.255.0 up
4) in minicom, input "reset"


Then the board can start with given root file system

2010-07-18

GSpace for Online Disk

I setup a 7G Gspace online disk. Actually, what you need is a free gmail acount and installation of an add-on on your firefox browser. See the http://www.getgspace.com/ for installation and usage.

2010-06-14

Some Terms of VoIP


VoIP: voice over IP network.
SIP: Session Initiation Protocol
miniSipServer: a VOIP server for Microsoft windows system

2010-05-28

nfs-kernel-server vs. nfs-user-server

Max tried to install nfs-server on his Debian machine.
>sudo apt-get install nfs-kernel-server
Everything looks fine, except of this warning message:
 
Not starting NFS kernel daemon: no support in current kernel. (warning)
 
It seems that the current kernel doesn't support nfs kernel daemon. After googling for sometime, I found that rebuild the kernel is the solution for the problem (http://computingplugs.com/index.php/NFS_server). It is funny that my self-built kernel 2.6.34 has no the option

[*] Root file system on NFS

in 'make menuconfig'.

The other solution is to install nfs-user-server, which runs in the user-mode, not in kernel-model.

>sudo apt-get install nfs-user-server
>/etc/init.d/nfs-user-server restart

Reference:

 
 

2010-05-15

Setup Wireless of ThinkPad SL510 in Debian

Thinkpad sl510 has a intel wireless card:
==============
Intel(R) WiFi Link 1000 BGN
==============

Unfortunately, Debian Lenny with kernel  2.6.26 cannot support this card. You could install a 2.6.32 kernel image from backport. Follow the ref [1].
Or, you could directly compile a 2.6.33 kernel from source code. According to [3], the Intel Wireless WiFi Link 1000 is supported since 2.6.33. Follow the tutorial in [4]

Afterwards, Max installed a gui-based network manager software wicd-client.
Follow the ref [2].

Reference:

2010-05-05

PsTools

"PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. PsExec's most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems. "
 Reference
http://technet.microsoft.com/en-gb/sysinternals/bb897553.aspx

2010-04-12

Setup Google App Email

Max cannot bear the poor service of Yahoo Small Business any more. One day, he decided to give up his web hosting at Yahoo and transfer his domain to www.namecheap.com to setup free google App Email.

Transfer domain to www.namecheap.com. Follow the steps of "Transfer Process". Two things are important related with your current registrar:
  1. You need to unlock your domain
  2. You need to input EPP Key (Authorization Key) of the domain.
1) Domain transfer: For Yahoo Small business, you can find both of them at "Domain control panel".  In the end, you will be informed by email to approve the transfer. The completion of transfer takes maxiaml 5 days.
According to ICANN's 'Policy on Transfer of Registrations between Registrars' (http://www.icann.org/en/transfers/policy-en.htm), losing registrar has 5 days to release the domain, from the moment they get transfer out notification.
2) Change DNS server: Use the DNS server of NameCheap. By select "Transfer DNS to NameCheap".
3) Create a Google App Standard edition using your domain. It is simple.
4) Verify the domain ownership.There are two ways:
  1. Change domain CNAME record 
Because Max has no webhost but only domain, he can only verify the ownership by changing CNAME record. At NameCheap, Select your domain->All Host Record. Set the subdomain record as screenshot:


5) Test: Open your webmail at "mail.mydomain.com" and try to send a email to yourself to check if it works.
6) Don't forget to cancel the service of your old privider. Try to get refund. Yahoo has 30-Day Satisfaction Guarantee.

Reference:

2010-01-20

tracert

Ping shows whether the server is online, while tracert checks the way to reach the server.
See the comparison at http://www.werle.com/intagent/k11_4.htm

2009-10-28

Svn Access through a Proxy

The Subversion client can go through a proxy, if you configure it to do so.

First, edit your servers configuration file to indicate which proxy to use. The file's location depends on your operating system. On Linux or Unix it is located in the directory ~/.subversion. On Windows it is in %APPDATA%\Subversion (try echo %APPDATA%, note this is a hidden directory).
Example: Edit the servers file and add something like at global session:
[global]
http-proxy-host = your.proxy.name
http-proxy-port = 3128
Check your internet browser setting, if you have only a proxy configuration, for example http://proxyconf.some.name. You can simply open this link using your browser and download the configuration script, I believe you can find the proxy server and the port.

2009-10-26

Don't Forget Firewall for VMware Bridged Network

Max has a windows host and debian vm guest. In host-only and NAT vm network, everything fine. But if the vmware has a bridged network, host has no access the guest anymore. The basic differences between the three network configurations is briefly explain here. For example, putty. Don't forget add an exception to host firewall, in which your vmware workstation should not be blocked.

VMWare Network Modes

VMware has three kinds of network configurations:
  • Host-Only Networking: Principally, the virtual guest can only talk with host and has no access to outside. But, with help of proxy server, it is possible.
  • Network Address Translation (NAT) The guest can connect to a TCP/IP network using a Token Ring adapter on the host computer. The virtual machine does not have its own IP address on the external network. Instead, a separate private network is set up on the host computer.
  • Bridged Networking: Bridged mode lets the virtual machine share the host's Ethernet connection, while appearing as a separate machine with its own MAC and TCP/IP address.



References:
  1. VMware Networks, Bridged vs. Nat vs. Host
  2. Network address translation

2009-08-30

"Acquiring network address" problem of wireless LAN

Max's laptop has a problem of wireless connection, status is stuck always at endless "Acquiring network address". The reason lies on the client adaptor doesn't support the encryption method used in router. Solution is found here
  1. Change SSID in rounter to create a new profile.
  2. Use basic WEP 64bit ASCII encryption.
  3. now wireless works.

2009-08-20

Setup SVN+SSL server at home

Max finally setup a svn server at home.

0) Install Debian Lenny
1) DynDNS dynamical update your IP to dns
2) Set Port forwarding on router, open 80 (HTTP) and 443 (HTTPS)
3) Install apache + ssl. Some workaround about missing script.
4) If you get following message when you restart "/etc/init.d/apache restart". You need to read this artical
># /etc/init.d/apache2 restart
Restarting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

5) Install and setup svn.

2009-08-14

Upload your DHCP IP to FTP server

1) create ip_ftp.bat
====ip_ftp.bat ==========

@echo off
curl.exe http://whatismyip.com/automation/n09230945NL.asp > ip.txt
ftp.exe -s:ftp.txt.bat
2) create ftp.txt.bat
==== ftp.txt.bat ==========
open $ftpserver
$ftpuser
$password
put "ip.txt"
bye
3) download curl.exe to the same fold
4) Run ip_ftp.bat
5) Check if upload success by "curl.exe $server/ip.txt" (your IP will be shown)
6) Put your script into scheduled tasks

2009-08-13

Extract DHCP dynamic IP

A previous article has explained how to extract static IP using a batch. But if your computer has a dynamic IP assigned by DHCP server, how can you get your IP? ipconfig? let's see.



Look! You just got an useless local IP 192.168.x.x.
  • Where is your current WAN IP? Click here. Now you got a your real IP, at right now.
  • Why this happens? See the explanation here. The reason is your router. It determines the IP in WAN, but you or your code can only get it a LAN IP from it.
  • How let your script get the WAN IP? Try this! "curl http://whatismyip.com/automation/n09230945NL.asp". Of course, you need to install the curl at first.
  • How to let your code get WAN IP? Use libcurl.

batch file to extract static IP

If you installed VMware in your windows computer, more IPs will be displayed by ipconfig. How to seperate your static IP from VM IP? Good news: all vm IP start with 192.168. See the following batch:




@echo off

IPCONFIG |FIND "IP" | FIND /V "192.168" > %temp%\TEMPIP.txt
FOR /F "tokens=2 delims=:" %%a in (%temp%\TEMPIP.txt) do set IP=%%a
del %temp%\TEMPIP.txt
set IP=%IP:~1%
echo %IP% >%temp%\ip.txt
echo The current IP address is "%IP%"

2009-08-11

DHCP at home

DHCP is short for Dynamic Host Configuration Protocol. Most of house computers access the internet as DHCP clients. For example, as Max starts his house computer, as a DHCP client, it sends request to DHCP server (owned by ISP) and get a response with a dynamical configuration information of network:
  • IP Address
  • Subnet Mask
  • Default Gateway
  • DNS server
  • ...
The most important is IP address. DHCP client will never get a static IP for a long term. For example, T-online (ISP) automatically recycles all the IPs and assigns a new IP to your computer (DHCP client) in 24 hours. Actually, all the DHCP server has somehow been configured that client IP will be reassigned within a certain time span and IP ranges. What is DHCP good for? Because static IP is valuable resource of www, while DHCP is enable to more efficiently reuse the IP resource.

Just have a fun. If some marketing people of ISP keep bothering you with some blabla.., just ask him this question:

"Could you provide me a static IP with this price?"

He will shut up immediately. Trust me.

2009-08-05

Putty connets to local VM

On the windows host, Max prefers to use Putty console instead of directly using VM windows to play the local Linux VM. Everyone know it. Since Putty uses SSH protocol to connect to server, it is logical that we have to install SSH daemon on the Linux VM Guest at first.


1) Install SSH package
>apt-get install openssh-server

2) Start SSH Daemon
>/etc/init.d/ssh restart

3) Get IP of guest
>ifconfig

4) Start Putty from Windows Host and connect to the Guest IP


2009-08-03

gconftool - preferences setting

As Max seeked to setting Proxy for his Debian VM, he found an interesting configuration tool in GNOME, "gconftool", which is used to manage all kinds of appliation preferences, i.e, proxy server, desktop and so on. He decided to spend sometime to learn it.

The cool thing is that " if someone changes a setting by gconftool, it instantly updates in all the applications that interested in this setting" . Simple but powerful, thousand times better than nasty Windows Registry. Take the example of set proxy server in article "Make Debian work better" Let's see how it work:

  • > gconftool -s /system/http_proxy/use_http_proxy -t bool true
  • > gconftool -s /system/http_proxy/host -t string ${PROXYSERVER}
  • > gconftool -s /system/http_proxy/port -t int ${PORT}
  • > gconftool -s /system/http_proxy/use_same_proxy -t bool true
  • > gconf -s /system/proxy/mode -t string manual

No news is good news! At the time, if you open System->preference->Network Proxy, you would find all the settings have been updated, without logout or restart. More explaination in detials can be found in Victor's blog .

Where are these preference value saved? Here you are:

>cat .gconf/system/http_proxy/%gconf.xml


You see, so-called repository is nothing but a just well-structured xml data. More precisely, the repository is not single xml but a series of xml in different storage locations (Configuration sources). You can search a preference in repository as

> gconftool -g /system/http_proxy/port
81

Or recursively show all preference in the path

> gconftool -R /system/http_proxy

use_http_proxy = true
use_authentication = false
host = ${PROXYSERVER}
authentication_user =
ignore_hosts = [localhost,127.0.0.0/8]
use_same_proxy = true
authentication_password =
port = 81

By default, GConf searches the xml files in the following order:

  • xml:readonly:/etc/gconf/gconf.xml.mandatory (w:root)
  • include "$(HOME)/.gconf.path"
  • xml:readwrite:$(HOME)/.gconf (The above setting is save here)
  • xml:readonly:/etc/gconf/gconf.xml.defaults (w:root)