/l3/users/eb/2009/linux12/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 :30 :31 :32 :33 :34 :35 :36 :37 :38 :39 :40 :41 :42 :43 :44 :45 :46 :47 :48 |
|
#ping 192.168.206.1
PING 192.168.206.1 (192.168.206.1) 56(84) bytes of data. ^C --- 192.168.206.1 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1007ms |
#ping 192.168.206.2
PING 192.168.206.2 (192.168.206.2) 56(84) bytes of data. 64 bytes from 192.168.206.2: icmp_seq=1 ttl=64 time=0.225 ms ^C --- 192.168.206.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.225/0.225/0.225/0.000 ms |
#ping 192.168.206.1
PING 192.168.206.1 (192.168.206.1) 56(84) bytes of data. ^C --- 192.168.206.1 ping statistics --- 61 packets transmitted, 0 received, 100% packet loss, time 60479ms |
#ping 192.168.206.1
PING 192.168.206.1 (192.168.206.1) 56(84) bytes of data. ^C --- 192.168.206.1 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3024ms |
#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=62 time=1.67 ms ^C --- 192.168.105.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.677/1.677/1.677/0.000 ms |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.106.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.106.1 0.0.0.0 UG 0 0 0 eth0 |
#ssh 192.168.106.1
The authenticity of host '192.168.106.1 (192.168.106.1)' can't be established. RSA key fingerprint is 34:6c:c2:da:38:7c:d7:17:e9:cd:17:8d:e7:cf:f1:a6. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.106.1' (RSA) to the list of known hosts. Enter passphrase for key '/root/.ssh/id_dsa': Linux linux11 2.6.29-2-686 #1 SMP Sun May 17 17:56:29 UTC 2009 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: Wed Jun 3 17:56:01 2009 from 192.168.106.2 l3-agent is already running: pid=4673; pidfile=/root/.lilalo/l3-agent.pid Agent pid 1695 Agent pid 1695 Agent pid 1695 |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.205.2 192.168.206.1 255.255.255.255 UGH 0 0 0 eth0.206 172.16.1.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.105.0 172.16.1.5 255.255.255.0 UG 0 0 0 tun0 192.168.106.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.106 192.168.206.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.206 0.0.0.0 172.16.1.5 0.0.0.0 UG 0 0 0 tun0 |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.106.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.106.1 0.0.0.0 UG 0 0 0 eth0 |
#cat /etc/network/interfaces
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. auto lo eth0 iface lo inet loopback iface eth0 inet static # address 192.168.15.12 # netmask 255.255.255.0 # network 192.168.15.0 # broadcast 192.168.15.255 # gateway 192.168.15.254 address 192.168.106.2 netmask 255.255.255.0 network 192.168.106.0 broadcast 192.168.106.255 gateway 192.168.106.1 |
#/etc/init.d/net
netdiag networking |
#/etc/init.d/networking restart
Reconfiguring network interfaces...SIOCDELRT: No such process done. |
#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.636 ms 64 bytes from 192.168.15.254: icmp_seq=2 ttl=64 time=0.626 ms ^C --- 192.168.15.254 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.626/0.631/0.636/0.005 ms |
#ssh 192.168.15.254
Connection to 192.168.15.254 closed by remote host. |
#vconfig add eth0 106
WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS?? Added VLAN with VID == 106 to IF -:eth0:- |
#vconfig add eth0 206
Added VLAN with VID == 206 to IF -:eth0:- |
#vim /etc/network/interfaces
|
# 24
2 # /usr/share/doc/ifupdown/examples for more information. 3 4 #iface eth0 inet static # address 192.168.15.12 5 # netmask 255.255.255.0 # network 192.168.15.0 6 # broadcast 192.168.15.255 # gateway 192.168.15.254 7 i 8 iface eth0.106 inet static ... ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/network/interfaces" 41L, 838C записаний |
#/etc/init.d/networking restart
Reconfiguring network interfaces...Ignoring unknown interface eth0=eth0. Ignoring unknown interface eth0=eth0. done. |
#ping 192.168.206.1
PING 192.168.206.1 (192.168.206.1) 56(84) bytes of data. 64 bytes from 192.168.206.1: icmp_seq=1 ttl=64 time=0.656 ms 64 bytes from 192.168.206.1: icmp_seq=2 ttl=64 time=0.640 ms ^C --- 192.168.206.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.640/0.648/0.656/0.008 ms |
#ping 192.168.106.2
PING 192.168.106.2 (192.168.106.2) 56(84) bytes of data. ^C --- 192.168.106.2 ping statistics --- 16 packets transmitted, 0 received, 100% packet loss, time 15119ms |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:37333 errors:0 dropped:0 overruns:0 frame:0 TX packets:37818 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:10018449 (9.5 MiB) TX bytes:4489866 (4.2 MiB) eth0.106 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 BROADCAST MULTICAST MTU:1500 Metric:1 ... collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) 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:834 errors:0 dropped:0 overruns:0 frame:0 TX packets:834 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:118207 (115.4 KiB) TX bytes:118207 (115.4 KiB) |
#/etc/init.d/networking restart
Reconfiguring network interfaces...Ignoring unknown interface eth0=eth0. done. |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:37344 errors:0 dropped:0 overruns:0 frame:0 TX packets:37835 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:10019460 (9.5 MiB) TX bytes:4493745 (4.2 MiB) eth0.106 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 BROADCAST MULTICAST MTU:1500 Metric:1 ... collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) 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:835 errors:0 dropped:0 overruns:0 frame:0 TX packets:835 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:118351 (115.5 KiB) TX bytes:118351 (115.5 KiB) |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:37344 errors:0 dropped:0 overruns:0 frame:0 TX packets:37835 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:10019460 (9.5 MiB) TX bytes:4493745 (4.2 MiB) eth0.106 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 BROADCAST MULTICAST MTU:1500 Metric:1 ... collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) 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:835 errors:0 dropped:0 overruns:0 frame:0 TX packets:835 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:118351 (115.5 KiB) TX bytes:118351 (115.5 KiB) |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:37344 errors:0 dropped:0 overruns:0 frame:0 TX packets:37835 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:10019460 (9.5 MiB) TX bytes:4493745 (4.2 MiB) eth0.106 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 BROADCAST MULTICAST MTU:1500 Metric:1 ... collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) 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:835 errors:0 dropped:0 overruns:0 frame:0 TX packets:835 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:118351 (115.5 KiB) TX bytes:118351 (115.5 KiB) |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#ifconfig eth0 down
|
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:37359 errors:0 dropped:0 overruns:0 frame:0 TX packets:37856 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:10020662 (9.5 MiB) TX bytes:4507935 (4.2 MiB) eth0.106 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:21 errors:0 dropped:0 overruns:0 frame:0 ... collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) 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:836 errors:0 dropped:0 overruns:0 frame:0 TX packets:836 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:118495 (115.7 KiB) TX bytes:118495 (115.7 KiB) |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:37359 errors:0 dropped:0 overruns:0 frame:0 TX packets:37856 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:10020662 (9.5 MiB) TX bytes:4507935 (4.2 MiB) eth0.106 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:21 errors:0 dropped:0 overruns:0 frame:0 ... collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) 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:836 errors:0 dropped:0 overruns:0 frame:0 TX packets:836 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:118495 (115.7 KiB) TX bytes:118495 (115.7 KiB) |
#ifconfig eth0 down
|
#ifconfig eth0 down
|
#ping 192.168.106.1
connect: Network is unreachable |
#ifconfig eth0 up
|
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#ping 192.168.106.1
connect: Network is unreachable |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface |
#vim /etc/network/interfaces
--- /tmp/l3-saved-3747.18237.31249 2009-06-03 19:33:11.000000000 +0300 +++ /etc/network/interfaces 2009-06-03 19:33:48.000000000 +0300 @@ -1,7 +1,7 @@ # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. -auto lo eth0 +auto lo eth0 eth0.106 eth0.206 iface lo inet loopback iface eth0 inet static |
#ping 192.168.106.2
PING 192.168.106.2 (192.168.106.2) 56(84) bytes of data. 64 bytes from 192.168.106.2: icmp_seq=1 ttl=64 time=0.223 ms 64 bytes from 192.168.106.2: icmp_seq=2 ttl=64 time=0.224 ms ^C --- 192.168.106.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 0.223/0.223/0.224/0.014 ms |
#echo 1 /proc/sys/net/
core/ ipv4/ ipv6/ token-ring/ unix/ |
#echo 1 /proc/sys/net/
core/ ipv4/ ipv6/ token-ring/ unix/ |
#echo 1 /proc/sys/net/ipv4/ip
ip_default_ttl ip_forward ipfrag_low_thresh ipfrag_secret_interval ip_local_port_range ip_no_pmtu_disc ip_dynaddr ipfrag_high_thresh ipfrag_max_dist ipfrag_time ip_nonlocal_bind |
#echo 1 /proc/sys/net/ipv4/ip_forward
1 /proc/sys/net/ipv4/ip_forward |
#echo 1 >> /proc/sys/net/ipv4/ip_forward
|
#echo 1 > /proc/sys/net/ipv4/ip_forward
|
#cd /etc/openvpn/
|
#ls
update-resolv-conf |
#vim client.conf
--- /dev/null 2009-06-03 19:29:57.505584844 +0300 +++ client.conf 2009-06-03 19:40:15.000000000 +0300 @@ -0,0 +1,8 @@ +port 443 +proto tcp-client +dev tun +ifconfig 172.16.1.6 172.16.1.5 +redirect-gateway +secret linux9.key +remote 192.168.205.2 + |
#scp 192.168.205.2:/etc/openvpn/linux9.key /etc/openvpn/
The authenticity of host '192.168.205.2 (192.168.205.2)' can't be established. RSA key fingerprint is 34:6c:c2:da:38:7c:d7:17:e9:cd:17:8d:e7:cf:f1:a6. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.205.2' (RSA) to the list of known hosts. root@192.168.205.2's password: Permission denied, please try again. root@192.168.205.2's password: linux9.key 100% 636 0.6KB/s 00:00 |
#ping 192.168.105.1
PING 192.168.105.1 (192.168.105.1) 56(84) bytes of data. ^C --- 192.168.105.1 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3024ms |
#ping 192.168.105.2
PING 192.168.105.2 (192.168.105.2) 56(84) bytes of data. ^C --- 192.168.105.2 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1008ms |
#/etc/init.d/openvpn restart
Stopping virtual private network daemon: client. Starting virtual private network daemon: client. |
#tail -f /var/log/daemon.log
Jun 3 19:50:16 linux12 ovpn-client[4500]: Peer Connection Initiated with 192.168.205.2:443 Jun 3 19:50:17 linux12 ovpn-client[4500]: Initialization Sequence Completed Jun 3 19:51:12 linux12 monit[3276]: 'cron' process is not running Jun 3 19:51:12 linux12 monit[3276]: 'cron' trying to restart Jun 3 19:51:12 linux12 monit[3276]: 'cron' start: /etc/init.d/cron Jun 3 19:51:12 linux12 monit[3276]: 'cron' failed to start Jun 3 19:53:17 linux12 ovpn-client[4500]: Connection reset, restarting [0] Jun 3 19:53:17 linux12 ovpn-client[4500]: /sbin/ifconfig tun0 0.0.0.0 Jun 3 19:53:17 linux12 ovpn-client[4500]: SIGUSR1[soft,connection-reset] received, process restarting Jun 3 19:53:22 linux12 ovpn-client[4500]: NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables ... Jun 3 20:12:40 linux12 ovpn-client[4500]: TCP connection established with 192.168.205.2:443 Jun 3 20:12:40 linux12 ovpn-client[4500]: TCPv4_CLIENT link local: [undef] Jun 3 20:12:40 linux12 ovpn-client[4500]: TCPv4_CLIENT link remote: 192.168.205.2:443 Jun 3 20:12:40 linux12 ovpn-client[4500]: Peer Connection Initiated with 192.168.205.2:443 Jun 3 20:12:41 linux12 ovpn-client[4500]: Initialization Sequence Completed Jun 3 20:15:12 linux12 monit[3276]: 'cron' process is not running Jun 3 20:15:12 linux12 monit[3276]: 'cron' trying to restart Jun 3 20:15:12 linux12 monit[3276]: 'cron' start: /etc/init.d/cron Jun 3 20:15:12 linux12 monit[3276]: 'cron' failed to start ^C |
#ping 192.168.205.2
PING 192.168.205.2 (192.168.205.2) 56(84) bytes of data. 64 bytes from 192.168.205.2: icmp_seq=1 ttl=63 time=0.235 ms 64 bytes from 192.168.205.2: icmp_seq=2 ttl=63 time=0.223 ms 64 bytes from 192.168.205.2: icmp_seq=3 ttl=63 time=0.220 ms ^C --- 192.168.205.2 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1999ms rtt min/avg/max/mdev = 0.220/0.226/0.235/0.006 ms |
#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=63 time=1.41 ms 64 bytes from 192.168.105.2: icmp_seq=2 ttl=63 time=1.35 ms 64 bytes from 192.168.105.2: icmp_seq=3 ttl=63 time=1.35 ms 64 bytes from 192.168.105.2: icmp_seq=4 ttl=63 time=1.37 ms 64 bytes from 192.168.105.2: icmp_seq=5 ttl=63 time=1.34 ms ^C --- 192.168.105.2 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4005ms rtt min/avg/max/mdev = 1.348/1.371/1.418/0.041 ms |
#ping 10.0.35.100
PING 10.0.35.100 (10.0.35.100) 56(84) bytes of data. 64 bytes from 10.0.35.100: icmp_seq=1 ttl=61 time=0.673 ms 64 bytes from 10.0.35.100: icmp_seq=2 ttl=61 time=0.646 ms ^C --- 10.0.35.100 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 0.646/0.659/0.673/0.029 ms |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.205.2 192.168.206.1 255.255.255.255 UGH 0 0 0 eth0.206 172.16.1.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0 192.168.106.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.106 192.168.206.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.206 0.0.0.0 172.16.1.5 0.0.0.0 UG 0 0 0 tun0 |
#~ +q436f+q6b75+q6b64+q6b72+q6b6c+q2332+q2334+q2569+q2a37+q6b31
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.632 ms ^C --- 192.168.105.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.632/0.632/0.632/0.000 ms |
#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=63 time=5.33 ms ^C --- 192.168.105.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 5.332/5.332/5.332/0.000 ms |
#ping 192.168.105.2
64 bytes from 192.168.105.2: icmp_seq=471 ttl=63 time=1.44 ms 64 bytes from 192.168.105.2: icmp_seq=472 ttl=63 time=1.43 ms 64 bytes from 192.168.105.2: icmp_seq=473 ttl=63 time=1.43 ms 64 bytes from 192.168.105.2: icmp_seq=474 ttl=63 time=1.39 ms 64 bytes from 192.168.105.2: icmp_seq=475 ttl=63 time=1.42 ms 64 bytes from 192.168.105.2: icmp_seq=476 ttl=63 time=1.33 ms 64 bytes from 192.168.105.2: icmp_seq=477 ttl=63 time=1.41 ms 64 bytes from 192.168.105.2: icmp_seq=478 ttl=63 time=1.41 ms 64 bytes from 192.168.105.2: icmp_seq=479 ttl=63 time=1.49 ms 64 bytes from 192.168.105.2: icmp_seq=480 ttl=63 time=1.36 ms ... 64 bytes from 192.168.105.2: icmp_seq=610 ttl=63 time=1.37 ms 64 bytes from 192.168.105.2: icmp_seq=611 ttl=63 time=1.38 ms 64 bytes from 192.168.105.2: icmp_seq=612 ttl=63 time=1.41 ms 64 bytes from 192.168.105.2: icmp_seq=613 ttl=63 time=1.41 ms 64 bytes from 192.168.105.2: icmp_seq=614 ttl=63 time=1.36 ms 64 bytes from 192.168.105.2: icmp_seq=615 ttl=63 time=1.42 ms ^C --- 192.168.105.2 ping statistics --- 712 packets transmitted, 610 received, 14% packet loss, time 712554ms rtt min/avg/max/mdev = 0.619/2.582/664.374/26.899 ms |
#ssh 192.168.205.2
root@192.168.205.2's password: Linux linux9 2.6.29-2-686 #1 SMP Sun May 17 17:56:29 UTC 2009 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: Wed Jun 3 19:52:39 2009 from 192.168.106.2 l3-agent is already running: pid=17118; pidfile=/root/.lilalo/l3-agent.pid |
#ifconfig eth0.215 up
|
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1e:8c:64:2c:4a inet addr:192.168.15.9 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21e:8cff:fe64:2c4a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:73091 errors:0 dropped:0 overruns:0 frame:0 TX packets:62569 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:40525888 (38.6 MiB) TX bytes:9387824 (8.9 MiB) eth0.105 Link encap:Ethernet HWaddr 00:1e:8c:64:2c:4a inet addr:192.168.105.1 Bcast:192.168.105.255 Mask:255.255.255.0 ... TX packets:6918 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:296793 (289.8 KiB) TX bytes:296793 (289.8 KiB) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:172.16.1.5 P-t-P:172.16.1.6 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:13 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:900 (900.0 B) TX bytes:744 (744.0 B) |
#ifconfig eth0.215 down
|
#ifup eth0.215
Don't seem to be have all the variables for eth0.215/inet. Failed to bring up eth0.215. |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 172.16.1.6 0.0.0.0 255.255.255.255 UH 0 0 0 tun0 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.106.0 172.16.1.6 255.255.255.0 UG 0 0 0 tun0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1e:8c:64:2c:4a inet addr:192.168.15.9 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21e:8cff:fe64:2c4a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:73302 errors:0 dropped:0 overruns:0 frame:0 TX packets:62740 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:40544542 (38.6 MiB) TX bytes:9415900 (8.9 MiB) eth0.105 Link encap:Ethernet HWaddr 00:1e:8c:64:2c:4a inet addr:192.168.105.1 Bcast:192.168.105.255 Mask:255.255.255.0 ... TX packets:6918 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:296793 (289.8 KiB) TX bytes:296793 (289.8 KiB) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:172.16.1.5 P-t-P:172.16.1.6 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:19 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:1228 (1.1 KiB) TX bytes:744 (744.0 B) |
#vim /etc/network/interfaces
|
#ping 192.168.205.2
PING 192.168.205.2 (192.168.205.2) 56(84) bytes of data. ^C --- 192.168.205.2 ping statistics --- 10 packets transmitted, 0 received, 100% packet loss, time 9071ms |
#ssh 192.168.205.2
root@192.168.205.2's password: Linux linux9 2.6.29-2-686 #1 SMP Sun May 17 17:56:29 UTC 2009 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: Wed Jun 3 20:12:17 2009 from 192.168.206.2 l3-agent is already running: pid=17118; pidfile=/root/.lilalo/l3-agent.pid |
#vconfig eth0 215
Unknown command -:eth0:- Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. * The vlan_id is the identifier (0-4095) of the VLAN you are operating on. * skb_priority is the priority in the socket buffer (sk_buff). * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#vconfig add eth0 215
ERROR: trying to add VLAN #215 to IF -:eth0:- error: File exists |
#vconfig del eth0 215
Unknown command -:del:- Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. * The vlan_id is the identifier (0-4095) of the VLAN you are operating on. * skb_priority is the priority in the socket buffer (sk_buff). * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#vconfig add eth0 215
ERROR: trying to add VLAN #215 to IF -:eth0:- error: File exists |
#vconfig delete eth0 215
Unknown command -:delete:- Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. * The vlan_id is the identifier (0-4095) of the VLAN you are operating on. * skb_priority is the priority in the socket buffer (sk_buff). * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#vconfig rem eth0 215
ERROR: trying to remove VLAN -:eth0:- error: Invalid argument |
#vconfig rem eth0.215
Removed VLAN -:eth0.215:- |
#vconfig add eth0 215
Added VLAN with VID == 215 to IF -:eth0:- |
#ifup eth0.215
Don't seem to be have all the variables for eth0.215/inet. Failed to bring up eth0.215. |
#ifdown eth0.215
ifdown: interface eth0.215 not configured |
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. auto lo eth0 iface lo inet loopback iface eth0 inet static # address 192.168.15.12 # netmask 255.255.255.0 # network 192.168.15.0 # broadcast 192.168.15.255 # gateway 192.168.15.254 address 192.168.106.2 netmask 255.255.255.0 network 192.168.106.0 broadcast 192.168.106.255 gateway 192.168.106.1
Время первой команды журнала | 18:48:44 2009- 6- 3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 20:21:52 2009- 6- 3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 30.69 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.55 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.08 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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