/l3/trainings/nt-lnet/2006-02-18/linux5.unix.nt/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:97 inet addr:192.168.16.193 Bcast:192.168.16.192 Mask:255.255.255.192 inet6 addr: fe80::201:2ff:feb4:6197/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:134 errors:0 dropped:0 overruns:1 frame:0 TX packets:108 errors:0 dropped:0 overruns:0 carrier:1 collisions:0 txqueuelen:1000 RX bytes:13036 (12.7 Kb) TX bytes:37947 (37.0 Kb) Interrupt:11 Base address:0xa000 eth1 Link encap:Ethernet HWaddr 00:04:76:A1:EF:BB ... RX bytes:9271 (9.0 Kb) TX bytes:828 (828.0 b) Interrupt:5 Base address:0xc000 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:4475 errors:0 dropped:0 overruns:0 frame:0 TX packets:4475 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6274964 (5.9 Mb) TX bytes:6274964 (5.9 Mb) |
#ping -A 192.168.16.193 192.168.16.131
![]() PING 192.168.16.131 (192.168.16.131) 56(124) bytes of data. --- 192.168.16.131 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2007ms , ipg/ewma 1003.851/0.000 ms |
#mii-tool
![]() |
#mii-tool
eth0: no link eth1: no link |
#mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok eth1: no link |
#ifconfig eth0 192.168.16.194/26
![]() Usage: ifconfig [-a] [-i] [-v] [-s] <interface> [[<AF>] <address>] [add <address>[/<prefixlen>]] [del <address>[/<prefixlen>]] [[-]broadcast [<address>]] [[-]pointopoint [<address>]] [netmask <address>] [dstaddr <address>] [tunnel <address>] [outfill <NN>] [keepalive <NN>] [hw <HW> <address>] [metric <NN>] [mtu <NN>] [[-]trailers] [[-]arp] [[-]allmulti] [multicast] [[-]promisc] ... ppp (Point-to-Point Protocol) hdlc ((Cisco)-HDLC) lapb (LAPB) arcnet (ARCnet) dlci (Frame Relay DLCI) frad (Frame Relay Access Device) sit (IPv6-in-IPv4) fddi (Fiber Distributed Data Interface) hippi (HIPPI) irda (IrLAP) ec (Econet) x25 (generic X.25) <AF>=Address family. Default: inet List of possible address families: unix (UNIX Domain) inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) rose (AMPR ROSE) ipx (Novell IPX) ddp (Appletalk DDP) ec (Econet) ash (Ash) x25 (CCITT X.25) |
#ifconfig eth0 192.168.16.194/26/26 broadcast 192
![]() |
#ifconfig eth0 192.168.16.194/26
|
#mii-tool
![]() |
#ping 192.168.16.193
![]() PING 192.168.16.193 (192.168.16.193) 56(84) bytes of data. --- 192.168.16.193 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1012ms |
#ifconfig eth0 192.168.16.194/26
![]() |
#ifconfig eth0 192.168.16.194/26 broadcast 192.16
|
#ping 192.168.16.193
![]() |
#ping 192.168.16.193
![]() PING 192.168.16.193 (192.168.16.193) 56(84) bytes of data. From 192.168.16.194 icmp_seq=1 Destination Host Unreachable From 192.168.16.194 icmp_seq=2 Destination Host Unreachable From 192.168.16.194 icmp_seq=3 Destination Host Unreachable --- 192.168.16.193 ping statistics --- 5 packets transmitted, 0 received, +3 errors, 100% packet loss, time 4003ms , pipe 4 |
#ping -A 192.168.16.194 192.168.16.193
![]() PING 192.168.16.193 (192.168.16.193) 56(124) bytes of data. --- 192.168.16.193 ping statistics --- 4 packets transmitted, 0 received, 100% packet loss, time 3008ms , ipg/ewma 1002.897/0.000 ms |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:97 inet addr:192.168.16.194 Bcast:192.168.16.192 Mask:255.255.255.192 inet6 addr: fe80::201:2ff:feb4:6197/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:178 errors:0 dropped:0 overruns:1 frame:0 TX packets:117 errors:0 dropped:0 overruns:0 carrier:1 collisions:0 txqueuelen:1000 RX bytes:15676 (15.3 Kb) TX bytes:38487 (37.5 Kb) Interrupt:11 Base address:0xa000 eth1 Link encap:Ethernet HWaddr 00:04:76:A1:EF:BB ... RX bytes:9271 (9.0 Kb) TX bytes:828 (828.0 b) Interrupt:5 Base address:0xc000 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:4488 errors:0 dropped:0 overruns:0 frame:0 TX packets:4488 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6276280 (5.9 Mb) TX bytes:6276280 (5.9 Mb) |
#ifconfig
![]() |
#ping -A 192.168.16.194 192.168.16.193
![]() PING 192.168.16.193 (192.168.16.193) 56(124) bytes of data. --- 192.168.16.193 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 4015ms , ipg/ewma 1003.847/0.000 ms |
#ping --h
![]() ping: invalid option -- - Usage: ping [-LRUbdfnqrvVaA] [-c count] [-i interval] [-w deadline] [-p pattern] [-s packetsize] [-t ttl] [-I interface or address] [-M mtu discovery hint] [-S sndbuf] [ -T timestamp option ] [ -Q tos ] [hop1 ...] destination |
#ping -I 192.168.16.194 192.168.16.193
PING 192.168.16.193 (192.168.16.193) from 192.168.16.194 : 56(84) bytes of data. 64 bytes from 192.168.16.193: icmp_seq=0 ttl=64 time=1.33 ms 64 bytes from 192.168.16.193: icmp_seq=1 ttl=64 time=0.142 ms 64 bytes from 192.168.16.193: icmp_seq=2 ttl=64 time=0.141 ms 64 bytes from 192.168.16.193: icmp_seq=3 ttl=64 time=0.143 ms 64 bytes from 192.168.16.193: icmp_seq=4 ttl=64 time=0.140 ms 64 bytes from 192.168.16.193: icmp_seq=5 ttl=64 time=0.125 ms --- 192.168.16.193 ping statistics --- 6 packets transmitted, 6 received, 0% packet loss, time 5005ms rtt min/avg/max/mdev = 0.125/0.336/1.330/0.444 ms, pipe 2 |
#ping 192.168.16.193
PING 192.168.16.193 (192.168.16.193) 56(84) bytes of data. 64 bytes from 192.168.16.193: icmp_seq=0 ttl=64 time=0.184 ms 64 bytes from 192.168.16.193: icmp_seq=1 ttl=64 time=0.152 ms --- 192.168.16.193 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1004ms rtt min/avg/max/mdev = 0.152/0.168/0.184/0.016 ms, pipe 2 |
#ping 192.168.17.1
PING 192.168.17.1 (192.168.17.1) 56(84) bytes of data. 64 bytes from 192.168.17.1: icmp_seq=0 ttl=64 time=0.056 ms --- 192.168.17.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.056/0.056/0.056/0.000 ms, pipe 2 |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:97 inet addr:192.168.16.194 Bcast:192.168.16.255 Mask:255.255.255.192 inet6 addr: fe80::201:2ff:feb4:6197/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:197 errors:0 dropped:0 overruns:1 frame:0 TX packets:136 errors:0 dropped:0 overruns:0 carrier:1 collisions:0 txqueuelen:1000 RX bytes:17462 (17.0 Kb) TX bytes:40273 (39.3 Kb) Interrupt:11 Base address:0xa000 eth1 Link encap:Ethernet HWaddr 00:04:76:A1:EF:BB ... RX bytes:9271 (9.0 Kb) TX bytes:828 (828.0 b) Interrupt:5 Base address:0xc000 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:4495 errors:0 dropped:0 overruns:0 frame:0 TX packets:4495 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6276908 (5.9 Mb) TX bytes:6276908 (5.9 Mb) |
#mc
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:97 inet addr:192.168.16.194 Bcast:192.168.16.255 Mask:255.255.255.192 inet6 addr: fe80::201:2ff:feb4:6197/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:197 errors:0 dropped:0 overruns:1 frame:0 TX packets:136 errors:0 dropped:0 overruns:0 carrier:1 collisions:0 txqueuelen:1000 RX bytes:17462 (17.0 Kb) TX bytes:40273 (39.3 Kb) Interrupt:11 Base address:0xa000 eth1 Link encap:Ethernet HWaddr 00:04:76:A1:EF:BB ... RX bytes:9271 (9.0 Kb) TX bytes:828 (828.0 b) Interrupt:5 Base address:0xc000 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:4495 errors:0 dropped:0 overruns:0 frame:0 TX packets:4495 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6276908 (5.9 Mb) TX bytes:6276908 (5.9 Mb) |
#ping 192.168.16.193
PING 192.168.16.193 (192.168.16.193) 56(84) bytes of data. 64 bytes from 192.168.16.193: icmp_seq=0 ttl=64 time=0.149 ms 64 bytes from 192.168.16.193: icmp_seq=1 ttl=64 time=0.152 ms --- 192.168.16.193 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1004ms rtt min/avg/max/mdev = 0.149/0.150/0.152/0.012 ms, pipe 2 |
#arp -a
? (192.168.16.193) at 00:60:08:13:79:2A [ether] on eth0 |
#route add default gw 192.168.16.193
|
#ping -A 192.168.17.1 192.168.16.193
![]() PING 192.168.16.193 (192.168.16.193) 56(124) bytes of data. --- 192.168.16.193 ping statistics --- 6 packets transmitted, 0 received, 100% packet loss, time 5016ms , ipg/ewma 1003.365/0.000 ms |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 * 255.255.255.192 U 0 0 0 eth0 192.168.17.0 * 255.255.255.0 U 0 0 0 eth1 default 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#route add -net 192.168.17.
![]() |
#route add -net 192.168.17.0 gw 192.168.16.194
![]() SIOCADDRT: Invalid argument |
#route add -net 192.168.17.0/24 gw 192.168.16.194
|
#ping -A 192.168.17.1 192.168.16.193
![]() PING 192.168.16.193 (192.168.16.193) 56(124) bytes of data. --- 192.168.16.193 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#ping -A 192.168.17.1 192.168.16.194
![]() PING 192.168.16.194 (192.168.16.194) 56(124) bytes of data. --- 192.168.16.194 ping statistics --- 9 packets transmitted, 0 received, 100% packet loss, time 8031ms , ipg/ewma 1003.896/0.000 ms |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 * 255.255.255.192 U 0 0 0 eth0 192.168.17.0 192.168.16.194 255.255.255.0 UG 0 0 0 eth0 192.168.17.0 * 255.255.255.0 U 0 0 0 eth1 default 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#ping 192.168.16.193
PING 192.168.16.193 (192.168.16.193) 56(84) bytes of data. 64 bytes from 192.168.16.193: icmp_seq=0 ttl=64 time=1.28 ms --- 192.168.16.193 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 1.280/1.280/1.280/0.000 ms, pipe 2 |
#route -a
![]() route: invalid option -- a 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
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 * 255.255.255.192 U 0 0 0 eth0 192.168.17.0 192.168.16.194 255.255.255.0 UG 0 0 0 eth0 192.168.17.0 * 255.255.255.0 U 0 0 0 eth1 default 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#route add default gw 192.168.16.194
|
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 * 255.255.255.192 U 0 0 0 eth0 192.168.17.0 192.168.16.194 255.255.255.0 UG 0 0 0 eth0 192.168.17.0 * 255.255.255.0 U 0 0 0 eth1 default 192.168.16.194 0.0.0.0 UG 0 0 0 eth0 default 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#ping -A 192.168.17.1 192.168.16.194
![]() PING 192.168.16.194 (192.168.16.194) 56(124) bytes of data. --- 192.168.16.194 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2007ms , ipg/ewma 1003.589/0.000 ms |
#route del default gw 192.168.16.194
|
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 * 255.255.255.192 U 0 0 0 eth0 192.168.17.0 192.168.16.194 255.255.255.0 UG 0 0 0 eth0 192.168.17.0 * 255.255.255.0 U 0 0 0 eth1 default 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#netstat -nl
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:44850 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:5335 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 :::22 :::* LISTEN udp 0 0 0.0.0.0:32768 0.0.0.0:* ... unix 2 [ ACC ] STREAM LISTENING 8433 /tmp/orbit-user/linc-f78-0-6d9782c2b2a19 unix 2 [ ACC ] STREAM LISTENING 8466 /tmp/orbit-user/linc-f7a-0-586b371c33ad0 unix 2 [ ACC ] STREAM LISTENING 8525 /tmp/orbit-user/linc-f85-0-63a62d1a6eac unix 2 [ ACC ] STREAM LISTENING 8580 /tmp/orbit-user/linc-f92-0-5055dcd6df271 unix 2 [ ACC ] STREAM LISTENING 5729 /var/run/acpid.socket unix 2 [ ACC ] STREAM LISTENING 8609 /tmp/orbit-user/linc-f94-0-420c6a77a6836 unix 2 [ ACC ] STREAM LISTENING 8637 /tmp/orbit-user/linc-f96-0-6cbac8b471d93 unix 2 [ ACC ] STREAM LISTENING 8666 /tmp/orbit-user/linc-f98-0-5e8b4e9315117 unix 2 [ ACC ] STREAM LISTENING 8783 /tmp/orbit-user/linc-f9a-0-61f5c591eb641 unix 2 [ ACC ] STREAM LISTENING 6221 /var/run/dbus/system_bus_socket |
#netstat -h
![]() usage: netstat [-veenNcCF] [<Af>] -r netstat {-V|--version|-h|--help} netstat [-vnNcaeol] [<Socket> ...] netstat { [-veenNac] -i[<Iface>] | [-cnNe] -M | -s } [delay] -r, --route display routing table -i, --interfaces=[<Iface>] display interface table -g, --groups display multicast group memberships -s, --statistics display networking statistics (like SNMP) -M, --masquerade display masqueraded connections -v, --verbose be verbose -n, --numeric don't resolve names ... -o, --timers display timers -F, --fib display Forwarding Information Base (default) -C, --cache display routing cache instead of FIB <Iface>: Name of interface to monitor/list. <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom <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) |
#tra
![]() tracepath traceroute transist.flt trap tracepath6 traceroute6 transxx traptoemail |
#traceroute 192.168.16.193
![]() traceroute to 192.168.16.193 (192.168.16.193), 30 hops max, 38 byte packets |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 * 255.255.255.192 U 0 0 0 eth0 192.168.17.0 192.168.16.194 255.255.255.0 UG 0 0 0 eth0 192.168.17.0 * 255.255.255.0 U 0 0 0 eth1 default 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#route del 198.168.17.0 gw 192.168.16.194
![]() SIOCDELRT: No such process |
#route del 198.168.17.0
![]() SIOCDELRT: No such process |
#route del 192.168.17.0 gw 192.168.16.194
![]() SIOCDELRT: No such process |
#route del gw 192.168.16.194
![]() gw: Host name lookup failure |
#clear
|
#route -o
![]() route: invalid option -- o 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 -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 0.0.0.0 255.255.255.192 U 0 0 0 eth0 192.168.17.0 192.168.16.194 255.255.255.0 UG 0 0 0 eth0 192.168.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 0.0.0.0 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#ifcomfig
![]() -bash: ifcomfig: command not found |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:B4:61:97 inet addr:192.168.16.194 Bcast:192.168.16.255 Mask:255.255.255.192 inet6 addr: fe80::201:2ff:feb4:6197/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:224 errors:0 dropped:0 overruns:1 frame:0 TX packets:256 errors:0 dropped:0 overruns:0 carrier:1 collisions:0 txqueuelen:1000 RX bytes:19216 (18.7 Kb) TX bytes:48735 (47.5 Kb) Interrupt:11 Base address:0xa000 eth1 Link encap:Ethernet HWaddr 00:04:76:A1:EF:BB ... RX bytes:9271 (9.0 Kb) TX bytes:828 (828.0 b) Interrupt:5 Base address:0xc000 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:4527 errors:0 dropped:0 overruns:0 frame:0 TX packets:4527 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:6279852 (5.9 Mb) TX bytes:6279852 (5.9 Mb) |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 * 255.255.255.192 U 0 0 0 eth0 192.168.17.0 192.168.16.194 255.255.255.0 UG 0 0 0 eth0 192.168.17.0 * 255.255.255.0 U 0 0 0 eth1 default 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 0.0.0.0 255.255.255.192 U 0 0 0 eth0 192.168.17.0 192.168.16.194 255.255.255.0 UG 0 0 0 eth0 192.168.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 0.0.0.0 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#mc
|
#route flush
![]() Flushing `inet' routing table not supported Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M] [netmask N] [mss Mss] [window W] [irtt I] [mod] [dyn] [reinstate] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject inet_route [-FC] flush NOT supported |
#route
![]() Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 * 255.255.255.192 U 0 0 0 eth0 |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 0.0.0.0 255.255.255.192 U 0 0 0 eth0 192.168.17.0 192.168.16.194 255.255.255.0 UG 0 0 0 eth0 192.168.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 0.0.0.0 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#route delete default gw
![]() Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M] [netmask N] [mss Mss] [window W] [irtt I] [mod] [dyn] [reinstate] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject inet_route [-FC] flush NOT supported |
#route del default gw
![]() Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M] [netmask N] [mss Mss] [window W] [irtt I] [mod] [dyn] [reinstate] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject inet_route [-FC] flush NOT supported |
#route del default
|
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 0.0.0.0 255.255.255.192 U 0 0 0 eth0 192.168.17.0 192.168.16.194 255.255.255.0 UG 0 0 0 eth0 192.168.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 |
#route delete -net 192.168.17.0/24 gw 192.168.16.194
|
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 0.0.0.0 255.255.255.192 U 0 0 0 eth0 192.168.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 |
#route add -net 192.168.15.0/24 gw 192.168.16.193
|
#ping 192.168.16.193
PING 192.168.16.193 (192.168.16.193) 56(84) bytes of data. 64 bytes from 192.168.16.193: icmp_seq=0 ttl=64 time=2.41 ms --- 192.168.16.193 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 2.412/2.412/2.412/0.000 ms, pipe 2 |
#ping 192.168.15.256
![]() ping: unknown host 192.168.15.256 |
#ping 192.168.15.254
![]() PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data. --- 192.168.15.254 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1014ms |
#traceroute 192.168.15.254
![]() traceroute to 192.168.15.254 (192.168.15.254), 30 hops max, 38 byte packets 1 * * * 2 * |
#route add -net 192.168.15.0/24 defoult gw 192.168.16.193
![]() Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M] [netmask N] [mss Mss] [window W] [irtt I] [mod] [dyn] [reinstate] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject inet_route [-FC] flush NOT supported |
#route add -net 192.168.15.0/24 default gw 192.168.16.193
![]() Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw Gw] [metric M] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [gw Gw] [metric M] [netmask N] [mss Mss] [window W] [irtt I] [mod] [dyn] [reinstate] [[dev] If] inet_route [-vF] add {-host|-net} Target[/prefix] [metric M] reject inet_route [-FC] flush NOT supported |
#mc
|
#sudo cat /proc/sys/net/ipv4/ip_forward
1 |
#traceroute 192.168.15.254
![]() traceroute to 192.168.15.254 (192.168.15.254), 30 hops max, 38 byte packets 1 * * * |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 0.0.0.0 255.255.255.192 U 0 0 0 eth0 192.168.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.15.0 192.168.16.193 255.255.255.0 UG 0 0 0 eth0 |
#route default gw 192.168.16.194
![]() 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 default gw 192.168.16.194
|
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 0.0.0.0 255.255.255.192 U 0 0 0 eth0 192.168.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.15.0 192.168.16.193 255.255.255.0 UG 0 0 0 eth0 0.0.0.0 192.168.16.194 0.0.0.0 UG 0 0 0 eth0 |
#route add default gw 192.168.16.193
|
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 0.0.0.0 255.255.255.192 U 0 0 0 eth0 192.168.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.15.0 192.168.16.193 255.255.255.0 UG 0 0 0 eth0 0.0.0.0 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 0.0.0.0 192.168.16.194 0.0.0.0 UG 0 0 0 eth0 |
#route del default gw 192.168.16.194
|
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 0.0.0.0 255.255.255.192 U 0 0 0 eth0 192.168.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.15.0 192.168.16.193 255.255.255.0 UG 0 0 0 eth0 0.0.0.0 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#route del net 192.168.15.0
![]() |
#route del -net 192.168.15.0
![]() SIOCDELRT: Invalid argument |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 0.0.0.0 255.255.255.192 U 0 0 0 eth0 192.168.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.15.0 192.168.16.193 255.255.255.0 UG 0 0 0 eth0 0.0.0.0 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#traceroute 192.168.15.1
![]() traceroute to 192.168.15.1 (192.168.15.1), 30 hops max, 38 byte packets |
#traceroute 192.168.16.193
traceroute to 192.168.16.193 (192.168.16.193), 30 hops max, 38 byte packets 1 192.168.16.193 (192.168.16.193) 28.334 ms 0.349 ms 0.271 ms |
#traceroute 192.168.16.130
traceroute to 192.168.16.130 (192.168.16.130), 30 hops max, 38 byte packets 1 192.168.16.130 (192.168.16.130) 28.683 ms 0.339 ms 0.271 ms |
#traceroute 192.168.16.129
![]() traceroute to 192.168.16.129 (192.168.16.129), 30 hops max, 38 byte packets 1 * * * |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.16.192 0.0.0.0 255.255.255.192 U 0 0 0 eth0 192.168.17.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.15.0 192.168.16.193 255.255.255.0 UG 0 0 0 eth0 0.0.0.0 192.168.16.193 0.0.0.0 UG 0 0 0 eth0 |
#route del net 192.168.15.0 gw 192.168.16.193
![]() net: Host name lookup failure |
1
Время первой команды журнала | 11:54:53 2006- 2-18 | |||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:58:32 2006- 2-18 | |||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 97 | |||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 34.02 | |||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.03 | |||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.06 | |||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.52 | |||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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