/l3/users/eb/2009/linux3/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 :30 :31 :32 :33 :34 :35 :36 :37 :38 |
|
#file -s /dev/sdb2
/dev/sdb2: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, 1st sector stage2 0x1c11381, code offset 0x48 |
#qemu -hda /dev/md1
Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory |
#echo ';' | sfdisk /dev/md1
Checking that no-one is using this disk right now ... OK Disk /dev/md1: 2443872 cylinders, 2 heads, 4 sectors/track sfdisk: ERROR: sector 0 does not have an msdos signature /dev/md1: unrecognized partition table type Old situation: No partitions found New situation: Units = cylinders of 4096 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/md1p1 0+ 2443871 2443872- 9775487+ 83 Linux /dev/md1p2 0 - 0 0 0 Empty /dev/md1p3 0 - 0 0 0 Empty /dev/md1p4 0 - 0 0 0 Empty Warning: no primary partition is marked bootable (active) This does not matter for LILO, but the DOS MBR will not boot this disk. Successfully wrote the new partition table Re-reading the partition table ... If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).) |
#echo ';' | sfdisk /dev/md1
Checking that no-one is using this disk right now ... OK Disk /dev/md1: 2443872 cylinders, 2 heads, 4 sectors/track sfdisk: ERROR: sector 0 does not have an msdos signature /dev/md1: unrecognized partition table type Old situation: No partitions found New situation: Units = cylinders of 4096 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/md1p1 0+ 2443871 2443872- 9775487+ 83 Linux /dev/md1p2 0 - 0 0 0 Empty /dev/md1p3 0 - 0 0 0 Empty /dev/md1p4 0 - 0 0 0 Empty Warning: no primary partition is marked bootable (active) This does not matter for LILO, but the DOS MBR will not boot this disk. Successfully wrote the new partition table Re-reading the partition table ... If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).) |
#grub
Probing devices to guess BIOS drives. This may take a long time. |
#qemu -hda /dev/md1
Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory |
#cat /etc/mdadm/mdadm.conf
# mdadm.conf # # Please refer to mdadm.conf(5) for information about this file. # # by default, scan all partitions (/proc/partitions) for MD superblocks. # alternatively, specify devices to scan, using wildcards if desired. DEVICE partitions # auto-create devices with Debian standard permissions CREATE owner=root group=disk mode=0660 auto=yes # automatically tag new arrays as belonging to the local system HOMEHOST <system> # instruct the monitoring daemon where to send mail alerts MAILADDR root # definitions of existing MD arrays # This file was auto-generated on Sat, 30 May 2009 18:59:37 +0300 # by mkconf $Id$ |
#cat /etc/mdadm/mdadm.conf
# mdadm.conf # # Please refer to mdadm.conf(5) for information about this file. # # by default, scan all partitions (/proc/partitions) for MD superblocks. # alternatively, specify devices to scan, using wildcards if desired. DEVICE partitions # auto-create devices with Debian standard permissions CREATE owner=root group=disk mode=0660 auto=yes # automatically tag new arrays as belonging to the local system HOMEHOST <system> # instruct the monitoring daemon where to send mail alerts MAILADDR root # definitions of existing MD arrays # This file was auto-generated on Sat, 30 May 2009 18:59:37 +0300 # by mkconf $Id$ |
#apt-get install ettercap
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following extra packages will be installed: ettercap-common The following NEW packages will be installed: ettercap ettercap-common ... Get:2 http://127.0.0.1 sid/main ettercap 1:0.7.3-1.2+b1 [191kB] Fetched 500kB in 0s (2383kB/s) Selecting previously deselected package ettercap-common. (Reading database ... 55386 files and directories currently installed.) Unpacking ettercap-common (from .../ettercap-common_1%3a0.7.3-1.2+b1_i386.deb) ... Selecting previously deselected package ettercap. Unpacking ettercap (from .../ettercap_1%3a0.7.3-1.2+b1_i386.deb) ... Processing triggers for man-db ... Setting up ettercap-common (1:0.7.3-1.2+b1) ... Setting up ettercap (1:0.7.3-1.2+b1) ... |
#ettercap -M arp /192.168.15.4/ /192.168.15.1/ -L log -T
ettercap NG-0.7.3 copyright 2001-2004 ALoR & NaGA Listening on eth0... (Ethernet) eth0 -> 00:07:E9:3C:2C:BA 192.168.15.3 255.255.255.0 SSL dissection needs a valid 'redir_command_on' script in the etter.conf file Privileges dropped to UID 65534 GID 65534... 28 plugins 39 protocol dissectors 53 ports monitored 7587 mac vendor fingerprint 1698 tcp OS fingerprint ... TCP 192.168.15.4:40653 --> 192.168.15.1:110 | AP PASS pasword POP : 192.168.15.1:110 -> USER: user PASS: pasword Mon Jun 1 12:43:33 2009 TCP 192.168.15.1:110 --> 192.168.15.4:40653 | A Closing text interface... ARP poisoner deactivated. RE-ARPing the victims... Unified sniffing was stopped. |
#etterlog -L log.eci
etterlog NG-0.7.3 copyright 2001-2004 ALoR & NaGA Log file version : NG-0.7.3 Timestamp : Mon Jun 1 12:42:47 2009 Type : LOG_INFO 1698 tcp OS fingerprint 7587 mac vendor fingerprint 2183 known services |
#etterlog -L log.ecp
etterlog NG-0.7.3 copyright 2001-2004 ALoR & NaGA Log file version : NG-0.7.3 Timestamp : Mon Jun 1 12:42:47 2009 Type : LOG_PACKET Mon Jun 1 12:42:58 2009 [700304] TCP 192.168.15.4:40653 --> 192.168.15.1:110 | S Mon Jun 1 12:42:58 2009 [700596] TCP 192.168.15.1:110 --> 192.168.15.4:40653 | SA Mon Jun 1 12:42:58 2009 [704286] TCP 192.168.15.4:40653 --> 192.168.15.1:110 | A ... Mon Jun 1 12:43:22 2009 [946481] TCP 192.168.15.1:110 --> 192.168.15.4:40653 | AP +OK Password required for user.. Mon Jun 1 12:43:22 2009 [946771] TCP 192.168.15.4:40653 --> 192.168.15.1:110 | A Mon Jun 1 12:43:33 2009 [704304] TCP 192.168.15.4:40653 --> 192.168.15.1:110 | AP PASS pasword Mon Jun 1 12:43:33 2009 [743632] TCP 192.168.15.1:110 --> 192.168.15.4:40653 | A |
#etterlog -L log.eci
etterlog NG-0.7.3 copyright 2001-2004 ALoR & NaGA Log file version : NG-0.7.3 Timestamp : Mon Jun 1 12:42:47 2009 Type : LOG_INFO 1698 tcp OS fingerprint 7587 mac vendor fingerprint 2183 known services |
#~
"/mnt/etc/mdadm/mdadm.conf" 22L, 626C+q436f+q6b75+q6b64+q6b72+q6b6c+q2332+q2334+q2569+q2a37+q6b31 # automatically tag new arrays as belonging to the local system HOMEHOST <system> # instruct the monitoring daemon where to send mail alerts MAILADDR root # definitions of existing MD arrays # This file was auto-generated on Sat, 30 May 2009 18:59:37 +0300 # by mkconf $Id$ "/mnt/etc/mdadm/mdadm.conf" 22L, 615C written |
#apt-get install nmap
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: nmap 0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded. Need to get 1072kB of archives. After this operation, 3801kB of additional disk space will be used. Get:1 http://127.0.0.1 sid/main nmap 4.68-1 [1072kB] Fetched 1072kB in 0s (3242kB/s) Selecting previously deselected package nmap. (Reading database ... 55492 files and directories currently installed.) Unpacking nmap (from .../archives/nmap_4.68-1_i386.deb) ... Processing triggers for man-db ... Setting up nmap (4.68-1) ... |
#nmap -p 22 '192.168.15.*' >& /dev/null
|
#arp -am
arp: invalid option -- 'm' Usage: arp [-vn] [<HW>] [-i <if>] [-a] [<hostname>] <-Display ARP cache arp [-v] [-i <if>] -d <host> [pub] <-Delete ARP entry arp [-vnD] [<HW>] [-i <if>] -f [<filename>] <-Add entry from file arp [-v] [<HW>] [-i <if>] -s <host> <hwaddr> [temp] <-Add entry arp [-v] [<HW>] [-i <if>] -Ds <host> <if> [netmask <nm>] pub <-''- -a display (all) hosts in alternative (BSD) style -s, --set set a new ARP entry -d, --delete delete a specified entry ... -D, --use-device read <hwaddr> from given device -A, -p, --protocol specify protocol family -f, --file read new entries from file or from /etc/ethers <HW>=Use '-H <hw>' to specify hardware address type. Default: ether List of possible hardware types (which support ARP): strip (Metricom Starmode IP) ash (Ash) ether (Ethernet) tr (16/4 Mbps Token Ring) tr (16/4 Mbps Token Ring (New)) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) rose (AMPR ROSE) arcnet (ARCnet) dlci (Frame Relay DLCI) fddi (Fiber Distributed Data Interface) hippi (HIPPI) irda (IrLAP) x25 (generic X.25) eui64 (Generic EUI-64) |
#arp -an
? (192.168.15.16) at 00:04:76:a1:f0:5d [ether] on eth0 ? (192.168.15.254) at 00:15:60:7a:63:80 [ether] on eth0 ? (192.168.15.5) at 00:0a:01:d4:d3:5a [ether] on eth0 ? (192.168.15.15) at 00:22:15:c8:4e:d2 [ether] on eth0 ? (192.168.15.9) at 00:1e:8c:64:2c:4a [ether] on eth0 ? (192.168.15.1) at 00:1b:fc:7d:bb:47 [ether] on eth0 ? (192.168.15.7) at 00:1b:fc:7d:b5:98 [ether] on eth0 ? (192.168.15.12) at 00:1b:fc:7d:bc:f0 [ether] on eth0 ? (192.168.15.11) at 00:1b:fc:7d:bc:f5 [ether] on eth0 ? (192.168.15.14) at 00:1b:fc:7d:bd:0e [ether] on eth0 ? (192.168.15.10) at 00:13:d4:b2:4f:e0 [ether] on eth0 ? (192.168.15.6) at 00:1b:fc:7d:b5:a7 [ether] on eth0 ? (192.168.15.253) at 00:1f:29:bc:3a:d8 [ether] on eth0 ? (192.168.15.8) at 00:1e:8c:64:2a:66 [ether] on eth0 ? (192.168.15.4) at 00:04:76:a0:a9:12 [ether] on eth0 ? (192.168.15.13) at 00:1b:fc:c1:52:e8 [ether] on eth0 ? (192.168.15.2) at 00:1e:8c:64:2a:64 [ether] on eth0 |
#arp -an | awk '{print $2" "$4}' | tr -d '()'
192.168.15.16 00:04:76:a1:f0:5d 192.168.15.254 00:15:60:7a:63:80 192.168.15.5 00:0a:01:d4:d3:5a 192.168.15.15 00:22:15:c8:4e:d2 192.168.15.9 00:1e:8c:64:2c:4a 192.168.15.1 00:1b:fc:7d:bb:47 192.168.15.7 00:1b:fc:7d:b5:98 192.168.15.12 00:1b:fc:7d:bc:f0 192.168.15.11 00:1b:fc:7d:bc:f5 192.168.15.14 00:1b:fc:7d:bd:0e 192.168.15.10 00:13:d4:b2:4f:e0 192.168.15.6 00:1b:fc:7d:b5:a7 192.168.15.253 00:1f:29:bc:3a:d8 192.168.15.8 00:1e:8c:64:2a:66 192.168.15.4 00:04:76:a0:a9:12 192.168.15.13 00:1b:fc:c1:52:e8 192.168.15.2 00:1e:8c:64:2a:64 |
#vi /mnt/etc/mdadm/mdadm.conf
--- /tmp/l3-saved-13262.20091.2106 2009-06-01 12:52:35.000000000 +0300 +++ /mnt/etc/mdadm/mdadm.conf 2009-06-01 12:54:09.000000000 +0300 @@ -6,6 +6,7 @@ # by default, scan all partitions (/proc/partitions) for MD superblocks. # alternatively, specify devices to scan, using wildcards if desired. DEVICE +ARRAY /dev/md1 devices=/dev/sdb2 # auto-create devices with Debian standard permissions CREATE owner=root group=disk mode=0660 auto=yes |
#qemu -hda /dev/md1
Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0" after 142 requests (141 known processed) with 0 events remaining. |
#~
# # The "id" field MUST be the same as the last # characters of the device (after "tty"). # # Format: # <id>:<runlevels>:<action>:<process> # # Note that on most Debian systems tty7 is used by the X Window System, # so if you want to add more getty's go ahead but skip tty7 if you run X. # 1:2345:respawn:/sbin/getty 38400 tty1 54,1 67% |
#apt-get install rcconf
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: rcconf 0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded. Need to get 23.1kB of archives. After this operation, 135kB of additional disk space will be used. Get:1 http://127.0.0.1 sid/main rcconf 2.2 [23.1kB] Fetched 23.1kB in 0s (86.0kB/s) Selecting previously deselected package rcconf. (Reading database ... 55562 files and directories currently installed.) Unpacking rcconf (from .../archives/rcconf_2.2_all.deb) ... Processing triggers for man-db ... Setting up rcconf (2.2) ... |
#vi /etc/X11/xorg.conf
--- /tmp/l3-saved-3110.23102.551 2009-06-01 14:48:03.000000000 +0300 +++ /etc/X11/xorg.conf 2009-06-01 14:49:46.000000000 +0300 @@ -0,0 +1,4 @@ +Section "Device" + Identifier "Generic video card" + Driver "vesa" +EndSection |
#dpkg-reconfigure console-cyrillic
|
#fdisk -l /dev/sda
Disk /dev/sda: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x12c36e6e Device Boot Start End Blocks Id System /dev/sda1 1 3648 29302528+ 83 Linux |
#fdisk -l /dev/sda
Disk /dev/sda: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x12c36e6e Device Boot Start End Blocks Id System /dev/sda1 1 3648 29302528+ 83 Linux |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 38913 312568672 83 Linux |
#fdisk -l /dev/sdb
Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xce5cf3c1 Device Boot Start End Blocks Id System /dev/sdb1 1 38913 312568672 83 Linux |
#cat /proc/sys/net/ipv4/ip_
ip_default_ttl ip_forward ip_nonlocal_bind ip_dynaddr ip_local_port_range ip_no_pmtu_disc |
#cat /proc/sys/net/ipv4/ip_
ip_default_ttl ip_forward ip_nonlocal_bind ip_dynaddr ip_local_port_range ip_no_pmtu_disc |
#vi /etc/sysctl.conf
--- /tmp/l3-saved-4119.6980.24312 2009-06-01 15:20:31.000000000 +0300 +++ /etc/sysctl.conf 2009-06-01 15:20:41.000000000 +0300 @@ -25,7 +25,7 @@ #net.ipv4.tcp_syncookies=1 # Uncomment the next line to enable packet forwarding for IPv4 -#net.ipv4.ip_forward=1 +net.ipv4.ip_forward=1 # Uncomment the next line to enable packet forwarding for IPv6 #net.ipv6.conf.all.forwarding=1 |
#whatis hping3
hping3 (8) - send (almost) arbitrary TCP/IP packets to network hosts |
#whatis hping3
hping3 (8) - send (almost) arbitrary TCP/IP packets to network hosts |
#hping3 --help
usage: hping3 host [options] -h --help show this help -v --version show version -c --count packet count -i --interval wait (uX for X microseconds, for example -i u1000) --fast alias for -i u10000 (10 packets for second) --faster alias for -i u1000 (100 packets for second) --flood sent packets as fast as possible. Don't show replies. -n --numeric numeric output -q --quiet quiet ... -j --dump dump packets in hex -J --print dump printable characters -B --safe enable 'safe' protocol -u --end tell you when --file reached EOF and prevent rewind -T --traceroute traceroute mode (implies --bind and --ttl 1) --tr-stop Exit when receive the first not ICMP in traceroute mode --tr-keep-ttl Keep the source TTL fixed, useful to monitor just one hop --tr-no-rtt Don't calculate/show RTT information in traceroute mode ARS packet description (new, unstable) --apd-send Send the packet described with APD (see docs/APD.txt) |
#hping3 --help
usage: hping3 host [options] -h --help show this help -v --version show version -c --count packet count -i --interval wait (uX for X microseconds, for example -i u1000) --fast alias for -i u10000 (10 packets for second) --faster alias for -i u1000 (100 packets for second) --flood sent packets as fast as possible. Don't show replies. -n --numeric numeric output -q --quiet quiet ... -j --dump dump packets in hex -J --print dump printable characters -B --safe enable 'safe' protocol -u --end tell you when --file reached EOF and prevent rewind -T --traceroute traceroute mode (implies --bind and --ttl 1) --tr-stop Exit when receive the first not ICMP in traceroute mode --tr-keep-ttl Keep the source TTL fixed, useful to monitor just one hop --tr-no-rtt Don't calculate/show RTT information in traceroute mode ARS packet description (new, unstable) --apd-send Send the packet described with APD (see docs/APD.txt) |
#hping3 crimea-board.info
HPING crimea-board.info (eth0 193.238.109.9): NO FLAGS are set, 40 headers + 0 data bytes ^C --- crimea-board.info hping statistic --- 184 packets transmitted, 0 packets received, 100% packet loss round-trip min/avg/max = 0.0/0.0/0.0 ms |
#hping3 crimea-board.info
HPING crimea-board.info (eth0 193.238.109.9): NO FLAGS are set, 40 headers + 0 data bytes ^C --- crimea-board.info hping statistic --- 184 packets transmitted, 0 packets received, 100% packet loss round-trip min/avg/max = 0.0/0.0/0.0 ms |
#apt-get install vlan
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: vlan 0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded. Need to get 39.6kB of archives. After this operation, 176kB of additional disk space will be used. Get:1 http://127.0.0.1 sid/main vlan 1.9-3 [39.6kB] Fetched 39.6kB in 0s (567kB/s) Selecting previously deselected package vlan. (Reading database ... 55397 files and directories currently installed.) Unpacking vlan (from .../archives/vlan_1.9-3_i386.deb) ... Processing triggers for man-db ... Setting up vlan (1.9-3) ... |
#apt-get install vlan
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: vlan 0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded. Need to get 39.6kB of archives. After this operation, 176kB of additional disk space will be used. Get:1 http://127.0.0.1 sid/main vlan 1.9-3 [39.6kB] Fetched 39.6kB in 0s (567kB/s) Selecting previously deselected package vlan. (Reading database ... 55397 files and directories currently installed.) Unpacking vlan (from .../archives/vlan_1.9-3_i386.deb) ... Processing triggers for man-db ... Setting up vlan (1.9-3) ... |
#vconfig
Expecting argc to be 3-5, inclusive. Was: 1 Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. * The vlan_id is the identifier (0-4095) of the VLAN you are operating on. * skb_priority is the priority in the socket buffer (sk_buff). * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#vconfig
Expecting argc to be 3-5, inclusive. Was: 1 Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. * The vlan_id is the identifier (0-4095) of the VLAN you are operating on. * skb_priority is the priority in the socket buffer (sk_buff). * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#vconfig eth0 102
WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS?? Unknown command -:eth0:- Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. ... * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#vconfig eth0 102
WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS?? Unknown command -:eth0:- Usage: add [interface-name] [vlan_id] rem [vlan-name] set_flag [interface-name] [flag-num] [0 | 1] set_egress_map [vlan-name] [skb_priority] [vlan_qos] set_ingress_map [vlan-name] [skb_priority] [vlan_qos] set_name_type [name-type] * The [interface-name] is the name of the ethernet card that hosts the VLAN you are talking about. ... * vlan_qos is the 3 bit priority in the VLAN header * name-type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5) * FLAGS: 1 REORDER_HDR When this is set, the VLAN device will move the ethernet header around to make it look exactly like a real ethernet device. This may help programs such as DHCPd which read the raw ethernet packet and make assumptions about the location of bytes. If you don't need it, don't turn it on, because there will be at least a small performance degradation. Default is OFF. |
#vconfig add eth0 102
WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS?? Added VLAN with VID == 102 to IF -:eth0:- |
#vconfig add eth0 102
WARNING: Could not open /proc/net/vlan/config. Maybe you need to load the 8021q module, or maybe you are not using PROCFS?? Added VLAN with VID == 102 to IF -:eth0:- |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:07:e9:3c:2c:ba inet addr:192.168.15.3 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::207:e9ff:fe3c:2cba/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:11659 errors:0 dropped:0 overruns:0 frame:0 TX packets:11128 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:7507516 (7.1 MiB) TX bytes:1440680 (1.3 MiB) eth0.102 Link encap:Ethernet HWaddr 00:07:e9:3c:2c:ba BROADCAST MULTICAST MTU:1500 Metric:1 ... collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:253 errors:0 dropped:0 overruns:0 frame:0 TX packets:253 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1329491 (1.2 MiB) TX bytes:1329491 (1.2 MiB) |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:07:e9:3c:2c:ba inet addr:192.168.15.3 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::207:e9ff:fe3c:2cba/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:11659 errors:0 dropped:0 overruns:0 frame:0 TX packets:11128 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:7507516 (7.1 MiB) TX bytes:1440680 (1.3 MiB) eth0.102 Link encap:Ethernet HWaddr 00:07:e9:3c:2c:ba BROADCAST MULTICAST MTU:1500 Metric:1 ... collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:253 errors:0 dropped:0 overruns:0 frame:0 TX packets:253 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1329491 (1.2 MiB) TX bytes:1329491 (1.2 MiB) |
#ip route
192.168.102.0/24 dev eth0.102 proto kernel scope link src 192.168.102.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.3 default via 192.168.15.254 dev eth0 |
#ip route
192.168.102.0/24 dev eth0.102 proto kernel scope link src 192.168.102.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.3 default via 192.168.15.254 dev eth0 |
#шз кip route
192.168.101.0/24 dev eth0.101 proto kernel scope link src 192.168.101.10 192.168.102.0/24 dev eth0.102 proto kernel scope link src 192.168.102.1 192.168.103.0/24 dev eth0.103 proto kernel scope link src 192.168.103.10 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.3 default via 192.168.15.254 dev eth0 |
#шз кip route
192.168.101.0/24 dev eth0.101 proto kernel scope link src 192.168.101.10 192.168.102.0/24 dev eth0.102 proto kernel scope link src 192.168.102.1 192.168.103.0/24 dev eth0.103 proto kernel scope link src 192.168.103.10 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.3 default via 192.168.15.254 dev eth0 |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:07:e9:3c:2c:ba inet addr:192.168.15.3 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::207:e9ff:fe3c:2cba/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:201 errors:0 dropped:0 overruns:0 frame:0 TX packets:203 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:24716 (24.1 KiB) TX bytes:18181 (17.7 KiB) 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) |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:07:e9:3c:2c:ba inet addr:192.168.15.3 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::207:e9ff:fe3c:2cba/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:201 errors:0 dropped:0 overruns:0 frame:0 TX packets:203 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:24716 (24.1 KiB) TX bytes:18181 (17.7 KiB) 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) |
#modprobe /lib/
firmware/ i686/ lsb/ oss-compat/ terminfo/ xtables/ i486-linux-gnu/ init/ modules/ security/ udev/ |
#modprobe /lib/modules/2.6.29-2-686/
build/ kernel/ source/ |
#modprobe /lib/
firmware/ i686/ lsb/ oss-compat/ terminfo/ xtables/ i486-linux-gnu/ init/ modules/ security/ udev/ |
#modprobe /lib/modules/2.6.29-2-686/
build/ kernel/ source/ |
#modprobe /lib/modules/2.6.29-2-686/kernel/net/
802/ atm/ can/ econet/ irda/ mac80211/ rfkill/ sctp/ wimax/ 8021q/ ax25/ core/ ipv4/ key/ netfilter/ rose/ sunrpc/ wireless/ 9p/ bluetooth/ dccp/ ipv6/ lapb/ netrom/ rxrpc/ tipc/ x25/ appletalk/ bridge/ decnet/ ipx/ llc/ phonet/ sched/ wanrouter/ xfrm/ |
#modprobe /lib/modules/2.6.29-2-686/kernel/net/
802/ atm/ can/ econet/ irda/ mac80211/ rfkill/ sctp/ wimax/ 8021q/ ax25/ core/ ipv4/ key/ netfilter/ rose/ sunrpc/ wireless/ 9p/ bluetooth/ dccp/ ipv6/ lapb/ netrom/ rxrpc/ tipc/ x25/ appletalk/ bridge/ decnet/ ipx/ llc/ phonet/ sched/ wanrouter/ xfrm/ |
#modprobe /lib/modules/2.6.29-2-686/kernel/net/8021q/8021q.ko
FATAL: Module /lib/modules/2.6.29_2_686/kernel/net/8021q/8021q.ko not found. |
#modprobe /lib/modules/2.6.29-2-686/kernel/net/8021q/8021q.ko
FATAL: Module /lib/modules/2.6.29_2_686/kernel/net/8021q/8021q.ko not found. |
#/etc/init.d/
anacron ifupdown-clean rc aoetools keyboard-setup rc.local atd keymap.sh rcS aumix killprocs reboot bootlogd lpd rmnologin bootmisc.sh lvm2 rsync checkfs.sh mdadm rsyslog checkroot.sh mdadm-raid screen-cleanup console-cyrillic module-init-tools sendsigs console-screen.kbd.sh monit single ... dbus mountdevsubfs.sh stop-bootlogd-single exim4 mountkernfs.sh sudo gdm mountnfs-bootclean.sh syslog-ng glibc.sh mountnfs.sh udev hal mountoverflowtmp udev-mtab halt mtab.sh umountfs hostname.sh networking umountnfs.sh hwclockfirst.sh openbsd-inetd umountroot hwclock.sh portmap urandom ifupdown procps x11-common |
#/etc/init.d/
anacron ifupdown-clean rc aoetools keyboard-setup rc.local atd keymap.sh rcS aumix killprocs reboot bootlogd lpd rmnologin bootmisc.sh lvm2 rsync checkfs.sh mdadm rsyslog checkroot.sh mdadm-raid screen-cleanup console-cyrillic module-init-tools sendsigs console-screen.kbd.sh monit single ... dbus mountdevsubfs.sh stop-bootlogd-single exim4 mountkernfs.sh sudo gdm mountnfs-bootclean.sh syslog-ng glibc.sh mountnfs.sh udev hal mountoverflowtmp udev-mtab halt mtab.sh umountfs hostname.sh networking umountnfs.sh hwclockfirst.sh openbsd-inetd umountroot hwclock.sh portmap urandom ifupdown procps x11-common |
#modprobe /lib/modules/2.6.29-2-686/kernel/net/8021q
FATAL: Module /lib/modules/2.6.29_2_686/kernel/net/8021q not found. |
#modprobe /lib/modules/2.6.29-2-686/kernel/net/8021q
FATAL: Module /lib/modules/2.6.29_2_686/kernel/net/8021q not found. |
#vi /etc/network/interfaces
--- /tmp/l3-saved-3518.16444.14357 2009-06-02 09:46:28.000000000 +0300 +++ /etc/network/interfaces 2009-06-02 09:48:54.000000000 +0300 @@ -11,4 +11,8 @@ broadcast 192.168.15.255 gateway 192.168.15.254 - +auto eth0.102 +iface eth0.102 inet static + address 192.168.102.1 + netmask 255.255.255.0 + vlan_raw_device eth0 |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:07:e9:3c:2c:ba inet addr:192.168.15.3 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::207:e9ff:fe3c:2cba/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:209 errors:0 dropped:0 overruns:0 frame:0 TX packets:205 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:22557 (22.0 KiB) TX bytes:17826 (17.4 KiB) eth0.102 Link encap:Ethernet HWaddr 00:07:e9:3c:2c:ba inet addr:192.168.102.1 Bcast:192.168.102.255 Mask:255.255.255.0 ... collisions:0 txqueuelen:0 RX bytes:782 (782.0 B) TX bytes:468 (468.0 B) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets: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) |
# mdadm.conf # # Please refer to mdadm.conf(5) for information about this file. # # by default, scan all partitions (/proc/partitions) for MD superblocks. # alternatively, specify devices to scan, using wildcards if desired. DEVICE partitions # auto-create devices with Debian standard permissions CREATE owner=root group=disk mode=0660 auto=yes # automatically tag new arrays as belonging to the local system HOMEHOST <system> # instruct the monitoring daemon where to send mail alerts MAILADDR root # definitions of existing MD arrays # This file was auto-generated on Sat, 30 May 2009 18:59:37 +0300 # by mkconf $Id$
ip_default_ttl ip_forward ip_nonlocal_bind ip_dynaddr ip_local_port_range ip_no_pmtu_disc
0
Время первой команды журнала | 11:26:54 2009- 6- 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:51:49 2009- 6- 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 12.87 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.41 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.70 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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