/l3/users/2014-11-nt-voip/nt-voip/debian2/root :1 :2 :3 :4 :5 :6 :7 |
|
#screen -ls
|
#layout "us,ru"
|
#ping ya.ru
|
#setxkbmap -layout "us,ru"
|
#cat ~/.l3rc
|
#шifconfig
eth0 Link encap:Ethernet HWaddr 6c:3b:e5:3a:e8:25 inet addr:192.168.12.2 Bcast:192.168.12.255 Mask:255.255.255.0 inet6 addr: fe80::6e3b:e5ff:fe3a:e825/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:35278 errors:0 dropped:4 overruns:0 frame:0 TX packets:19200 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:21972773 (20.9 MiB) TX bytes:1757216 (1.6 MiB) Interrupt:18 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:154 errors:0 dropped:0 overruns:0 frame:0 TX packets:154 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:9418 (9.1 KiB) TX bytes:9418 (9.1 KiB) |
#ifconfig
eth0 Link encap:Ethernet HWaddr 6c:3b:e5:3a:e8:25 inet addr:192.168.12.2 Bcast:192.168.12.255 Mask:255.255.255.0 inet6 addr: fe80::6e3b:e5ff:fe3a:e825/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:35506 errors:0 dropped:4 overruns:0 frame:0 TX packets:19345 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:22026096 (21.0 MiB) TX bytes:1772491 (1.6 MiB) Interrupt:18 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:154 errors:0 dropped:0 overruns:0 frame:0 TX packets:154 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:9418 (9.1 KiB) TX bytes:9418 (9.1 KiB) |
#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.12.2 netmask 255.255.255.0 gateway 192.168.12.254 |
#alias exit='echo no exit'
|
#ping 192.168.12.253
PING 192.168.12.253 (192.168.12.253) 56(84) bytes of data. 64 bytes from 192.168.12.253: icmp_req=1 ttl=64 time=1.45 ms 64 bytes from 192.168.12.253: icmp_req=2 ttl=64 time=0.673 ms 64 bytes from 192.168.12.253: icmp_req=3 ttl=64 time=0.671 ms 64 bytes from 192.168.12.253: icmp_req=4 ttl=64 time=0.674 ms 64 bytes from 192.168.12.253: icmp_req=5 ttl=64 time=0.614 ms 64 bytes from 192.168.12.253: icmp_req=6 ttl=64 time=0.660 ms 64 bytes from 192.168.12.253: icmp_req=7 ttl=64 time=0.676 ms 64 bytes from 192.168.12.253: icmp_req=8 ttl=64 time=2.17 ms 64 bytes from 192.168.12.253: icmp_req=9 ttl=64 time=0.677 ms ... 64 bytes from 192.168.12.253: icmp_req=18 ttl=64 time=0.602 ms 64 bytes from 192.168.12.253: icmp_req=19 ttl=64 time=0.675 ms 64 bytes from 192.168.12.253: icmp_req=20 ttl=64 time=0.675 ms 64 bytes from 192.168.12.253: icmp_req=21 ttl=64 time=1.01 ms 64 bytes from 192.168.12.253: icmp_req=22 ttl=64 time=0.654 ms 64 bytes from 192.168.12.253: icmp_req=23 ttl=64 time=0.665 ms ^C --- 192.168.12.253 ping statistics --- 23 packets transmitted, 23 received, 0% packet loss, time 22002ms rtt min/avg/max/mdev = 0.602/1.423/15.481/3.016 ms |
#ping 192.168.12.253
PING 192.168.12.253 (192.168.12.253) 56(84) bytes of data. 64 bytes from 192.168.12.253: icmp_req=1 ttl=64 time=0.558 ms 64 bytes from 192.168.12.253: icmp_req=2 ttl=64 time=0.673 ms 64 bytes from 192.168.12.253: icmp_req=3 ttl=64 time=0.657 ms 64 bytes from 192.168.12.253: icmp_req=4 ttl=64 time=0.624 ms 64 bytes from 192.168.12.253: icmp_req=5 ttl=64 time=0.726 ms 64 bytes from 192.168.12.253: icmp_req=6 ttl=64 time=0.672 ms 64 bytes from 192.168.12.253: icmp_req=7 ttl=64 time=0.963 ms 64 bytes from 192.168.12.253: icmp_req=8 ttl=64 time=0.651 ms 64 bytes from 192.168.12.253: icmp_req=9 ttl=64 time=0.681 ms ... 64 bytes from 192.168.12.253: icmp_req=27 ttl=64 time=0.681 ms 64 bytes from 192.168.12.253: icmp_req=28 ttl=64 time=0.663 ms 64 bytes from 192.168.12.253: icmp_req=29 ttl=64 time=0.651 ms 64 bytes from 192.168.12.253: icmp_req=30 ttl=64 time=0.667 ms 64 bytes from 192.168.12.253: icmp_req=31 ttl=64 time=0.668 ms 64 bytes from 192.168.12.253: icmp_req=32 ttl=64 time=0.835 ms ^C --- 192.168.12.253 ping statistics --- 32 packets transmitted, 32 received, 0% packet loss, time 30997ms rtt min/avg/max/mdev = 0.558/0.726/1.824/0.217 ms |
#ifconfig
eth0 Link encap:Ethernet HWaddr 6c:3b:e5:3a:e8:25 inet addr:192.168.12.2 Bcast:192.168.12.255 Mask:255.255.255.0 inet6 addr: fe80::6e3b:e5ff:fe3a:e825/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:49600 errors:0 dropped:4 overruns:0 frame:0 TX packets:26153 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:26280067 (25.0 MiB) TX bytes:2379160 (2.2 MiB) Interrupt:18 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:206 errors:0 dropped:0 overruns:0 frame:0 TX packets:206 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:12538 (12.2 KiB) TX bytes:12538 (12.2 KiB) |
#зÑÑÐping 192.168.12.253
PING 192.168.12.253 (192.168.12.253) 56(84) bytes of data. 64 bytes from 192.168.12.253: icmp_req=1 ttl=64 time=3.68 ms 64 bytes from 192.168.12.253: icmp_req=2 ttl=64 time=0.659 ms 64 bytes from 192.168.12.253: icmp_req=3 ttl=64 time=0.674 ms 64 bytes from 192.168.12.253: icmp_req=4 ttl=64 time=0.673 ms 64 bytes from 192.168.12.253: icmp_req=5 ttl=64 time=0.672 ms 64 bytes from 192.168.12.253: icmp_req=6 ttl=64 time=0.678 ms 64 bytes from 192.168.12.253: icmp_req=7 ttl=64 time=1.26 ms 64 bytes from 192.168.12.253: icmp_req=8 ttl=64 time=0.608 ms 64 bytes from 192.168.12.253: icmp_req=9 ttl=64 time=0.674 ms ^C --- 192.168.12.253 ping statistics --- 9 packets transmitted, 9 received, 0% packet loss, time 8002ms rtt min/avg/max/mdev = 0.608/1.065/3.687/0.946 ms |
#layout "us,ru"
|
#ping ya.ru
|
#setxkbmap -layout "us,ru"
|
#cat ~/.l3rc
sed -i s/192.168.20.1 sed: -e expression #1, char 14: unterminated `s' command |
#sed -i s/192.168.20.1/ /ets/network/interfaces
sed: -e expression #1, char 15: unterminated `s' command |
##sed -i s
|
#sed -i s/192.168.12.2/192.168.20.1/ /etc/network/interfaces
|
#/192.168.20.1/ /etc/network/interfaces
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.20.1 netmask 255.255.255.0 gateway 192.168.20.154 |
#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.20.1 netmask 255.255.255.0 gateway 192.168.20.254 |
#cat /etc/network/interfaces
|
#/192.168.20.1/ /etc/network/interfaces
|
#cat /etc/network/interfaces
|
#cat /etc/network/interfaces
ifconfig eth0 Link encap:Ethernet HWaddr 6c:3b:e5:3a:e8:25 inet addr:192.168.12.2 Bcast:192.168.12.255 Mask:255.255.255.0 inet6 addr: fe80::6e3b:e5ff:fe3a:e825/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:72486 errors:0 dropped:4 overruns:0 frame:0 TX packets:41333 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:35796076 (34.1 MiB) TX bytes:3699332 (3.5 MiB) Interrupt:18 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:234 errors:0 dropped:0 overruns:0 frame:0 TX packets:234 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:14218 (13.8 KiB) TX bytes:14218 (13.8 KiB) |
#cat /etc/network/interfaces
|
#/192.168.20.1/ /etc/network/interfaces
|
#cat /etc/network/interfaces
|
#cat /etc/network/interfaces
ping 192.168.12.253 PING 192.168.12.253 (192.168.12.253) 56(84) bytes of data. From 192.168.12.2 icmp_seq=1 Destination Host Unreachable From 192.168.12.2 icmp_seq=2 Destination Host Unreachable From 192.168.12.2 icmp_seq=3 Destination Host Unreachable From 192.168.12.2 icmp_seq=4 Destination Host Unreachable From 192.168.12.2 icmp_seq=5 Destination Host Unreachable From 192.168.12.2 icmp_seq=6 Destination Host Unreachable From 192.168.12.2 icmp_seq=7 Destination Host Unreachable From 192.168.12.2 icmp_seq=8 Destination Host Unreachable ... From 192.168.12.2 icmp_seq=16 Destination Host Unreachable From 192.168.12.2 icmp_seq=17 Destination Host Unreachable From 192.168.12.2 icmp_seq=18 Destination Host Unreachable From 192.168.12.2 icmp_seq=19 Destination Host Unreachable From 192.168.12.2 icmp_seq=20 Destination Host Unreachable From 192.168.12.2 icmp_seq=21 Destination Host Unreachable ^C --- 192.168.12.253 ping statistics --- 24 packets transmitted, 0 received, +21 errors, 100% packet loss, time 23122ms pipe 3 |
#ifdown eth0
RTNETLINK answers: No such process |
#ifconfig eth0
eth0 Link encap:Ethernet HWaddr 6c:3b:e5:3a:e8:25 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:4 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:18 |
#ifup eth0
|
#ifconfig eth0
eth0 Link encap:Ethernet HWaddr 6c:3b:e5:3a:e8:25 inet addr:192.168.20.1 Bcast:192.168.20.255 Mask:255.255.255.0 inet6 addr: fe80::6e3b:e5ff:fe3a:e825/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:85 errors:0 dropped:4 overruns:0 frame:0 TX packets:116 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:10492 (10.2 KiB) TX bytes:13774 (13.4 KiB) Interrupt:18 |
#ping 192.168.20.253
PING 192.168.20.253 (192.168.20.253) 56(84) bytes of data. From 192.168.20.1 icmp_seq=1 Destination Host Unreachable From 192.168.20.1 icmp_seq=2 Destination Host Unreachable From 192.168.20.1 icmp_seq=3 Destination Host Unreachable From 192.168.20.1 icmp_seq=4 Destination Host Unreachable From 192.168.20.1 icmp_seq=5 Destination Host Unreachable From 192.168.20.1 icmp_seq=6 Destination Host Unreachable From 192.168.20.1 icmp_seq=7 Destination Host Unreachable From 192.168.20.1 icmp_seq=8 Destination Host Unreachable From 192.168.20.1 icmp_seq=9 Destination Host Unreachable From 192.168.20.1 icmp_seq=10 Destination Host Unreachable From 192.168.20.1 icmp_seq=11 Destination Host Unreachable From 192.168.20.1 icmp_seq=12 Destination Host Unreachable From 192.168.20.1 icmp_seq=13 Destination Host Unreachable From 192.168.20.1 icmp_seq=14 Destination Host Unreachable From 192.168.20.1 icmp_seq=17 Destination Host Unreachable ^C --- 192.168.20.253 ping statistics --- 19 packets transmitted, 0 received, +15 errors, 100% packet loss, time 17999ms pipe 4 |
#ifconfig
eth0 Link encap:Ethernet HWaddr 6c:3b:e5:3a:e8:25 inet addr:192.168.20.1 Bcast:192.168.20.255 Mask:255.255.255.0 inet6 addr: fe80::6e3b:e5ff:fe3a:e825/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:109 errors:0 dropped:4 overruns:0 frame:0 TX packets:154 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:16594 (16.2 KiB) TX bytes:16479 (16.0 KiB) Interrupt:18 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:465 errors:0 dropped:0 overruns:0 frame:0 TX packets:465 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:40212 (39.2 KiB) TX bytes:40212 (39.2 KiB) |
#ping 192.168.20.254
PING 192.168.20.254 (192.168.20.254) 56(84) bytes of data. 64 bytes from 192.168.20.254: icmp_req=1 ttl=64 time=0.621 ms 64 bytes from 192.168.20.254: icmp_req=2 ttl=64 time=0.626 ms 64 bytes from 192.168.20.254: icmp_req=3 ttl=64 time=0.677 ms 64 bytes from 192.168.20.254: icmp_req=4 ttl=64 time=0.634 ms 64 bytes from 192.168.20.254: icmp_req=5 ttl=64 time=0.793 ms 64 bytes from 192.168.20.254: icmp_req=6 ttl=64 time=0.692 ms 64 bytes from 192.168.20.254: icmp_req=7 ttl=64 time=0.624 ms 64 bytes from 192.168.20.254: icmp_req=8 ttl=64 time=0.678 ms 64 bytes from 192.168.20.254: icmp_req=9 ttl=64 time=0.612 ms 64 bytes from 192.168.20.254: icmp_req=10 ttl=64 time=0.681 ms 64 bytes from 192.168.20.254: icmp_req=11 ttl=64 time=0.670 ms 64 bytes from 192.168.20.254: icmp_req=12 ttl=64 time=0.678 ms 64 bytes from 192.168.20.254: icmp_req=13 ttl=64 time=0.696 ms ^C --- 192.168.20.254 ping statistics --- 13 packets transmitted, 13 received, 0% packet loss, time 11999ms rtt min/avg/max/mdev = 0.612/0.667/0.793/0.057 ms |
#ping 192.168.20.253
PING 192.168.20.253 (192.168.20.253) 56(84) bytes of data. From 192.168.20.1 icmp_seq=1 Destination Host Unreachable From 192.168.20.1 icmp_seq=2 Destination Host Unreachable From 192.168.20.1 icmp_seq=3 Destination Host Unreachable From 192.168.20.1 icmp_seq=4 Destination Host Unreachable From 192.168.20.1 icmp_seq=5 Destination Host Unreachable From 192.168.20.1 icmp_seq=6 Destination Host Unreachable ^C --- 192.168.20.253 ping statistics --- 8 packets transmitted, 0 received, +6 errors, 100% packet loss, time 7038ms pipe 3 |
#ping 192.168.20.254
PING 192.168.20.254 (192.168.20.254) 56(84) bytes of data. 64 bytes from 192.168.20.254: icmp_req=1 ttl=64 time=0.633 ms 64 bytes from 192.168.20.254: icmp_req=2 ttl=64 time=0.670 ms 64 bytes from 192.168.20.254: icmp_req=3 ttl=64 time=0.625 ms 64 bytes from 192.168.20.254: icmp_req=4 ttl=64 time=0.681 ms ^C --- 192.168.20.254 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 2999ms rtt min/avg/max/mdev = 0.625/0.652/0.681/0.029 ms |
#ping 192.168.12.253
PING 192.168.12.253 (192.168.12.253) 56(84) bytes of data. 64 bytes from 192.168.12.253: icmp_req=1 ttl=64 time=0.591 ms 64 bytes from 192.168.12.253: icmp_req=2 ttl=64 time=0.674 ms 64 bytes from 192.168.12.253: icmp_req=3 ttl=64 time=0.610 ms 64 bytes from 192.168.12.253: icmp_req=4 ttl=64 time=0.656 ms 64 bytes from 192.168.12.253: icmp_req=5 ttl=64 time=0.960 ms 64 bytes from 192.168.12.253: icmp_req=6 ttl=64 time=0.600 ms ^C --- 192.168.12.253 ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 5001ms rtt min/avg/max/mdev = 0.591/0.681/0.960/0.132 ms |
#ping 192.168.12.254
PING 192.168.12.254 (192.168.12.254) 56(84) bytes of data. 64 bytes from 192.168.12.254: icmp_req=1 ttl=63 time=0.335 ms 64 bytes from 192.168.12.254: icmp_req=2 ttl=63 time=0.356 ms 64 bytes from 192.168.12.254: icmp_req=3 ttl=63 time=0.371 ms 64 bytes from 192.168.12.254: icmp_req=4 ttl=63 time=0.323 ms 64 bytes from 192.168.12.254: icmp_req=5 ttl=63 time=0.368 ms ^C --- 192.168.12.254 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3999ms rtt min/avg/max/mdev = 0.323/0.350/0.371/0.027 ms |
#apt-cache search dhcp server
ahcpd - Ad-Hoc Configuration Protocol avahi-autoipd - Avahi IPv4LL network address configuration daemon bootp - server for the bootp protocol with DHCP support udhcpd - Provides the busybox DHCP server implementation dhcp-helper - A DHCP relay agent dhcp-probe - network DHCP or BootP server discover dhcpdump - Parse DHCP packets from tcpdump dhcping - DHCP Daemon Ping Program dhis-server - Dynamic Host Information System - server dibbler-client - portable DHCPv6 client ... ltsp-server-standalone - complete LTSP server environment nagios-plugins-basic - Plugins for nagios compatible monitoring systems netdiscover - active/passive network address scanner using arp requests netdiscover-dbg - active/passive network address scanner using arp requests (debug) pump - BOOTP and DHCP client for automatic IP configuration pxe - free PXE daemon python-pydhcplib - Python DHCP client/server library python-pypureomapi - ISC DHCP OMAPI protocol implementation in Python resolvconf - name server information handler wide-dhcpv6-server - DHCPv6 server for automatic IPv6 hosts configuration |
#cat /etc/network/interfaces
|
#cat /etc/network/interfaces
[[[[[[[ bash: [[[[[[[: command not found |
#isc-dhcp-server
bash: isc-dhcp-server: command not found |
#ep INTER/ets/default/isc-dhcp-server
bash: ep: command not found |
#Press ENTER or type command to continue
|
#~
|
#~
bash: /etc/default/isc-dhcp-serveri: No such file or directory |
#apt-get install isc-dhcp-server
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: isc-dhcp-server-ldap The following NEW packages will be installed: isc-dhcp-server 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 935 kB of archives. After this operation, 2,075 kB of additional disk space will be used. ... Preconfiguring packages ... Selecting previously unselected package isc-dhcp-server. (Reading database ... 128675 files and directories currently installed.) Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.2.2.dfsg.1-5+deb70u6_amd64.deb) ... Processing triggers for man-db ... Setting up isc-dhcp-server (4.2.2.dfsg.1-5+deb70u6) ... Generating /etc/default/isc-dhcp-server... Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed! failed! invoke-rc.d: initscript isc-dhcp-server, action "start" failed. |
#option domain-name "unix.nt"
bash: option: command not found |
## я вам сейчас помогу
|
#vim /etc/
|
#vim /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-3942.22132.24187 2014-11-24 15:01:42.137913915 +0200 +++ /etc/dhcp/dhcpd.conf 2014-11-24 15:02:51.669914740 +0200 @@ -10,8 +10,8 @@ ddns-update-style none; # option definitions common to all supported networks... -option domain-name "example.org"; -option domain-name-servers ns1.example.org, ns2.example.org; +option domain-name "unix.nt"; +option domain-name-servers 192.168.20.254; default-lease-time 600; max-lease-time 7200; @@ -32,10 +32,9 @@ # This is a very basic subnet declaration. -#subnet 10.254.239.0 netmask 255.255.255.224 { -# range 10.254.239.10 10.254.239.20; -# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; -#} +subnet 192.168.20.0 netmask 255.255.255.0 { + range 192.168.20.100 192.168.20.200; +} # This declaration allows BOOTP clients to get dynamic addresses, # which we don't really recommend. |
#grep INTER /etc/default/isc-dhcp-server
INTERFACES="eth0" |
#/etc/init.d/isc-dhcp-server restart
Stopping ISC DHCP server: dhcpd failed! Starting ISC DHCP server: dhcpd. |
#tail /var/log/daemon.log
Nov 24 14:27:58 debian2 avahi-daemon[2742]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.20.1. Nov 24 14:27:58 debian2 avahi-daemon[2742]: New relevant interface eth0.IPv4 for mDNS. Nov 24 14:27:58 debian2 avahi-daemon[2742]: Registering new address record for 192.168.20.1 on eth0.IPv4. Nov 24 14:28:00 debian2 NetworkManager[2788]: <info> (eth0): carrier now ON (device state 10) Nov 24 14:28:02 debian2 avahi-daemon[2742]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::6e3b:e5ff:fe3a:e825. Nov 24 14:28:02 debian2 avahi-daemon[2742]: New relevant interface eth0.IPv6 for mDNS. Nov 24 14:28:02 debian2 avahi-daemon[2742]: Registering new address record for fe80::6e3b:e5ff:fe3a:e825 on eth0.*. Nov 24 14:28:15 debian2 ntpdate[5720]: no server suitable for synchronization found Nov 24 14:51:20 debian2 dbus[2697]: [system] Activating service name='org.freedesktop.PackageKit' (using servicehelper) Nov 24 14:51:20 debian2 dbus[2697]: [system] Successfully activated service 'org.freedesktop.PackageKit' |
#tail /var/log/messages
Nov 24 15:03:08 debian2 dhcpd: For info, please visit https://www.isc.org/software/dhcp/ Nov 24 15:03:08 debian2 dhcpd: Internet Systems Consortium DHCP Server 4.2.2 Nov 24 15:03:08 debian2 dhcpd: Copyright 2004-2011 Internet Systems Consortium. Nov 24 15:03:08 debian2 dhcpd: All rights reserved. Nov 24 15:03:08 debian2 dhcpd: For info, please visit https://www.isc.org/software/dhcp/ Nov 24 15:03:08 debian2 dhcpd: Wrote 0 leases to leases file. Nov 24 15:03:12 debian2 dhcpd: DHCPDISCOVER from 00:19:aa:10:6a:e9 via eth0 Nov 24 15:03:13 debian2 dhcpd: DHCPOFFER on 192.168.20.100 to 00:19:aa:10:6a:e9 (SEP0019AA106AE9) via eth0 Nov 24 15:03:13 debian2 dhcpd: DHCPREQUEST for 192.168.20.100 (192.168.20.1) from 00:19:aa:10:6a:e9 (SEP0019AA106AE9) via eth0 Nov 24 15:03:13 debian2 dhcpd: DHCPACK on 192.168.20.100 to 00:19:aa:10:6a:e9 (SEP0019AA106AE9) via eth0 |
#vim /etc/default/isc-dhcp-server
|
#/etc/init.d/isc-dhcp-server restart
Stopping ISC DHCP server: dhcpd. Starting ISC DHCP server: dhcpd. |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default switch.unix.nt 0.0.0.0 UG 0 0 0 eth0 192.168.20.0 * 255.255.255.0 U 0 0 0 eth0 |
#cat /etc/dhcp/dhcpd/
cat: /etc/dhcp/dhcpd/: No such file or directory |
#~
|
#apt-cache search asterisk
asterisk - Open Source Private Branch Exchange (PBX) asterisk-config - Configuration files for Asterisk asterisk-dahdi - DAHDI devices support for the Asterisk PBX asterisk-dbg - Debugging symbols for Asterisk asterisk-dev - Development files for Asterisk asterisk-doc - Source code documentation for Asterisk asterisk-mobile - Bluetooth phone support for the Asterisk PBX asterisk-modules - loadable modules for the Asterisk PBX asterisk-mp3 - MP3 playback support for the Asterisk PBX asterisk-mysql - MySQL database protocol support for the Asterisk PBX ... linphone-dbg - Debugging symbols for linphone and its libraries op-panel - switchboard type application for the Asterisk PBX libopenr2-3 - MFC/R2 (telephony) call setup library python-asterisk - Asterisk Manager API interface module for Python libsipwitch-dev - secure peer-to-peer SIP VoIP server - development files libsipwitch1 - secure peer-to-peer SIP VoIP server - development files libsipwitch1-dbg - secure peer-to-peer SIP VoIP server - development files sipwitch - secure peer-to-peer VoIP server for the SIP protocol sipwitch-cgi - secure peer-to-peer SIP VoIP server - CGI XML-RPC interface python-starpy - Asterisk (AMI) protocols for Twisted Python |
#apt-get install asterisk
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: asterisk-config asterisk-core-sounds-en asterisk-core-sounds-en-gsm asterisk-modules asterisk-moh-opsound-gsm asterisk-voicemail autopoint debhelper freetds-common gettext git git-man html2text intltool-debian libcurl3 liberror-perl libgettextpo0 libiksemel3 libmail-sendmail-perl libodbc1 libpq5 libradiusclient-ng2 libresample1 libsaclm3 libsaevt3 libsensors4 libsnmp-base libsnmp15 libsox-fmt-alsa libsox-fmt-base libsox2 ... Setting up libmail-sendmail-perl (0.79.16-1) ... Setting up libsox2 (14.4.0-3) ... Setting up libsox-fmt-alsa (14.4.0-3) ... Setting up libsox-fmt-base (14.4.0-3) ... Setting up module-assistant (0.11.4) ... Setting up rsync (3.0.9-4) ... update-rc.d: using dependency based boot sequencing Setting up sox (14.4.0-3) ... Setting up vpb-driver-source (4.2.55-1) ... Setting up asterisk-moh-opsound-gsm (2.03-1) ... |
#dpkg-reconfigure asterisk-config
|
#apt-get install asterisk
Reading package lists... Done Building dependency tree Reading state information... Done asterisk is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#ps aux| grep [a]sterisk
asterisk 11840 0.7 0.1 761636 30212 ? Ssl 16:38 0:00 /usr/sbin/asterisk -p -U asterisk asterisk 11841 0.0 0.0 13916 772 ? S 16:38 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 11840 |
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 11840) debian2*CLI> debian2*CLI> core ... No such command 'sip show' (type 'core show help sip show' for other possible commands) debian2*CLI> sip show channel channels channelstats domains history inuse mwi objects peer peers registry sched settings subscriptions tcp users user debian2*CLI> sip show channels Peer User/ANR Call ID Format Hold Last Message Expiry Peer 0 active SIP dialogs debian2*CLI> quit |
#mv /etc/asterisk/extention.conf{bak}
mv: missing destination file operand after `/etc/asterisk/extention.conf{bak}' Try `mv --help' for more information. |
#mv .
./ .bash_history .l3rc .viminfo ../ .bash_profile .lilalo/ .aptitude/ .bashrc .profile .asterisk_history .gconf/ .ssh/ |
#mv /etc/asterisk/extention.conf{..bak}
mv: missing destination file operand after `/etc/asterisk/extention.conf{..bak}' Try `mv --help' for more information. |
#mv /etc/asterisk/sip.conf{..bak}
mv: missing destination file operand after `/etc/asterisk/sip.conf{..bak}' Try `mv --help' for more information. |
#mv /etc/asterisk/sip.conf{,.bak}
|
#mv /etc/asterisk/extention.conf{,.bak}
mv: cannot stat `/etc/asterisk/extention.conf': No such file or directory |
#mv /etc/asterisk/extention.conf{,.bak}
mv: cannot stat `/etc/asterisk/extention.conf': No such file or directory |
#ls /etc/asterisk/
adsi.conf cli_permissions.conf modules.conf agents.conf codecs.conf musiconhold.conf ais.conf console.conf muted.conf alarmreceiver.conf dbsep.conf osp.conf alsa.conf dnsmgr.conf oss.conf amd.conf dsp.conf phone.conf app_mysql.conf dundi.conf phoneprov.conf asterisk.adsi enum.conf queuerules.conf asterisk.conf extconfig.conf queues.conf calendar.conf extensions.ael res_config_mysql.conf ... cel_custom.conf indications.conf sip_notify.conf cel_odbc.conf jabber.conf skinny.conf cel_pgsql.conf jingle.conf sla.conf cel_sqlite3_custom.conf logger.conf smdi.conf cel_tds.conf manager.conf telcordia-1.adsi chan_dahdi.conf manager.d udptl.conf chan_mobile.conf meetme.conf unistim.conf chan_ooh323.conf mgcp.conf users.conf cli_aliases.conf minivm.conf voicemail.conf cli.conf misdn.conf vpb.conf |
#mv /etc/asterisk/extensions.conf{,.bak}
|
#ls /etc/asterisk/
adsi.conf codecs.conf muted.conf agents.conf console.conf osp.conf ais.conf dbsep.conf oss.conf alarmreceiver.conf dnsmgr.conf phone.conf alsa.conf dsp.conf phoneprov.conf amd.conf dundi.conf queuerules.conf app_mysql.conf enum.conf queues.conf asterisk.adsi extconfig.conf res_config_mysql.conf asterisk.conf extensions.ael res_config_sqlite.conf calendar.conf extensions.conf.bak res_curl.conf ... cel_odbc.conf jingle.conf sla.conf cel_pgsql.conf logger.conf smdi.conf cel_sqlite3_custom.conf manager.conf telcordia-1.adsi cel_tds.conf manager.d udptl.conf chan_dahdi.conf meetme.conf unistim.conf chan_mobile.conf mgcp.conf users.conf chan_ooh323.conf minivm.conf voicemail.conf cli_aliases.conf misdn.conf vpb.conf cli.conf modules.conf cli_permissions.conf musiconhold.conf |
#cat /etc/asterisk/sip
sip.conf sip.conf.bak sip_notify.conf |
#cat /etc/asterisk/sip
sip.conf sip.conf.bak sip_notify.conf |
#cat /etc/asterisk/sip.conf
[general] context=default [1201] type=friend secret=1234 host=dynamic [1202] type=friend secret=1234 host=dynamic |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 12293) debian2*CLI> ! ael agent agi aoc calendar ... 1201 (Unspecified) D N 0 Unmonitored 1202 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] debian2*CLI> t No such command 't' (type 'core show help t' for other possible commands) debian2*CLI> event dump No such command 'event dump ' (type 'core show help event dump' for other possible commands) debian2*CLI> q No such command 'q' (type 'core show help q' for other possible commands) debian2*CLI> quit |
#date
Mon Nov 24 17:20:12 EET 2014 |
#asterisk -rÑ
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 12293) debian2*CLI> Disconnected from Asterisk server |
#asterisk -rx 'sip show peers
asterisk -r asterisk -rx 'sip show peers' cat /etc/asterisk/extensions.conf cat /etc/asterisk/extensions.conf grep default /etc/asterisk/sip.conf context=default йгшейгше quit exit quit exit |
#asterisk -rx 'sip show peers
asterisk -r asterisk -rx 'sip show peers' cat /etc/asterisk/extensions.conf cat /etc/asterisk/extensions.conf grep default /etc/asterisk/sip.conf context=default йгшейгше quit how sip peers' exit ... asterisk -rx 'sip show peers' cat /etc/asterisk/extensions.conf cat /etc/asterisk/extensions.conf grep default /etc/asterisk/sip.conf context=default йгшейгше quit exit quit exit |
#asterisk -rx 'sip show peers
asterisk -r asterisk -rx 'sip show peers' cat /etc/asterisk/extensions.conf cat /etc/asterisk/extensions.conf grep default /etc/asterisk/sip.conf context=default йгшейгше quit how sip peers' exit ... Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 12293) debian2*CLI> dialplan reload Dialplan reloaded. [Nov 24 18:19:02] NOTICE[12316]: chan_sip.c:22753 handle_request_invite: Call from '1202' (192.168.20.101:35122) to extension '1201' rejected because extension not found in context 'default'. debian2*CLI> quit |
sip.conf sip.conf.bak sip_notify.conf
[general] context=default [1201] type=friend secret=1234 host=dynamic [1202] type=friend secret=1234 host=dynamic
l3cd=/users/2014-11-nt-voip/nt-voip/debian2/root
Время первой команды журнала | 14:13:25 2014-11-23 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 17:18:33 2014-11-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 20.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 6.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.39 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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