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

Содержание

Журнал

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

13:36:36
#pkill l3-agent

13:36:39
#sh install
Installing dependencies...
Ok
Downloading l3bashrc...
|   --2010-10-25 14:36:45--  http://xgu.ru/lilalo/l3bashrc
|   Распознаётся xgu.ru... 212.26.146.51
|   Устанавливается соединение с xgu.ru|212.26.146.51|:80... соединение установлено.
|   Запрос HTTP послан, ожидается ответ... 200 OK
|   Длина: 7709 (7,5K) [text/plain]
|   Сохраняется в каталог: `l3bashrc'.
|
...
If you use xgu.ru backend, your labs will be available at
http://xgu.ru/l3//users/sid/nt-voip/linux8.unix.nt.unix.nt
Use commands
 $ l3cd /users/sid/MY-NEW-CONTEXT/linux8.unix.nt.unix.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)
13:36:54
#l3-agent

13:36:57
#cat ~/.l3rc
l3cd=/users/sid/nt-voip/linux8.unix.nt.unix.nt/root
13:37:03
#vi /etc/network/interfaces
13:39:56
#~
127.0.0.1       localhost
192.168.15.28   linux8.unix.nt.unix.nt  linux8.unix.nt
# 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
13:40:59
#cat /etc/hosts
127.0.0.1       localhost
192.168.108.1   linux8.unix.nt.unix.nt  linux8.unix.nt
# 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
13:41:07
#cat /etc/hosts

13:41:07
#cat /etc/hosts
                   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 eth0
iface eth0 inet static
        address 192.168.108.1
        netmask 255.255.255.0
        network 192.168.15.0
        broadcast 192.168.15.255
        gateway 192.168.15.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.0.35.1
        dns-search unix.nt
13:41:32
#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 eth0
iface eth0 inet static
        address 192.168.108.1
        netmask 255.255.255.0
        network 192.168.108.0
        broadcast 192.168.108.255
        gateway 192.168.108.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 10.0.35.1
        dns-search unix.nt
13:41:33
#cat /etc/network/interfaces
                   cd
/dev/pts/15
13:44:44
#ssh 192.168.15.254
  192.168.15.10   002170-6e6a8f     dynamic
  192.168.15.11   002655-bef627     dynamic 4
  192.168.15.12   001eec-1442b2     dynamic 6
  192.168.15.21   000ffe-7eb951     dynamic 33
  192.168.15.22   0013d4-b247f9     dynamic 29
  192.168.15.23   000ffe-7eb853     dynamic 25
  192.168.15.24   0007e9-3c2b9f     dynamic 2
  192.168.15.26   001a92-31bbfc     dynamic 21
  192.168.15.27   000ffe-7ea767     dynamic 18
  192.168.15.28   0007e9-450d2c     dynamic 5
...
  192.168.15.12   001eec-1442b2     dynamic 6
  192.168.15.21   000ffe-7eb951     dynamic 33
  192.168.15.22   0013d4-b247f9     dynamic 29
  192.168.15.23   000ffe-7eb853     dynamic 25
  192.168.15.24   0007e9-3c2b9f     dynamic 2
  192.168.15.26   001a92-31bbfc     dynamic 21
  192.168.15.27   000ffe-7ea767     dynamic 18
  192.168.15.28   0007e9-450d2c     dynamic 5
  192.168.15.29   0007e9-3c265f     dynamic 8
Connection to 192.168.15.254 closed.
13:52:31
#vi
13:53:41
# 24 1 001d92-52ffcf dynamic 15
> do
> grep "^$i " ports | awk '{print "vlan '$[100+i]' untagged "$4}'
> done
vlan 101 untagged 15
vlan 101 untagged 33
vlan 102 untagged 27
vlan 102 untagged 29
vlan 103 untagged 19
vlan 103 untagged 25
vlan 104 untagged 9
...
vlan 108 untagged 13
vlan 108 untagged 5
vlan 109 untagged 10
vlan 109 untagged 8
vlan 110 untagged 12
vlan 110 untagged 30
vlan 111 untagged 4
vlan 111 untagged 14
vlan 112 untagged 6
vlan 112 untagged 16
/dev/pts/10
14:00:26
#ssh 192.168.15.29
The authenticity of host '192.168.15.29 (192.168.15.29)' can't be established.
RSA key fingerprint is 49:de:18:e2:43:79:af:0b:ef:9d:c0:57:9d:a5:93:56.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.15.29' (RSA) to the list of known hosts.
root@192.168.15.29's password:
Linux George 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 14:49:59 2010
George:~# exit
logout
Connection to 192.168.15.29 closed.
14:01:26
#vi ports2
14:03:06
#vlan 101 untagged 15

14:03:08
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:e9:45:0d:2c
          inet addr:192.168.15.28  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::207:e9ff:fe45:d2c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:106387 errors:0 dropped:0 overruns:0 frame:0
          TX packets:75724 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:41886087 (39.9 MiB)  TX bytes:12244570 (11.6 MiB)
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:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6984 (6.8 KiB)  TX bytes:6984 (6.8 KiB)
14:03:10
#ssh 192.168.15.29
root@192.168.15.29's password:
14:03:14
#ssh 192.168.15.254
Connection to 192.168.15.254 closed.
14:04:53
#vi ports
14:04:59
#~
  3 vlan 102 untagged 27
  4 vlan 102 untagged 29
  5 vlan 103 untagged 19
  6 vlan 103 untagged 25
  7 vlan 104 untagged 9
  8 vlan 104 untagged 2
  9 vlan 106 untagged 17
 10 vlan 106 untagged 21
 11 vlan 107 untagged 1
 12 vlan 107 untagged 18
...
 16 vlan 110 untagged 12
 17 vlan 110 untagged 30
 18 vlan 111 untagged 4
 19 vlan 111 untagged 14
 20 vlan 112 untagged 6
 21 vlan 112 untagged 16
~
~
~
"ports2" [Новый] 21L, 435C записано
14:05:29
#ls
ports  ports2
/dev/tty1
14:06:51
#ls
ports  ports2
14:06:55
#cd /tmp/

14:06:58
#ls
install
14:06:58
#vim install
--- /tmp/l3-saved-6756.6995.17011	2010-10-25 15:07:01.000000000 +0300
+++ install	2010-10-25 15:07:12.000000000 +0300
@@ -9,7 +9,7 @@
 
 lilalo_user=sid
 lab=nt-voip
-install_l3bashrc_for_this_users=${users:-"root user"}  # users who will use l3agent and l3script
+install_l3bashrc_for_this_users=${users:-"root sid"}  # users who will use l3agent and l3script
 lilalo_context="/users/${lilalo_user}/${lab}/${hostname}"
 
 #
14:07:12
#sh install
Installing dependencies...
Ok
Downloading l3bashrc...
|   --2010-10-25 15:07:15--  http://xgu.ru/lilalo/l3bashrc
|   Распознаётся xgu.ru... 212.26.146.51
|   Устанавливается соединение с xgu.ru|212.26.146.51|:80... соединение установлено.
|   Запрос HTTP послан, ожидается ответ... 200 OK
|   Длина: 7709 (7,5K) [text/plain]
|   Сохраняется в каталог: `l3bashrc'.
|
...
If you use xgu.ru backend, your labs will be available at
http://xgu.ru/l3//users/sid/nt-voip/linux8.unix.nt.unix.nt
Use commands
 $ l3cd /users/sid/MY-NEW-CONTEXT/linux8.unix.nt.unix.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/tty2
14:08:36
#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_seq=1 ttl=48 time=55.5 ms
64 bytes from www.yandex.ru (87.250.250.3): icmp_seq=2 ttl=48 time=55.9 ms
^C
--- ya.ru ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1003ms
rtt min/avg/max/mdev = 55.509/55.714/55.919/0.205 ms
14:10:33
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:e9:45:0d:2c
          inet addr:192.168.15.28  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::207:e9ff:fe45:d2c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:107779 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77053 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:42138471 (40.1 MiB)  TX bytes:12436717 (11.8 MiB)
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:50 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:21768 (21.2 KiB)  TX bytes:21768 (21.2 KiB)
прошло 35 минут
14:46:04
#/etc/init.d/networking restart
Reconfiguring network interfaces...SIOCDELRT: No such process
done.
14:46:10
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:e9:45:0d:2c
          inet addr:192.168.15.28  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::207:e9ff:fe45:d2c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:109915 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77168 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:42318820 (40.3 MiB)  TX bytes:12449655 (11.8 MiB)
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:71 errors:0 dropped:0 overruns:0 frame:0
          TX packets:71 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:31760 (31.0 KiB)  TX bytes:31760 (31.0 KiB)
14:46:13
#if
if        ifconfig  ifdown    ifup
14:46:13
#ifdown eth0
ifdown: interface eth0 not configured
14:46:27
#ifup eth0

14:46:32
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:e9:45:0d:2c
          inet addr:192.168.108.1  Bcast:192.168.108.255  Mask:255.255.255.0
          inet6 addr: fe80::207:e9ff:fe45:d2c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:109953 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77185 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:42321630 (40.3 MiB)  TX bytes:12454004 (11.8 MiB)
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:71 errors:0 dropped:0 overruns:0 frame:0
          TX packets:71 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:31760 (31.0 KiB)  TX bytes:31760 (31.0 KiB)
14:46:35
#ping ya.ru
^C
14:46:40
#vim /etc/resolv.conf
14:47:00
#~
^C
14:47:57
#ping ya.ru
^X^C
14:49:22
#ping 192.168.101.1
PING 192.168.101.1 (192.168.101.1) 56(84) bytes of data.
^C
--- 192.168.101.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1014ms
14:49:36
#ping ya.ru
^C
14:55:44
#vim /etc/hosts
--- /tmp/l3-saved-7310.15835.3272	2010-10-25 15:58:23.000000000 +0300
+++ /etc/hosts	2010-10-25 15:58:37.000000000 +0300
@@ -1,5 +1,5 @@
 127.0.0.1	localhost
-192.168.108.1	linux8.unix.nt.unix.nt	linux8.unix.nt
+192.168.108.1	linux8.unix.nt	linux8
 
 # The following lines are desirable for IPv6 capable hosts
 ::1     localhost ip6-localhost ip6-loopback
14:58:37
#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_seq=1 ttl=48 time=54.2 ms
^C
--- ya.ru ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 54.214/54.214/54.214/0.000 ms
14:59:02
#apt-get update
В кеше http://10.0.35.1 lenny Release.gpg
В кеше http://security.debian.org lenny/updates Release.gpg
Игн http://security.debian.org lenny/updates/main Translation-ru
Игн http://security.debian.org lenny/updates/contrib Translation-ru
Игн http://security.debian.org lenny/updates/non-free Translation-ru
В кеше http://10.0.35.1 lenny/main Translation-ru
В кеше http://security.debian.org lenny/updates Release
Игн http://security.debian.org lenny/updates/main Packages/DiffIndex
В кеше http://volatile.debian.org lenny/volatile Release.gpg
Игн http://volatile.debian.org lenny/volatile/main Translation-ru
...
Игн http://10.0.35.1 lenny/main Sources
Игн http://10.0.35.1 lenny/non-free Sources
Игн http://10.0.35.1 lenny/contrib Sources
В кеше http://10.0.35.1 lenny/main Packages
В кеше http://10.0.35.1 lenny/non-free Packages
В кеше http://10.0.35.1 lenny/contrib Packages
В кеше http://10.0.35.1 lenny/main Sources
В кеше http://10.0.35.1 lenny/non-free Sources
В кеше http://10.0.35.1 lenny/contrib Sources
Чтение списков пакетов... Готово
14:59:14
#apt-get dist-upgrade
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
Расчёт обновлений... Готово
обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено.
14:59:18
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:07:e9:45:0d:2c
          inet addr:192.168.108.1  Bcast:192.168.108.255  Mask:255.255.255.0
          inet6 addr: fe80::207:e9ff:fe45:d2c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:111067 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77809 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:42425222 (40.4 MiB)  TX bytes:12533980 (11.9 MiB)
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:209 errors:0 dropped:0 overruns:0 frame:0
          TX packets:209 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:43858 (42.8 KiB)  TX bytes:43858 (42.8 KiB)
/dev/pts/0
15:00:16
#scr
screen        screendump    script        scriptreplay
15:00:16
#scr
screen        screendump    script        scriptreplay
15:00:16
#screen -x
/dev/pts/7
15:04:17
#screen -x
/dev/pts/9
15:04:31
#screen -x
/dev/pts/10
15:04:31
#screen -x
/dev/tty2
15:04:46
#screen
/dev/pts/14
15:04:50
#screen -x
/dev/pts/15
15:04:51
#screen -x
/dev/pts/20
15:04:55
#screen -x
15:05:02
#cat /etc/network/interfaces

15:05:02
#cat /etc/network/interfaces

15:05:02
#cat /etc/network/interfaces
                 prox
/dev/pts/22
15:05:04
#screen -x
/dev/pts/23
15:05:04
#alias exit="no exit"

/dev/pts/22
15:05:13
#screen -x
/dev/pts/23
15:05:15
#set -o ignoreeof

/dev/pts/14
15:05:27
#screen -help
/dev/pts/17
15:05:28
#screen -x
/dev/pts/15
15:05:33
#screen -X
15:05:40
#screen -x
/dev/pts/17
15:05:41
#screen -x 3058
/dev/pts/14
15:05:43
#screen -x
/dev/pts/15
15:05:46
#screen -x 3058
/dev/pts/26
15:05:54
#screen -ls
15:05:56
#screen -ls
/dev/pts/22
15:05:56
#screen -x 3058
/dev/pts/26
15:06:04
#screen -x 3058
/dev/pts/14
15:06:04
#screen -x 3058
/dev/pts/26
15:06:15
#screen -x 8415
15:06:26
#kill 8415

/dev/pts/28
15:06:34
#screen -x
/dev/pts/26
15:06:35