/l3/users/eb/2009/linux12/user :1 :2 :3 :4 |
|
#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 rem eth0.192
Removed VLAN -:eth0.192:- |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5858 errors:0 dropped:0 overruns:0 frame:0 TX packets:5080 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:1608209 (1.5 MiB) TX bytes:550875 (537.9 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:32 errors:0 dropped:0 overruns:0 frame:0 TX packets:32 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:41625 (40.6 KiB) TX bytes:41625 (40.6 KiB) |
#vconfig kolya 106
Unknown command -:kolya:- 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 kolya.106
Expecting argc to be 3-5, inclusive. Was: 2 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. |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5978 errors:0 dropped:0 overruns:0 frame:0 TX packets:5205 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:1621463 (1.5 MiB) TX bytes:570453 (557.0 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:32 errors:0 dropped:0 overruns:0 frame:0 TX packets:32 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:41625 (40.6 KiB) TX bytes:41625 (40.6 KiB) |
#vconfig eth0.106
Expecting argc to be 3-5, inclusive. Was: 2 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 kolya 106
ERROR: trying to add VLAN #106 to IF -:kolya:- error: No such device |
#vconfig add eth0 106
Added VLAN with VID == 106 to IF -:eth0:- |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6086 errors:0 dropped:0 overruns:0 frame:0 TX packets:5317 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:1633449 (1.5 MiB) TX bytes:587101 (573.3 KiB) eth0.106 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 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:32 errors:0 dropped:0 overruns:0 frame:0 TX packets:32 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:41625 (40.6 KiB) TX bytes:41625 (40.6 KiB) |
#vconfig rem eth0 106
ERROR: trying to remove VLAN -:eth0:- error: Invalid argument |
#vconfig rem eth0.106
Removed VLAN -:eth0.106:- |
#vconfig add eth0 106
Added VLAN with VID == 106 to IF -: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.616 ms 64 bytes from 192.168.15.254: icmp_seq=2 ttl=64 time=0.595 ms ^C --- 192.168.15.254 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.595/0.605/0.616/0.026 ms |
#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=2.36 ms 64 bytes from 192.168.15.254: icmp_seq=2 ttl=64 time=0.623 ms 64 bytes from 192.168.15.254: icmp_seq=3 ttl=64 time=0.614 ms ^C --- 192.168.15.254 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 0.614/1.199/2.362/0.822 ms |
#ping 192.168.15.254
PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data. From 192.168.15.12 icmp_seq=5 Destination Host Unreachable From 192.168.15.12 icmp_seq=6 Destination Host Unreachable From 192.168.15.12 icmp_seq=7 Destination Host Unreachable From 192.168.15.12 icmp_seq=9 Destination Host Unreachable From 192.168.15.12 icmp_seq=10 Destination Host Unreachable From 192.168.15.12 icmp_seq=11 Destination Host Unreachable From 192.168.15.12 icmp_seq=12 Destination Host Unreachable From 192.168.15.12 icmp_seq=13 Destination Host Unreachable From 192.168.15.12 icmp_seq=14 Destination Host Unreachable ... From 192.168.15.12 icmp_seq=35 Destination Host Unreachable From 192.168.15.12 icmp_seq=36 Destination Host Unreachable From 192.168.15.12 icmp_seq=37 Destination Host Unreachable From 192.168.15.12 icmp_seq=38 Destination Host Unreachable From 192.168.15.12 icmp_seq=39 Destination Host Unreachable From 192.168.15.12 icmp_seq=40 Destination Host Unreachable ^C --- 192.168.15.254 ping statistics --- 42 packets transmitted, 0 received, +34 errors, 100% packet loss, time 41231ms , pipe 3 |
#route change default 192.168.15.11
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) |
#route change default gw 192.168.15.11
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) |
#route change default gw 192.168.15.11
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) |
#netstat -rn
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#ip route --help
Command "--help" is unknown, try "ip route help". |
#ip --help
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } ip [ -force ] [-batch filename where OBJECT := { link | addr | addrlabel | route | rule | neigh | ntable | tunnel | maddr | mroute | monitor | xfrm } OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] | -f[amily] { inet | inet6 | ipx | dnet | link } | -o[neline] | -t[imestamp] } |
#route change 0.0.0.0/0 gw 192.168.15.11
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) |
#route add 0.0.0.0/0 gw 192.168.15.11
|
#ping 192.68.0.254
PING 192.68.0.254 (192.68.0.254) 56(84) bytes of data. ^C --- 192.68.0.254 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1007ms |
#ping 192.68.15.11
PING 192.68.15.11 (192.68.15.11) 56(84) bytes of data. From 192.168.15.12 icmp_seq=1 Destination Host Unreachable From 192.168.15.12 icmp_seq=2 Destination Host Unreachable From 192.168.15.12 icmp_seq=3 Destination Host Unreachable From 192.168.15.12 icmp_seq=4 Destination Host Unreachable From 192.168.15.12 icmp_seq=5 Destination Host Unreachable From 192.168.15.12 icmp_seq=6 Destination Host Unreachable From 192.168.15.12 icmp_seq=7 Destination Host Unreachable From 192.168.15.12 icmp_seq=8 Destination Host Unreachable From 192.168.15.12 icmp_seq=9 Destination Host Unreachable From 192.168.15.12 icmp_seq=11 Destination Host Unreachable From 192.168.15.12 icmp_seq=12 Destination Host Unreachable ^C --- 192.68.15.11 ping statistics --- 14 packets transmitted, 0 received, +11 errors, 100% packet loss, time 13071ms , pipe 3 |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6623 errors:0 dropped:0 overruns:0 frame:0 TX packets:5987 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:1699729 (1.6 MiB) TX bytes:643281 (628.2 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:110 errors:0 dropped:0 overruns:0 frame:0 TX packets:110 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:49833 (48.6 KiB) TX bytes:49833 (48.6 KiB) |
#vconfig add eth0 106
ERROR: trying to add VLAN #106 to IF -:eth0:- error: File exists |
#vconfig add eth0 106
ERROR: trying to add VLAN #106 to IF -:eth0:- error: File exists |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6626 errors:0 dropped:0 overruns:0 frame:0 TX packets:6007 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:1699909 (1.6 MiB) TX bytes:644481 (629.3 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:118 errors:0 dropped:0 overruns:0 frame:0 TX packets:118 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:50553 (49.3 KiB) TX bytes:50553 (49.3 KiB) |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6626 errors:0 dropped:0 overruns:0 frame:0 TX packets:6007 errors:0 dropped:0 overruns:0 carrier:2 collisions:0 txqueuelen:1000 RX bytes:1699909 (1.6 MiB) TX bytes:644481 (629.3 KiB) eth0.106 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 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:118 errors:0 dropped:0 overruns:0 frame:0 TX packets:118 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:50553 (49.3 KiB) TX bytes:50553 (49.3 KiB) |
#ifconfig eth0.106 192.168.106.2/24
|
#ping 192.168.106.1
PING 192.168.106.1 (192.168.106.1) 56(84) bytes of data. From 192.168.106.2 icmp_seq=2 Destination Host Unreachable From 192.168.106.2 icmp_seq=3 Destination Host Unreachable From 192.168.106.2 icmp_seq=4 Destination Host Unreachable From 192.168.106.2 icmp_seq=5 Destination Host Unreachable From 192.168.106.2 icmp_seq=6 Destination Host Unreachable From 192.168.106.2 icmp_seq=7 Destination Host Unreachable From 192.168.106.2 icmp_seq=8 Destination Host Unreachable From 192.168.106.2 icmp_seq=9 Destination Host Unreachable From 192.168.106.2 icmp_seq=10 Destination Host Unreachable ... From 192.168.106.2 icmp_seq=77 Destination Host Unreachable From 192.168.106.2 icmp_seq=78 Destination Host Unreachable From 192.168.106.2 icmp_seq=79 Destination Host Unreachable From 192.168.106.2 icmp_seq=81 Destination Host Unreachable From 192.168.106.2 icmp_seq=82 Destination Host Unreachable From 192.168.106.2 icmp_seq=85 Destination Host Unreachable ^C --- 192.168.106.1 ping statistics --- 88 packets transmitted, 0 received, +78 errors, 100% packet loss, time 87384ms , pipe 3 |
#netstta -rn
bash: netstta: command not found |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.15.11 255.255.255.255 UGH 0 0 0 eth0 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.106.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.106 0.0.0.0 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#route delete default
|
#route add default 192.168.106.1
SIOCADDRT: No such device |
#route add default 192.168.106.2
SIOCADDRT: No such device |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.15.11 255.255.255.255 UGH 0 0 0 eth0 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.106.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0.106 |
#route add default 192.168.106.1
SIOCADDRT: No such device |
#cat /proc/net/
anycast6 if_inet6 ip6_mr_vif mcfilter6 protocols route snmp6 tcp udplite arp igmp ip_mr_cache netfilter/ psched rt6_stats sockstat tcp6 udplite6 dev igmp6 ip_mr_vif netlink ptype rt_acct sockstat6 tr_rif unix dev_mcast ip6_flowlabel ipv6_route netstat raw rt_cache softnet_stat udp vlan/ dev_snmp6/ ip6_mr_cache mcfilter packet raw6 snmp stat/ udp6 wireless |
#cat /proc/net/ip
ip6_flowlabel ip6_mr_cache ip6_mr_vif ip_mr_cache ip_mr_vif ipv6_route |
#cat /proc/sys/net/ipv4/ip_
ip_default_ttl ip_dynaddr ip_forward ip_local_port_range ip_nonlocal_bind ip_no_pmtu_disc |
#cat /proc/sys/net/ipv4/ip_forward
0 |
#vconfig rem eth0
ERROR: trying to remove VLAN -:eth0:- error: Invalid argument |
#vconfig rem 106
ERROR: trying to remove VLAN -:106:- error: No such device |
#vconfig rem eth0.106
Removed VLAN -:eth0.106:- |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6697 errors:0 dropped:0 overruns:0 frame:0 TX packets:6114 errors:0 dropped:0 overruns:0 carrier:6 collisions:0 txqueuelen:1000 RX bytes:1704739 (1.6 MiB) TX bytes:651033 (635.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:246 errors:0 dropped:0 overruns:0 frame:0 TX packets:246 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:63969 (62.4 KiB) TX bytes:63969 (62.4 KiB) |
#ifconfig eth0 down
|
#ifconfig eth0 192.168.106.2/24 gw 192.168.106.1
gw: Host name lookup failure ifconfig: `--help' gives usage information. |
#ifconfig eth0 192.168.106.2/24 gw 192.168.106.1 up
gw: Host name lookup failure ifconfig: `--help' gives usage information. |
#ifconfig eth0 192.168.106.2/24 up
|
#route add default 192.168.106.2
SIOCADDRT: No such device |
#route add default gw 192.168.106.1
|
#ping 192.168.106.1
PING 192.168.106.1 (192.168.106.1) 56(84) bytes of data. 64 bytes from 192.168.106.1: icmp_seq=1 ttl=64 time=0.234 ms ^C --- 192.168.106.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.234/0.234/0.234/0.000 ms |
#ping 192.168.106.15
PING 192.168.106.15 (192.168.106.15) 56(84) bytes of data. ^C --- 192.168.106.15 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1006ms |
#ping 192.168.15.11
PING 192.168.15.11 (192.168.15.11) 56(84) bytes of data. 64 bytes from 192.168.15.11: icmp_seq=1 ttl=64 time=0.226 ms 64 bytes from 192.168.15.11: icmp_seq=2 ttl=64 time=0.218 ms 64 bytes from 192.168.15.11: icmp_seq=3 ttl=64 time=0.219 ms 64 bytes from 192.168.15.11: icmp_seq=4 ttl=64 time=0.222 ms 64 bytes from 192.168.15.11: icmp_seq=5 ttl=64 time=0.222 ms ^C --- 192.168.15.11 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3997ms rtt min/avg/max/mdev = 0.218/0.221/0.226/0.013 ms |
#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=63 time=0.731 ms 64 bytes from 192.168.15.254: icmp_seq=2 ttl=63 time=0.709 ms 64 bytes from 192.168.15.254: icmp_seq=3 ttl=63 time=0.716 ms 64 bytes from 192.168.15.254: icmp_seq=4 ttl=63 time=0.712 ms 64 bytes from 192.168.15.254: icmp_seq=5 ttl=63 time=1.04 ms ^C --- 192.168.15.254 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4000ms rtt min/avg/max/mdev = 0.709/0.781/1.041/0.134 ms |
#ping 192.168.102.1
PING 192.168.102.1 (192.168.102.1) 56(84) bytes of data. 64 bytes from 192.168.102.1: icmp_seq=1 ttl=62 time=2.03 ms 64 bytes from 192.168.102.1: icmp_seq=2 ttl=62 time=0.314 ms ^C --- 192.168.102.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.314/1.176/2.038/0.862 ms |
#ping 192.168.102.2
PING 192.168.102.2 (192.168.102.2) 56(84) bytes of data. 64 bytes from 192.168.102.2: icmp_seq=1 ttl=61 time=0.531 ms 64 bytes from 192.168.102.2: icmp_seq=2 ttl=61 time=0.519 ms ^C --- 192.168.102.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.519/0.525/0.531/0.006 ms |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. ^C --- ya.ru ping statistics --- 128 packets transmitted, 0 received, 100% packet loss, time 128008ms |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. 64 bytes from ya.ru (213.180.204.8): icmp_seq=1 ttl=53 time=43.3 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=2 ttl=53 time=31.8 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=3 ttl=53 time=32.5 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=4 ttl=53 time=36.2 ms ^C --- ya.ru ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 31.888/35.987/43.310/4.549 ms |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. 64 bytes from ya.ru (213.180.204.8): icmp_seq=1 ttl=53 time=33.1 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=2 ttl=53 time=32.5 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=3 ttl=53 time=33.2 ms ^C --- ya.ru ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 32.579/32.991/33.226/0.360 ms |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. \64 bytes from ya.ru (213.180.204.8): icmp_seq=1 ttl=53 time=33.3 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=2 ttl=53 time=31.9 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=3 ttl=53 time=30.5 ms ^C --- ya.ru ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 30.567/31.960/33.359/1.149 ms |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. 64 bytes from ya.ru (213.180.204.8): icmp_seq=1 ttl=53 time=34.4 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=2 ttl=53 time=30.8 ms ^C --- ya.ru ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 30.826/32.653/34.481/1.836 ms |
#init 0
|
0
Время первой команды журнала | 16:42:02 2009- 6- 1 | |||||||||||||||||||||||||||
Время последней команды журнала | 17:29:35 2009- 6- 1 | |||||||||||||||||||||||||||
Количество командных строк в журнале | 66 | |||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 40.91 | |||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.52 | |||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.79 | |||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.39 | |||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008