/l3/users/12-12-2011/NT-Lnet/debian1.net.nt/root :1 :2 :3 :4 :5 :6 :7 |
|
#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 |
#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 |
#screen
|
#exit
no exit |
#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 |
#/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. |
#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) |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#exit
exit Connection to 192.168.16.2 closed. |
#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 |
#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 |
#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 |
#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 |
#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 |
#exit
exit Connection to 192.168.16.2 closed. |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#iptables -t nat -L --lines-nubmer
iptables v1.4.8: unknown option `--lines-nubmer' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t nat -L --number-lines
iptables v1.4.8: unknown option `--number-lines' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -t nat -L --number-line
iptables v1.4.8: unknown option `--number-line' Try `iptables -h' or 'iptables --help' for more information. |
#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 |
#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 |
#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 |
#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 |
#echo 1 > /proc/sys/net/ipv4/ip_forward
|
#/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. |
#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 |
#screen
|
#screen -x
|
#ssh root@193.168.16.21
^C |
#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 |
#ssh root@192.168.16.21
ssh: connect to host 192.168.16.21 port 22: Connection refused |
#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 |
#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 |
#iptables -t nat -A POSTROUTING -s 192.168.30.0/26 -j MASQUERADE
|
#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 |
#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 |
#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 |
#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 |
#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 |
#route add -net 192.168.30.64/26 gw 192.168.30.62
|
#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 |
#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 |
#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 |
#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 |
#route add -net 192.168.30.128/26 gw 192.168.30.62
|
#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 |
#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 |
#route add -net 192.168.30.192/26 gw 192.168.30.62
|
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#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 |
#exit
exit Connection to 192.168.16.21 closed. |
#vim /etc/rc.conf
|
#reboot
Connection to 192.168.16.21 closed by remote host. Connection to 192.168.16.21 closed. |
#vim /etc/rc.conf
|
#reboot
Connection to 192.168.16.21 closed by remote host. Connection to 192.168.16.21 closed. |
#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 |
#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 |
Время первой команды журнала | 08:18:45 2011-12-13 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:56:11 2011-12-13 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 27.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.62 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.64 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008