Журнал лабораторных работ

Содержание

Журнал

Понедельник (12/12/11)

/dev/ttyp0
09:19:42
#l3 pwd
/users/NT-FBSDnet/12.12.11/fbsd.net.nt/root
09:19:46
#vim install
--- /tmp/l3-saved-1309.29233.9525	2011-12-12 10:20:15.000000000 +0200
+++ install	2011-12-12 10:20:43.000000000 +0200
@@ -7,8 +7,8 @@
 #
 # Set this variables before installation:
 
-lilalo_user=${lilalo_user:-NT-FBSDnet}
-lab=${lab:-12.12.11}
+lilalo_user=${lilalo_user:-12.12.2011}
+lab=${lab:-NT-FBSDnet}
 install_l3bashrc_for_this_users=${users:-"root user"}  # users who will use l3agent and l3script
 lilalo_context="/users/${lilalo_user}/${lab}/${hostname}"
 
09:20:43
#vim install
--- /tmp/l3-saved-1309.22875.28486	2011-12-12 10:20:57.000000000 +0200
+++ install	2011-12-12 10:21:09.000000000 +0200
@@ -7,7 +7,7 @@
 #
 # Set this variables before installation:
 
-lilalo_user=${lilalo_user:-12.12.2011}
+lilalo_user=${lilalo_user:-12-12-2011}
 lab=${lab:-NT-FBSDnet}
 install_l3bashrc_for_this_users=${users:-"root user"}  # users who will use l3agent and l3script
 lilalo_context="/users/${lilalo_user}/${lab}/${hostname}"
09:21:09
#bash install
Installing dependencies...
Ok
Downloading l3bashrc...
|   l3bashrc                                              7821  B 6317 kBps
Ok
Downloading l3prompt...
|   l3prompt                                               234  B 1409 kBps
Ok
Downloading l3-agent...
|   l3-agent                                                32 kB 6666 kBps
...
If you use xgu.ru backend, your labs will be available at
http://xgu.ru/l3//users/12-12-2011/NT-FBSDnet/fbsd.net.nt
Use commands
 $ l3cd /users/12-12-2011/MY-NEW-CONTEXT/fbsd.net.nt/USER
 $ l3pwd
to change and to know your current context.
For further information see http://xgu.ru/lilalo/ (in Russian).
Thank you gor using LiLaLo.
Happy Labbing!
(don't forget to restart bash or relogin)
/dev/ttyp0
09:21:24
#l3 pwd
/users/12-12-2011/NT-FBSDnet/fbsd.net.nt/root
09:21:27
#vim /home/user/.bashrc
--- /tmp/l3-saved-1728.13308.27223	2011-12-12 10:21:38.000000000 +0200
+++ /home/user/.bashrc	2011-12-12 10:22:00.000000000 +0200
@@ -1 +1,2 @@
-[ $0 == l3script ] && . /home/user/.lilalo/l3bashrc && _l3_start
+#[ $0 == l3script ] && . /home/user/.lilalo/l3bashrc && _l3_start
+. /home/user/.lilalo/l3bashrc && _l3_start
09:22:00
#vim /home/user/.bash_profile
--- /tmp/l3-saved-1728.5816.8622	2011-12-12 10:22:04.000000000 +0200
+++ /home/user/.bash_profile	2011-12-12 10:22:25.000000000 +0200
@@ -1,2 +1,2 @@
+. ~/.bashrc
 l3-agent
-
09:22:25
#su user -

/dev/ttyp0
09:23:00
#vim .bashrc
09:23:00
#vim .bashrc
09:23:00
#vim .bashrc
09:23:00
#vim .bashrc
09:23:00
#vim .bashrc
09:23:04
#~
. ~/.bashrc
l3-agent
".bash_profile" 3L, 22C
09:23:04
#~
. ~/.bashrc
l3-agent
".bash_profile" 3L, 22C
09:23:04
#~
. ~/.bashrc
l3-agent
".bash_profile" 3L, 22C
09:23:04
#~
. ~/.bashrc
l3-agent
".bash_profile" 3L, 22C
09:23:04
#~
. ~/.bashrc
l3-agent
".bash_profile" 3L, 22C
09:23:11
#~

09:23:11
#~

09:23:11
#~

09:23:11
#~

09:23:11
#~

09:23:13
#ls
.bash_history   .cache          .l3rc           .viminfo
.bash_profile   .cshrc          .lilalo         .vimrc
.bash_profile~  .history        .login          install
.bashrc         .k5login        .profile        install~
09:23:13
#ls
.bash_history   .cache          .l3rc           .viminfo
.bash_profile   .cshrc          .lilalo         .vimrc
.bash_profile~  .history        .login          install
.bashrc         .k5login        .profile        install~
09:23:13
#ls
.bash_history   .cache          .l3rc           .viminfo
.bash_profile   .cshrc          .lilalo         .vimrc
.bash_profile~  .history        .login          install
.bashrc         .k5login        .profile        install~
09:23:13
#ls
.bash_history   .cache          .l3rc           .viminfo
.bash_profile   .cshrc          .lilalo         .vimrc
.bash_profile~  .history        .login          install
.bashrc         .k5login        .profile        install~
09:23:13
#ls
.bash_history   .cache          .l3rc           .viminfo
.bash_profile   .cshrc          .lilalo         .vimrc
.bash_profile~  .history        .login          install
.bashrc         .k5login        .profile        install~
09:23:14
#rm install~

09:23:14
#rm install~

09:23:14
#rm install~

09:23:14
#rm install~

09:23:14
#rm install~

/dev/ttyp0
09:31:12
#ls
.bash_history   .bashrc         .history        .lilalo         .viminfo
.bash_profile   .cache          .k5login        .login          .vimrc
.bash_profile~  .cshrc          .l3rc           .profile
09:31:15
#vim .l3rc

Вторник (12/13/11)

/dev/ttyp0
09:20:39
#locate l3-bashrc

09:20:47
#locate l3-agent
/root/.lilalo/l3-agent.pid
/usr/home/user/.lilalo/l3-agent.pid
/usr/local/bin/l3-agent
09:20:53
#vim .bash_profile
--- /tmp/l3-saved-934.26453.32243	2011-12-13 10:21:07.000000000 +0200
+++ .bash_profile	2011-12-13 10:21:15.000000000 +0200
@@ -1,3 +1,2 @@
 . ~/.bashrc
-l3-agent
-
+. /usr/local/bin/l3-agent
09:21:15
#vim /home/user/.bash_profile
--- /tmp/l3-saved-934.2525.18582	2011-12-13 10:21:23.000000000 +0200
+++ /home/user/.bash_profile	2011-12-13 10:21:32.000000000 +0200
@@ -1,2 +1,2 @@
 . ~/.bashrc
-l3-agent
+. /usr/local/bin/l3-agent
прошло 49 минут
/dev/ttyp0
10:10:15
#ps aux|grep l3

10:10:21
#vim .bash_profile
--- /tmp/l3-saved-950.3028.5614	2011-12-13 11:10:26.000000000 +0200
+++ .bash_profile	2011-12-13 11:10:30.000000000 +0200
@@ -1,2 +1 @@
 . ~/.bashrc
-. /usr/local/bin/l3-agent
10:10:30
#vim .bashrc
--- /tmp/l3-saved-950.20264.24500	2011-12-13 11:10:35.000000000 +0200
+++ .bashrc	2011-12-13 11:10:41.000000000 +0200
@@ -1 +1,2 @@
 . /root/.lilalo/l3bashrc && _l3_start
+l3-agent
10:10:41
#vim /home/user/.bash_profile
--- /tmp/l3-saved-950.12112.15733	2011-12-13 11:10:53.000000000 +0200
+++ /home/user/.bash_profile	2011-12-13 11:10:57.000000000 +0200
@@ -1,2 +1 @@
 . ~/.bashrc
-. /usr/local/bin/l3-agent
10:10:57
#vim /home/user/.bashrc
--- /tmp/l3-saved-950.26736.17380	2011-12-13 11:11:00.000000000 +0200
+++ /home/user/.bashrc	2011-12-13 11:11:09.000000000 +0200
@@ -1,2 +1,3 @@
 #[ $0 == l3script ] && . /home/user/.lilalo/l3bashrc && _l3_start
 . /home/user/.lilalo/l3bashrc && _l3_start
+l3-agent

Воскресенье (02/12/12)

/dev/ttyp0
12:21:37
#ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:16:4e:00:00:00
        inet 192.168.13.201 netmask 0xffffff00 broadcast 192.168.13.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
12:21:45
#ping ya.ru
ping: cannot resolve ya.ru: Host name lookup failure
12:22:03
#vim /etc/resolv.conf
--- /tmp/l3-saved-918.26173.26045	2012-02-12 13:22:28.000000000 +0200
+++ /etc/resolv.conf	2012-02-12 13:22:50.000000000 +0200
@@ -1,2 +1,2 @@
-domain	net.nt
-nameserver	192.168.16.254
+domain		net.nt
+nameserver	192.168.13.253
12:22:50
#ping ya.ru
PING ya.ru (213.180.193.3): 56 data bytes
64 bytes from 213.180.193.3: icmp_seq=0 ttl=56 time=21.590 ms
64 bytes from 213.180.193.3: icmp_seq=1 ttl=56 time=22.620 ms
^C
--- ya.ru ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 21.590/22.105/22.620/0.515 ms
12:22:54
#uname -a
FreeBSD fbsd.net.nt 7.4-RELEASE FreeBSD 7.4-RELEASE #0: Thu Feb 17 03:51:56 UTC 2011     root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
12:22:58
#cd /usr/src/
COPYRIGHT          MAINTAINERS        Makefile.inc1      README             sys/
LOCKS              Makefile           ObsoleteFiles.inc  UPDATING
12:22:58
#cd /usr/src/
COPYRIGHT          MAINTAINERS        Makefile.inc1      README             sys/
LOCKS              Makefile           ObsoleteFiles.inc  UPDATING
12:22:58
#cd /usr/src/sys/
Makefile    cam/        crypto/     geom/       isa/        net80211/   netipsec/   nfs/        opencrypto/ rpc/        tools/
amd64/      cddl/       ddb/        gnu/        kern/       netatalk/   netipx/     nfs4client/ pc98/       security/   ufs/
arm/        compat/     dev/        i386/       libkern/    netgraph/   netnatm/    nfsclient/  pccard/     sparc64/    vm/
boot/       conf/       fs/         i4b/        modules/    netinet/    netncp/     nfsserver/  pci/        sun4v/      x86/
bsm/        contrib/    gdb/        ia64/       net/        netinet6/   netsmb/     nlm/        powerpc/    sys/        xdr/
12:22:58
#cd /usr/src/sys/i386/co
compile/ conf/
12:22:58
#cd /usr/src/sys/i386/co
compile/ conf/
12:22:58
#cd /usr/src/sys/i386/conf/

12:29:03
#ls
.cvsignore      DEFAULTS        GENERIC         GENERIC.hints   MAC             Makefile        NOTES           PAE             XBOX
12:29:04
#cp GENERIC{,.def}

12:29:16
#ls
.cvsignore      DEFAULTS        GENERIC         GENERIC.def     GENERIC.hints   MAC             Makefile        NOTES           PAE             XBOX
12:29:17
#vim GENERIC
12:32:09
#options NF
"GENERIC" 330L, 12739C
cpu             I686_CPU
ident           GENERIC
# To statically compile in device wiring instead of /boot/device.hints
#hints          "GENERIC.hints"         # Default places to look for devices.
makeoptions     DEBUG=-g                # Build kernel with gdb(1) debug symbols
options         SCHED_ULE               # ULE scheduler
options         PREEMPTION              # Enable kernel thread preemption
options         INET                    # InterNETworking
options         INET6                   # IPv6 communications protocols
options         SCTP                    # Stream Control Transmission Protocol
options         FFS                     # Berkeley Fast Filesystem
options         IPFIREWALL
options         IPFIREWALL_VERBOSE
options         IPFIREWALL_VERBOSE_LIMIT=500
options         IPDIVERT
options         SCHED_ULE               # ULE scheduler
options         SOFTUPDATES             # Enable FFS soft updates support
options         UFS_ACL                 # Support for access control lists
options         UFS_DIRHASH             # Improve performance on big directories
"GENERIC" 336L, 12845C written
12:37:09
#ipfw list
ipfw: getsockopt(IP_FW_GET): Protocol not available
12:37:18
#vim GENERIC
12:40:31
#Enable FFS soft updates support

12:40:32
#vim GENERIC
12:40:43
#Enable FFS soft updates support
#
# GENERIC -- Generic kernel configuration file for FreeBSD/i386
#
# For more information on this file, please read the handbook section on
# Kernel Configuration Files:
#
#    http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html
#
# The handbook is also available locally in /usr/share/doc/handbook
# if you've installed the doc distribution, otherwise always see the
...
options         IPFIREWALL
options         IPFIREWALL_VERBOSE
options         IPFIREWALL_VERBOSE_LIMIT=500
options         IPDIVERT
options         SCHED_ULE               # ULE scheduler
options         PREEMPTION              # Enable kernel thread preemption
options         INET                    # InterNETworking
options         INET6                   # IPv6 communications protocols
options         SCTP                    # Stream Control Transmission Protocol
options         FFS                     # Berkeley Fast Filesystem
12:40:54
#Enable FFS soft updates support
options         IPFIREWALL_VERBOSE
options         IPFIREWALL_VERBOSE_LIMIT=500
options         IPDIVERT
options         SCHED_ULE               # ULE scheduler
options         PREEMPTION              # Enable kernel thread preemption
options         INET                    # InterNETworking
options         INET6                   # IPv6 communications protocols
options         SCTP                    # Stream Control Transmission Protocol
options         FFS                     # Berkeley Fast Filesystem
options         DUMMYNET
options         UFS_DIRHASH             # Improve performance on big directories
options         UFS_GJOURNAL            # Enable gjournal-based UFS journaling
options         MD_ROOT                 # MD is a potential root device
options         NFSCLIENT               # Network Filesystem Client
options         NFSSERVER               # Network Filesystem Server
options         NFSLOCKD                # Network Lock Manager
options         NFS_ROOT                # NFS usable as /, requires NFSCLIENT
options         MSDOSFS                 # MSDOS Filesystem
"GENERIC" 336L, 12862C written
/dev/ttyp0
12:43:01
#cd /usr/src/sys/i386/conf

12:43:23
#ls
.cvsignore      GENERIC.def     MAC             PAE
DEFAULTS        GENERIC.hints   Makefile        XBOX
GENERIC         GENERIC~        NOTES
12:43:24
#vim GENERIC
12:43:32
#Improve performance on big directories
Kernel build directory is ../compile/GENERIC
Don't forget to do ``make cleandepend && make depend''
прошла 81 минута
/dev/ttyv0
14:04:37
#ping ya.ru
ping: cannot resolve ya.ru: Host name lookup failure
14:04:40
#ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:16:4e:00:00:00
        inet 192.168.13.201 netmask 0xffffff00 broadcast 192.168.13.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
14:04:45
#ping 192.168.13.253
PING 192.168.13.253 (192.168.13.253): 56 data bytes
ping: sendto: Permission denied
ping: sendto: Permission denied
ping: sendto: Permission denied
^C
--- 192.168.13.253 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
/dev/ttyv0
14:05:19
#ipfs list

14:05:51
#ipfw list
65535 deny ip from any to any
14:05:55
#ipfw add 100 allow ip form any to any
ipfw: missing ``from''
14:06:12
#ipfw add 100 allow ip from any to any
00100 allow ip from any to any
14:06:20
#ping ya.ru
PING ya.ru (87.250.250.3): 56 data bytes
64 bytes from 87.250.250.3: icmp_seq=0 ttl=58 time=24.002 ms
64 bytes from 87.250.250.3: icmp_seq=1 ttl=58 time=22.758 ms
^C
--- ya.ru ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 22.758/23.380/24.002/0.622 ms
/dev/ttyp1
14:08:46
#cd /usr/src/sys/i386/conf

14:08:56
#vim GENERIC
--- /tmp/l3-saved-1184.11718.24230	2012-02-12 15:08:59.000000000 +0200
+++ GENERIC	2012-02-12 15:10:18.000000000 +0200
@@ -31,6 +31,8 @@
 options		IPFIREWALL
 options		IPFIREWALL_VERBOSE
 options		IPFIREWALL_VERBOSE_LIMIT=500
+options		IPFIREWALL_DEFAULT_TO_ACCEPT
+options		IPFIREWALL_FORWARD
 options		IPDIVERT
 options		DUMMYNET
 
14:10:18
#conf GENERIC
bash: conf: command not found
14:10:24
#config GENERIC
Kernel build directory is ../compile/GENERIC
Don't forget to do ``make cleandepend && make depend''
прошло >2 часов
/dev/ttyp0
16:25:47
#nc
usage: nc [-46DdEhklnrStUuvz] [-e policy] [-I length] [-i interval] [-O length]
          [-P proxy_username] [-p source_port] [-s source_ip_address] [-T ToS]
          [-V rtable] [-w timeout] [-X proxy_protocol]
          [-x proxy_address[:port]] [hostname] [port]
16:25:50
#netcat
bash: netcat: command not found
16:25:53
#cd /usr/ports/

16:26:00
#ls
.cvsignore      Makefile        arabic          comms           emulators       hungarian       mbone           palm            shells          x11-drivers
CHANGES         Mk              archivers       converters      finance         irc             misc            polish          sysutils        x11-fm
COPYRIGHT       README          astro           databases       french          japanese        multimedia      ports-mgmt      textproc        x11-fonts
GIDs            Templates       audio           deskutils       ftp             java            net             portuguese      ukrainian       x11-servers
INDEX-7         Tools           benchmarks      devel           games           korean          net-im          print           vietnamese      x11-themes
KNOBS           UIDs            biology         distfiles       german          lang            net-mgmt        russian         www             x11-toolkits
LEGAL           UPDATING        cad             dns             graphics        mail            net-p2p         science         x11             x11-wm
MOVED           accessibility   chinese         editors         hebrew          math            news            security        x11-clocks
16:26:01
#cd ..

16:26:03
#df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad0s1a    937M    289M    573M    34%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/ad0s1e    899M     12K    827M     0%    /tmp
/dev/ad0s1f    7.5G    2.1G    4.8G    31%    /usr
/dev/ad0s1d    3.5G    6.5M    3.2G     0%    /var
16:26:17
#mv /usr/ports/ /tmp
/tmp: create/symlink failed, no inodes free
mv: /tmp/ports/textproc/l2a/Makefile: No space left on device
mv: /tmp/ports/textproc/l2a/distinfo: No space left on device
mv: /tmp/ports/textproc/l2a/pkg-descr: No space left on device
mv: /tmp/ports/textproc/la-aspell: No space left on device
mv: /bin/cp /usr/ports/ /tmp/ports/: terminated with 1 (non-zero) status
прошло 28 минут
16:55:14
#ls /usr/
.snap   bin     compat  games   home    include lib     libdata libexec local   obj     ports   sbin    share   src
16:55:19
#rm -rf /usr/ports/

16:57:07
#rm -rf /tmp/
.ICE-unix/  .X11-unix/  .XIM-unix/  .font-unix/ .snap/      ports/
16:57:07
#rm -rf /tmp/ports/

16:59:06
#porsnap fetch
bash: porsnap: command not found
17:05:12
#portsnap fetch
Looking up portsnap.FreeBSD.org mirrors... 5 mirrors found.
Fetching public key from portsnap2.freebsd.org... done.
Fetching snapshot tag from portsnap2.freebsd.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Sun Feb 12 02:05:21 EET 2012:
3e3bb856d084a1e56f2cd8a3100dc7de64ce2e9b131073100% of   65 MB  213 kBps 00m00s
Extracting snapshot... done.
Verifying snapshot integrity... done.
Fetching snapshot tag from portsnap2.freebsd.org... done.
Fetching snapshot metadata... done.
Updating from Sun Feb 12 02:05:21 EET 2012 to Sun Feb 12 16:00:35 EET 2012.
Fetching 4 metadata patches... done.
Applying metadata patches... done.
Fetching 0 metadata files... done.
Fetching 85 patches.....10....20....30....40....50....60....70....80.. done.
Applying patches... done.
Fetching 1 new ports or files... done.
17:14:44
#portsnap extract
/usr/ports/.cvsignore
/usr/ports/CHANGES
/usr/ports/COPYRIGHT
/usr/ports/GIDs
/usr/ports/KNOBS
/usr/ports/LEGAL
/usr/ports/MOVED
/usr/ports/Makefile
/usr/ports/Mk/bsd.apache.mk
/usr/ports/Mk/bsd.autotools.mk
...
/usr/ports/x11/xwud/
/usr/ports/x11/xxkb/
/usr/ports/x11/xzoom/
/usr/ports/x11/yakuake-kde4/
/usr/ports/x11/yakuake/
/usr/ports/x11/yalias/
/usr/ports/x11/yeahconsole/
/usr/ports/x11/yelp/
/usr/ports/x11/zenity/
Building new INDEX files... done.
прошло 24 минуты
17:39:10