/l3/users/29-05-2007/nt-lnet/linux2.net.nt/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 |
|
#vim /etc/network/interfaces
12c12 < up route add default gateway 192.168.19.62 netmask 255.255.255.224 --- > gateway 192.168.19.62 |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.19.62 255.255.255.224 UG 0 0 0 eth1 192.168.19.32 0.0.0.0 255.255.255.224 U 0 0 0 eth1 192.168.19.64 0.0.0.0 255.255.255.224 U 0 0 0 eth0 |
#route del default gw
Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M] [netmask N] [mss Mss] [window W] [irtt I] [mod] [dyn] [reinstate] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject inet_route [-FC] flush NOT supported |
#route del default g
'SIOCDELRT: No such device |
#route del default
SIOCDELRT: No such process |
#/etc/init.d/networking restart
Reconfiguring network interfaces...SIOCDELRT: No such process ifup: interface lo already configured done. |
#mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok eth1: negotiated 100baseTx-FD flow-control, link ok |
#tcpdump -n icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 17:09:39.148140 IP 192.168.19.65 > 192.168.19.33: ICMP echo request, id 10766, seq 9, length 64 17:09:39.170647 IP 192.168.19.33 > 192.168.19.65: ICMP echo reply, id 10766, seq 9, length 64 17:09:40.148167 IP 192.168.19.65 > 192.168.19.33: ICMP echo request, id 10766, seq 10, length 64 17:09:40.148184 IP 192.168.19.33 > 192.168.19.65: ICMP echo reply, id 10766, seq 10, length 64 17:09:41.148227 IP 192.168.19.65 > 192.168.19.33: ICMP echo request, id 10766, seq 11, length 64 17:09:41.148244 IP 192.168.19.33 > 192.168.19.65: ICMP echo reply, id 10766, seq 11, length 64 17:09:42.148293 IP 192.168.19.65 > 192.168.19.33: ICMP echo request, id 10766, seq 12, length 64 17:09:42.148303 IP 192.168.19.33 > 192.168.19.65: ICMP echo reply, id 10766, seq 12, length 64 ... 17:09:49.152748 IP 192.168.19.33 > 192.168.19.65: ICMP echo reply, id 10766, seq 19, length 64 17:09:50.152805 IP 192.168.19.65 > 192.168.19.33: ICMP echo request, id 10766, seq 20, length 64 17:09:50.152818 IP 192.168.19.33 > 192.168.19.65: ICMP echo reply, id 10766, seq 20, length 64 17:09:51.152862 IP 192.168.19.65 > 192.168.19.33: ICMP echo request, id 10766, seq 21, length 64 17:09:51.152873 IP 192.168.19.33 > 192.168.19.65: ICMP echo reply, id 10766, seq 21, length 64 17:09:52.152931 IP 192.168.19.65 > 192.168.19.33: ICMP echo request, id 10766, seq 22, length 64 17:09:52.152941 IP 192.168.19.33 > 192.168.19.65: ICMP echo reply, id 10766, seq 22, length 64 28 packets captured 28 packets received by filter 0 packets dropped by kernel |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.19.62 255.255.255.224 UG 0 0 0 eth1 192.168.19.32 0.0.0.0 255.255.255.224 U 0 0 0 eth1 192.168.19.64 0.0.0.0 255.255.255.224 U 0 0 0 eth0 0.0.0.0 192.168.19.62 0.0.0.0 UG 0 0 0 eth1 |
#ping 192.168.16.1 -i eth1
ping: bad timing interval. |
#ping 192.168.16.1 -I eth1
PING 192.168.16.1 (192.168.16.1) from 192.168.19.33 eth1: 56(84) bytes of data. 64 bytes from 192.168.16.1: icmp_seq=1 ttl=64 time=0.239 ms 64 bytes from 192.168.16.1: icmp_seq=2 ttl=64 time=0.155 ms --- 192.168.16.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1022ms rtt min/avg/max/mdev = 0.155/0.197/0.239/0.042 ms |
#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_seq=1 ttl=64 time=0.188 ms 64 bytes from 192.168.16.1: icmp_seq=2 ttl=64 time=0.226 ms 64 bytes from 192.168.16.1: icmp_seq=3 ttl=64 time=0.304 ms 64 bytes from 192.168.16.1: icmp_seq=4 ttl=64 time=0.151 ms --- 192.168.16.1 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3018ms rtt min/avg/max/mdev = 0.151/0.217/0.304/0.057 ms |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.19.62 255.255.255.224 UG 0 0 0 eth1 192.168.19.32 0.0.0.0 255.255.255.224 U 0 0 0 eth1 192.168.19.64 0.0.0.0 255.255.255.224 U 0 0 0 eth0 0.0.0.0 192.168.19.62 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_seq=1 ttl=64 time=0.312 ms 64 bytes from 192.168.16.1: icmp_seq=2 ttl=64 time=0.185 ms --- 192.168.16.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 0.185/0.248/0.312/0.065 ms |
#ping 192.168.16.15
PING 192.168.16.15 (192.168.16.15) 56(84) bytes of data. 64 bytes from 192.168.16.15: icmp_seq=108 ttl=63 time=5.35 ms 64 bytes from 192.168.16.15: icmp_seq=109 ttl=63 time=0.445 ms 64 bytes from 192.168.16.15: icmp_seq=110 ttl=63 time=0.534 ms 64 bytes from 192.168.16.15: icmp_seq=111 ttl=63 time=0.370 ms 64 bytes from 192.168.16.15: icmp_seq=112 ttl=63 time=0.458 ms 64 bytes from 192.168.16.15: icmp_seq=113 ttl=63 time=0.543 ms 64 bytes from 192.168.16.15: icmp_seq=114 ttl=63 time=0.379 ms 64 bytes from 192.168.16.15: icmp_seq=115 ttl=63 time=0.466 ms 64 bytes from 192.168.16.15: icmp_seq=116 ttl=63 time=0.304 ms ... 64 bytes from 192.168.16.15: icmp_seq=135 ttl=63 time=0.447 ms 64 bytes from 192.168.16.15: icmp_seq=136 ttl=63 time=0.535 ms 64 bytes from 192.168.16.15: icmp_seq=137 ttl=63 time=0.370 ms 64 bytes from 192.168.16.15: icmp_seq=138 ttl=63 time=0.455 ms 64 bytes from 192.168.16.15: icmp_seq=139 ttl=63 time=0.542 ms 64 bytes from 192.168.16.15: icmp_seq=140 ttl=63 time=0.379 ms 64 bytes from 192.168.16.15: icmp_seq=141 ttl=63 time=0.466 ms --- 192.168.16.15 ping statistics --- 141 packets transmitted, 34 received, 75% packet loss, time 140032ms rtt min/avg/max/mdev = 0.304/0.589/5.358/0.833 ms |
#fg
bash: fg: current: no such job |
#ping mail.ru
PING mail.ru (194.67.57.26) 56(84) bytes of data. --- mail.ru ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2011ms |
#tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 17:14:10.448442 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 28, length 64 17:14:11.448513 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 29, length 64 17:14:12.448572 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 30, length 64 17:14:13.448697 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 31, length 64 17:14:14.448805 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 32, length 64 17:14:15.448891 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 33, length 64 17:14:16.448953 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 34, length 64 17:14:16.449809 arp who-has 192.168.19.94 tell 192.168.19.65 ... 17:14:24.449747 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 42, length 64 17:14:25.449847 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 43, length 64 17:14:25.785861 IP 192.168.19.97.32776 > net.nt.domain: 63206+ A? xgu.ru. (24) 17:14:26.449927 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 44, length 64 17:14:27.450022 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 45, length 64 17:14:28.450122 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 46, length 64 17:14:29.450228 IP 192.168.19.97 > linux1.net.nt: ICMP echo request, id 21770, seq 47, length 64 24 packets captured 24 packets received by filter 0 packets dropped by kernel |
#tcpdump -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 17:14:33.450632 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 51, length 64 17:14:34.450708 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 52, length 64 17:14:35.450806 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 53, length 64 17:14:35.786820 IP 192.168.19.97.32776 > 192.168.16.15.53: 21900+ A? xgu.ru.net.nt. (31) 17:14:36.450883 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 54, length 64 17:14:37.450995 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 55, length 64 17:14:38.067040 IP 192.168.19.97.32777 > 192.168.16.15.53: 47282+ AAAA? debian.org.ua. (31) 17:14:38.451069 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 56, length 64 ... 17:15:43.457280 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 121, length 64 17:15:44.457376 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 122, length 64 17:15:45.457482 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 123, length 64 17:15:46.457549 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 124, length 64 17:15:47.457667 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 125, length 64 17:15:48.457745 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 126, length 64 17:15:49.457861 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 127, length 64 97 packets captured 97 packets received by filter 0 packets dropped by kernel |
#tcpdump -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 17:15:52.458181 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 130, length 64 17:15:53.458239 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 131, length 64 17:15:54.458331 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 132, length 64 17:15:55.458435 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 133, length 64 17:15:55.966476 IP 192.168.19.97.32781 > 192.168.16.15.53: 65530+ A? xgu.ru. (24) 17:15:56.458517 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 134, length 64 17:15:57.458621 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 135, length 64 17:15:58.458696 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 136, length 64 ... 17:16:02.460596 arp who-has 192.168.19.94 tell 192.168.19.65 17:16:02.460607 arp reply 192.168.19.94 is-at 00:01:02:b4:61:22 17:16:03.459201 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 141, length 64 17:16:04.462165 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 142, length 64 17:16:05.463397 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 143, length 64 17:16:05.967422 IP 192.168.19.97.32781 > 192.168.16.15.53: 28460+ A? xgu.ru.net.nt. (31) 17:16:06.465552 IP 192.168.19.97 > 192.168.16.1: ICMP echo request, id 21770, seq 144, length 64 20 packets captured 20 packets received by filter 0 packets dropped by kernel |
#route add -net 192.168.19.96 netmask 255.255.255.224 gw 192.168.19.65
|
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.19.62 255.255.255.224 UG 0 0 0 eth1 192.168.19.32 0.0.0.0 255.255.255.224 U 0 0 0 eth1 192.168.19.96 192.168.19.65 255.255.255.224 UG 0 0 0 eth0 192.168.19.64 0.0.0.0 255.255.255.224 U 0 0 0 eth0 0.0.0.0 192.168.19.62 0.0.0.0 UG 0 0 0 eth1 |
#date
Вто Май 29 17:20:46 EEST 2007 |
#ping ya.ru
PING ya.ru (87.250.251.8) 56(84) bytes of data. --- ya.ru ping statistics --- 28 packets transmitted, 0 received, 100% packet loss, time 27012ms |
#ping mail.ru
PING mail.ru (194.67.57.126) 56(84) bytes of data. 64 bytes from mail.ru (194.67.57.126): icmp_seq=1 ttl=111 time=107 ms 64 bytes from mail.ru (194.67.57.126): icmp_seq=2 ttl=111 time=103 ms 64 bytes from mail.ru (194.67.57.126): icmp_seq=3 ttl=111 time=106 ms 64 bytes from mail.ru (194.67.57.126): icmp_seq=4 ttl=111 time=105 ms --- mail.ru ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3013ms rtt min/avg/max/mdev = 103.733/105.945/107.820/1.511 ms |
#ping ya.ru
PING ya.ru (87.250.251.8) 56(84) bytes of data. 64 bytes from ya.ru (87.250.251.8): icmp_seq=1 ttl=52 time=129 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=2 ttl=52 time=191 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=3 ttl=52 time=122 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=4 ttl=52 time=127 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=5 ttl=52 time=163 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=6 ttl=52 time=132 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=7 ttl=52 time=133 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=8 ttl=52 time=130 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=9 ttl=52 time=129 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=10 ttl=52 time=134 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=11 ttl=52 time=130 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=12 ttl=52 time=134 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=13 ttl=52 time=137 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=14 ttl=52 time=165 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=15 ttl=52 time=138 ms 64 bytes from ya.ru (87.250.251.8): icmp_seq=16 ttl=52 time=142 ms --- ya.ru ping statistics --- 16 packets transmitted, 16 received, 0% packet loss, time 15018ms rtt min/avg/max/mdev = 122.219/140.159/191.342/17.419 ms |
#apt-cache search ipcalc
ipcalc - parameter calculator for IPv4 addresses sipcalc - Advanced console-based ip subnet calculator |
#apt-get install sipcalc
Чтение списков пакетов... Готово Построение дерева зависимостей... Готово НОВЫЕ пакеты, которые будут установлены: sipcalc обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 99 пакетов не обновлено. Необходимо скачать 31,2kБ архивов. После распаковки объем занятого дискового пространства возрастёт на 123kB. ВНИМАНИЕ: Следующие пакеты невозможно аутентифицировать! sipcalc Установить эти пакеты без проверки [y/N]? y Получено:1 http://debian.org.ua etch/main sipcalc 1.1.4-1 [31,2kB] Получено 31,2kB за 0s (123kB/c) Выбор ранее не выбранного пакета sipcalc. (Чтение базы данных... на данный момент установлено 32242 файлов и каталогов.) Распаковывается пакет sipcalc (из файла .../sipcalc_1.1.4-1_i386.deb)... Настраивается пакет sipcalc (1.1.4-1) ... |
#apt-get install ipcalc
Чтение списков пакетов... Готово Построение дерева зависимостей... Готово НОВЫЕ пакеты, которые будут установлены: ipcalc обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 99 пакетов не обновлено. Необходимо скачать 26,4kБ архивов. После распаковки объем занятого дискового пространства возрастёт на 131kB. ВНИМАНИЕ: Следующие пакеты невозможно аутентифицировать! ipcalc Установить эти пакеты без проверки [y/N]? y Получено:1 http://debian.org.ua etch/main ipcalc 0.41-1 [26,4kB] Получено 26,4kB за 0s (567kB/c) Выбор ранее не выбранного пакета ipcalc. (Чтение базы данных... на данный момент установлено 32253 файлов и каталогов.) Распаковывается пакет ipcalc (из файла .../archives/ipcalc_0.41-1_all.deb)... Настраивается пакет ipcalc (0.41-1) ... |
#ipcalc
Usage: ipcalc [options] <ADDRESS>[[/]<NETMASK>] [NETMASK] ipcalc takes an IP address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask, and host range. By giving a second netmask, you can design sub- and supernetworks. It is also intended to be a teaching tool and presents the results as easy-to-understand binary values. -n --nocolor Don't display ANSI color codes. -b --nobinary Suppress the bitwise output. -c --class Just print bit-count-mask of given address. -h --html Display results as HTML (not finished in this version). -v --version Print Version. ... ipcalc 192.168.0.1/24 ipcalc 192.168.0.1/255.255.128.0 ipcalc 192.168.0.1 255.255.128.0 255.255.192.0 ipcalc 192.168.0.1 0.0.63.255 ipcalc <ADDRESS1> - <ADDRESS2> deaggregate address range ipcalc <ADDRESS>/<NETMASK> --s a b c split network to subnets where a b c fits in. ! New HTML support not yet finished. ipcalc 0.41 |
#ipcalc -v
0.41 |
#ipcalc 172.16.1.0/30 /31
Address: 172.16.1.0 10101100.00010000.00000001.000000 00 Netmask: 255.255.255.252 = 30 11111111.11111111.11111111.111111 00 Wildcard: 0.0.0.3 00000000.00000000.00000000.000000 11 => Network: 172.16.1.0/30 10101100.00010000.00000001.000000 00 HostMin: 172.16.1.1 10101100.00010000.00000001.000000 01 HostMax: 172.16.1.2 10101100.00010000.00000001.000000 10 Broadcast: 172.16.1.3 10101100.00010000.00000001.000000 11 Hosts/Net: 2 Class B, Private Internet Subnets after transition from /30 to /31 ... HostMin: 172.16.1.0 10101100.00010000.00000001.0000000 0 HostMax: 172.16.1.1 10101100.00010000.00000001.0000000 1 Hosts/Net: 2 Class B, Private Internet, PtP Link RFC 3021 2. Network: 172.16.1.2/31 10101100.00010000.00000001.0000001 0 HostMin: 172.16.1.2 10101100.00010000.00000001.0000001 0 HostMax: 172.16.1.3 10101100.00010000.00000001.0000001 1 Hosts/Net: 2 Class B, Private Internet, PtP Link RFC 3021 Subnets: 2 Hosts: 2 |
#passwd
Enter new UNIX password: Retype new UNIX password: passwd: пароль успешно обновлён |
#passwd
Enter new UNIX password: Retype new UNIX password: passwd: пароль успешно обновлён |
#ipcalc 172.16.1.0/29 /32
INVALID MASK2: /32172.1 Address: 172.16.1.0 10101100.00010000.00000001.00000 000 Netmask: 255.255.255.248 = 29 11111111.11111111.11111111.11111 000 Wildcard: 0.0.0.7 00000000.00000000.00000000.00000 111 => Network: 172.16.1.0/29 10101100.00010000.00000001.00000 000 HostMin: 172.16.1.1 10101100.00010000.00000001.00000 001 HostMax: 172.16.1.6 10101100.00010000.00000001.00000 110 Broadcast: 172.16.1.7 10101100.00010000.00000001.00000 111 Hosts/Net: 6 Class B, Private Internet Supernet Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 Network: 172.16.1.0/24 10101100.00010000.00000001. 00000000 HostMin: 172.16.1.1 10101100.00010000.00000001. 00000001 HostMax: 172.16.1.254 10101100.00010000.00000001. 11111110 Broadcast: 172.16.1.255 10101100.00010000.00000001. 11111111 Hosts/Net: 254 Class B, Private Internet |
#date
Вто Май 29 17:33:35 EEST 2007 |
#screen -x
|
#screen -x\
|
#ipcalc
Usage: ipcalc [options] <ADDRESS>[[/]<NETMASK>] [NETMASK] ipcalc takes an IP address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask, and host range. By giving a second netmask, you can design sub- and supernetworks. It is also intended to be a teaching tool and presents the results as easy-to-understand binary values. -n --nocolor Don't display ANSI color codes. -b --nobinary Suppress the bitwise output. -c --class Just print bit-count-mask of given address. -h --html Display results as HTML (not finished in this version). -v --version Print Version. ... ipcalc 192.168.0.1/24 ipcalc 192.168.0.1/255.255.128.0 ipcalc 192.168.0.1 255.255.128.0 255.255.192.0 ipcalc 192.168.0.1 0.0.63.255 ipcalc <ADDRESS1> - <ADDRESS2> deaggregate address range ipcalc <ADDRESS>/<NETMASK> --s a b c split network to subnets where a b c fits in. ! New HTML support not yet finished. ipcalc 0.41 |
#ipcalc
Usage: ipcalc [options] <ADDRESS>[[/]<NETMASK>] [NETMASK] ipcalc takes an IP address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask, and host range. By giving a second netmask, you can design sub- and supernetworks. It is also intended to be a teaching tool and presents the results as easy-to-understand binary values. -n --nocolor Don't display ANSI color codes. -b --nobinary Suppress the bitwise output. -c --class Just print bit-count-mask of given address. -h --html Display results as HTML (not finished in this version). -v --version Print Version. ... ipcalc 192.168.0.1/24 ipcalc 192.168.0.1/255.255.128.0 ipcalc 192.168.0.1 255.255.128.0 255.255.192.0 ipcalc 192.168.0.1 0.0.63.255 ipcalc <ADDRESS1> - <ADDRESS2> deaggregate address range ipcalc <ADDRESS>/<NETMASK> --s a b c split network to subnets where a b c fits in. ! New HTML support not yet finished. ipcalc 0.41 |
#ipcalc 172.16.1.0/24 /27
Address: 172.16.1.0 10101100.00010000.00000001. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 172.16.1.0/24 10101100.00010000.00000001. 00000000 HostMin: 172.16.1.1 10101100.00010000.00000001. 00000001 HostMax: 172.16.1.254 10101100.00010000.00000001. 11111110 Broadcast: 172.16.1.255 10101100.00010000.00000001. 11111111 Hosts/Net: 254 Class B, Private Internet Subnets after transition from /24 to /27 ... Broadcast: 172.16.1.223 10101100.00010000.00000001.110 11111 Hosts/Net: 30 Class B, Private Internet 8. Network: 172.16.1.224/27 10101100.00010000.00000001.111 00000 HostMin: 172.16.1.225 10101100.00010000.00000001.111 00001 HostMax: 172.16.1.254 10101100.00010000.00000001.111 11110 Broadcast: 172.16.1.255 10101100.00010000.00000001.111 11111 Hosts/Net: 30 Class B, Private Internet Subnets: 8 Hosts: 240 |
#ipcalc 172.16.1.0/24 /27
Address: 172.16.1.0 10101100.00010000.00000001. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 172.16.1.0/24 10101100.00010000.00000001. 00000000 HostMin: 172.16.1.1 10101100.00010000.00000001. 00000001 HostMax: 172.16.1.254 10101100.00010000.00000001. 11111110 Broadcast: 172.16.1.255 10101100.00010000.00000001. 11111111 Hosts/Net: 254 Class B, Private Internet Subnets after transition from /24 to /27 ... Broadcast: 172.16.1.223 10101100.00010000.00000001.110 11111 Hosts/Net: 30 Class B, Private Internet 8. Network: 172.16.1.224/27 10101100.00010000.00000001.111 00000 HostMin: 172.16.1.225 10101100.00010000.00000001.111 00001 HostMax: 172.16.1.254 10101100.00010000.00000001.111 11110 Broadcast: 172.16.1.255 10101100.00010000.00000001.111 11111 Hosts/Net: 30 Class B, Private Internet Subnets: 8 Hosts: 240 |
#ipcalc 172.16.1.0/31
INVALID MASK1: 3124 Address: 172.16.1.0 10101100.00010000.00000001. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 172.16.1.0/24 10101100.00010000.00000001. 00000000 HostMin: 172.16.1.1 10101100.00010000.00000001. 00000001 HostMax: 172.16.1.254 10101100.00010000.00000001. 11111110 Broadcast: 172.16.1.255 10101100.00010000.00000001. 11111111 Hosts/Net: 254 Class B, Private Internet ... Broadcast: 172.16.1.223 10101100.00010000.00000001.110 11111 Hosts/Net: 30 Class B, Private Internet 8. Network: 172.16.1.224/27 10101100.00010000.00000001.111 00000 HostMin: 172.16.1.225 10101100.00010000.00000001.111 00001 HostMax: 172.16.1.254 10101100.00010000.00000001.111 11110 Broadcast: 172.16.1.255 10101100.00010000.00000001.111 11111 Hosts/Net: 30 Class B, Private Internet Subnets: 8 Hosts: 240 |
#ipcalc 172.16.1.0/31
INVALID MASK1: 3124 Address: 172.16.1.0 10101100.00010000.00000001. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 172.16.1.0/24 10101100.00010000.00000001. 00000000 HostMin: 172.16.1.1 10101100.00010000.00000001. 00000001 HostMax: 172.16.1.254 10101100.00010000.00000001. 11111110 Broadcast: 172.16.1.255 10101100.00010000.00000001. 11111111 Hosts/Net: 254 Class B, Private Internet ... Broadcast: 172.16.1.223 10101100.00010000.00000001.110 11111 Hosts/Net: 30 Class B, Private Internet 8. Network: 172.16.1.224/27 10101100.00010000.00000001.111 00000 HostMin: 172.16.1.225 10101100.00010000.00000001.111 00001 HostMax: 172.16.1.254 10101100.00010000.00000001.111 11110 Broadcast: 172.16.1.255 10101100.00010000.00000001.111 11111 Hosts/Net: 30 Class B, Private Internet Subnets: 8 Hosts: 240 |
#ipcalc 172.16.1.0/31 /32
Address: 172.16.1.0 10101100.00010000.00000001.0000000 0 Netmask: 255.255.255.254 = 31 11111111.11111111.11111111.1111111 0 Wildcard: 0.0.0.1 00000000.00000000.00000000.0000000 1 => Network: 172.16.1.0/31 10101100.00010000.00000001.0000000 0 HostMin: 172.16.1.0 10101100.00010000.00000001.0000000 0 HostMax: 172.16.1.1 10101100.00010000.00000001.0000000 1 Hosts/Net: 2 Class B, Private Internet, PtP Link RFC 3021 Subnets after transition from /31 to /32 Netmask: 255.255.255.255 = 32 11111111.11111111.11111111.11111111 Wildcard: 0.0.0.0 00000000.00000000.00000000.00000000 1. Hostroute: 172.16.1.0 10101100.00010000.00000001.00000000 Hosts/Net: 1 Class B, Private Internet 2. Hostroute: 172.16.1.1 10101100.00010000.00000001.00000001 Hosts/Net: 1 Class B, Private Internet Hosts: 2 |
#ipcalc 172.16.1.0/31 /32
Address: 172.16.1.0 10101100.00010000.00000001.0000000 0 Netmask: 255.255.255.254 = 31 11111111.11111111.11111111.1111111 0 Wildcard: 0.0.0.1 00000000.00000000.00000000.0000000 1 => Network: 172.16.1.0/31 10101100.00010000.00000001.0000000 0 HostMin: 172.16.1.0 10101100.00010000.00000001.0000000 0 HostMax: 172.16.1.1 10101100.00010000.00000001.0000000 1 Hosts/Net: 2 Class B, Private Internet, PtP Link RFC 3021 Subnets after transition from /31 to /32 Netmask: 255.255.255.255 = 32 11111111.11111111.11111111.11111111 Wildcard: 0.0.0.0 00000000.00000000.00000000.00000000 1. Hostroute: 172.16.1.0 10101100.00010000.00000001.00000000 Hosts/Net: 1 Class B, Private Internet 2. Hostroute: 172.16.1.1 10101100.00010000.00000001.00000001 Hosts/Net: 1 Class B, Private Internet Hosts: 2 |
#ipcalc 172.16.1.0/30 /32
INVALID MASK2: /321 INVALID MASK2: /321 Address: 172.16.1.0 10101100.00010000.00000001.000000 00 Netmask: 255.255.255.252 = 30 11111111.11111111.11111111.111111 00 Wildcard: 0.0.0.3 00000000.00000000.00000000.000000 11 => Network: 172.16.1.0/30 10101100.00010000.00000001.000000 00 HostMin: 172.16.1.1 10101100.00010000.00000001.000000 01 HostMax: 172.16.1.2 10101100.00010000.00000001.000000 10 Broadcast: 172.16.1.3 10101100.00010000.00000001.000000 11 Hosts/Net: 2 Class B, Private Internet Supernet Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 Network: 172.16.1.0/24 10101100.00010000.00000001. 00000000 HostMin: 172.16.1.1 10101100.00010000.00000001. 00000001 HostMax: 172.16.1.254 10101100.00010000.00000001. 11111110 Broadcast: 172.16.1.255 10101100.00010000.00000001. 11111111 Hosts/Net: 254 Class B, Private Internet |
#ipcalc 172.16.1.0/30 /32
INVALID MASK2: /321 Address: 172.16.1.0 10101100.00010000.00000001.000000 00 Netmask: 255.255.255.252 = 30 11111111.11111111.11111111.111111 00 Wildcard: 0.0.0.3 00000000.00000000.00000000.000000 11 => Network: 172.16.1.0/30 10101100.00010000.00000001.000000 00 HostMin: 172.16.1.1 10101100.00010000.00000001.000000 01 HostMax: 172.16.1.2 10101100.00010000.00000001.000000 10 Broadcast: 172.16.1.3 10101100.00010000.00000001.000000 11 Hosts/Net: 2 Class B, Private Internet Supernet Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 Network: 172.16.1.0/24 10101100.00010000.00000001. 00000000 HostMin: 172.16.1.1 10101100.00010000.00000001. 00000001 HostMax: 172.16.1.254 10101100.00010000.00000001. 11111110 Broadcast: 172.16.1.255 10101100.00010000.00000001. 11111111 Hosts/Net: 254 Class B, Private Internet |
#ifconfig
eth2 Link encap:Ethernet HWaddr 00:04:76:A1:F0:A5 inet addr:169.254.179.216 Bcast:169.254.255.255 Mask:255.255.0.0 inet6 addr: fe80::204:76ff:fea1:f0a5/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 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:185 Base address:0x2000 eth3 Link encap:Ethernet HWaddr 00:90:27:35:58:F2 ... inet addr:192.168.20.1 Bcast:192.168.20.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 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:14045 errors:0 dropped:0 overruns:0 frame:0 TX packets:14045 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:595656 (581.6 KiB) TX bytes:595656 (581.6 KiB) |
#ifconfig
eth2 Link encap:Ethernet HWaddr 00:04:76:A1:F0:A5 inet addr:169.254.179.216 Bcast:169.254.255.255 Mask:255.255.0.0 inet6 addr: fe80::204:76ff:fea1:f0a5/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 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:185 Base address:0x2000 eth3 Link encap:Ethernet HWaddr 00:90:27:35:58:F2 ... inet addr:192.168.20.1 Bcast:192.168.20.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 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:14045 errors:0 dropped:0 overruns:0 frame:0 TX packets:14045 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:595656 (581.6 KiB) TX bytes:595656 (581.6 KiB) |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:22 inet addr:192.168.19.94 Bcast:192.168.19.95 Mask:255.255.255.224 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 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:169 Base address:0x4c00 eth1 Link encap:Ethernet HWaddr 00:D0:B7:CD:1B:CF inet addr:192.168.19.33 Bcast:192.168.19.63 Mask:255.255.255.224 ... RX bytes:4239 (4.1 KiB) TX bytes:6890 (6.7 KiB) Base address:0xcc00 Memory:ff7e0000-ff800000 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:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
#mii-tool
eth0: no link eth1: negotiated 100baseTx-FD flow-control, link ok |
#ifconfig 192.168.16.2 netmask 255.255.255.0 gw 192.168.16.15
SIOCSIFNETMASK: No such device |
#ifconfig 192.168.16.2 netmask 255.255.255.0 gw 192.168.16.15 dev eth1
SIOCSIFNETMASK: No such device |
#ifconfig 192.168.16.2 netmask 255.255.255.0
SIOCSIFNETMASK: No such device |
#ifconfig 192.168.16.2 netmask 255.255.224 dev eth1
SIOCSIFNETMASK: No such device |
#vim /etc/network/interfaces
10c10 < address 192.168.19.33 --- > address 192.168.16.2 12c12 < gateway 192.168.19.62 --- > gateway 192.168.16.15 14c14 < iface eth0 inet static --- > #iface eth0 inet static |
#/etc/init.d/networking restart
Reconfiguring network interfaces.../etc/network/interfaces:15: duplicate option ifdown: couldn't read interfaces file "/etc/network/interfaces" /etc/network/interfaces:15: duplicate option ifup: couldn't read interfaces file "/etc/network/interfaces" failed. |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:22 inet addr:192.168.19.94 Bcast:192.168.19.95 Mask:255.255.255.224 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 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:169 Base address:0x4c00 eth1 Link encap:Ethernet HWaddr 00:D0:B7:CD:1B:CF inet addr:192.168.19.33 Bcast:192.168.19.63 Mask:255.255.255.224 ... RX bytes:13777 (13.4 KiB) TX bytes:9612 (9.3 KiB) Base address:0xcc00 Memory:ff7e0000-ff800000 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:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
#vim /etc/network/interfaces
15,16c15,16 < address 192.168.19.94 < netmask 255.255.255.224 --- > #address 192.168.19.94 > #netmask 255.255.255.224 |
#/etc/init.d/networking restart
Reconfiguring network interfaces...Ignoring unknown interface eth0=eth0. SIOCDELRT: No such process ifup: interface lo already configured ifup: interface eth0 already configured done. |
#vim /etc/network/interfaces
5c5 < auto lo eth0 eth1 --- > auto lo eth1 |
#/etc/init.d/networking restart
Reconfiguring network interfaces...Ignoring unknown interface eth0=eth0. ifup: interface lo already configured done. |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:22 inet addr:192.168.19.94 Bcast:192.168.19.95 Mask:255.255.255.224 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 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:169 Base address:0x4c00 eth1 Link encap:Ethernet HWaddr 00:D0:B7:CD:1B:CF inet addr:192.168.16.2 Bcast:192.168.16.31 Mask:255.255.255.224 ... RX bytes:54061 (52.7 KiB) TX bytes:58938 (57.5 KiB) Base address:0xcc00 Memory:ff7e0000-ff800000 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:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) |
#ping mail.ru
PING mail.ru (194.67.57.126) 56(84) bytes of data. 64 bytes from mail.ru (194.67.57.126): icmp_seq=1 ttl=112 time=111 ms 64 bytes from mail.ru (194.67.57.126): icmp_seq=2 ttl=112 time=114 ms --- mail.ru ping statistics --- 3 packets transmitted, 2 received, 33% packet loss, time 2023ms rtt min/avg/max/mdev = 111.384/112.753/114.123/1.410 ms |
#ssh root@192.168.16.1
root@192.168.16.1's password: Last login: Wed May 30 12:37:04 2007 from net.nt Linux linux1 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 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. l3-agent is already running: pid=3590; pidfile=/root/.lilalo/l3-agent.pid |
#pwd
/root |
#vim /etc/in
|
#vim /etc/in
|
#vim /etc/inputrc
|
#vim /etc/inputrc
21c21 < # set bell-style none --- > set bell-style none |
#. /etc/inputrc
[root@linux1:~]# [root@linux1:~]# ping bash: mode=emacs: command not found bash: \e[1~:: command not found bash: \e[4~:: command not found bash: \e[3~:: command not found bash: \e[2~:: command not found bash: \e[1;5C:: command not found bash: \e[1;5D:: command not found bash: \e[5C:: command not found ... bash: \e[8~:: command not found bash: \eOc:: command not found bash: \eOd:: command not found 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#telnet 192.168.16.2 65535
Trying 192.168.16.2... Connected to 192.168.16.2. Escape character is '^]'. 2+3# 5 ^] telnet> йгÑе ?Invalid command telnet> Ðquit ?Invalid command telnet> exit ?Invalid command telnet> ?Invalid command telnet> qyit ?Invalid command telnet> exit ?Invalid command telnet> q Connection closed. |
#nc 127.0.0.1 40000 | tar xvC /tmp
afs3-volser 7005/udp afs3-errors 7006/tcp # error interpretation service afs3-errors 7006/udp afs3-bos 7007/tcp # basic overseer process afs3-bos 7007/udp afs3-update 7008/tcp # server-to-server updater afs3-update 7008/udp afs3-rmtsys 7009/tcp # remote cache manager service afs3-rmtsys 7009/udp font-service 7100/tcp xfs # X Font Service ... bacula-fd 9102/tcp # Bacula File Daemon bacula-fd 9102/udp (UNKNOWN) [127.0.0.1] 40000 (?) : Connection refused 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#nc 127.0.0.1 40000 | tar xvC /tmp
afs3-volser 7005/udp afs3-errors 7006/tcp # error interpretation service afs3-errors 7006/udp afs3-bos 7007/tcp # basic overseer process afs3-bos 7007/udp afs3-update 7008/tcp # server-to-server updater afs3-update 7008/udp afs3-rmtsys 7009/tcp # remote cache manager service afs3-rmtsys 7009/udp font-service 7100/tcp xfs # X Font Service ... bacula-fd 9102/tcp # Bacula File Daemon bacula-fd 9102/udp (UNKNOWN) [127.0.0.1] 40000 (?) : Connection refused 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#ls -l /tmp
afs3-errors 7006/tcp # error interpretation service afs3-errors 7006/udp afs3-bos 7007/tcp # basic overseer process afs3-bos 7007/udp afs3-update 7008/tcp # server-to-server updater afs3-update 7008/udp afs3-rmtsys 7009/tcp # remote cache manager service afs3-rmtsys 7009/udp font-service 7100/tcp xfs # X Font Service font-service 7100/udp xfs ... bacula-fd 9102/udp итого 48 drwxr-xr-x 2 root root 49152 2007-05-13 17:38 lost+found 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#find .
./ODINAKOVOneOdInAkOvORAVNO ./ODINAKOVO_NEoDinakovo_RAVNO ./ODINAKOVO_neOdInAkOvO_RAVNO ./.mplayer ./.mplayer/config ./var ./.moc ./.moc/socket2 ./.moc/pid ./.moc/last_directory ... ./1.jpg ./1.gif ./1.png 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#find .
./ODINAKOVOneOdInAkOvORAVNO ./ODINAKOVO_NEoDinakovo_RAVNO ./ODINAKOVO_neOdInAkOvO_RAVNO ./.mplayer ./.mplayer/config ./var ./.moc ./.moc/socket2 ./.moc/pid ./.moc/last_directory ... ./1.jpg ./1.gif ./1.png 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#man nc
|
##nc -c /bin/bash
afs3-volser 7005/tcp # volume managment server afs3-volser 7005/udp afs3-errors 7006/tcp # error interpretation service afs3-errors 7006/udp afs3-bos 7007/tcp # basic overseer process afs3-bos 7007/udp afs3-update 7008/tcp # server-to-server updater afs3-update 7008/udp afs3-rmtsys 7009/tcp # remote cache manager service afs3-rmtsys 7009/udp ... bacula-dir 9101/udp bacula-fd 9102/tcp # Bacula File Daemon bacula-fd 9102/udp 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#nmap 127.0.0.1
afs3-rmtsys 7009/udp font-service 7100/tcp xfs # X Font Service font-service 7100/udp xfs bacula-dir 9101/tcp # Bacula Director bacula-dir 9101/udp bacula-fd 9102/tcp # Bacula File Daemon bacula-fd 9102/udp Starting Nmap 4.21ALPHA4 ( http://insecure.org ) at 2007-05-30 09:53 EEST Interesting ports on localhost (127.0.0.1): Not shown: 1702 closed ports PORT STATE SERVICE 22/tcp open ssh 110/tcp open pop3 Nmap finished: 1 IP address (1 host up) scanned in 0.140 seconds 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#nc -c /bin/bash -l -p 110
afs3-volser 7005/udp afs3-errors 7006/tcp # error interpretation service afs3-errors 7006/udp afs3-bos 7007/tcp # basic overseer process afs3-bos 7007/udp afs3-update 7008/tcp # server-to-server updater afs3-update 7008/udp afs3-rmtsys 7009/tcp # remote cache manager service afs3-rmtsys 7009/udp font-service 7100/tcp xfs # X Font Service ... bacula-fd 9102/tcp # Bacula File Daemon bacula-fd 9102/udp Can't grab 0.0.0.0:110 with bind 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#nc -c /bin/bash -l -p 110
afs3-volser 7005/udp afs3-errors 7006/tcp # error interpretation service afs3-errors 7006/udp afs3-bos 7007/tcp # basic overseer process afs3-bos 7007/udp afs3-update 7008/tcp # server-to-server updater afs3-update 7008/udp afs3-rmtsys 7009/tcp # remote cache manager service afs3-rmtsys 7009/udp font-service 7100/tcp xfs # X Font Service ... bacula-fd 9102/tcp # Bacula File Daemon bacula-fd 9102/udp Can't grab 0.0.0.0:110 with bind 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#nc -c /bin/bash -l -p 111
afs3-volser 7005/tcp # volume managment server afs3-volser 7005/udp afs3-errors 7006/tcp # error interpretation service afs3-errors 7006/udp afs3-bos 7007/tcp # basic overseer process afs3-bos 7007/udp afs3-update 7008/tcp # server-to-server updater afs3-update 7008/udp afs3-rmtsys 7009/tcp # remote cache manager service afs3-rmtsys 7009/udp ... bacula-dir 9101/udp bacula-fd 9102/tcp # Bacula File Daemon bacula-fd 9102/udp 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#mkfifo /tmp/fifo
afs3-volser 7005/tcp # volume managment server afs3-volser 7005/udp afs3-errors 7006/tcp # error interpretation service afs3-errors 7006/udp afs3-bos 7007/tcp # basic overseer process afs3-bos 7007/udp afs3-update 7008/tcp # server-to-server updater afs3-update 7008/udp afs3-rmtsys 7009/tcp # remote cache manager service afs3-rmtsys 7009/udp ... bacula-dir 9101/udp bacula-fd 9102/tcp # Bacula File Daemon bacula-fd 9102/udp 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#ls -l /tmp/fifo
afs3-volser 7005/udp afs3-errors 7006/tcp # error interpretation service afs3-errors 7006/udp afs3-bos 7007/tcp # basic overseer process afs3-bos 7007/udp afs3-update 7008/tcp # server-to-server updater afs3-update 7008/udp afs3-rmtsys 7009/tcp # remote cache manager service afs3-rmtsys 7009/udp font-service 7100/tcp xfs # X Font Service ... bacula-fd 9102/tcp # Bacula File Daemon bacula-fd 9102/udp prw-r--r-- 1 root root 0 2007-05-30 09:58 /tmp/fifo 0 packets captured 0 packets received by filter 0 packets dropped by kernel [root@linux1:~]# [root@linux1:~]# [root@linux1:~]# ------------------------------------------------------------------------------------------ |
#netstat -lnp | less
|
#pkill -9 nc
|
#ps aux | grep nc
root 3470 0.0 0.0 3752 732 pts/7 S+ 10:02 0:00 grep nc |
#netstat -lnp | grep :22000
|
Время первой команды журнала | 17:03:29 2007- 5-29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:02:32 2007- 5-30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 17.82 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.52 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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