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

Содержание

Журнал

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

/dev/pts/0
08:18:45
#ps aux|grep l3
root      1379  2.5  1.4  11940  7716 ?        Ss   09:18   0:00 l3-agent
root      1429  0.0  0.1   3880   776 pts/1    S+   09:18   0:00 grep l3
прошло 19 минут
/dev/pts/0
08:37:59
#ps aux|grep l3
root      1379  0.1  1.4  11940  7720 ?        Ss   09:18   0:01 l3-agent
user      1537  0.0  1.4  12004  7712 ?        Ss   09:20   0:00 l3-agent
root      1667  0.0  0.1   3884   780 pts/1    S+   09:38   0:00 grep l3
08:38:04
#screen
/dev/pts/2
08:38:32
#alias exit='echo no exit'

08:38:41
#exit
no exit
08:38:44
#vim /etc/network/interfaces
--- /tmp/l3-saved-1719.6869.21012	2011-12-13 09:38:52.000000000 +0200
+++ /etc/network/interfaces	2011-12-13 09:39:24.000000000 +0200
@@ -6,3 +6,7 @@
       address 192.168.16.1
       netmask 255.255.255.0
       gateway 192.168.16.254
+
+auto eth2
+      address 192.168.30.1
+      netmask 255.255.255.192
/dev/pts/4
08:38:47
#screen -x
/dev/pts/6
08:38:53
#screen -x
/dev/pts/2
08:39:25
#/etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning).
Reconfiguring network interfaces.../etc/network/interfaces:11: misplaced option
ifdown: couldn't read interfaces file "/etc/network/interfaces"
/etc/network/interfaces:11: misplaced option
ifup: couldn't read interfaces file "/etc/network/interfaces"
failed.
08:39:52
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:16:3e:00:00:01
          inet addr:192.168.16.1  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::216:3eff:fe00:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1393 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1013 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:106891 (104.3 KiB)  TX bytes:170195 (166.2 KiB)
          Interrupt:5 Base address:0x2000
eth2      Link encap:Ethernet  HWaddr 00:16:3e:00:02:01
...
          RX bytes:0 (0.0 B)  TX bytes:328 (328.0 B)
          Interrupt:11 Base address:0x8200
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)
08:39:54
#ping 192.168.30.62
PING 192.168.30.62 (192.168.30.62) 56(84) bytes of data.
64 bytes from 192.168.30.62: icmp_req=1 ttl=64 time=2.78 ms
64 bytes from 192.168.30.62: icmp_req=2 ttl=64 time=1.82 ms
^C
--- 192.168.30.62 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 1.828/2.307/2.787/0.481 ms
08:40:08
#ping 192.168.30.65
PING 192.168.30.65 (192.168.30.65) 56(84) bytes of data.
^C
--- 192.168.30.65 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms
08:42:13
#ssh root@192.168.16.21
The authenticity of host '192.168.16.21 (192.168.16.21)' can't be established.
DSA key fingerprint is 0a:54:02:23:35:67:a7:44:31:e7:ae:ec:12:e3:bb:31.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.16.21' (DSA) to the list of known hosts.
Password:
Last login: Tue Dec 13 11:20:51 2011 from net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 7.4-RELEASE (GENERIC) #0: Thu Feb 17 03:51:56 UTC 2011
Welcome to FreeBSD!
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
Removing stale pidfile
/dev/pts/8
08:45:34
#screen -x
/dev/pts/2
08:46:43
#ping 192.168.30.65

08:46:43
#ssh root@192.168.16.21
Password:
Last login: Tue Dec 13 11:45:15 2011 from fobos.net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 7.4-RELEASE (GENERIC) #0: Thu Feb 17 03:51:56 UTC 2011
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
Removing stale pidfile
08:51:15
#ssh root@192.168.16.21
Password:
Last login: Tue Dec 13 11:47:49 2011 from fobos.net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 7.4-RELEASE (GENERIC) #0: Thu Feb 17 03:51:56 UTC 2011
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
Removing stale pidfile
08:53:38
#ssh root@192.168.16.21
Password:
Last login: Tue Dec 13 11:54:57 2011 from fobos.net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 7.4-RELEASE (GENERIC) #0: Thu Feb 17 03:51:56 UTC 2011
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
Removing stale pidfile
08:56:37
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.30.192  *               255.255.255.192 U     0      0        0 eth2
192.168.30.128  *               255.255.255.192 U     0      0        0 eth1
localnet        *               255.255.255.0   U     0      0        0 eth0
default         192.168.30.129  0.0.0.0         UG    0      0        0 eth1
08:56:39
#ping 192.168.16.1
PING 192.168.16.1 (192.168.16.1) 56(84) bytes of data.
64 bytes from 192.168.16.1: icmp_req=1 ttl=64 time=27.1 ms
64 bytes from 192.168.16.1: icmp_req=2 ttl=64 time=1.19 ms
^C
--- 192.168.16.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 1.197/14.163/27.130/12.967 ms
08:56:46
#ping 192.168.30.1
PING 192.168.30.1 (192.168.30.1) 56(84) bytes of data.
^C
--- 192.168.30.1 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2013ms
08:56:59
#exit
exit
Connection to 192.168.16.2 closed.
08:57:22
#ssh root@192.168.16.21
                                      2
The authenticity of host '192.168.16.2 (192.168.16.2)' can't be established.
RSA key fingerprint is 3e:c3:8c:6f:e8:92:5b:31:dd:04:d2:51:48:57:c9:99.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.16.2' (RSA) to the list of known hosts.
root@192.168.16.2's password:
Linux debian2 2.6.32-5-686 #1 SMP Fri Sep 9 20:51:05 UTC 2011 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Dec 13 09:56:33 2011 from net.nt
l3-agent is already running: pid=1364; pidfile=/root/.lilalo/l3-agent.pid
l3-agent is already running: pid=1364; pidfile=/root/.lilalo/l3-agent.pid
08:57:34
#ping 192.168.30.1
PING 192.168.30.1 (192.168.30.1) 56(84) bytes of data.
^C
--- 192.168.30.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3013ms
08:57:40
#ping 192.168.30.62
PING 192.168.30.62 (192.168.30.62) 56(84) bytes of data.
^C
--- 192.168.30.62 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms
08:57:46
#ping 192.168.30.65
PING 192.168.30.65 (192.168.30.65) 56(84) bytes of data.
^C
--- 192.168.30.65 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms
08:57:50
#traceroute 192.168.30.1
traceroute to 192.168.30.1 (192.168.30.1), 30 hops max, 60 byte packets
 1  192.168.30.129 (192.168.30.129)  1.458 ms  1.361 ms  1.355 ms
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
...
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * *^C
08:58:34
#exit
exit
Connection to 192.168.16.2 closed.
08:58:42
#ssh root@192.168.16.21
Password:
Last login: Tue Dec 13 11:55:02 2011 from fobos.net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 7.4-RELEASE (GENERIC) #0: Thu Feb 17 03:51:56 UTC 2011
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
Removing stale pidfile
09:03:11
#ping 192.168.16.21
PING 192.168.16.21 (192.168.16.21) 56(84) bytes of data.
From 192.168.16.1 icmp_seq=16 Destination Host Unreachable
From 192.168.16.1 icmp_seq=17 Destination Host Unreachable
From 192.168.16.1 icmp_seq=18 Destination Host Unreachable
From 192.168.16.1 icmp_seq=19 Destination Host Unreachable
From 192.168.16.1 icmp_seq=20 Destination Host Unreachable
From 192.168.16.1 icmp_seq=21 Destination Host Unreachable
From 192.168.16.1 icmp_seq=22 Destination Host Unreachable
From 192.168.16.1 icmp_seq=23 Destination Host Unreachable
From 192.168.16.1 icmp_seq=24 Destination Host Unreachable
...
From 192.168.16.1 icmp_seq=39 Destination Host Unreachable
64 bytes from 192.168.16.21: icmp_req=40 ttl=64 time=1009 ms
64 bytes from 192.168.16.21: icmp_req=41 ttl=64 time=1.03 ms
64 bytes from 192.168.16.21: icmp_req=42 ttl=64 time=1.18 ms
64 bytes from 192.168.16.21: icmp_req=43 ttl=64 time=1.23 ms
64 bytes from 192.168.16.21: icmp_req=44 ttl=64 time=0.965 ms
^C
--- 192.168.16.21 ping statistics ---
44 packets transmitted, 5 received, +24 errors, 88% packet loss, time 43117ms
rtt min/avg/max/mdev = 0.965/202.745/1009.313/403.284 ms, pipe 3
09:04:30
#ssh root@192.168.16.21
Password:
Last login: Tue Dec 13 12:04:32 2011 from fobos.net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 7.4-RELEASE (GENERIC) #0: Thu Feb 17 03:51:56 UTC 2011
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
Removing stale pidfile
/dev/pts/10
09:09:33
#screen
/dev/pts/12
09:09:45
#ps aux|greep screen
bash: greep: команда не найдена
/dev/pts/14
09:09:57
#screen -x
/dev/pts/12
09:09:57
#ps aux|grep screen
root      1675  0.0  0.1   4844  1012 pts/1    S+   09:38   0:00 screen
root      1962  0.0  0.2   4844  1040 pts/5    S+   09:38   0:00 screen -x
root      2005  0.0  0.2   4844  1036 pts/7    S+   09:38   0:00 screen -x
root      2277  0.0  0.2   4844  1040 pts/9    S+   09:45   0:00 screen -x
root      2451  0.1  0.1   4844  1004 pts/11   S+   10:09   0:00 screen
root      2642  0.0  0.1   3884   784 pts/13   S+   10:10   0:00 grep screen
09:10:04
#ps aux|grep screen
root      1675  0.0  0.1   4844  1012 pts/1    S+   09:38   0:00 screen
root      1962  0.0  0.2   4844  1040 pts/5    S+   09:38   0:00 screen -x
root      2005  0.0  0.2   4844  1036 pts/7    S+   09:38   0:00 screen -x
root      2277  0.0  0.2   4844  1040 pts/9    S+   09:45   0:00 screen -x
root      2451  0.0  0.1   4844  1004 pts/11   S+   10:09   0:00 screen
root      2852  0.0  0.1   3880   776 pts/13   S+   10:12   0:00 grep screen
/dev/pts/16
09:10:21
#screen -x
/dev/pts/18
09:10:45
#screen -x
/dev/pts/12
09:13:30
#ping ya.ru
PING ya.ru (93.158.134.203) 56(84) bytes of data.
64 bytes from www.yandex.ru (93.158.134.203): icmp_req=1 ttl=58 time=22.7 ms
64 bytes from www.yandex.ru (93.158.134.203): icmp_req=2 ttl=58 time=30.3 ms
64 bytes from www.yandex.ru (93.158.134.203): icmp_req=3 ttl=58 time=35.8 ms
^C
--- ya.ru ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 22.779/29.672/35.888/5.376 ms
09:14:42
#iptables -t nat -L --lines-nubmer
iptables v1.4.8: unknown option `--lines-nubmer'
Try `iptables -h' or 'iptables --help' for more information.
09:15:02
#iptables -t nat -L --number-lines
iptables v1.4.8: unknown option `--number-lines'
Try `iptables -h' or 'iptables --help' for more information.
09:15:09
#iptables -t nat -L --number-line
iptables v1.4.8: unknown option `--number-line'
Try `iptables -h' or 'iptables --help' for more information.
09:15:11
#iptables -t nat -L --line-numbers
Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination
Chain POSTROUTING (policy ACCEPT)
num  target     prot opt source               destination
1    MASQUERADE  all  --  192.168.30.0/26      anywhere
2    MASQUERADE  all  --  192.168.30.128/26    anywhere
Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination
прошло 16 минут
/dev/pts/0
09:32:03
#vim /etc/network/interfaces
--- /tmp/l3-saved-1357.25910.15884	2011-12-13 10:32:20.000000000 +0200
+++ /etc/network/interfaces	2011-12-13 10:33:09.000000000 +0200
@@ -6,3 +6,8 @@
       address 192.168.16.1
       netmask 255.255.255.0
       gateway 192.168.16.254
+
+auto eth2
+iface eth2 inet static
+      address 192.168.30.1/26
+      netmask 255.255.255.192
09:33:09
#echo 1 > /proc/sys/net/ipv4/ip_
ip_default_ttl       ip_dynaddr           ip_forward           ip_local_port_range  ip_nonlocal_bind     ip_no_pmtu_disc
09:33:09
#echo 1 > /proc/sys/net/ipv4/ip_
ip_default_ttl       ip_dynaddr           ip_forward           ip_local_port_range  ip_nonlocal_bind     ip_no_pmtu_disc
09:33:09
#echo 1 > /proc/sys/net/ipv4/ip_forward

09:33:25
#/etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning).
Reconfiguring network interfaces...done.
09:33:38
#vim /etc/sysctl.conf
--- /tmp/l3-saved-1357.8836.14241	2011-12-13 10:33:44.000000000 +0200
+++ /etc/sysctl.conf	2011-12-13 10:33:53.000000000 +0200
@@ -25,7 +25,7 @@
 #net.ipv4.tcp_syncookies=1
 
 # Uncomment the next line to enable packet forwarding for IPv4
-#net.ipv4.ip_forward=1
+net.ipv4.ip_forward=1
 
 # Uncomment the next line to enable packet forwarding for IPv6
 #  Enabling this option disables Stateless Address Autoconfiguration
09:33:54
#screen
/dev/pts/2
09:34:22
#vim
/dev/pts/4
09:40:10
#screen -x
/dev/pts/6
09:40:25
#scr
screen        screendump    script        scriptreplay
09:40:25
#screen -x
/dev/pts/8
09:40:31
#screen -x
/dev/pts/2
09:41:15
#~

09:41:16
#ssh root@193.168.16.21
^C
09:41:25
#ssh root@192.168.16.21
The authenticity of host '192.168.16.21 (192.168.16.21)' can't be established.
DSA key fingerprint is 0a:54:02:23:35:67:a7:44:31:e7:ae:ec:12:e3:bb:31.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.16.21' (DSA) to the list of known hosts.
Password:
Last login: Tue Dec 13 12:38:34 2011 from net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 7.4-RELEASE (GENERIC) #0: Thu Feb 17 03:51:56 UTC 2011
Welcome to FreeBSD!
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
Removing stale pidfile
09:44:49
#ssh root@192.168.16.21
ssh: connect to host 192.168.16.21 port 22: Connection refused
09:45:55
#ssh root@192.168.16.21
Password:
Last login: Tue Dec 13 12:41:31 2011 from fobos.net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 7.4-RELEASE (GENERIC) #0: Thu Feb 17 03:51:56 UTC 2011
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
Removing stale pidfile
09:50:48
#ping 192.168.30.1
PING 192.168.30.1 (192.168.30.1) 56(84) bytes of data.
64 bytes from 192.168.30.1: icmp_req=1 ttl=64 time=0.183 ms
64 bytes from 192.168.30.1: icmp_req=2 ttl=64 time=0.096 ms
64 bytes from 192.168.30.1: icmp_req=3 ttl=64 time=0.093 ms
^C
--- 192.168.30.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.093/0.124/0.183/0.041 ms
09:53:47
#iptables -t nat -A POSTROUTING -s 192.168.30.0/26 -j MASQUERADE

09:55:09
#ping 192.168.30.126
PING 192.168.30.126 (192.168.30.126) 56(84) bytes of data.
^C
--- 192.168.30.126 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2016ms
09:55:22
#ping 192.168.30.62
PING 192.168.30.62 (192.168.30.62) 56(84) bytes of data.
64 bytes from 192.168.30.62: icmp_req=1 ttl=64 time=1.63 ms
64 bytes from 192.168.30.62: icmp_req=2 ttl=64 time=1.82 ms
^C
--- 192.168.30.62 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 1.638/1.732/1.826/0.094 ms
09:55:30
#ping 192.168.30.126
PING 192.168.30.126 (192.168.30.126) 56(84) bytes of data.
^C
--- 192.168.30.126 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms
09:59:00
#ping 192.168.30.62
PING 192.168.30.62 (192.168.30.62) 56(84) bytes of data.
64 bytes from 192.168.30.62: icmp_req=1 ttl=64 time=1.73 ms
^C
--- 192.168.30.62 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.732/1.732/1.732/0.000 ms
09:59:08
#ping 192.168.30.65
PING 192.168.30.65 (192.168.30.65) 56(84) bytes of data.
^C
--- 192.168.30.65 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1007ms
09:59:13
#route add -net 192.168.30.64/26 gw 192.168.30.62

09:59:42
#ping 192.168.30.126
PING 192.168.30.126 (192.168.30.126) 56(84) bytes of data.
^C
--- 192.168.30.126 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms
09:59:51
#ping 192.168.30.126
PING 192.168.30.126 (192.168.30.126) 56(84) bytes of data.
^C
--- 192.168.30.126 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3000ms
10:00:14
#ping 192.168.30.126
PING 192.168.30.126 (192.168.30.126) 56(84) bytes of data.
64 bytes from 192.168.30.126: icmp_req=1 ttl=63 time=2.48 ms
64 bytes from 192.168.30.126: icmp_req=2 ttl=63 time=3.99 ms
64 bytes from 192.168.30.126: icmp_req=3 ttl=63 time=2.68 ms
^C
--- 192.168.30.126 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 2.487/3.055/3.992/0.667 ms
10:01:15
#ping 192.168.30.129
PING 192.168.30.129 (192.168.30.129) 56(84) bytes of data.
^C
--- 192.168.30.129 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 2999ms
10:02:13
#route add -net 192.168.30.128/26 gw 192.168.30.62

10:02:31
#ping 192.168.30.190
PING 192.168.30.190 (192.168.30.190) 56(84) bytes of data.
64 bytes from 192.168.30.190: icmp_req=1 ttl=62 time=5.43 ms
64 bytes from 192.168.30.190: icmp_req=2 ttl=62 time=12.6 ms
^C
--- 192.168.30.190 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 5.437/9.024/12.612/3.588 ms
10:02:38
#ping 192.168.30.193
PING 192.168.30.193 (192.168.30.193) 56(84) bytes of data.
^C
--- 192.168.30.193 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1004ms
10:02:45
#route add -net 192.168.30.192/26 gw 192.168.30.62

10:03:00
#vim /etc/network/interfaces
--- /tmp/l3-saved-1640.20409.154	2011-12-13 11:06:32.000000000 +0200
+++ /etc/network/interfaces	2011-12-13 11:11:29.000000000 +0200
@@ -1,13 +1,18 @@
 auto lo
 iface lo inet loopback
 
-auto eth0
-iface eth0 inet static
-      address 192.168.16.1
-      netmask 255.255.255.0
-      gateway 192.168.16.254
+#auto eth0
+#iface eth0 inet static
+#      address 192.168.16.1
+#      netmask 255.255.255.0
+#      gateway 192.168.16.254
 
 auto eth2
 iface eth2 inet static
       address 192.168.30.1/26
       netmask 255.255.255.192
+
+up route add -net 192.168.30.64/26 gw 192.168.30.62
+up route add -net 192.168.30.128/26 gw 192.168.30.62
+up route add -net 192.168.30.192/26 gw 192.168.30.62
+up iptables -t nat -A POSTROUTING -s 192.168.30.0/26 -j MASQUERADE
прошло 15 минут
/dev/tty1
10:18:31
#vim /etc/network/interfaces
--- /tmp/l3-saved-1278.10501.12077	2011-12-13 11:18:35.000000000 +0200
+++ /etc/network/interfaces	2011-12-13 11:18:47.000000000 +0200
@@ -1,11 +1,11 @@
 auto lo
 iface lo inet loopback
 
-#auto eth0
-#iface eth0 inet static
-#      address 192.168.16.1
-#      netmask 255.255.255.0
-#      gateway 192.168.16.254
+auto eth0
+iface eth0 inet static
+      address 192.168.16.1
+      netmask 255.255.255.0
+      gateway 192.168.16.254
 
 auto eth2
 iface eth2 inet static
/dev/pts/0
10:22:55
#iptables -t nat -A POSTROUTING -s 192.168.16.0/24 -j MASQUERADE

/dev/pts/2
10:23:18
#screen -x
/dev/pts/0
10:26:26
#ping ya.ru
PING ya.ru (87.250.251.3) 56(84) bytes of data.
64 bytes from www.yandex.ru (87.250.251.3): icmp_req=1 ttl=58 time=23.4 ms
64 bytes from www.yandex.ru (87.250.251.3): icmp_req=2 ttl=58 time=24.6 ms
^C
--- ya.ru ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 23.402/24.026/24.650/0.624 ms
10:26:30
#ping 192.168.30.190
PING 192.168.30.190 (192.168.30.190) 56(84) bytes of data.
64 bytes from 192.168.30.190: icmp_req=1 ttl=62 time=4.34 ms
^C
--- 192.168.30.190 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 4.340/4.340/4.340/0.000 ms
10:26:42
#ping 192.168.30.193
PING 192.168.30.193 (192.168.30.193) 56(84) bytes of data.
From 192.168.30.62: icmp_seq=1 Redirect Host(New nexthop: 192.168.30.1)
From 192.168.30.62: icmp_seq=7 Redirect Host(New nexthop: 192.168.30.1)
^C
--- 192.168.30.193 ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 6001ms
/dev/pts/0
10:28:21
#ping 192.168.30.193
PING 192.168.30.193 (192.168.30.193) 56(84) bytes of data.
From 192.168.30.62: icmp_seq=1 Redirect Host(New nexthop: 192.168.30.1)
From 192.168.30.62: icmp_seq=2 Redirect Host(New nexthop: 192.168.30.1)
From 192.168.30.62: icmp_seq=3 Redirect Host(New nexthop: 192.168.30.1)
^C
--- 192.168.30.193 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2003ms
/dev/pts/0
10:29:01
#ping 192.168.30.193
PING 192.168.30.193 (192.168.30.193) 56(84) bytes of data.
64 bytes from 192.168.30.193: icmp_req=1 ttl=62 time=5.40 ms
64 bytes from 192.168.30.193: icmp_req=2 ttl=62 time=5.61 ms
^C
--- 192.168.30.193 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 5.408/5.510/5.613/0.126 ms
10:29:17
#ping ya.ru
PING ya.ru (87.250.250.3) 56(84) bytes of data.
64 bytes from www.yandex.ru (87.250.250.3): icmp_req=1 ttl=58 time=22.6 ms
64 bytes from www.yandex.ru (87.250.250.3): icmp_req=2 ttl=58 time=22.5 ms
^C
--- ya.ru ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 22.542/22.603/22.664/0.061 ms
прошло 16 минут
/dev/pts/2
10:45:17
#netstat -r
Routing tables
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.30.65      UGS         0      111    re1
localhost          localhost          UH          0        0    lo0
192.168.16.0       link#1             UC          0        0    re0
192.168.16.1       00:16:3e:00:00:01  UHLW        1        0    re0   1188
net.nt             00:07:e9:0c:45:0c  UHLW        1      217    re0   1195
192.168.30.64/26   link#2             UC          0        0    re1
192.168.30.65      00:16:3e:00:02:03  UHLW        2        0    re1   1037
192.168.30.128/26  link#3             UC          0        0    re2
192.168.30.190     00:16:3e:00:01:02  UHLW        1        1    re2   1182
Internet6:
Destination        Gateway            Flags      Netif Expire
localhost.net.nt   localhost.net.nt   UHL         lo0
fe80::%lo0         fe80::1%lo0        U           lo0
fe80::1%lo0        link#5             UHL         lo0
ff01:5::           fe80::1%lo0        UC          lo0
ff02::%lo0         fe80::1%lo0        UC          lo0
10:45:24
#netstat -rn
Routing tables
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.30.65      UGS         0      112    re1
127.0.0.1          127.0.0.1          UH          0        0    lo0
192.168.16.0/24    link#1             UC          0        0    re0
192.168.16.1       00:16:3e:00:00:01  UHLW        1        0    re0   1184
192.168.16.254     00:07:e9:0c:45:0c  UHLW        1      247    re0   1191
192.168.30.64/26   link#2             UC          0        0    re1
192.168.30.65      00:16:3e:00:02:03  UHLW        2        0    re1   1033
192.168.30.128/26  link#3             UC          0        0    re2
192.168.30.190     00:16:3e:00:01:02  UHLW        1        1    re2   1178
Internet6:
Destination                       Gateway                       Flags      Netif Expire
::1                               ::1                           UHL         lo0
fe80::%lo0/64                     fe80::1%lo0                   U           lo0
fe80::1%lo0                       link#5                        UHL         lo0
ff01:5::/32                       fe80::1%lo0                   UC          lo0
ff02::%lo0/32                     fe80::1%lo0                   UC          lo0
10:45:28
#netstat -rn -f inet
Routing tables
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.30.65      UGS         0      118    re1
127.0.0.1          127.0.0.1          UH          0        0    lo0
192.168.16.0/24    link#1             UC          0        0    re0
192.168.16.1       00:16:3e:00:00:01  UHLW        1        0    re0   1169
192.168.16.254     00:07:e9:0c:45:0c  UHLW        1      276    re0   1176
192.168.30.64/26   link#2             UC          0        0    re1
192.168.30.65      00:16:3e:00:02:03  UHLW        2        0    re1   1018
192.168.30.128/26  link#3             UC          0        0    re2
192.168.30.190     00:16:3e:00:01:02  UHLW        1        1    re2   1194
10:45:43
#ping 192.168.30.1
PING 192.168.30.1 (192.168.30.1): 56 data bytes
^C
--- 192.168.30.1 ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss
10:46:06
#ping 192.168.30.62
PING 192.168.30.62 (192.168.30.62): 56 data bytes
64 bytes from 192.168.30.62: icmp_seq=0 ttl=64 time=8.450 ms
64 bytes from 192.168.30.62: icmp_seq=1 ttl=64 time=1.414 ms
64 bytes from 192.168.30.62: icmp_seq=2 ttl=64 time=2.378 ms
64 bytes from 192.168.30.62: icmp_seq=3 ttl=64 time=1.822 ms
64 bytes from 192.168.30.62: icmp_seq=4 ttl=64 time=2.063 ms
64 bytes from 192.168.30.62: icmp_seq=5 ttl=64 time=3.909 ms
64 bytes from 192.168.30.62: icmp_seq=6 ttl=64 time=1.551 ms
^C
--- 192.168.30.62 ping statistics ---
7 packets transmitted, 7 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.414/3.084/8.450/2.322 ms
10:46:23
#exit
exit
Connection to 192.168.16.21 closed.
10:49:42
#vim /etc/rc.conf
10:51:11
#reboot
Connection to 192.168.16.21 closed by remote host.
Connection to 192.168.16.21 closed.
10:52:34
#vim /etc/rc.conf
10:53:27
#reboot
Connection to 192.168.16.21 closed by remote host.
Connection to 192.168.16.21 closed.
10:55:03
#ping 192.168.16.1
PING 192.168.16.1 (192.168.16.1): 56 data bytes
64 bytes from 192.168.16.1: icmp_seq=0 ttl=64 time=3.737 ms
64 bytes from 192.168.16.1: icmp_seq=1 ttl=64 time=2.611 ms
^C
--- 192.168.16.1 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 2.611/3.174/3.737/0.563 ms
/dev/pts/0
10:55:56
#screen
/dev/pts/2
10:56:08
#ssh root@192.168.16.2
The authenticity of host '192.168.16.2 (192.168.16.2)' can't be established.
DSA key fingerprint is 72:80:11:55:1d:55:f4:87:60:7f:15:2c:39:93:38:79.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.16.2' (DSA) to the list of known hosts.
root@192.168.16.2's password:
Linux debian2 2.6.32-5-686 #1 SMP Fri Sep 9 20:51:05 UTC 2011 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Dec 13 09:21:23 2011 from net.nt
l3-agent is already running: pid=1364; pidfile=/root/.lilalo/l3-agent.pid
l3-agent is already running: pid=1364; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/4
10:56:11
#screen -x

Статистика

Время первой команды журнала08:18:45 2011-12-13
Время последней команды журнала10:56:11 2011-12-13
Количество командных строк в журнале100
Процент команд с ненулевым кодом завершения, %27.00
Процент синтаксически неверно набранных команд, % 1.00
Суммарное время работы с терминалом *, час 2.62
Количество командных строк в единицу времени, команда/мин 0.64
Частота использования команд
ping31|============================| 28.70%
screen15|=============| 13.89%
ssh12|===========| 11.11%
vim8|=======| 7.41%
iptables6|=====| 5.56%
ps5|====| 4.63%
route4|===| 3.70%
grep4|===| 3.70%
exit4|===| 3.70%
echo3|==| 2.78%
netstat3|==| 2.78%
ip_2|=| 1.85%
reboot2|=| 1.85%
/etc/init.d/networking2|=| 1.85%
ifconfig1|| 0.93%
alias1|| 0.93%
ip_forward1|| 0.93%
traceroute1|| 0.93%
greep1|| 0.93%
~1|| 0.93%
scr1|| 0.93%
____
*) Интервалы неактивности длительностью 30 минут и более не учитываются

Справка

Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
  1. В журнал автоматически попадают все команды, данные в любом терминале системы.

  2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

  3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
    $ l s-l
    bash: l: command not found
    

  4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
    $ test 5 -lt 4
    Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

  5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
    $ find / -name abc
    find: /home/devi-orig/.gnome2: Keine Berechtigung
    find: /home/devi-orig/.gnome2_private: Keine Berechtigung
    find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung
    find: /home/devi-orig/.metacity: Keine Berechtigung
    find: /home/devi-orig/.inkscape: Keine Berechtigung
    ^C
    

  6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
    # id
    uid=0(root) gid=0(root) Gruppen=0(root)
    

  7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
    $ vi ~/.bashrc
    2a3,5
    >    if [ -f /usr/local/etc/bash_completion ]; then
    >         . /usr/local/etc/bash_completion
    >        fi
    

  8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
    $ patch ~/.bashrc
    В данном случае изменения применяются к файлу ~/.bashrc

  9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

    Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

  10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

  11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

  12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

  13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

  14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

    $ whoami
    
    user
    
    $ #^ Интересно, кто я?
    
    в журнале это будет выглядеть так:
    $ whoami
    
    user
    
    Интересно, кто я?

  15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

    $ whoami
    
    user
    
    $ cat > /dev/null #^ Интересно, кто я?
    
    Программа whoami выводит имя пользователя, под которым 
    мы зарегистрировались в системе.
    -
    Она не может ответить на вопрос о нашем назначении 
    в этом мире.
    
    В журнале это будет выглядеть так:
    $ whoami
    user
    
    Интересно, кто я?
    Программа whoami выводит имя пользователя, под которым
    мы зарегистрировались в системе.

    Она не может ответить на вопрос о нашем назначении
    в этом мире.
    Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

  16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

  17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
  18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
  19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
    1
        2
    3   
        4
    
    Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

О программе

LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008

$Id$