/l3/users/eb/2009/linux1/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 |
|
#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 add eth0 vlan 101
ERROR: trying to add VLAN #0 to IF -:eth0:- error: File exists |
#ssh root@10.0.35.100
root@10.0.35.100's password: Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Mon Jun 1 17:11:52 2009 from linux6.unix.nt l3-agent is already running: pid=1765; pidfile=/root/.lilalo/l3-agent.pid |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bb:47 inet addr:192.168.15.1 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bb47/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6418 errors:0 dropped:0 overruns:0 frame:0 TX packets:4156 errors:0 dropped:0 overruns:0 carrier:6 collisions:0 txqueuelen:1000 RX bytes:2593746 (2.4 MiB) TX bytes:302685 (295.5 KiB) eth0.0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bb:47 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: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 eth0.101 192.168.101.1 netmask 255.255.255.0
|
#ip route
192.168.101.0/24 dev eth0.101 proto kernel scope link src 192.168.101.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.1 default via 192.168.15.254 dev eth0 |
#history
353 fdisk -lu /devsda 354 fdisk -lu /dev/sda 355 fdisk -lu /dev/sdb 356 apt-get install mkisofs 357 apt-get install dvd+rw-tools 358 mount -o loop /root/etc.iso /mnt 359 ls -l /dev/loop1 360 ls -l /dev/loop2 361 mdadm 362 ndadm -C --help | less ... 492 vlan 493 vlan help 494 vconfig 495* 496 ping 192.168.15.254 497 vconfig add eth0 101 498 ifconfig -a 499 ifconfig eth0.101 192.168.101.1 netmask 255.255.255.0 500 ip route 501 history |
#da
bash: da: команда не найдена |
#ssh root@10.0.35.100
ssh: connect to host 10.0.35.100 port 22: Connection refused |
#ssh root@192.168.15.254
The authenticity of host '192.168.15.254 (192.168.15.254)' can't be established. RSA key fingerprint is 7e:ed:6a:01:cb:0b:a2:37:07:c5:64:c0:e0:23:f1:e4. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.254' (RSA) to the list of known hosts. We'd like to keep you up to date about: * Software feature updates * New product announcements * Special events Please register your products now at: www.ProCurve.com root@192.168.15.254's password: Received disconnect from 192.168.15.254: 2: Sorry, the maximum number of sessions are active. Try again later. |
#ssh 192.168.15.254
We'd like to keep you up to date about: * Software feature updates * New product announcements * Special events Please register your products now at: www.ProCurve.com root@192.168.15.254's password: Received disconnect from 192.168.15.254: 2: Sorry, the maximum number of sessions are active. Try again later. |
#ssh 192.168.15.254
We'd like to keep you up to date about: * Software feature updates * New product announcements * Special events Please register your products now at: www.ProCurve.com root@192.168.15.254's password: Received disconnect from 192.168.15.254: 2: Sorry, the maximum number of sessions are active. Try again later. |
#ip route
192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.1 default via 192.168.15.254 dev eth0 |
#vconfig eth0 101
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
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 101
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 101
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 == 101 to IF -:eth0:- |
#ifconfi -a
bash: ifconfi: команда не найдена |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bb:47 inet addr:192.168.15.1 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bb47/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4372 errors:0 dropped:0 overruns:0 frame:0 TX packets:3867 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:4360597 (4.1 MiB) TX bytes:433388 (423.2 KiB) eth0.101 Link encap:Ethernet HWaddr 00:1b:fc:7d:bb:47 BROADCAST MULTICAST MTU:1500 Metric:1 ... collisions:0 txqueuelen:0 RX bytes:276 (276.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: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 eth0.101 192.168.101.1 netmask 255.255.255.0
|
#ip route
192.168.101.0/24 dev eth0.101 proto kernel scope link src 192.168.101.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.1 default via 192.168.15.254 dev eth0 |
#echo 1 > /proc/sys/net/ipv4/ip_forward
|
#ip route
192.168.101.0/24 dev eth0.101 proto kernel scope link src 192.168.101.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.1 default via 192.168.15.254 dev eth0 |
#vi /etc/sysctl.conf
|
# 41 +q436f+q6b75+q6b64+q6b72+q6b6c+q2332+q2334+q2569+q2a37+q6b31
48 #net.ipv4.conf.all.accept_redirects = 0 49 #net.ipv6.conf.all.accept_redirects = 0 50 # _or_ 51 # Accept ICMP redirects only for gateways listed in our default 52 # gateway list (enabled by default) 53 # net.ipv4.conf.all.secure_redirects = 1 54 # 55 # Do not send ICMP redirects (we are not a router) 56 #net.ipv4.conf.all.send_redirects = 0 57 # 58 # Do not accept IP source route packets (we are not a router) 59 #net.ipv4.conf.all.accept_source_route = 0 60 #net.ipv6.conf.all.accept_source_route = 0 61 # 62 # Log Martian Packets 63 #net.ipv4.conf.all.log_martians = 1 64 # 65 # The contents of /proc/<pid>/maps and smaps files are only visible to 66 # readers that are allowed to ptrace() the process 67 # kernel.maps_protect = 1 "/etc/sysctl.conf" 67L, 2274C записано |
#ping 192.168.15.102
PING 192.168.15.102 (192.168.15.102) 56(84) bytes of data. From 192.168.15.1 icmp_seq=1 Destination Host Unreachable From 192.168.15.1 icmp_seq=2 Destination Host Unreachable From 192.168.15.1 icmp_seq=3 Destination Host Unreachable From 192.168.15.1 icmp_seq=4 Destination Host Unreachable From 192.168.15.1 icmp_seq=5 Destination Host Unreachable From 192.168.15.1 icmp_seq=6 Destination Host Unreachable ^C --- 192.168.15.102 ping statistics --- 7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6030ms , pipe 3 |
#ping 192.168.101.2
PING 192.168.101.2 (192.168.101.2) 56(84) bytes of data. 64 bytes from 192.168.101.2: icmp_seq=1 ttl=64 time=0.229 ms 64 bytes from 192.168.101.2: icmp_seq=2 ttl=64 time=0.221 ms 64 bytes from 192.168.101.2: icmp_seq=3 ttl=64 time=0.222 ms 64 bytes from 192.168.101.2: icmp_seq=4 ttl=64 time=0.222 ms ^C --- 192.168.101.2 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 2998ms rtt min/avg/max/mdev = 0.221/0.223/0.229/0.015 ms |
#ping 192.168.101.3
PING 192.168.101.3 (192.168.101.3) 56(84) bytes of data. ^C --- 192.168.101.3 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1008ms |
#ip route
192.168.101.0/24 dev eth0.101 proto kernel scope link src 192.168.101.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.1 default via 192.168.15.254 dev eth0 |
#ping 192.168.15.254
PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data. 64 bytes from 192.168.15.254: icmp_seq=1 ttl=64 time=0.656 ms 64 bytes from 192.168.15.254: icmp_seq=2 ttl=64 time=0.642 ms 64 bytes from 192.168.15.254: icmp_seq=3 ttl=64 time=0.651 ms 64 bytes from 192.168.15.254: icmp_seq=4 ttl=64 time=0.648 ms 64 bytes from 192.168.15.254: icmp_seq=5 ttl=64 time=0.643 ms 64 bytes from 192.168.15.254: icmp_seq=6 ttl=64 time=0.650 ms 64 bytes from 192.168.15.254: icmp_seq=7 ttl=64 time=0.621 ms 64 bytes from 192.168.15.254: icmp_seq=8 ttl=64 time=0.656 ms 64 bytes from 192.168.15.254: icmp_seq=9 ttl=64 time=0.699 ms ^C --- 192.168.15.254 ping statistics --- 9 packets transmitted, 9 received, 0% packet loss, time 8000ms rtt min/avg/max/mdev = 0.621/0.651/0.699/0.037 ms |
#ip route
192.168.101.0/24 dev eth0.101 proto kernel scope link src 192.168.101.1 192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.1 default via 192.168.15.254 dev eth0 |
#vi /etc/sysctl.conf
|
#ssh root@192.168.101.2
The authenticity of host '192.168.101.2 (192.168.101.2)' can't be established. RSA key fingerprint is 34:6c:c2:da:38:7c:d7:17:e9:cd:17:8d:e7:cf:f1:a6. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.101.2' (RSA) to the list of known hosts. root@192.168.101.2's password: Linux linux2 2.6.29-2-686 #1 SMP Sun May 17 17:56:29 UTC 2009 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Mon Jun 1 13:55:29 2009 from linux14.unix.nt |
#dpkg -l | grep tcpdump
ii tcpdump 4.0.0-2 A powerful tool for network monitoring and data acquisition |
#tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel |
#tcpdump -i eth0.101 -n
10:14:59.620254 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 31488:31696, ack 1, win 215, options [nop,nop,TS val 617018 ecr 810009], length 208 10:14:59.620299 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 31696:31904, ack 1, win 215, options [nop,nop,TS val 617018 ecr 810009], length 208 10:14:59.620306 IP 192.168.101.2.37622 > 192.168.101.1.22: Flags [.], ack 30720, win 1002, options [nop,nop,TS val 810009 ecr 617018], length 0 10:14:59.620365 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 31904:32256, ack 1, win 215, options [nop,nop,TS val 617018 ecr 810009], length 352 10:14:59.620410 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 32256:32464, ack 1, win 215, options [nop,nop,TS val 617018 ecr 810009], length 208 10:14:59.620454 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 32464:32672, ack 1, win 215, options [nop,nop,TS val 617018 ecr 810009], length 208 10:14:59.620499 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 32672:32880, ack 1, win 215, options [nop,nop,TS val 617018 ecr 810009], length 208 10:14:59.620509 IP 192.168.101.2.37622 > 192.168.101.1.22: Flags [.], ack 31696, win 1002, options [nop,nop,TS val 810009 ecr 617018], length 0 10:14:59.620564 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 32880:33232, ack 1, win 215, options [nop,nop,TS val 617018 ecr 810009], length 352 10:14:59.620609 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 33232:33440, ack 1, win 215, options [nop,nop,TS val 617018 ecr 810009], length 208 ... 10:14:59.634696 IP 192.168.101.2.37622 > 192.168.101.1.22: Flags [.], ack 57344, win 1002, options [nop,nop,TS val 810013 ecr 617021], length 0 10:14:59.634749 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 58736:59088, ack 1, win 215, options [nop,nop,TS val 617021 ecr 810013], length 352 10:14:59.634795 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 59088:59296, ack 1, win 215, options [nop,nop,TS val 617021 ecr 810013], length 208 10:14:59.634842 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 59296:59504, ack 1, win 215, options [nop,nop,TS val 617021 ecr 810013], length 208 10:14:59.634892 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 59504:59712, ack 1, win 215, options [nop,nop,TS val 617022 ecr 810013], length 208 10:14:59.634942 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 59712:59920, ack 1, win 215, options [nop,nop,TS val 617022 ecr 810013], length 208 10:14:59.634987 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 59920:60128, ack 1, win 215, options [nop,nop,TS val 617022 ecr 810013], length 208 10:14:59.635034 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 60128:60336, ack 1, win 215, options [nop,nop,TS val 617022 ecr 810013], length 208 10:14:59.635082 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 60336:60544, ack 1, win 215, options [nop,nop,TS val 617022 ecr 810013], length 208 10:14:59.635108 IP 192.168.101.2.37622 > 192.168.101.1.22: Flags [.], ack 59296, win 1002, options [nop,nop,TS val 810013 ecr 617021], length 0 |
#tcpdump -i eth0.101 -n not port 22
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0.101, link-type EN10MB (Ethernet), capture size 96 bytes ^C 0 packets captured 0 packets received by filter 0 packets dropped by kernel |
#mii-tool
eth0: negotiated 1000baseT-FD flow-control, link ok |
#mii-tool --help
usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...] -V, --version display version information -v, --verbose more verbose output -R, --reset reset MII to poweron state -r, --restart restart autonegotiation -w, --watch monitor for link status changes -l, --log with -w, write events to syslog -A, --advertise=media,... advertise only specified media -F, --force=media force specified media technology media: 1000baseTx-HD, 1000baseTx-FD, 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, (to advertise both HD and FD) 1000baseTx, 100baseTx, 10baseT |
#mii-tool -F 100baseTx-FD
|
#mii-tool eth0.101
eth0.101: negotiated 1000baseT-FD flow-control, link ok |
#mii-tool --forse=100baseTx-FD
mii-tool: unrecognized option '--forse=100baseTx-FD' usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...] -V, --version display version information -v, --verbose more verbose output -R, --reset reset MII to poweron state -r, --restart restart autonegotiation -w, --watch monitor for link status changes -l, --log with -w, write events to syslog -A, --advertise=media,... advertise only specified media -F, --force=media force specified media technology media: 1000baseTx-HD, 1000baseTx-FD, 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, (to advertise both HD and FD) 1000baseTx, 100baseTx, 10baseT |
#mii-tool eth0.101 10baseT-HD
eth0.101: negotiated 1000baseT-FD flow-control, link ok SIOCGMIIPHY on '10baseT-HD' failed: No such device |
#mii-tool eth0.101
eth0.101: negotiated 1000baseT-FD flow-control, link ok |
#mii-tool eth0.101 100baseTx-FD
eth0.101: negotiated 1000baseT-FD flow-control, link ok SIOCGMIIPHY on '100baseTx-FD' failed: No such device |
#mii-tool eth0.101
eth0.101: negotiated 1000baseT-FD flow-control, link ok |
#mii-tool eth0.101 100baseT-FD
eth0.101: negotiated 1000baseT-FD flow-control, link ok SIOCGMIIPHY on '100baseT-FD' failed: No such device |
#mii-tool eth0.101 10baseT-FD
eth0.101: negotiated 1000baseT-FD flow-control, link ok SIOCGMIIPHY on '10baseT-FD' failed: No such device |
#mii-tool eth0.101 10baseT-HD
eth0.101: negotiated 1000baseT-FD flow-control, link ok SIOCGMIIPHY on '10baseT-HD' failed: No such device |
#mii-tool -f eth0.101 10baseT-HD
mii-tool: invalid option -- 'f' usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...] -V, --version display version information -v, --verbose more verbose output -R, --reset reset MII to poweron state -r, --restart restart autonegotiation -w, --watch monitor for link status changes -l, --log with -w, write events to syslog -A, --advertise=media,... advertise only specified media -F, --force=media force specified media technology media: 1000baseTx-HD, 1000baseTx-FD, 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, (to advertise both HD and FD) 1000baseTx, 100baseTx, 10baseT |
#mii-tool -f eth0 10baseT-HD
mii-tool: invalid option -- 'f' usage: mii-tool [-VvRrwl] [-A media,... | -F media] [interface ...] -V, --version display version information -v, --verbose more verbose output -R, --reset reset MII to poweron state -r, --restart restart autonegotiation -w, --watch monitor for link status changes -l, --log with -w, write events to syslog -A, --advertise=media,... advertise only specified media -F, --force=media force specified media technology media: 1000baseTx-HD, 1000baseTx-FD, 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD, (to advertise both HD and FD) 1000baseTx, 100baseTx, 10baseT |
#mii-tool -F eth0 10baseT-HD
Invalid media specification 'eth0'. |
#mii-tool -F eth0.101 10baseT-HD
Invalid media specification 'eth0.101'. |
#mii-tool eth0.101
eth0.101: negotiated 1000baseT-FD flow-control, link ok |
#mii-tool -F eth0.101 100baseTx-FD
Invalid media specification 'eth0.101'. |
#mii-diag
bash: mii-diag: команда не найдена |
#apt-get install mii-diag
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Предлагаемые пакеты: nictools-pci nictools-nopci НОВЫЕ пакеты, которые будут установлены: mii-diag обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 25 пакетов не обновлено. Необходимо скачать 19,0kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 57,3kB. Получено:1 http://10.0.35.1 sid/main mii-diag 2.11-2 [19,0kB] Получено 19,0kБ за 0s (1845kБ/c) Выбор ранее не выбранного пакета mii-diag. (Чтение базы данных ... на данный момент установлено 54575 файлов и каталогов.) Распаковывается пакет mii-diag (из файла .../mii-diag_2.11-2_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет mii-diag (2.11-2) ... |
#mii-diag eth0.101
Basic registers of MII PHY #0: 1000 796d 004d d015 0de1 c1e1 000d 2801. The autonegotiated capability is 01e0. The autonegotiated media type is 100baseTx-FD. Basic mode control register 0x1000: Auto-negotiation enabled. You have link beat, and everything is working OK. Your link partner advertised c1e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT. End of basic transceiver information. |
#mii-diag --help
Usage: mii-diag [-aDfrRvVw] [-AF <speed+duplex>] [--watch] <interface>. This program configures and monitors the transceiver management registers for network interfaces. It uses the Media Independent Interface (MII) standard with additional Linux-specific controls to communicate with the underlying device driver. The MII registers control and report network link settings and errors. Examples are link speed, duplex, capabilities advertised to the link partner, status LED indications and link error counters. The common usage is mii-diag eth0 ... -M --msg-level LEVEL Set the driver message bit map. -p --phy ADDR Set the PHY (MII address) to report. -r --restart Restart the link autonegotiation. -R --reset Reset the transceiver. -v --verbose Report each action taken. -V --version Emit version information. -w --watch Continuously monitor the transceiver and report changes. This command returns success (zero) if the interface information can be read. If the --status option is passed, a zero return means that the interface has link beat. |
#mii-diag -F eth0.101 100baseTx-FD
Invalid media advertisement value 'eth0.101'. Either pass a numeric value or one of the following names: 100baseT4 200 100baseTx 180 100baseTx-FD 100 100baseTx-HD 080 10baseT 060 10baseT-FD 040 10baseT-HD 020 Usage: mii-diag [--help] [-aDfrRvVw] [-AF <speed+duplex>] [--watch] <interface>. |
#mii-diag -F eth0 100baseTx-FD
Invalid media advertisement value 'eth0'. Either pass a numeric value or one of the following names: 100baseT4 200 100baseTx 180 100baseTx-FD 100 100baseTx-HD 080 10baseT 060 10baseT-FD 040 10baseT-HD 020 Usage: mii-diag [--help] [-aDfrRvVw] [-AF <speed+duplex>] [--watch] <interface>. |
#modinfo
Usage: modinfo [-0][-F field][-k kernelversion][-b basedir] module... Prints out the information about one or more module(s). If a fieldname is given, just print out that field (or nothing if not found). Otherwise, print all information out in a readable form If -0 is given, separate with nul, not newline. If -b is given, use an image of the module tree. |
#lsmod
Module Size Used by 8021q 17716 0 garp 7040 1 8021q stp 2092 1 garp i915 130336 2 drm 133296 3 i915 i2c_algo_bit 4888 1 i915 ipv6 232468 16 vfat 8672 0 fat 41688 1 vfat ... ide_core 91812 3 ide_cd_mod,ide_pci_generic,jmicron atl1 26892 0 mii 4648 1 atl1 intel_agp 22548 1 usbcore 124912 3 uhci_hcd,ehci_hcd agpgart 30624 3 drm,intel_agp thermal 15092 0 processor 39540 1 thermal fan 4104 0 thermal_sys 10272 3 thermal,processor,fan |
#lspci
00:00.0 Host bridge: Intel Corporation 82P965/G965 Memory Controller Hub (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82G965 Integrated Graphics Controller (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2) 00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02) 00:1f.5 IDE interface: Intel Corporation 82801H (ICH8 Family) 2 port SATA IDE Controller (rev 02) 01:00.0 IDE interface: JMicron Technologies, Inc. JMB368 IDE controller 02:00.0 Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0) |
#lspci
00:00.0 Host bridge: Intel Corporation 82P965/G965 Memory Controller Hub (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82G965 Integrated Graphics Controller (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2) 00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02) 00:1f.5 IDE interface: Intel Corporation 82801H (ICH8 Family) 2 port SATA IDE Controller (rev 02) 01:00.0 IDE interface: JMicron Technologies, Inc. JMB368 IDE controller 02:00.0 Ethernet controller: Attansic Technology Corp. L1 Gigabit Ethernet Adapter (rev b0) |
#find /sys -name \*02:00.0\*
/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0 /sys/bus/pci/devices/0000:02:00.0 /sys/bus/pci/drivers/atl1/0000:02:00.0 |
#modinfo atl1
filename: /lib/modules/2.6.29-2-686/kernel/drivers/net/atlx/atl1.ko description: Atheros L1 Gigabit Ethernet Driver version: 2.1.3 license: GPL author: Xiong Huang <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com> srcversion: D6016237A6BE3B49B78E322 alias: pci:v00001969d00001048sv*sd*bc*sc*i* depends: mii vermagic: 2.6.29-2-686 SMP mod_unload modversions 686 parm: int_mod_timer:Interrupt moderator timer (array of int) parm: debug:Message level (0=none,...,16=all) (int) |
#find /sys -name \*02:00.0\* | grep driver
/sys/bus/pci/drivers/atl1/0000:02:00.0 |
#find /sys -name \*02:00.0\* | grep driver
/sys/bus/pci/drivers/atl1/0000:02:00.0 |
#modinfo atl1
filename: /lib/modules/2.6.29-2-686/kernel/drivers/net/atlx/atl1.ko description: Atheros L1 Gigabit Ethernet Driver version: 2.1.3 license: GPL author: Xiong Huang <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com> srcversion: D6016237A6BE3B49B78E322 alias: pci:v00001969d00001048sv*sd*bc*sc*i* depends: mii vermagic: 2.6.29-2-686 SMP mod_unload modversions 686 parm: int_mod_timer:Interrupt moderator timer (array of int) parm: debug:Message level (0=none,...,16=all) (int) |
#modinfo mii
filename: /lib/modules/2.6.29-2-686/kernel/drivers/net/mii.ko license: GPL description: MII hardware support library author: Jeff Garzik <jgarzik@pobox.com> depends: vermagic: 2.6.29-2-686 SMP mod_unload modversions 686 |
#apt-cache search ethtool
ethtool - display or change Ethernet device settings ifplugd - configuration daemon for ethernet devices |
#modinfo atl1
filename: /lib/modules/2.6.29-2-686/kernel/drivers/net/atlx/atl1.ko description: Atheros L1 Gigabit Ethernet Driver version: 2.1.3 license: GPL author: Xiong Huang <xiong.huang@atheros.com>, Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com> srcversion: D6016237A6BE3B49B78E322 alias: pci:v00001969d00001048sv*sd*bc*sc*i* depends: mii vermagic: 2.6.29-2-686 SMP mod_unload modversions 686 parm: int_mod_timer:Interrupt moderator timer (array of int) parm: debug:Message level (0=none,...,16=all) (int) |
#eth-tool
bash: eth-tool: команда не найдена |
#apt-get install eth-tools
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово E: Не удалось найти пакет eth-tools |
#apt-get install ethtool
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово НОВЫЕ пакеты, которые будут установлены: ethtool обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 25 пакетов не обновлено. Необходимо скачать 68,4kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 262kB. Получено:1 http://10.0.35.1 sid/main ethtool 6+20090307-1 [68,4kB] Получено 68,4kБ за 0s (0Б/c) Выбор ранее не выбранного пакета ethtool. (Чтение базы данных ... на данный момент установлено 54580 файлов и каталогов.) Распаковывается пакет ethtool (из файла .../ethtool_6+20090307-1_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет ethtool (6+20090307-1) ... |
#apt-get install ethtool
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Уже установлена самая новая версия ethtool. обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 25 пакетов не обновлено. |
#ethtool
ethtool: bad command line argument(s) For more information run ethtool -h |
#ethtool -h
ethtool version 6git Usage: ethtool DEVNAME Display standard information about device ethtool -s|--change DEVNAME Change generic options [ speed %%d ] [ duplex half|full ] [ port tp|aui|bnc|mii|fibre ] [ autoneg on|off ] [ advertise %%x ] [ phyad %%d ] ... ethtool -p|--identify DEVNAME Show visible port identification (e.g. blinking) [ TIME-IN-SECONDS ] ethtool -t|--test DEVNAME Execute adapter self test [ online | offline ] ethtool -S|--statistics DEVNAME Show adapter statistics ethtool -n|--show-nfc DEVNAME Show Rx network flow classificationoptions [ rx-flow-hash tcp4|udp4|ah4|sctp4|tcp6|udp6|ah6|sctp6 ] ethtool -N|--config-nfc DEVNAME Configure Rx network flow classification options [ rx-flow-hash tcp4|udp4|ah4|sctp4|tcp6|udp6|ah6|sctp6 p|m|v|t|s|d|f|n|r... ] ethtool -h|--help DEVNAME Show this help |
#ethtool -h | less
|
#ethtool -s eth0 speed 100d duplex half
|
#mii-tool eth0
eth0: negotiated 1000baseT-FD flow-control, link ok |
#ping -f 192.168.15.254
PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data. |
#ssh root@10.0.35.100
root@10.0.35.100's password: Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Jun 2 10:44:54 2009 from linux7.unix.nt l3-agent is already running: pid=1765; pidfile=/root/.lilalo/l3-agent.pid |
#ping -s 1024 -f 192.168.15.254
PING 192.168.15.254 (192.168.15.254) 1024(1052) bytes of data. |
#ping -s 1024 -f 10.0.35.100
PING 10.0.35.100 (10.0.35.100) 1024(1052) bytes of data. |
Время первой команды журнала | 16:43:25 2009- 6- 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:49:52 2009- 6- 2 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 31.68 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 5.94 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.05 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.82 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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