/l3/users/12-03-2007/nt-lnet/linux1.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 |
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::201:2ff:feb4:6114/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:85347 errors:1 dropped:0 overruns:0 frame:2 TX packets:98689 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:29152623 (27.8 MiB) TX bytes:22465300 (21.4 MiB) Interrupt:169 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:3437 errors:0 dropped:0 overruns:0 frame:0 TX packets:3437 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:147264 (143.8 KiB) TX bytes:147264 (143.8 KiB) |
#tcpdump icmp -i eth0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 14:52:53.175148 IP linux1.net.nt > serzh.net.nt: ICMP linux1.net.nt udp port 32802 unreachable, length 138 14:52:57.980179 IP linux2.net.nt > linux1.net.nt: ICMP echo request, id 61730, seq 1, length 64 14:52:57.980231 IP linux1.net.nt > linux2.net.nt: ICMP echo reply, id 61730, seq 1, length 64 14:52:58.981391 IP linux2.net.nt > linux1.net.nt: ICMP echo request, id 61730, seq 2, length 64 14:52:58.981448 IP linux1.net.nt > linux2.net.nt: ICMP echo reply, id 61730, seq 2, length 64 14:52:59.981349 IP linux2.net.nt > linux1.net.nt: ICMP echo request, id 61730, seq 3, length 64 14:52:59.981409 IP linux1.net.nt > linux2.net.nt: ICMP echo reply, id 61730, seq 3, length 64 14:53:00.981311 IP linux2.net.nt > linux1.net.nt: ICMP echo request, id 61730, seq 4, length 64 14:53:00.981374 IP linux1.net.nt > linux2.net.nt: ICMP echo reply, id 61730, seq 4, length 64 9 packets captured 9 packets received by filter 0 packets dropped by kernel |
#ssh linux2 ping linux1 -c4
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 14:52:53.175148 IP linux1.net.nt > serzh.net.nt: ICMP linux1.net.nt udp port 32802 unreachable, length 138 14:52:57.980179 IP linux2.net.nt > linux1.net.nt: ICMP echo request, id 61730, seq 1, length 64 14:52:57.980231 IP linux1.net.nt > linux2.net.nt: ICMP echo reply, id 61730, seq 1, length 64 14:52:58.981391 IP linux2.net.nt > linux1.net.nt: ICMP echo request, id 61730, seq 2, length 64 14:52:58.981448 IP linux1.net.nt > linux2.net.nt: ICMP echo reply, id 61730, seq 2, length 64 14:52:59.981349 IP linux2.net.nt > linux1.net.nt: ICMP echo request, id 61730, seq 3, length 64 14:52:59.981409 IP linux1.net.nt > linux2.net.nt: ICMP echo reply, id 61730, seq 3, length 64 14:53:00.981311 IP linux2.net.nt > linux1.net.nt: ICMP echo request, id 61730, seq 4, length 64 14:53:00.981374 IP linux1.net.nt > linux2.net.nt: ICMP echo reply, id 61730, seq 4, length 64 root@linux2's password: PING linux1.net.nt (192.168.16.1) 56(84) bytes of data. 64 bytes from linux1.net.nt (192.168.16.1): icmp_seq=1 ttl=64 time=0.355 ms 64 bytes from linux1.net.nt (192.168.16.1): icmp_seq=2 ttl=64 time=0.362 ms 64 bytes from linux1.net.nt (192.168.16.1): icmp_seq=3 ttl=64 time=0.370 ms 64 bytes from linux1.net.nt (192.168.16.1): icmp_seq=4 ttl=64 time=0.377 ms --- linux1.net.nt ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3001ms rtt min/avg/max/mdev = 0.355/0.366/0.377/0.008 ms |
#ping -h
Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline] [-p pattern] [-s packetsize] [-t ttl] [-I interface or address] [-M mtu discovery hint] [-S sndbuf] [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination |
#ping -i 10 -I eth0 -c4 linux3
PING linux3.net.nt (192.168.16.3) from 192.168.16.1 eth0: 56(84) bytes of data. 64 bytes from linux3.net.nt (192.168.16.3): icmp_seq=1 ttl=64 time=0.253 ms 64 bytes from linux3.net.nt (192.168.16.3): icmp_seq=2 ttl=64 time=0.179 ms --- linux3.net.nt ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 10002ms rtt min/avg/max/mdev = 0.179/0.216/0.253/0.037 ms |
#ping -i 1 -I eth0 -c4 linux3
PING linux3.net.nt (192.168.16.3) from 192.168.16.1 eth0: 56(84) bytes of data. 64 bytes from linux3.net.nt (192.168.16.3): icmp_seq=1 ttl=64 time=0.235 ms 64 bytes from linux3.net.nt (192.168.16.3): icmp_seq=2 ttl=64 time=0.176 ms 64 bytes from linux3.net.nt (192.168.16.3): icmp_seq=3 ttl=64 time=0.174 ms 64 bytes from linux3.net.nt (192.168.16.3): icmp_seq=4 ttl=64 time=0.176 ms --- linux3.net.nt ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3008ms rtt min/avg/max/mdev = 0.174/0.190/0.235/0.027 ms |
#ping -i 1 -I eth0 -c4 linux3 -S 1600
PING linux3.net.nt (192.168.16.3) from 192.168.16.1 eth0: 56(84) bytes of data. 64 bytes from linux3.net.nt (192.168.16.3): icmp_seq=1 ttl=64 time=0.220 ms 64 bytes from linux3.net.nt (192.168.16.3): icmp_seq=2 ttl=64 time=0.181 ms 64 bytes from linux3.net.nt (192.168.16.3): icmp_seq=3 ttl=64 time=0.152 ms 64 bytes from linux3.net.nt (192.168.16.3): icmp_seq=4 ttl=64 time=0.171 ms --- linux3.net.nt ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3008ms rtt min/avg/max/mdev = 0.152/0.181/0.220/0.024 ms |
#ping -i 1 -I eth0 -c4 linux3 -s 1600
PING linux3.net.nt (192.168.16.3) from 192.168.16.1 eth0: 1600(1628) bytes of data. 1608 bytes from linux3.net.nt (192.168.16.3): icmp_seq=1 ttl=64 time=0.804 ms 1608 bytes from linux3.net.nt (192.168.16.3): icmp_seq=2 ttl=64 time=0.713 ms 1608 bytes from linux3.net.nt (192.168.16.3): icmp_seq=3 ttl=64 time=0.720 ms 1608 bytes from linux3.net.nt (192.168.16.3): icmp_seq=4 ttl=64 time=0.713 ms --- linux3.net.nt ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3010ms rtt min/avg/max/mdev = 0.713/0.737/0.804/0.047 ms |
#ping -i 1 -I eth0 -c4 linux3 -s 1800
PING linux3.net.nt (192.168.16.3) from 192.168.16.1 eth0: 1800(1828) bytes of data. 1808 bytes from linux3.net.nt (192.168.16.3): icmp_seq=1 ttl=64 time=0.785 ms 1808 bytes from linux3.net.nt (192.168.16.3): icmp_seq=2 ttl=64 time=0.716 ms --- linux3.net.nt ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.716/0.750/0.785/0.044 ms |
#ping -i 1 -I eth0 -c4 linux3 -s 1900
PING linux3.net.nt (192.168.16.3) from 192.168.16.1 eth0: 1900(1928) bytes of data. 1908 bytes from linux3.net.nt (192.168.16.3): icmp_seq=1 ttl=64 time=0.809 ms 1908 bytes from linux3.net.nt (192.168.16.3): icmp_seq=2 ttl=64 time=0.730 ms --- linux3.net.nt ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1003ms rtt min/avg/max/mdev = 0.730/0.769/0.809/0.048 ms |
#ping -i 1 -I eth0 -c4 linux3 -s 2000
PING linux3.net.nt (192.168.16.3) from 192.168.16.1 eth0: 2000(2028) bytes of data. 2008 bytes from linux3.net.nt (192.168.16.3): icmp_seq=1 ttl=64 time=0.807 ms 2008 bytes from linux3.net.nt (192.168.16.3): icmp_seq=2 ttl=64 time=0.753 ms --- linux3.net.nt ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1003ms rtt min/avg/max/mdev = 0.753/0.780/0.807/0.027 ms |
#ping -i 1 -I eth0 -c4 linux3 -s 21
PING linux3.net.nt (192.168.16.3) from 192.168.16.1 eth0: 2100(2128) bytes of data. 2108 bytes from linux3.net.nt (192.168.16.3): icmp_seq=1 ttl=64 time=0.854 ms 2108 bytes from linux3.net.nt (192.168.16.3): icmp_seq=2 ttl=64 time=0.766 ms ^[[A2108 bytes from linux3.net.nt (192.168.16.3): icmp_seq=3 ttl=64 time=0.765 ms --- linux3.net.nt ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2008ms rtt min/avg/max/mdev = 0.765/0.795/0.854/0.041 ms |
#ping -i 1 -I eth0 -c4 linux3 -s 4500
PING linux3.net.nt (192.168.16.3) from 192.168.16.1 eth0: 4500(4528) bytes of data. 4508 bytes from linux3.net.nt (192.168.16.3): icmp_seq=1 ttl=64 time=1000 ms 4508 bytes from linux3.net.nt (192.168.16.3): icmp_seq=2 ttl=64 time=3.78 ms 4508 bytes from linux3.net.nt (192.168.16.3): icmp_seq=3 ttl=64 time=1.18 ms 4508 bytes from linux3.net.nt (192.168.16.3): icmp_seq=4 ttl=64 time=1.18 ms --- linux3.net.nt ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3003ms rtt min/avg/max/mdev = 1.180/251.775/1000.953/432.539 ms, pipe 2 |
#ping -f linux3
PING linux3.net.nt (192.168.16.3) 56(84) bytes of data. |
#traceroute -n mail.ru
traceroute to mail.ru (194.67.57.26), 30 hops max, 40 byte packets 1 192.168.16.15 2.088 ms 0.474 ms 0.714 ms 2 10.0.35.1 1.488 ms 1.232 ms 1.822 ms 3 10.0.1.1 1.454 ms 1.759 ms 1.951 ms 4 * * * 5 212.40.51.73 158.912 ms 134.504 ms 124.303 ms 6 212.40.35.229 157.216 ms 118.230 ms 132.985 ms 7 212.40.36.246 154.846 ms 223.525 ms 229.948 ms 8 87.236.225.254 241.302 ms 222.572 ms 220.724 ms 9 212.162.4.89 225.212 ms 144.270 ms 165.909 ms 10 4.68.118.34 105.453 ms 145.042 ms 4.68.118.162 145.774 ms 11 4.68.128.70 206.599 ms 208.041 ms 224.123 ms 12 4.68.125.230 253.932 ms * 4.68.96.226 342.286 ms 13 213.242.110.130 200.374 ms 181.344 ms * 14 195.239.11.86 205.627 ms 209.784 ms 162.394 ms 15 195.239.13.109 112.121 ms 141.970 ms 281.322 ms 16 * * 194.67.57.26 215.836 ms |
#traceroute mail.ru
traceroute to mail.ru (194.67.57.26), 30 hops max, 40 byte packets 1 serzh (192.168.16.15) 1.982 ms 0.269 ms 0.288 ms 2 10.0.35.1 (10.0.35.1) 1.991 ms 0.788 ms 0.998 ms 3 medusa.tech.inc (10.0.1.1) 1.309 ms 1.049 ms 0.678 ms 4 * * * 5 gi0-0-215.puma.tsua.net (212.40.51.73) 117.893 ms 142.704 ms 179.004 ms 6 gi0-3-510.bear.tsua.net (212.40.35.229) 211.009 ms 212.671 ms 204.929 ms 7 fe0-0-431.slon.tsua.net (212.40.36.246) 178.786 ms 126.167 ms 93.694 ms 8 core-fft.lo1.p1.comstar.net.ua (87.236.225.254) 144.776 ms 307.230 ms 196.842 ms 9 * 212.162.4.89 (212.162.4.89) 135.765 ms 111.545 ms 10 ae-0-52.bbr2.frankfurt1.level3.net (4.68.118.34) 95.676 ms ae-0-54.bbr2.frankfurt1.level3.net (4.68.118.98) 144.531 ms ae-0-52.bbr2.frankfurt1.level3.net (4.68.118.34) 148.534 ms 11 as-0-0.mp2.stockholm1.level3.net (4.68.128.70) 205.407 ms 222.229 ms 246.633 ms 12 ge-1-2.car2.stockholm1.level3.net (4.68.125.230) 265.383 ms ge-1-1.car2.stockholm1.level3.net (4.68.96.226) 109.057 ms ge-1-2.car2.stockholm1.level3.net (4.68.125.230) 88.024 ms 13 213.242.110.154 (213.242.110.154) 98.343 ms 213.242.110.130 (213.242.110.130) 234.831 ms 204.848 ms 14 cat03.moscow.gldn.net (195.239.11.86) 172.080 ms 221.145 ms 248.282 ms 15 cat01.Moscow.gldn.net (195.239.13.109) 237.347 ms 218.365 ms 233.127 ms 16 mail.ru (194.67.57.26) 283.481 ms 134.325 ms * |
#apt-get install vlock
Чтение списков пакетов... Готово Построение дерева зависимостей... Готово НОВЫЕ пакеты, которые будут установлены: vlock обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 93 пакетов не обновлено. Необходимо скачать 15,0kБ архивов. После распаковки объем занятого дискового пространства возрастёт на 102kB. Получено:1 http://192.168.16.15 etch/main vlock 1.3-10 [15,0kB] Получено 15,0kB за 2s (6410B/c) Выбор ранее не выбранного пакета vlock. (Чтение базы данных... на данный момент установлено 79452 файлов и каталогов.) Распаковывается пакет vlock (из файла .../archives/vlock_1.3-10_i386.deb)... Настраивается пакет vlock (1.3-10) ... |
#vlock -a
*** This tty is not a VC (virtual console). *** *** It may not be securely locked. *** This TTY is now locked by root. Please press Enter to unlock. Password: |
#vlock --all
*** This tty is not a VC (virtual console). *** *** It may not be securely locked. *** This TTY is now locked by root. Please press Enter to unlock. Password: |
#man vlock
|
#vlock -a
|
#vim /etc/pam.d/vlock
|
#vlock -a
*** This tty is not a VC (virtual console). *** *** It may not be securely locked. *** This TTY is now locked by root. Please press Enter to unlock. Password: |
#dpkg -L vlock
/. /usr /usr/bin /usr/bin/vlock /usr/share /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/vlock /usr/share/doc /usr/share/doc/vlock /usr/share/doc/vlock/TODO.Debian /usr/share/doc/vlock/copyright /usr/share/doc/vlock/changelog.gz /usr/share/doc/vlock/README.gz /usr/share/doc/vlock/changelog.Debian.gz /usr/share/man /usr/share/man/man1 /usr/share/man/man1/vlock.1.gz /etc /etc/pam.d /etc/pam.d/vlock |
#zless /usr/share/doc/vlock/README.gz
|
#vlock -h
vlock: locks virtual consoles, saving your current session. Usage: vlock [options] Where [options] are any of: -c or --current: lock only this virtual console, allowing user to switch to other virtual consoles. -a or --all: lock all virtual consoles by preventing other users from switching virtual consoles. -v or --version: Print the version number of vlock and exit. -h or --help: Print this help message and exit. -q or --quiet: print as few messages as possible. |
#vlock --all
*** This tty is not a VC (virtual console). *** *** It may not be securely locked. *** This TTY is now locked by root. Please press Enter to unlock. Password: |
#netstat -i
Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 190587 1 0 0 207209 0 0 0 BMRU lo 16436 0 3457 0 0 0 3457 0 0 0 LRU |
#netstat -r
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.16.0 * 255.255.255.0 U 0 0 0 eth0 default serzh.net.nt 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.16.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.16.15 0.0.0.0 UG 0 0 0 eth0 |
#netstat -l
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 localhost:2208 *:* LISTEN tcp 0 0 *:dict *:* LISTEN tcp 0 0 *:sunrpc *:* LISTEN tcp 0 0 *:auth *:* LISTEN tcp 0 0 localhost:ipp *:* LISTEN tcp 0 0 *:35641 *:* LISTEN tcp 0 0 localhost:smtp *:* LISTEN tcp 0 0 localhost:50879 *:* LISTEN ... unix 2 [ ACC ] STREAM LISTENING 12229 /tmp/orbit-user/linc-f86-0-973166cc3611 unix 2 [ ACC ] STREAM LISTENING 12247 /tmp/orbit-user/linc-f88-0-973166cdd548 unix 2 [ ACC ] STREAM LISTENING 12278 /tmp/orbit-user/linc-f9f-0-2d3771217bb42 unix 2 [ ACC ] STREAM LISTENING 12308 /tmp/orbit-user/linc-fa1-0-2d377121c14ef unix 2 [ ACC ] STREAM LISTENING 12338 /tmp/orbit-user/linc-fa3-0-53d3a0bb5e78 unix 2 [ ACC ] STREAM LISTENING 12388 /tmp/orbit-user/linc-fb2-0-5fe97a0fce27b unix 2 [ ACC ] STREAM LISTENING 12406 /tmp/orbit-user/linc-fb8-0-1c955588e518 unix 2 [ ACC ] STREAM LISTENING 18291 /tmp/orbit-user/linc-221b-0-7fd62854bfc5c unix 2 [ ACC ] STREAM LISTENING 11812 @/tmp/dbus-XedZjsZXz7 unix 2 [ ACC ] STREAM LISTENING 6429 @/var/run/hald/dbus-6fMx4mSGn1 |
#netstat -ln
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:2628 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:35641 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:50879 0.0.0.0:* LISTEN ... unix 2 [ ACC ] STREAM LISTENING 12229 /tmp/orbit-user/linc-f86-0-973166cc3611 unix 2 [ ACC ] STREAM LISTENING 12247 /tmp/orbit-user/linc-f88-0-973166cdd548 unix 2 [ ACC ] STREAM LISTENING 12278 /tmp/orbit-user/linc-f9f-0-2d3771217bb42 unix 2 [ ACC ] STREAM LISTENING 12308 /tmp/orbit-user/linc-fa1-0-2d377121c14ef unix 2 [ ACC ] STREAM LISTENING 12338 /tmp/orbit-user/linc-fa3-0-53d3a0bb5e78 unix 2 [ ACC ] STREAM LISTENING 12388 /tmp/orbit-user/linc-fb2-0-5fe97a0fce27b unix 2 [ ACC ] STREAM LISTENING 12406 /tmp/orbit-user/linc-fb8-0-1c955588e518 unix 2 [ ACC ] STREAM LISTENING 18291 /tmp/orbit-user/linc-221b-0-7fd62854bfc5c unix 2 [ ACC ] STREAM LISTENING 11812 @/tmp/dbus-XedZjsZXz7 unix 2 [ ACC ] STREAM LISTENING 6429 @/var/run/hald/dbus-6fMx4mSGn1 |
#netstat -lnp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2404/hpiod tcp 0 0 0.0.0.0:2628 0.0.0.0:* LISTEN 2605/0 tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2111/portmap tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN 2665/inetd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2512/cupsd tcp 0 0 0.0.0.0:35641 0.0.0.0:* LISTEN 2723/rpc.statd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2648/exim4 tcp 0 0 127.0.0.1:50879 0.0.0.0:* LISTEN 2407/python ... unix 2 [ ACC ] STREAM LISTENING 12229 3992/gnome-power-ma /tmp/orbit-user/linc-f86-0-973166cc3611 unix 2 [ ACC ] STREAM LISTENING 12247 3976/nm-applet /tmp/orbit-user/linc-f88-0-973166cdd548 unix 2 [ ACC ] STREAM LISTENING 12278 3999/notification-a /tmp/orbit-user/linc-f9f-0-2d3771217bb42 unix 2 [ ACC ] STREAM LISTENING 12308 4001/clock-applet /tmp/orbit-user/linc-fa1-0-2d377121c14ef unix 2 [ ACC ] STREAM LISTENING 12338 4003/mixer_applet2 /tmp/orbit-user/linc-fa3-0-53d3a0bb5e78 unix 2 [ ACC ] STREAM LISTENING 12388 4018/notification-d /tmp/orbit-user/linc-fb2-0-5fe97a0fce27b unix 2 [ ACC ] STREAM LISTENING 12406 4025/gnome-screensa /tmp/orbit-user/linc-fb8-0-1c955588e518 unix 2 [ ACC ] STREAM LISTENING 18291 8731/firefox-bin /tmp/orbit-user/linc-221b-0-7fd62854bfc5c unix 2 [ ACC ] STREAM LISTENING 11812 3936/dbus-daemon @/tmp/dbus-XedZjsZXz7 unix 2 [ ACC ] STREAM LISTENING 6429 2528/hald @/var/run/hald/dbus-6fMx4mSGn1 |
#netstat -lnp | grep 25
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2512/cupsd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2648/exim4 udp 0 0 0.0.0.0:32768 0.0.0.0:* 2590/avahi-daemon: udp 0 0 0.0.0.0:5353 0.0.0.0:* 2590/avahi-daemon: udp 0 0 0.0.0.0:631 0.0.0.0:* 2512/cupsd unix 2 [ ACC ] STREAM LISTENING 6394 2512/cupsd /var/run/cups/cups.sock unix 2 [ ACC ] STREAM LISTENING 6413 2520/dbus-daemon /var/run/dbus/system_bus_socket unix 2 [ ACC ] STREAM LISTENING 7532 2590/avahi-daemon: /var/run/avahi-daemon/socket unix 2 [ ACC ] STREAM LISTENING 6428 2528/hald @/var/run/hald/dbus-en6C9Jmbxs unix 2 [ ACC ] STREAM LISTENING 12406 4025/gnome-screensa /tmp/orbit-user/linc-fb8-0-1c955588e518 unix 2 [ ACC ] STREAM LISTENING 6429 2528/hald @/var/run/hald/dbus-6fMx4mSGn1 |
#netstat -lnp | grep :25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2648/exim4 |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.0 * 255.255.255.0 U 0 0 0 eth0 default serzh.net.nt 0.0.0.0 UG 0 0 0 eth0 |
#netstat -r
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.16.0 * 255.255.255.0 U 0 0 0 eth0 default serzh.net.nt 0.0.0.0 UG 0 0 0 eth0 |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.16.15 0.0.0.0 UG 0 0 0 eth0 |
##route add/del -host/-net IP/MASK gw IP/MASK
|
#ping 10.0.17.1
PING 10.0.17.1 (10.0.17.1) 56(84) bytes of data. 64 bytes from 10.0.17.1: icmp_seq=1 ttl=64 time=0.386 ms 64 bytes from 10.0.17.1: icmp_seq=2 ttl=64 time=0.210 ms --- 10.0.17.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 0.210/0.298/0.386/0.088 ms |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::201:2ff:feb4:6114/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:192222 errors:1 dropped:0 overruns:0 frame:2 TX packets:209030 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:45380547 (43.2 MiB) TX bytes:34600216 (32.9 MiB) Interrupt:169 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:3457 errors:0 dropped:0 overruns:0 frame:0 TX packets:3457 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:148944 (145.4 KiB) TX bytes:148944 (145.4 KiB) |
#traceroute -n 10.0.17.1
traceroute to 10.0.17.1 (10.0.17.1), 30 hops max, 40 byte packets 1 10.0.17.1 0.391 ms 0.410 ms 0.360 ms |
#ifconfig eth0:1 10.0.17.30
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::201:2ff:feb4:6114/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:192732 errors:1 dropped:0 overruns:0 frame:2 TX packets:209503 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:45464369 (43.3 MiB) TX bytes:34705400 (33.0 MiB) Interrupt:169 eth0:1 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 inet addr:10.0.17.30 Bcast:10.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:169 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:3457 errors:0 dropped:0 overruns:0 frame:0 TX packets:3457 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:148944 (145.4 KiB) TX bytes:148944 (145.4 KiB) |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0 0.0.0.0 192.168.16.15 0.0.0.0 UG 0 0 0 eth0 |
#ping 10.0.17.1
PING 10.0.17.1 (10.0.17.1) 56(84) bytes of data. --- 10.0.17.1 ping statistics --- 14 packets transmitted, 0 received, 100% packet loss, time 13009ms |
#route add -net 10.0.0.0/8 gw 192.168.16.15
|
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.0.0.0 192.168.16.15 255.0.0.0 UG 0 0 0 eth0 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0 0.0.0.0 192.168.16.15 0.0.0.0 UG 0 0 0 eth0 |
#ping 10.0.17.1
PING 10.0.17.1 (10.0.17.1) 56(84) bytes of data. 64 bytes from 10.0.17.1: icmp_seq=1 ttl=64 time=0.391 ms 64 bytes from 10.0.17.1: icmp_seq=2 ttl=64 time=0.237 ms --- 10.0.17.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 0.237/0.314/0.391/0.077 ms |
#traceroute -n 10.0.17.1
traceroute to 10.0.17.1 (10.0.17.1), 30 hops max, 40 byte packets 1 10.0.17.1 0.303 ms 0.312 ms 0.329 ms |
#route del -net 10.0.0.0/8
|
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0 0.0.0.0 192.168.16.15 0.0.0.0 UG 0 0 0 eth0 |
#ipcalc
bash: ipcalc: command not found |
#passwd
Enter new UNIX password: Retype new UNIX password: passwd: пароль успешно обновлён |
#ip addr
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:01:02:b4:61:14 brd ff:ff:ff:ff:ff:ff inet 192.168.16.1/24 brd 192.168.16.255 scope global eth0 inet 10.0.17.30/8 brd 10.255.255.255 scope global eth0:1 inet6 fe80::201:2ff:feb4:6114/64 scope link valid_lft forever preferred_lft forever 3: local: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:01:02:b4:61:09 brd ff:ff:ff:ff:ff:ff inet 192.168.16.100/24 brd 192.168.16.255 scope global local 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::201:2ff:feb4:6114/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:195858 errors:1 dropped:0 overruns:0 frame:2 TX packets:212786 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:47250961 (45.0 MiB) TX bytes:35171270 (33.5 MiB) Interrupt:169 eth0:1 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 inet addr:10.0.17.30 Bcast:10.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:169 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:3457 errors:0 dropped:0 overruns:0 frame:0 TX packets:3457 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:148944 (145.4 KiB) TX bytes:148944 (145.4 KiB) |
#apt-get install ipcalc
Чтение списков пакетов... Готово Построение дерева зависимостей... Готово НОВЫЕ пакеты, которые будут установлены: ipcalc обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 93 пакетов не обновлено. Необходимо скачать 26,4kБ архивов. После распаковки объем занятого дискового пространства возрастёт на 131kB. Получено:1 http://192.168.16.15 etch/main ipcalc 0.41-1 [26,4kB] Получено 26,4kB за 0s (137kB/c) Выбор ранее не выбранного пакета ipcalc. (Чтение базы данных... на данный момент установлено 79462 файлов и каталогов.) Распаковывается пакет 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 192.168.18.0/24 /26
Address: 192.168.18.0 11000000.10101000.00010010. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 192.168.18.0/24 11000000.10101000.00010010. 00000000 HostMin: 192.168.18.1 11000000.10101000.00010010. 00000001 HostMax: 192.168.18.254 11000000.10101000.00010010. 11111110 Broadcast: 192.168.18.255 11000000.10101000.00010010. 11111111 Hosts/Net: 254 Class C, Private Internet Subnets after transition from /24 to /26 ... Broadcast: 192.168.18.191 11000000.10101000.00010010.10 111111 Hosts/Net: 62 Class C, Private Internet 4. Network: 192.168.18.192/26 11000000.10101000.00010010.11 000000 HostMin: 192.168.18.193 11000000.10101000.00010010.11 000001 HostMax: 192.168.18.254 11000000.10101000.00010010.11 111110 Broadcast: 192.168.18.255 11000000.10101000.00010010.11 111111 Hosts/Net: 62 Class C, Private Internet Subnets: 4 Hosts: 248 |
#ipcalc 192.168.18.0/24 /27
Address: 192.168.18.0 11000000.10101000.00010010. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 192.168.18.0/24 11000000.10101000.00010010. 00000000 HostMin: 192.168.18.1 11000000.10101000.00010010. 00000001 HostMax: 192.168.18.254 11000000.10101000.00010010. 11111110 Broadcast: 192.168.18.255 11000000.10101000.00010010. 11111111 Hosts/Net: 254 Class C, Private Internet Subnets after transition from /24 to /27 ... Broadcast: 192.168.18.223 11000000.10101000.00010010.110 11111 Hosts/Net: 30 Class C, Private Internet 8. Network: 192.168.18.224/27 11000000.10101000.00010010.111 00000 HostMin: 192.168.18.225 11000000.10101000.00010010.111 00001 HostMax: 192.168.18.254 11000000.10101000.00010010.111 11110 Broadcast: 192.168.18.255 11000000.10101000.00010010.111 11111 Hosts/Net: 30 Class C, Private Internet Subnets: 8 Hosts: 240 |
#ipcalc 192.168.18.0/24 /26
Address: 192.168.18.0 11000000.10101000.00010010. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 192.168.18.0/24 11000000.10101000.00010010. 00000000 HostMin: 192.168.18.1 11000000.10101000.00010010. 00000001 HostMax: 192.168.18.254 11000000.10101000.00010010. 11111110 Broadcast: 192.168.18.255 11000000.10101000.00010010. 11111111 Hosts/Net: 254 Class C, Private Internet Subnets after transition from /24 to /26 ... Broadcast: 192.168.18.191 11000000.10101000.00010010.10 111111 Hosts/Net: 62 Class C, Private Internet 4. Network: 192.168.18.192/26 11000000.10101000.00010010.11 000000 HostMin: 192.168.18.193 11000000.10101000.00010010.11 000001 HostMax: 192.168.18.254 11000000.10101000.00010010.11 111110 Broadcast: 192.168.18.255 11000000.10101000.00010010.11 111111 Hosts/Net: 62 Class C, Private Internet Subnets: 4 Hosts: 248 |
#ipcalc 192.168.18.0/24 /27
Address: 192.168.18.0 11000000.10101000.00010010. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 192.168.18.0/24 11000000.10101000.00010010. 00000000 HostMin: 192.168.18.1 11000000.10101000.00010010. 00000001 HostMax: 192.168.18.254 11000000.10101000.00010010. 11111110 Broadcast: 192.168.18.255 11000000.10101000.00010010. 11111111 Hosts/Net: 254 Class C, Private Internet Subnets after transition from /24 to /27 ... Broadcast: 192.168.18.223 11000000.10101000.00010010.110 11111 Hosts/Net: 30 Class C, Private Internet 8. Network: 192.168.18.224/27 11000000.10101000.00010010.111 00000 HostMin: 192.168.18.225 11000000.10101000.00010010.111 00001 HostMax: 192.168.18.254 11000000.10101000.00010010.111 11110 Broadcast: 192.168.18.255 11000000.10101000.00010010.111 11111 Hosts/Net: 30 Class C, Private Internet Subnets: 8 Hosts: 240 |
#ipcalc 192.168.18.0/24 /26
Address: 192.168.18.0 11000000.10101000.00010010. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 192.168.18.0/24 11000000.10101000.00010010. 00000000 HostMin: 192.168.18.1 11000000.10101000.00010010. 00000001 HostMax: 192.168.18.254 11000000.10101000.00010010. 11111110 Broadcast: 192.168.18.255 11000000.10101000.00010010. 11111111 Hosts/Net: 254 Class C, Private Internet Subnets after transition from /24 to /26 ... Broadcast: 192.168.18.191 11000000.10101000.00010010.10 111111 Hosts/Net: 62 Class C, Private Internet 4. Network: 192.168.18.192/26 11000000.10101000.00010010.11 000000 HostMin: 192.168.18.193 11000000.10101000.00010010.11 000001 HostMax: 192.168.18.254 11000000.10101000.00010010.11 111110 Broadcast: 192.168.18.255 11000000.10101000.00010010.11 111111 Hosts/Net: 62 Class C, Private Internet Subnets: 4 Hosts: 248 |
#ip addr add eth0 192.168.18.1/26
Error: an inet prefix is expected rather than "eth0". |
#ip addr help
Command "helpeth0" is unknown, try "ip addr help". |
#ip addr help
Usage: ip addr {add|del} IFADDR dev STRING ip addr {show|flush} [ dev STRING ] [ scope SCOPE-ID ] [ to PREFIX ] [ FLAG-LIST ] [ label PATTERN ] IFADDR := PREFIX | ADDR peer PREFIX [ broadcast ADDR ] [ anycast ADDR ] [ label STRING ] [ scope SCOPE-ID ] SCOPE-ID := [ host | link | global | NUMBER ] FLAG-LIST := [ FLAG-LIST ] FLAG FLAG := [ permanent | dynamic | secondary | primary | tentative | deprecated ] |
#ap addr add 192.168.18.1/26 dev eth1
bash: ap: command not found |
#lspci
00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 01) 00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 01) 00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01) 00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01) 00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01) 00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 81) 00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 01) 00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 01) 00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01) 00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01) 01:00.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 74) 01:01.0 Ethernet controller: 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 74) |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::201:2ff:feb4:6114/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:198938 errors:1 dropped:0 overruns:0 frame:2 TX packets:215880 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:48671033 (46.4 MiB) TX bytes:35744941 (34.0 MiB) Interrupt:169 eth0:1 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 inet addr:10.0.17.30 Bcast:10.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:169 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:3457 errors:0 dropped:0 overruns:0 frame:0 TX packets:3457 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:148944 (145.4 KiB) TX bytes:148944 (145.4 KiB) |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::201:2ff:feb4:6114/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:199035 errors:1 dropped:0 overruns:0 frame:2 TX packets:215985 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:48684091 (46.4 MiB) TX bytes:35763103 (34.1 MiB) Interrupt:169 eth0:1 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 ... 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:201 Base address:0x2000 sit0 Link encap:IPv6-in-IPv4 NOARP MTU:1480 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: negotiated 100baseTx-FD flow-control, link ok |
#ifconfig local up
|
#ip addr add 192.168.18.1/26 dev local
|
#ip addr
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:01:02:b4:61:14 brd ff:ff:ff:ff:ff:ff inet 192.168.16.1/24 brd 192.168.16.255 scope global eth0 inet 10.0.17.30/8 brd 10.255.255.255 scope global eth0:1 inet6 fe80::201:2ff:feb4:6114/64 scope link valid_lft forever preferred_lft forever 3: local: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:01:02:b4:61:09 brd ff:ff:ff:ff:ff:ff inet 192.168.16.100/24 brd 192.168.16.255 scope global local inet 192.168.18.1/26 scope global local 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 |
#ip addr del 192.168.16.100/24 dev local
|
#ip addr
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:01:02:b4:61:14 brd ff:ff:ff:ff:ff:ff inet 192.168.16.1/24 brd 192.168.16.255 scope global eth0 inet 10.0.17.30/8 brd 10.255.255.255 scope global eth0:1 inet6 fe80::201:2ff:feb4:6114/64 scope link valid_lft forever preferred_lft forever 3: local: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:01:02:b4:61:09 brd ff:ff:ff:ff:ff:ff inet 192.168.18.1/26 scope global local 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 |
#ipcalc 192.168.18.0/24 /26
Address: 192.168.18.0 11000000.10101000.00010010. 00000000 Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000 Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111 => Network: 192.168.18.0/24 11000000.10101000.00010010. 00000000 HostMin: 192.168.18.1 11000000.10101000.00010010. 00000001 HostMax: 192.168.18.254 11000000.10101000.00010010. 11111110 Broadcast: 192.168.18.255 11000000.10101000.00010010. 11111111 Hosts/Net: 254 Class C, Private Internet Subnets after transition from /24 to /26 ... Broadcast: 192.168.18.191 11000000.10101000.00010010.10 111111 Hosts/Net: 62 Class C, Private Internet 4. Network: 192.168.18.192/26 11000000.10101000.00010010.11 000000 HostMin: 192.168.18.193 11000000.10101000.00010010.11 000001 HostMax: 192.168.18.254 11000000.10101000.00010010.11 111110 Broadcast: 192.168.18.255 11000000.10101000.00010010.11 111111 Hosts/Net: 62 Class C, Private Internet Subnets: 4 Hosts: 248 |
#ip addr
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:01:02:b4:61:14 brd ff:ff:ff:ff:ff:ff inet 192.168.16.1/24 brd 192.168.16.255 scope global eth0 inet 10.0.17.30/8 brd 10.255.255.255 scope global eth0:1 inet6 fe80::201:2ff:feb4:6114/64 scope link valid_lft forever preferred_lft forever 3: local: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:01:02:b4:61:09 brd ff:ff:ff:ff:ff:ff inet 192.168.18.1/26 scope global local inet6 fe80::201:2ff:feb4:6109/64 scope link valid_lft forever preferred_lft forever 4: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 |
#ping 192.168.18.62
PING 192.168.18.62 (192.168.18.62) 56(84) bytes of data. 64 bytes from 192.168.18.62: icmp_seq=1 ttl=64 time=3.64 ms 64 bytes from 192.168.18.62: icmp_seq=2 ttl=64 time=0.312 ms 64 bytes from 192.168.18.62: icmp_seq=3 ttl=64 time=0.310 ms 64 bytes from 192.168.18.62: icmp_seq=4 ttl=64 time=0.306 ms 64 bytes from 192.168.18.62: icmp_seq=5 ttl=64 time=0.307 ms 64 bytes from 192.168.18.62: icmp_seq=6 ttl=64 time=0.303 ms 64 bytes from 192.168.18.62: icmp_seq=7 ttl=64 time=0.296 ms 64 bytes from 192.168.18.62: icmp_seq=8 ttl=64 time=0.339 ms 64 bytes from 192.168.18.62: icmp_seq=9 ttl=64 time=0.303 ms --- 192.168.18.62 ping statistics --- 9 packets transmitted, 9 received, 0% packet loss, time 7999ms rtt min/avg/max/mdev = 0.296/0.679/3.642/1.047 ms |
#route --help
Usage: route [-nNvee] [-FC] [<AF>] List kernel routing tables route [-v] [-FC] {add|del|flush} ... Modify routing table for AF. route {-h|--help} [<AF>] Detailed usage syntax for specified AF. route {-V|--version} Display version/author and exit. -v, --verbose be verbose -n, --numeric don't resolve names -e, --extend display other/more information -F, --fib display Forwarding Information Base (default) -C, --cache display routing cache instead of FIB <AF>=Use '-A <af>' or '--<af>'; default: inet List of possible address families (which support routing): inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) x25 (CCITT X.25) |
#echo /proc/sys
sys/ sysrq-trigger sysvipc/ |
#echo /proc/sys/net/ipv4/ip_
ip_default_ttl ip_dynaddr ip_forward ip_local_port_range ip_nonlocal_bind ip_no_pmtu_disc |
#echo /proc/sys/net/ipv4/ip_forward
/proc/sys/net/ipv4/ip_forward |
#cat /proc/sys/net/ipv4/ip_forward
0 |
#man route
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::201:2ff:feb4:6114/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:200803 errors:1 dropped:0 overruns:0 frame:2 TX packets:217862 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:50172073 (47.8 MiB) TX bytes:36025244 (34.3 MiB) Interrupt:169 eth0:1 Link encap:Ethernet HWaddr 00:01:02:B4:61:14 ... RX bytes:148944 (145.4 KiB) TX bytes:148944 (145.4 KiB) local Link encap:Ethernet HWaddr 00:01:02:B4:61:09 inet addr:192.168.18.1 Bcast:0.0.0.0 Mask:255.255.255.192 inet6 addr: fe80::201:2ff:feb4:6109/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:34 errors:0 dropped:0 overruns:0 frame:0 TX packets:30 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:5736 (5.6 KiB) TX bytes:4095 (3.9 KiB) Interrupt:201 Base address:0x2000 |
#ifconfig eth0:1 down
|
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.18.0 * 255.255.255.192 U 0 0 0 local 192.168.16.0 * 255.255.255.0 U 0 0 0 eth0 10.0.0.0 * 255.0.0.0 U 0 0 0 eth0 default serzh.net.nt 0.0.0.0 UG 0 0 0 eth0 |
#cat /proc/sys/net/ipv4/ip_forward
0 |
#echo 1 > /proc/sys/net/ipv4/ip_forward
|
#tcpd
tcpd tcpdchk tcpdmatch tcpdump |
#tcpdump -n -i eth0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 17:17:03.434517 IP 82.207.118.247.22 > 192.168.16.1.45710: P 10342967:10343079(112) ack 2897705265 win 2274 <nop,nop,timestamp 259568423 29097031> 17:17:03.434577 IP 192.168.16.1.45710 > 82.207.118.247.22: . ack 4294965856 win 501 <nop,nop,timestamp 29097818 259567672,nop,nop,sack 1 {0:112}> 2 packets captured 2 packets received by filter 0 packets dropped by kernel |
#tcpdump -n -i eth0 icmp
17:17:27.900317 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 23, length 64 17:17:28.900266 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 24, length 64 17:17:29.900230 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 25, length 64 17:17:30.900176 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 26, length 64 17:17:31.900132 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 27, length 64 17:17:32.900074 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 28, length 64 17:17:33.900034 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 29, length 64 17:17:34.899965 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 30, length 64 17:17:35.899943 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 31, length 64 17:17:36.899905 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 32, length 64 ... 17:19:40.914414 IP 192.168.16.15 > 192.168.18.62: ICMP echo reply, id 45362, seq 156, length 64 17:19:41.914515 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 157, length 64 17:19:41.914736 IP 192.168.16.15 > 192.168.18.62: ICMP echo reply, id 45362, seq 157, length 64 17:19:42.914100 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 158, length 64 17:19:42.914319 IP 192.168.16.15 > 192.168.18.62: ICMP echo reply, id 45362, seq 158, length 64 17:19:43.914058 IP 192.168.18.62 > 192.168.16.15: ICMP echo request, id 45362, seq 159, length 64 17:19:43.914276 IP 192.168.16.15 > 192.168.18.62: ICMP echo reply, id 45362, seq 159, length 64 164 packets captured 164 packets received by filter 0 packets dropped by kernel |
#ping 192.168.17.1
PING 192.168.17.1 (192.168.17.1) 56(84) bytes of data. --- 192.168.17.1 ping statistics --- 8 packets transmitted, 0 received, 100% packet loss, time 7010ms |
#ping 10.0.17.1
PING 10.0.17.1 (10.0.17.1) 56(84) bytes of data. --- 10.0.17.1 ping statistics --- 6 packets transmitted, 0 received, 100% packet loss, time 5000ms |
0
Время первой команды журнала | 14:52:21 2007- 3-12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 17:20:06 2007- 3-12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 13.86 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.37 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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