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

Содержание

Журнал

Понедельник (10/25/10)

/dev/pts/0
13:23:49
#l3
l3                 l3cd               l3-config          l3mass_upload      l3_save_last_line  l3shot
l3-agent           l3_close_session   l3_fix_prompt      l3pwd              l3script           l3upload
13:23:49
#l3
l3                 l3cd               l3-config          l3mass_upload      l3_save_last_line  l3shot
l3-agent           l3_close_session   l3_fix_prompt      l3pwd              l3script           l3upload
13:23:49
#l3-agent

13:24:05
#l3
l3                 l3cd               l3-config          l3mass_upload      l3_save_last_line  l3shot
l3-agent           l3_close_session   l3_fix_prompt      l3pwd              l3script           l3upload
13:24:05
#l3
l3                 l3cd               l3-config          l3mass_upload      l3_save_last_line  l3shot
l3-agent           l3_close_session   l3_fix_prompt      l3pwd              l3script           l3upload
13:24:05
#l3script restart
l3script: restart: No such file or directory
13:24:18
#w
 07:24:28 up  1:32,  2 users,  load average: 0.23, 0.16, 0.10
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
ids      tty7     :0               06:00    1.00s 45.78s  0.24s x-session-manager
ids      pts/0    :0.0             06:00    1.00s  1.42s 10.82s gnome-terminal
13:24:33
#l3-agent
l3-agent is already running: pid=5464; pidfile=/home/ids/.lilalo/l3-agent.pid
/dev/pts/2
13:25:50
$apt-get install mozilla
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
13:26:04
$sudo -s
[sudo] password for ids:
13:26:14
#apt-get install mozilla
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mozilla is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package mozilla has no installation candidate
/dev/pts/3
13:26:14
#apt-get install mozilla
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package mozilla is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package mozilla has no installation candidate
/dev/pts/2
13:26:29
#apt-get search mozilla
E: Invalid operation search
/dev/pts/3
13:26:29
#apt-get search mozilla
E: Invalid operation search
/dev/pts/0
13:28:26
#ECHO HELLO WORKD
bash: ECHO: command not found
13:28:33
#echo hello world
hello world
13:28:42
#tracert mail.ukravto.kiev.ua
traceroute to mail.ukravto.kiev.ua (193.27.80.33), 30 hops max, 40 byte packets
 1  192.168.15.254 (192.168.15.254)  0.891 ms * *
 2  10.0.35.1 (10.0.35.1)  0.278 ms  0.276 ms  0.291 ms
 3  10.0.3.4 (10.0.3.4)  1.209 ms * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  193.27.80.33 (193.27.80.33)  10.760 ms  11.326 ms  12.106 ms
13:29:25
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth1
default         192.168.15.254  0.0.0.0         UG    0      0        0 eth1
13:30:25
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth1
^C
13:32:32
#vi /etc/resolv.conf
13:32:51
#~
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth1
default         gw.unix.nt      0.0.0.0         UG    0      0        0 eth1
13:32:59
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth1
default         gw.unix.nt      0.0.0.0         UG    0      0        0 eth1
13:33:01
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth1
default         gw.unix.nt      0.0.0.0         UG    0      0        0 eth1
13:33:02
#route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth1
default         gw.unix.nt      0.0.0.0         UG    0      0        0 eth1
13:33:02
#ps ax | grep Net
 2656 ?        Ssl    0:00 /usr/sbin/NetworkManager --pid-file /var/run/NetworkManager/NetworkManager.pid
 5940 pts/1    S+     0:00 grep Net
13:33:37
#/etc/init.d/network-manager
network-manager             network-manager-dispatcher
13:33:37
#/etc/init.d/network-manager stop
Stopping network connection manager: NetworkManager.
13:34:00
#/etc/init.d/network-manager-dispatcher stop
Stopping network events dispatcher: NetworkManagerDispatcher.
13:34:26
#mtr ya.ru
bash: mtr: command not found
13:34:33
#apt-get install mtr
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  mtr
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 49.5kB of archives.
After this operation, 168kB of additional disk space will be used.
Get:1 http://10.0.35.1 lenny/main mtr 0.73-1 [49.5kB]
Fetched 49.5kB in 45s (1100B/s)
Selecting previously deselected package mtr.
(Reading database ... 92235 files and directories currently installed.)
Unpacking mtr (from .../archives/mtr_0.73-1_i386.deb) ...
Processing triggers for menu ...
Processing triggers for man-db ...
Setting up mtr (0.73-1) ...
Processing triggers for menu ...
13:38:10
#cat /home/ids/.l3rc
l3cd=/users/ids/nt-voip/linux23.unix.nt.unix.nt/ids
13:39:08
#ps ax | grep l3
 5464 ?        Ss     0:30 l3-agent
 6245 pts/1    R+     0:00 grep l3
13:39:24
#pkill 5464

13:39:35
#cat /home/ids/.l3rc
l3cd=/users/ids/nt-voip/linux23.unix.nt.unix.nt/ids
13:39:38
#vi /etc/hosts
--- /tmp/l3-saved-5424.30663.8893	2010-10-25 07:40:35.000000000 -0400
+++ /etc/hosts	2010-10-25 07:40:48.000000000 -0400
@@ -1,5 +1,5 @@
 127.0.0.1	localhost
-192.168.15.23	linux23.unix.nt.unix.nt	linux23.unix.nt
+192.168.15.23	linux23.unix.nt	linux23
 
 # The following lines are desirable for IPv6 capable hosts
 ::1     localhost ip6-localhost ip6-loopback
13:42:17
#sed -i s/192.168.15/192.168.103/ /etc/hosts /etc/network/interfaces

13:43:38
#less /etc/network/interfaces
13:43:51
#sed -i s/192.168.103.23/192.168.103.1/ /etc/hosts /etc/network/interfaces

13:44:34
#ls /etc/network/interfaces
/etc/network/interfaces
/dev/pts/5
13:45:05
$ping 192.168.15.254
PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data.
64 bytes from 192.168.15.254: icmp_seq=1 ttl=64 time=0.771 ms
64 bytes from 192.168.15.254: icmp_seq=2 ttl=64 time=0.748 ms
64 bytes from 192.168.15.254: icmp_seq=3 ttl=64 time=0.755 ms
64 bytes from 192.168.15.254: icmp_seq=4 ttl=64 time=0.763 ms
64 bytes from 192.168.15.254: icmp_seq=5 ttl=64 time=0.596 ms
64 bytes from 192.168.15.254: icmp_seq=6 ttl=64 time=0.603 ms
64 bytes from 192.168.15.254: icmp_seq=7 ttl=64 time=0.775 ms
64 bytes from 192.168.15.254: icmp_seq=8 ttl=64 time=0.621 ms
64 bytes from 192.168.15.254: icmp_seq=9 ttl=64 time=0.620 ms
64 bytes from 192.168.15.254: icmp_seq=10 ttl=64 time=0.610 ms
64 bytes from 192.168.15.254: icmp_seq=11 ttl=64 time=0.619 ms
^C
--- 192.168.15.254 ping statistics ---
11 packets transmitted, 11 received, 0% packet loss, time 10007ms
rtt min/avg/max/mdev = 0.596/0.680/0.775/0.076 ms
13:50:14
$ifconfig
bash: ifconfig: command not found
13:50:16
$/ifconfig
bash: /ifconfig: No such file or directory
13:50:28
$/sbin/ifconfig
eth1      Link encap:Ethernet  HWaddr 00:50:04:a2:02:99
          inet addr:192.168.15.23  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::250:4ff:fea2:299/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:36341 errors:0 dropped:0 overruns:2 frame:0
          TX packets:5495 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:31145140 (29.7 MiB)  TX bytes:514861 (502.7 KiB)
          Interrupt:21 Base address:0xac00
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:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:800 (800.0 B)  TX bytes:800 (800.0 B)
13:50:32
$ssh 192.168.108.1
The authenticity of host '192.168.108.1 (192.168.108.1)' can't be established.
RSA key fingerprint is da:4a:92:81:55:fc:a8:1b:fd:c8:e4:7a:2e:68:f0:fa.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.108.1' (RSA) to the list of known hosts.
ids@192.168.108.1's password:
прошло 10 минут
/dev/pts/0
14:01:11
#cat /etc/net
netscsid.conf  network/       networks
14:01:11
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth1
iface eth1 inet static
        address 192.168.103.1
        netmask 255.255.255.0
        network 192.168.103.0
        broadcast 192.168.103.255
        gateway 192.168.103.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.0.35.1
        dns-search unix.nt
14:07:09
#q!
bash: q!: command not found
14:07:16
#cat /etc/hosts
127.0.0.1       localhost
192.168.105.1   linux23.unix.nt linux23
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
14:07:26
#ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is a8:20:0f:d6:b2:91:28:43:ee:36:02:27:88:87:2f:d5.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
root@localhost's password:
14:12:58
#/etc/init.d/networking restart
Reconfiguring network interfaces...SIOCDELRT: No such process
done.
14:14:56
#/etc/init.d/networking restart
Reconfiguring network interfaces...done.
14:15:02
#ifconfig
eth1      Link encap:Ethernet  HWaddr 00:50:04:a2:02:99
          inet addr:192.168.15.23  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::250:4ff:fea2:299/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:38748 errors:0 dropped:0 overruns:2 frame:0
          TX packets:5551 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:31457939 (30.0 MiB)  TX bytes:527179 (514.8 KiB)
          Interrupt:21 Base address:0xac00
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:41 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5300 (5.1 KiB)  TX bytes:5300 (5.1 KiB)
14:15:24
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth1
iface eth1 inet static
        address 192.168.105.1
        netmask 255.255.255.0
        network 192.168.105.0
        broadcast 192.168.105.255
        gateway 192.168.105.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.0.35.1
        dns-search unix.nt
14:15:37
#/etc/init.d/network
networking                  network-manager             network-manager-dispatcher
14:15:37
#/etc/init.d/network
networking                  network-manager             network-manager-dispatcher
14:15:37
#/etc/init.d/network restart
bash: /etc/init.d/network: No such file or directory
14:15:48
#/etc/init.d/network stop
bash: /etc/init.d/network: No such file or directory
14:15:56
#/etc/init.d/network
networking                  network-manager             network-manager-dispatcher
14:15:56
#/etc/init.d/networking stop
Deconfiguring network interfaces...done.
14:16:04
#/etc/init.d/networking start
Configuring network interfaces...done.
14:16:16
#ifconfig eth0 down

14:16:41
#ifconfig eth0 up

14:16:45
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:e9:3c:2c:38
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
eth1      Link encap:Ethernet  HWaddr 00:50:04:a2:02:99
          inet addr:192.168.15.23  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::250:4ff:fea2:299/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
...
          RX bytes:31507314 (30.0 MiB)  TX bytes:539235 (526.5 KiB)
          Interrupt:21 Base address:0xac00
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:51 errors:0 dropped:0 overruns:0 frame:0
          TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6148 (6.0 KiB)  TX bytes:6148 (6.0 KiB)
14:16:48
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth1
iface eth1 inet static
        address 192.168.105.1
        netmask 255.255.255.0
        network 192.168.105.0
        broadcast 192.168.105.255
        gateway 192.168.105.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.0.35.1
        dns-search unix.nt
14:17:22
#/etc/init.d/networking restart
Reconfiguring network interfaces...done.
14:17:40
#q!q
qq!
bash: qq!: command not found
14:18:05
#ifdown eth1
ifdown: interface eth1 not configured
14:18:12
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:e9:3c:2c:38
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
eth1      Link encap:Ethernet  HWaddr 00:50:04:a2:02:99
          inet addr:192.168.15.23  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::250:4ff:fea2:299/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
...
          RX bytes:31528585 (30.0 MiB)  TX bytes:545905 (533.1 KiB)
          Interrupt:21 Base address:0xac00
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:51 errors:0 dropped:0 overruns:0 frame:0
          TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6148 (6.0 KiB)  TX bytes:6148 (6.0 KiB)
14:18:18
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth1
iface eth1 inet static
        address 192.168.105.1
        netmask 255.255.255.0
        network 192.168.105.0
        broadcast 192.168.105.255
        gateway 192.168.105.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.0.35.1
        dns-search unix.nt
14:18:22
#if
if        ifconfig  ifdown    ifup
14:18:22
#ifdown eth1
ifdown: interface eth1 not configured
14:18:32
#ifdown eth0
ifdown: interface eth0 not configured
14:18:36
#/etc/init.d/ifupdown
ifupdown        ifupdown-clean
14:18:36
#/etc/init.d/ifupdown
Usage: /etc/init.d/ifupdown {start|stop|restart|force-reload}
14:19:02
#/etc/init.d/ifupdown start
Setting up networking....
14:19:12
#/etc/init.d/networking restart
Reconfiguring network interfaces...done.
14:19:47
#cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth1
iface eth1 inet static
        address 192.168.105.1
        netmask 255.255.255.0
        network 192.168.105.0
        broadcast 192.168.105.255
        gateway 192.168.105.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.0.35.1
        dns-search unix.nt
14:20:09
#ifdown eth1
ifdown: interface eth1 not configured
14:20:18
#ifup eth1

прошло 28 минут
14:49:10
#ping ya.ru
^C
14:49:20
#ping 192.168.106.1
PING 192.168.106.1 (192.168.106.1) 56(84) bytes of data.
From 192.168.105.1 icmp_seq=1 Destination Host Unreachable
From 192.168.105.1 icmp_seq=2 Destination Host Unreachable
From 192.168.105.1 icmp_seq=3 Destination Host Unreachable
From 192.168.105.1 icmp_seq=6 Destination Host Unreachable
From 192.168.105.1 icmp_seq=7 Destination Host Unreachable
From 192.168.105.1 icmp_seq=9 Destination Host Unreachable
From 192.168.105.1 icmp_seq=10 Destination Host Unreachable
From 192.168.105.1 icmp_seq=11 Destination Host Unreachable
From 192.168.105.1 icmp_seq=13 Destination Host Unreachable
...
From 192.168.105.1 icmp_seq=75 Destination Host Unreachable
From 192.168.105.1 icmp_seq=76 Destination Host Unreachable
From 192.168.105.1 icmp_seq=77 Destination Host Unreachable
From 192.168.105.1 icmp_seq=79 Destination Host Unreachable
From 192.168.105.1 icmp_seq=80 Destination Host Unreachable
From 192.168.105.1 icmp_seq=81 Destination Host Unreachable
^C
--- 192.168.106.1 ping statistics ---
82 packets transmitted, 0 received, +57 errors, 100% packet loss, time 81096ms
, pipe 3
14:50:52
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:e9:3c:2c:38
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
eth1      Link encap:Ethernet  HWaddr 00:50:04:a2:02:99
          inet addr:192.168.105.1  Bcast:192.168.105.255  Mask:255.255.255.0
          inet6 addr: fe80::250:4ff:fea2:299/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
...
          RX bytes:31794399 (30.3 MiB)  TX bytes:614023 (599.6 KiB)
          Interrupt:21 Base address:0xac00
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:382 errors:0 dropped:0 overruns:0 frame:0
          TX packets:382 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:36024 (35.1 KiB)  TX bytes:36024 (35.1 KiB)
14:50:55
#ping 192.168.106.1
PING 192.168.106.1 (192.168.106.1) 56(84) bytes of data.
^C
--- 192.168.106.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1014ms
14:56:06
#ping 192.168.105.1
PING 192.168.105.1 (192.168.105.1) 56(84) bytes of data.
64 bytes from 192.168.105.1: icmp_seq=1 ttl=64 time=0.045 ms
64 bytes from 192.168.105.1: icmp_seq=2 ttl=64 time=0.040 ms
^C
--- 192.168.105.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.040/0.042/0.045/0.007 ms
14:56:13
#ping 192.168.105.1
PING 192.168.105.1 (192.168.105.1) 56(84) bytes of data.
64 bytes from 192.168.105.1: icmp_seq=1 ttl=64 time=0.042 ms
64 bytes from 192.168.105.1: icmp_seq=2 ttl=64 time=0.034 ms
^C
--- 192.168.105.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.034/0.038/0.042/0.004 ms
14:58:53
#ping 192.168.105.2
PING 192.168.105.2 (192.168.105.2) 56(84) bytes of data.
From 192.168.105.1 icmp_seq=1 Destination Host Unreachable
From 192.168.105.1 icmp_seq=2 Destination Host Unreachable
From 192.168.105.1 icmp_seq=3 Destination Host Unreachable
From 192.168.105.1 icmp_seq=5 Destination Host Unreachable
From 192.168.105.1 icmp_seq=6 Destination Host Unreachable
From 192.168.105.1 icmp_seq=7 Destination Host Unreachable
From 192.168.105.1 icmp_seq=9 Destination Host Unreachable
From 192.168.105.1 icmp_seq=10 Destination Host Unreachable
From 192.168.105.1 icmp_seq=11 Destination Host Unreachable
...
From 192.168.105.1 icmp_seq=17 Destination Host Unreachable
From 192.168.105.1 icmp_seq=18 Destination Host Unreachable
From 192.168.105.1 icmp_seq=19 Destination Host Unreachable
From 192.168.105.1 icmp_seq=21 Destination Host Unreachable
From 192.168.105.1 icmp_seq=22 Destination Host Unreachable
From 192.168.105.1 icmp_seq=23 Destination Host Unreachable
^C
--- 192.168.105.2 ping statistics ---
23 packets transmitted, 0 received, +18 errors, 100% packet loss, time 22034ms
, pipe 3
14:59:18
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:e9:3c:2c:38
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
eth1      Link encap:Ethernet  HWaddr 00:50:04:a2:02:99
          inet addr:192.168.105.1  Bcast:192.168.105.255  Mask:255.255.255.0
          inet6 addr: fe80::250:4ff:fea2:299/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
...
          RX bytes:31843551 (30.3 MiB)  TX bytes:627989 (613.2 KiB)
          Interrupt:21 Base address:0xac00
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:477 errors:0 dropped:0 overruns:0 frame:0
          TX packets:477 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:44568 (43.5 KiB)  TX bytes:44568 (43.5 KiB)
14:59:21
#ping 192.168.105.2
PING 192.168.105.2 (192.168.105.2) 56(84) bytes of data.
64 bytes from 192.168.105.2: icmp_seq=1 ttl=128 time=2.44 ms
64 bytes from 192.168.105.2: icmp_seq=2 ttl=128 time=0.214 ms
64 bytes from 192.168.105.2: icmp_seq=3 ttl=128 time=0.361 ms
^C
--- 192.168.105.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2005ms
rtt min/avg/max/mdev = 0.214/1.005/2.442/1.018 ms
15:00:12
#tracert ya.ru
traceroute to ya.ru (77.88.21.3), 30 hops max, 40 byte packets
 1  192.168.105.254 (192.168.105.254)  0.822 ms  1.087 ms *
 2  10.0.35.1 (10.0.35.1)  0.350 ms  0.366 ms  0.372 ms
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  www.yandex.ru (77.88.21.3)  53.242 ms  55.197 ms  56.062 ms
15:00:35
#apt-get install dhcp
dhcp               dhcp3-common       dhcp3-relay        dhcp3-server-ldap  dhcpcd-sv          dhcpd              dhcpdump           dhcping
dhcp3-client       dhcp3-dev          dhcp3-server       dhcpcd             dhcp-client        dhcp-dns           dhcp-helper        dhcp-relay
15:00:35
#apt-get install dhcp3-server
 ┌─────────────────────────────────────────────────────────────────────┤ DHCP Server ├────────────────────────────────────────────────────────â”
 │                                                                                                                                                          │
 │ Non-authoritative version of DHCP server                                                                                                                 │
 │                                                                                                                                                          │
 │ The version 3 DHCP server is non-authoritative by default.                                                                                               │
 │                                                                                                                                                          │
 │ This means that if a client requests an address that the server knows nothing about and the address is incorrect for that network segment, the server    │
 │ will _not_ send a DHCPNAK (which tells the client it should stop using the address). If you want to change this behavior, you must explicitly state in   │
 │ dhcpd.conf what network segments your server is authoritative for using the 'authoritative' statement.                                                   │
 │                                                                                                                                                          │
...
 └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────â”
Selecting previously deselected package dhcp3-server.
(Reading database ... 92247 files and directories currently installed.)
Unpacking dhcp3-server (from .../dhcp3-server_3.1.1-6+lenny4_i386.deb) ...
Processing triggers for man-db ...
Setting up dhcp3-server (3.1.1-6+lenny4) ...
Generating /etc/default/dhcp3-server...
Starting DHCP server: dhcpd3check syslog for diagnostics. failed!
 failed!
invoke-rc.d: initscript dhcp3-server, action "start" failed.
/dev/pts/5
15:04:32
$ssh 192.168.108.1 -l root
root@192.168.108.1's password:
Permission denied, please try again.
root@192.168.108.1's password:
Permission denied, please try again.
root@192.168.108.1's password:
Linux linux8.unix.nt 2.6.26-2-686 #1 SMP Thu Sep 16 19:35:51 UTC 2010 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: Mon Oct 25 16:04:50 2010 from 192.168.111.1
l3-agent is already running: pid=6070; pidfile=/root/.lilalo/l3-agent.pid
15:04:55
#screen -x
/dev/pts/0
15:08:32
#vi /etc/dhcp3/dhc
15:08:32
#vi /etc/dhcp3/dhc
15:08:32
#vi /etc/dhcp3/dhcpd.conf
15:09:24
#}

15:09:43
#cd /etc/dhcp3/

15:09:49
#ls
dhclient.conf  dhclient-enter-hooks.d  dhclient-exit-hooks.d  dhcpd.conf  dhcpd.conf.SAVE
15:09:52
#vim dhcpd.conf
--- /tmp/l3-saved-5424.1029.15510	2010-10-25 09:10:08.000000000 -0400
+++ dhcpd.conf	2010-10-25 09:14:10.000000000 -0400
@@ -11,8 +11,8 @@
 ddns-update-style none;
 
 # option definitions common to all supported networks...
-option domain-name "example.org";
-option domain-name-servers ns1.example.org, ns2.example.org;
+option domain-name "unix.nt";
+option domain-name-servers 10.0.35.1;
 
 default-lease-time 600;
 max-lease-time 7200;
@@ -33,76 +33,7 @@
 
 # This is a very basic subnet declaration.
 
-#subnet 10.254.239.0 netmask 255.255.255.224 {
-#  range 10.254.239.10 10.254.239.20;
-#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
-#}
-
-# This declaration allows BOOTP clients to get dynamic addresses,
-# which we don't really recommend.
-
-#subnet 10.254.239.32 netmask 255.255.255.224 {
-#  range dynamic-bootp 10.254.239.40 10.254.239.60;
-#  option broadcast-address 10.254.239.31;
-#  option routers rtr-239-32-1.example.org;
-#}
-
-# A slightly different configuration for an internal subnet.
-#subnet 10.5.5.0 netmask 255.255.255.224 {
-#  range 10.5.5.26 10.5.5.30;
-#  option domain-name-servers ns1.internal.example.org;
-#  option domain-name "internal.example.org";
-#  option routers 10.5.5.1;
-#  option broadcast-address 10.5.5.31;
-#  default-lease-time 600;
-#  max-lease-time 7200;
-#}
-
-# Hosts which require special configuration options can be listed in
-# host statements.   If no address is specified, the address will be
-# allocated dynamically (if possible), but the host-specific information
-# will still come from the host declaration.
-
-#host passacaglia {
-#  hardware ethernet 0:0:c0:5d:bd:95;
-#  filename "vmunix.passacaglia";
-#  server-name "toccata.fugue.com";
-#}
-
-# Fixed IP addresses can also be specified for hosts.   These addresses
-# should not also be listed as being available for dynamic assignment.
-# Hosts for which fixed IP addresses have been specified can boot using
-# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
-# be booted with DHCP, unless there is an address range on the subnet
-# to which a BOOTP client is connected which has the dynamic-bootp flag
-# set.
-#host fantasia {
-#  hardware ethernet 08:00:07:26:c0:a5;
-#  fixed-address fantasia.fugue.com;
-#}
-
-# You can declare a class of clients and then do address allocation
-# based on that.   The example below shows a case where all clients
-# in a certain class get addresses on the 10.17.224/24 subnet, and all
-# other clients get addresses on the 10.0.29/24 subnet.
-
-#class "foo" {
-#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
-#}
-
-#shared-network 224-29 {
-#  subnet 10.17.224.0 netmask 255.255.255.0 {
-#    option routers rtr-224.example.org;
-#  }
-#  subnet 10.0.29.0 netmask 255.255.255.0 {
-#    option routers rtr-29.example.org;
-#  }
-#  pool {
-#    allow members of "foo";
-#    range 10.17.224.10 10.17.224.250;
-#  }
-#  pool {
-#    deny members of "foo";
-#    range 10.0.29.10 10.0.29.230;
-#  }
-#}
+subnet 192.168.105.0 netmask 255.255.255.0 {
+  range 192.168.105.200 192.168.105.250;
+  option routers 192.168.105.254;
+}

Файлы

  • /etc/hosts
  • /etc/net
  • /etc/network/interfaces
  • /home/ids/.l3rc
  • /etc/hosts
    >
    127.0.0.1       localhost
    192.168.105.1   linux23.unix.nt linux23
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    
    /etc/net
    >
    netscsid.conf  network/       networks
    
    /etc/network/interfaces
    >
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    # The loopback network interface
    auto lo
    iface lo inet loopback
    # The primary network interface
    allow-hotplug eth1
    iface eth1 inet static
            address 192.168.105.1
            netmask 255.255.255.0
            network 192.168.105.0
            broadcast 192.168.105.255
            gateway 192.168.105.254
            # dns-* options are implemented by the resolvconf package, if installed
            dns-nameservers 10.0.35.1
            dns-search unix.nt
    
    /home/ids/.l3rc
    >
    l3cd=/users/ids/nt-voip/linux23.unix.nt.unix.nt/ids
    

    Статистика

    Время первой команды журнала13:23:49 2010-10-25
    Время последней команды журнала15:09:52 2010-10-25
    Количество командных строк в журнале100
    Процент команд с ненулевым кодом завершения, %10.00
    Процент синтаксически неверно набранных команд, %10.00
    Суммарное время работы с терминалом *, час 1.77
    Количество командных строк в единицу времени, команда/мин 0.94
    Частота использования команд
    ifconfig9|========| 8.74%
    cat9|========| 8.74%
    apt-get8|=======| 7.77%
    ping8|=======| 7.77%
    /etc/init.d/networking6|=====| 5.83%
    /etc/init.d/network5|====| 4.85%
    route5|====| 4.85%
    vi5|====| 4.85%
    l34|===| 3.88%
    ifdown4|===| 3.88%
    /etc/init.d/ifupdown3|==| 2.91%
    ssh3|==| 2.91%
    tracert2|=| 1.94%
    sed2|=| 1.94%
    ls2|=| 1.94%
    ps2|=| 1.94%
    l3-agent2|=| 1.94%
    grep2|=| 1.94%
    /etc/init.d/network-manager2|=| 1.94%
    }1|| 0.97%
    /etc/init.d/network-manager-dispatcher1|| 0.97%
    screen1|| 0.97%
    l3script1|| 0.97%
    pkill1|| 0.97%
    cd1|| 0.97%
    ECHO1|| 0.97%
    echo1|| 0.97%
    ~1|| 0.97%
    -s1|| 0.97%
    q!1|| 0.97%
    w1|| 0.97%
    sudo1|| 0.97%
    ifup1|| 0.97%
    vim1|| 0.97%
    /ifconfig1|| 0.97%
    mtr1|| 0.97%
    less1|| 0.97%
    if1|| 0.97%
    q!q1|| 0.97%
    ____
    *) Интервалы неактивности длительностью 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$