Archive

Archive for the ‘networking’ Category

Installing ns-2 on windows

November 16th, 2007 No comments

pertama, install dulu cygwinnya….
paket2 yg perlu ada di cygwin : diffutils, gcc, gcc-g++, gawk, tar, gzip, make, patch, perl, dan w32api

kl gak th nginstallnya, ni : http://x.cygwin.com/docs/ug/setup-cygwin-x-installing.html

trus download paket ns2 (all), tarok di c:\cygwin (direktori cygwin), terus jalanin shell cygwinnya

ketikan tar xvfz ns2..(nama filenya).

pdh ke direktori tempat ns2 diekstrak :

cd ns ( tekan tab aja)

terus ketik ./install

lama nginstallnya …

terus cd ns-2.31/

ketik : ./validate

agak lama juga ni, lebih 30 mnt …., kyknya nyampe sejam juga, gak tau juga, tergantung kompi juga. Udah tidur, terus bangun lagi, belum siap2 juga.

yah, setelah 2 jam lebih, selesai juga validatenya..

habis tu, gak tahu…, kayaknya masih ada yang harus di konfig lagi, akhirnya cari2 cara nginstall lagi selain pake cygwin, ketemu :

http://www.item.ntnu.no/fag/ttm4150/labs/ns2win.html

cukup download program [ tcl830 ], [ NS2 ], [ NAM ], [ tofrodos ] ,
terus copy NS2 dan NAM (file nya udah di rename jadi “ns.exe” dan “nam.exe” aja, biar mudah di pake), terus copykan “fromdos.exe” nya ke direktori yang sama dengan …\tcl\bin\, dan ns dan nam juga di situ di tarok.

terus buat file tcl, misalnya :

#Create a simulator object
set ns [new Simulator]

#Define different colors for data flows
$ns color 1 Blue
$ns color 2 Red

#Open the nam trace file
set nf [open out.nam w]
$ns namtrace-all $nf

#Define a ‘finish’ procedure
proc finish {} {
global ns nf
$ns flush-trace
#Close the trace file
close $nf
#Execute nam on the trace file
exec nam out.nam &
exit 0
}

#Create four nodes
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]

#Create links between the nodes
$ns duplex-link $n0 $n2 1Mb 10ms DropTail
$ns duplex-link $n1 $n2 1Mb 10ms DropTail
$ns duplex-link $n3 $n2 1Mb 10ms SFQ

$ns duplex-link-op $n0 $n2 orient right-down
$ns duplex-link-op $n1 $n2 orient right-up
$ns duplex-link-op $n2 $n3 orient right

#Monitor the queue for the link between node 2 and node 3
$ns duplex-link-op $n2 $n3 queuePos 0.5

#Create a UDP agent and attach it to node n0
set udp0 [new Agent/UDP]
$udp0 set class_ 1
$ns attach-agent $n0 $udp0

# Create a CBR traffic source and attach it to udp0
set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp0

#Create a UDP agent and attach it to node n1
set udp1 [new Agent/UDP]
$udp1 set class_ 2
$ns attach-agent $n1 $udp1

# Create a CBR traffic source and attach it to udp1
set cbr1 [new Application/Traffic/CBR]
$cbr1 set packetSize_ 500
$cbr1 set interval_ 0.005
$cbr1 attach-agent $udp1

#Create a Null agent (a traffic sink) and attach it to node n3
set null0 [new Agent/Null]
$ns attach-agent $n3 $null0

#Connect the traffic sources with the traffic sink
$ns connect $udp0 $null0
$ns connect $udp1 $null0

#Schedule events for the CBR agents
$ns at 0.5 “$cbr0 start”
$ns at 1.0 “$cbr1 start”
$ns at 4.0 “$cbr1 stop”
$ns at 4.5 “$cbr0 stop”
#Call the finish procedure after 5 seconds of simulation time
$ns at 5.0 “finish”

#Run the simulation
$ns run

simpan, misalnya tes.tcl

terus jalankan
ns tes.tcl





Categories: networking Tags:

mount shared folder windows dr ubuntu

November 5th, 2007 No comments

setelah samba di install, dan sharing2 file pun berhasil, namun untuk mempermudah proses sharing file, maka shared folder pun di mount, dengan :

labkom@labkom-desktop:~$ sudo smbmount "//ther12k/share" /mnt/ther12kCould not resolve mount point /mnt/ther12k

oops, kenapa ya?

ternyata, direktori /mnt/ther12k belum di buat, buat dulu direktorinya :

labkom@labkom-desktop:/mnt$ sudo mkdir ther12k

ok, deh jadi :

labkom@labkom-desktop:/mnt$ sudo smbmount "//ther12k/share" /mnt/ther12kPassword:labkom@labkom-desktop:/mnt$ cd /mnt/ther12klabkom@labkom-desktop:/mnt/ther12k$ lsad muncher                compressed  music                      ProgramsAdMuncher v4.7.27105.exe  Documents   NOD32 Antivirus 3.0.551.0
Categories: networking Tags:

sharing file windows-linux dengan samba

November 4th, 2007 No comments

di labkom osnya ada linux ma windows, jadi perlu sharing antar keduanya, terus pake samba.

“Samba adalah implementasi dari SMB protocol yaitu protocol yang digunakan oleh sistem operasi MS seperti MS Windows untuk men-sharing file dan printer. Dengan SMB anda bisa mengakses file & printer yang di-share oleh komputer Windows atau men-share file & printer di komputer linux anda”

caranya : install samba di linux, dalam hal ini distro linuxnya ubuntu 7.1

labkom@labkom-desktop:~$ sudo apt-get install sambaPassword:Reading package lists... DoneBuilding dependency treeReading state information... DoneRecommended packages:smbldap-toolsThe following NEW packages will be installed:samba0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.Need to get 3341kB of archives.After unpacking 8184kB of additional disk space will be used.WARNING: The following packages cannot be authenticated!sambaInstall these packages without verification [y/N]? yGet:1 http://id.archive.ubuntu.com feisty-updates/main samba 3.0.24-2ubuntu1.2 [3341kB]Fetched 3341kB in 11s (295kB/s)Preconfiguring packages ...Selecting previously deselected package samba.(Reading database ... 107379 files and directories currently installed.)Unpacking samba (from .../samba_3.0.24-2ubuntu1.2_i386.deb) ...Setting up samba (3.0.24-2ubuntu1.2) ...Generating /etc/default/samba...tdbsam_open: Converting version 0 database to version 3.account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0account_policy_get: tdb_fetch_uint32 failed for field 2 (password history), returning 0account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to change password), returning 0account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0Importing accout for root...okImporting accout for daemon...okImporting accout for bin...okImporting accout for sys...okImporting accout for sync...okImporting accout for games...okImporting accout for man...okImporting accout for lp...okImporting accout for mail...okImporting accout for news...okImporting accout for uucp...okImporting accout for proxy...okImporting accout for www-data...okImporting accout for backup...okImporting accout for list...okImporting accout for irc...okImporting accout for gnats...okImporting accout for nobody...okImporting accout for dhcp...okImporting accout for syslog...okImporting accout for klog...okImporting accout for messagebus...okImporting accout for avahi-autoipd...okImporting accout for avahi...okImporting accout for cupsys...okImporting accout for haldaemon...okImporting accout for hplip...okImporting accout for gdm...okImporting accout for labkom...okImporting accout for sshd...okImporting accout for mysql...ok* Starting Samba daemons... [ OK ]

terus kita coba mengakses sharing file di windows, caranya :

pertama lihat dulu folder yg bisa di share :

smbclient -L nama komputer

contoh :

labkom@labkom-desktop:~$ sudo smbclient -L ther12kPassword:Domain=[THER12K] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

   Sharename       Type      Comment   ---------       ----      -------   E$              Disk      Default share   IPC$            IPC       Remote IPC   share           Disk   My Disc (D)     Disk   ADMIN$          Disk      Remote Admin   C$              Disk      Default shareDomain=[THER12K] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

   Server               Comment   ---------            -------

   Workgroup            Master   ---------            -------

terus akses foldernya :

caranya :

smbclient “//namakomputer/foldershare”

contoh:

labkom@labkom-desktop:~$ sudo smbclient "//ther12k/share"Password:Domain=[THER12K] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]smb: \> ls.                                   D        0  Sun Nov  4 06:03:55 2007..                                  D        0  Sun Nov  4 06:03:55 2007ad muncher                          D        0  Sun Nov  4 06:00:52 2007AdMuncher v4.7.27105.exe            A   473845  Sat Oct 28 10:44:34 2006compressed                          D        0  Mon Nov  5 16:44:53 2007Documents                           D        0  Mon Nov  5 16:44:20 2007music                               D        0  Sun Nov  4 06:03:53 2007NOD32 Antivirus 3.0.551.0           D        0  Sun Nov  4 06:00:53 2007Programs                            D        0  Sun Nov  4 09:01:35 2007

           39205 blocks of size 1048576. 38009 blocks available

udah gitu pada prompt dapat diketikkan perintah-perintah yang dipakai di ftp seperti ls, get, put, mget, mput, binary dsb. Kalau sudah selesai ketik saja quit.

contoh (mengambil file AdMuncher v4.7.27105.exe) :

smb: \> get "AdMuncher v4.7.27105.exe"getting file \AdMuncher v4.7.27105.exe of size 473845 as AdMuncher v4.7.27105.exe (754.9 kb/s) (average 754.9 kb/s)smb: \> exitlabkom@labkom-desktop:~$ lsAdMuncher v4.7.27105.exe  ExamplesDesktop                   fgs-mapserver_phpmapscript_4.8.2-1.2-linux-i386.bin

untuk mengakses folder share ubuntu dr windows, samba harus dikonfigurasi :

sudo gedit /etc/samba/smb.conf

contoh konfigurasi, tanpa password

pada bagian authentication, ganti :

security=user

dengan :

security=share

terus untuk folder yg di share, seperti ini :

[labkom]
path = /home/labkom
available = yes
browsable = yes
public = yes
writeable=no

restart sambanya :

labkom@labkom-desktop:~$ sudo /etc/init.d/samba restart
* Stopping Samba daemons… [ OK ]
* Starting Samba daemons… [ OK ]

Categories: networking Tags:

mengakses shell ubuntu dr windows

November 4th, 2007 No comments

karena, pake vnc terlalu berat, aku coba untuk mengakses shellnya saja, dengan putty.
pertama isntall open ssh :

sudo apt-get install ssh

masukin passwordnya.
terus dengan memakai putty dr windows pilih ssh, dan masukin ipnya :

terus masukin passwordnya :

jadi deh :

Shell

Categories: networking Tags:

remote desktop ubuntu dari windows dengan vnc

November 4th, 2007 No comments

pertama, karena mw nginstall web server di komp ubuntu, sambil browsing2 di komp windows, karena kejauhan, terus cari cara biar bisa remote dekstop dr windows. terus browsing2 deh.

caranya nginstallnya gampang banget.

install nvc4server di ubuntu :

labkom@labkom-desktop:~$ sudo apt-get install vnc4server
Password:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Suggested packages:
vnc-java
The following NEW packages will be installed:
vnc4server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1089kB of archives.
After unpacking 2507kB of additional disk space will be used.
Get:1 http://security.ubuntu.com feisty-security/universe vnc4server 4.1.1+xorg1.0.2-0ubuntu4.1 [1089kB]
Fetched 1089kB in 2m41s (6733B/s)
Selecting previously deselected package vnc4server.
(Reading database … 105508 files and directories currently installed.)
Unpacking vnc4server (from …/vnc4server_4.1.1+xorg1.0.2-0ubuntu4.1_i386.deb) …
Setting up vnc4server (4.1.1+xorg1.0.2-0ubuntu4.1) …


terus jalanin vnc4servernya :

labkom@labkom-desktop:~$ vncserver -geometry 800×600 -depth 24

buka system>preferences>remote desktop

terus isikan password yg diinginkan, password itu untuk konek ke ubuntu nantinya.

pass

udah gitu download vnc4viewer buat windowsnya di : http://www.realvnc.com/

jalankan vnc4viewer :

Login

masukin ip komp ubuntunya, terus password yg udah di set tadi :

Inspass

ok, remote desktop :

Jadi_1

Categories: networking Tags: