| /l3/users/sid/nt-voip/linux8.unix.nt.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
|
#pkill l3-agent
|
|
#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) |
|
#l3-agent
|
|
#cat ~/.l3rc
l3cd=/users/sid/nt-voip/linux8.unix.nt.unix.nt/root |
|
#vi /etc/network/interfaces
|
|
#~
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 |
|
#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 |
|
#cat /etc/hosts
|
|
#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
|
|
#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
|
|
#cat /etc/network/interfaces
cd
|
|
#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. |
|
#vi
|
|
# 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
|
|
#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. |
|
#vi ports2
|
|
#vlan 101 untagged 15
|
|
#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)
|
|
#ssh 192.168.15.29
root@192.168.15.29's password: |
|
#ssh 192.168.15.254
Connection to 192.168.15.254 closed. |
|
#vi ports
|
|
#~
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 записано |
|
#ls
ports ports2 |
|
#cd /tmp/
|
|
#ls
install |
|
#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}"
#
|
|
#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) |
|
#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 |
|
#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)
|
|
#/etc/init.d/networking restart
Reconfiguring network interfaces...SIOCDELRT: No such process done. |
|
#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)
|
|
#if
if ifconfig ifdown ifup |
|
#ifdown eth0
ifdown: interface eth0 not configured |
|
#ifup eth0
|
|
#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)
|
|
#ping ya.ru
^C |
|
#vim /etc/resolv.conf
|
|
#~
^C |
|
#ping ya.ru
^X^C |
|
#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 |
|
#ping ya.ru
^C |
|
#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 |
|
#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 |
|
#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 Чтение списков пакетов... Готово |
|
#apt-get dist-upgrade
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Расчёт обновлений... Готово обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. |
|
#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)
|
|
#scr
screen screendump script scriptreplay |
|
#screen -x
|
|
#cat /etc/network/interfaces
|
|
#cat /etc/network/interfaces
|
|
#cat /etc/network/interfaces
prox
|
|
#screen -x
|
|
#screen -ls
|
|
#kill 8415
|