/l3/users/12-12-2011/NT-BSDnet/freebsd1.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 :30 :31 :32 :33 :34 :35 |
|
#vim .l3rc
|
#vim .l3rc
|
#vim .l3rc
|
#vim .l3rc
|
#vim .l3rc
|
#ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:00:01 inet 192.168.16.21 netmask 0xffffff00 broadcast 192.168.16.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active re1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:01:01 media: Ethernet autoselect (100baseTX <full-duplex>) status: active re2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:02:01 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 |
#dmesg |grep re0
re0: <RealTek 8139C+ 10/100BaseTX> port 0xc100-0xc1ff mem 0xf3001000-0xf30010ff irq 5 at device 4.0 on pci0 re0: Chip rev. 0x74800000 re0: MAC rev. 0x00000000 miibus0: <MII bus> on re0 re0: Ethernet address: 00:16:4e:00:00:01 re0: [FILTER] |
#ifconfig -a
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:00:01 inet 192.168.16.21 netmask 0xffffff00 broadcast 192.168.16.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active re1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:01:01 media: Ethernet autoselect (100baseTX <full-duplex>) status: active re2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:02:01 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 |
#ping 192.168.16.8
PING 192.168.16.8 (192.168.16.8): 56 data bytes 64 bytes from 192.168.16.8: icmp_seq=0 ttl=64 time=15.629 ms ^C --- 192.168.16.8 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 15.629/15.629/15.629/0.000 ms |
#ssh root@213.160.142.162
^C |
#ssh root@213.160.142.162 -p33
13:38:41 up 5 days, 5:10, 1 user, load average: 0,36, 0,38, 0,29 358 processes: 356 sleeping, 2 running, 0 zombie, 0 stopped CPU0 states: 2,28% user 15,20% system 0,0% nice 0,0% iowait 82,0% idle CPU1 states: 0,37% user 15,9% system 0,0% nice 0,0% iowait 84,3% idle CPU2 states: 1,49% user 15,33% system 0,0% nice 0,0% iowait 82,17% idle CPU3 states: 0,16% user 14,40% system 0,0% nice 0,0% iowait 84,44% idle Mem: 8273640k av, 4834180k used, 3439460k free, 0k shrd, 120536k buff 2473852k active, 2136568k inactive Swap: 843404k av, 0k used, 843404k free 4344356k cached PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND ... Dec 07 04:33:35 Process php is not dead cleanly. Killing with -KILL. Dec 07 04:33:35 Killing of php OK Dec 07 08:21:38 watchdog started Dec 07 08:30:17 watchdog started Dec 07 09:40:23 Killing process php. Limit of cpu is exceeded Dec 07 09:40:28 Process php is not dead cleanly. Killing with -KILL. Dec 07 09:40:28 Killing of php OK [root@idecogate root]# exit logout Connection to 213.160.142.162 closed. |
#ls /etc
X11 hostid network.subr rc.firewall6 aliases hosts networks rc.initdiskless amd.map hosts.allow newsyslog.conf rc.resume apmd.conf hosts.equiv nscd.conf rc.sendmail auth.conf hosts.lpd nsmb.conf rc.shutdown bluetooth inetd.conf nsswitch.conf rc.subr crontab isdn ntp rc.suspend csh.cshrc libalias.conf opieaccess remote csh.login lilalo opiekeys resolv.conf csh.logout localtime pam.d rmt ... dumpdates mail.rc ppp spwd.db fbtab make.conf printcap ssh freebsd-update.conf manpath.config profile ssl fstab manpath.config.bak protocols sysctl.conf ftpusers master.passwd pwd.db syslog.conf gettytab motd rc termcap gnats mtree rc.bsdextended ttys group namedb rc.conf zfs gss netconfig rc.d host.conf netstart rc.firewall |
#less /etc/netstart .
|
#rout
bash: rout: command not found |
#netstart -r
bash: netstart: command not found |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default fobos UGS 0 132 re0 localhost localhost UH 0 0 lo0 192.168.16.0 link#1 UC 0 0 re0 192.168.16.51 00:14:c2:05:a2:60 UHLW 1 0 re0 1106 net.nt 00:07:e9:0c:45:0c UHLW 2 392 re0 1200 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UHL lo0 fe80::%lo0 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5:: fe80::1%lo0 UC lo0 ff02::%lo0 fe80::1%lo0 UC lo0 |
#route delete default
delete net default |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default fobos UGS 0 132 re0 localhost localhost UH 0 0 lo0 192.168.16.0 link#1 UC 0 0 re0 192.168.16.1 00:16:3e:00:00:01 UHLW 1 0 re0 1185 192.168.16.51 00:14:c2:05:a2:60 UHLW 1 0 re0 725 net.nt 00:07:e9:0c:45:0c UHLW 2 470 re0 1186 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UHL lo0 fe80::%lo0 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5:: fe80::1%lo0 UC lo0 ff02::%lo0 fe80::1%lo0 UC lo0 |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default net.nt UGS 0 132 re0 localhost localhost UH 0 0 lo0 192.168.16.0 link#1 UC 0 0 re0 192.168.16.1 00:16:3e:00:00:01 UHLW 1 0 re0 862 192.168.16.51 00:14:c2:05:a2:60 UHLW 1 0 re0 402 fobos 00:07:e9:0c:45:0c UHLW 2 543 re0 1197 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UHL lo0 fe80::%lo0 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5:: fe80::1%lo0 UC lo0 ff02::%lo0 fe80::1%lo0 UC lo0 |
#netstat -n
Active Internet connections Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 192.168.16.21.22 192.168.16.254.2613 ESTABLISHED tcp4 0 0 192.168.16.21.22 192.168.16.254.4577 ESTABLISHED Active UNIX domain sockets Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr c3419d20 stream 0 0 c346c450 0 0 0 /var/run/devd.pipe c34192a0 dgram 0 0 0 c34195e8 0 c34193f0 c3419348 dgram 0 0 0 c3419690 0 0 c34193f0 dgram 0 0 0 c34195e8 0 0 c34195e8 dgram 0 0 c346c9b4 0 c34192a0 0 /var/run/logpriv c3419690 dgram 0 0 c346cac8 0 c3419348 0 /var/run/log |
#netstat
Active Internet connections Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 freebsd1.ssh fobos.2613 ESTABLISHED tcp4 0 0 freebsd1.ssh net.nt.4577 ESTABLISHED Active UNIX domain sockets Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr c3419d20 stream 0 0 c346c450 0 0 0 /var/run/devd.pipe c34192a0 dgram 0 0 0 c34195e8 0 c34193f0 c3419348 dgram 0 0 0 c3419690 0 0 c34193f0 dgram 0 0 0 c34195e8 0 0 c34195e8 dgram 0 0 c346c9b4 0 c34192a0 0 /var/run/logpriv c3419690 dgram 0 0 c346cac8 0 c3419348 0 /var/run/log |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire localhost localhost UH 0 0 lo0 192.168.16.0 link#1 UC 0 0 re0 fobos 00:07:e9:0c:45:0c UHLW 1 633 re0 1192 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UHL lo0 fe80::%lo0 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5:: fe80::1%lo0 UC lo0 ff02::%lo0 fe80::1%lo0 UC lo0 |
#netstat -n
Active Internet connections Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 192.168.16.21.22 192.168.16.254.2613 ESTABLISHED tcp4 0 0 192.168.16.21.22 192.168.16.254.4577 ESTABLISHED Active UNIX domain sockets Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr c3419d20 stream 0 0 c346c450 0 0 0 /var/run/devd.pipe c34192a0 dgram 0 0 0 c34195e8 0 c34193f0 c3419348 dgram 0 0 0 c3419690 0 0 c34193f0 dgram 0 0 0 c34195e8 0 0 c34195e8 dgram 0 0 c346c9b4 0 c34192a0 0 /var/run/logpriv c3419690 dgram 0 0 c346cac8 0 c3419348 0 /var/run/log |
#ping ya.ru
PING ya.ru (213.180.204.3): 56 data bytes ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host ^C --- ya.ru ping statistics --- 4 packets transmitted, 0 packets received, 100.0% packet loss |
#route add default gw 192.168.16.254
route: bad address: gw |
#ping ya.ru
PING ya.ru (93.158.134.203): 56 data bytes ping: sendto: No route to host ping: sendto: No route to host ^C --- ya.ru ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss |
#route add default 92.168.16.254
add net default: gateway 192.168.16.254 |
#ping ya.ru
PING ya.ru (93.158.134.3): 56 data bytes 64 bytes from 93.158.134.3: icmp_seq=0 ttl=58 time=22.356 ms 64 bytes from 93.158.134.3: icmp_seq=1 ttl=58 time=21.889 ms ^C --- ya.ru ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 21.889/22.123/22.356/0.233 ms |
#less /etc/rc.conf
|
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default fobos UGS 0 2 re0 localhost localhost UH 0 0 lo0 192.168.16.0 link#1 UC 0 0 re0 192.168.16.1 00:16:3e:00:00:01 UHLW 1 0 re0 1193 net.nt 00:07:e9:0c:45:0c UHLW 2 862 re0 1194 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UHL lo0 fe80::%lo0 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5:: fe80::1%lo0 UC lo0 ff02::%lo0 fe80::1%lo0 UC lo0 |
#netstat -r -f inet
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default fobos UGS 0 2 re0 localhost localhost UH 0 0 lo0 192.168.16.0 link#1 UC 0 0 re0 192.168.16.1 00:16:3e:00:00:01 UHLW 1 0 re0 1178 net.nt 00:07:e9:0c:45:0c UHLW 2 881 re0 1179 |
#netstat -r -f inet6
Routing tables Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UHL lo0 fe80::%lo0 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5:: fe80::1%lo0 UC lo0 ff02::%lo0 fe80::1%lo0 UC lo0 |
#sysctl net.inet.ip.forwarding
net.inet.ip.forwarding: 0 |
#ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:00:01 inet 192.168.16.21 netmask 0xffffff00 broadcast 192.168.16.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active re1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:01:01 media: Ethernet autoselect (100baseTX <full-duplex>) status: active re2: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:02:01 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 |
#ee /etc/rc.conf
--- /tmp/l3-saved-2158.22909.16756 2011-12-12 17:39:25.000000000 +0200 +++ /etc/rc.conf 2011-12-12 17:41:30.000000000 +0200 @@ -10,6 +10,8 @@ font8x8="cp866-8x8" hostname="freebsd1.net.nt" ifconfig_re0="inet 192.168.16.21 netmask 255.255.255.0" +ifconfig_re1="inet 192.168.30.129 netmask 255.255.255.192" +ifconfig_re2="inet 192.168.30.190 netmask 255.255.255.192" inetd_enable="YES" keymap="ru.koi8-r" mousechar_start="3" |
#/etc/netstart
devd already running? (pid=750). Setting hostuuid: a675e116-d753-774a-e67e-2adb8a64c1d9. Setting hostid: 0x4f43d0e9. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:00:01 ... media: Ethernet autoselect (100baseTX <full-duplex>) status: active re2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:02:01 inet 192.168.30.190 netmask 0xffffffc0 broadcast 192.168.30.191 media: Ethernet autoselect (100baseTX <full-duplex>) status: active add net default: gateway 192.168.16.254 Additional routing options:. |
#ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:00:01 inet 192.168.16.21 netmask 0xffffff00 broadcast 192.168.16.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:01:01 inet 192.168.30.129 netmask 0xffffffc0 broadcast 192.168.30.191 ... options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:02:01 inet 192.168.30.190 netmask 0xffffffc0 broadcast 192.168.30.191 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 |
#ee /etc/sysctl.conf
|
#ee /etc/rc.conf
--- /tmp/l3-saved-2158.18065.4674 2011-12-12 17:59:54.000000000 +0200 +++ /etc/rc.conf 2011-12-12 18:00:39.000000000 +0200 @@ -4,6 +4,7 @@ # Enable network daemons for user convenience. # Please make all changes to this file, not to /etc/defaults/rc.conf. # This file now contains just the overrides from /etc/defaults/rc.conf. +gateway_enable="YES" defaultrouter="192.168.16.254" font8x14="cp866-8x14" font8x16="cp866b-8x16" |
#sysctl net.inet.ip.forwarding=1
net.inet.ip.forwarding: 0 -> 1 |
#route add default 192.168.30.126
route: writing to routing socket: Network is unreachable add net default: gateway 192.168.30.126: Network is unreachable |
#route add default gw .168.30.126
route: bad address: gw |
#route -n
usage: route [-dnqtv] command [[modifiers] args] |
#netstat -n
Active Internet connections Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 192.168.16.21.22 192.168.16.254.2613 ESTABLISHED Active UNIX domain sockets Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr c3419d20 stream 0 0 c346c450 0 0 0 /var/run/devd.pipe c34192a0 dgram 0 0 0 c34195e8 0 c34193f0 c3419348 dgram 0 0 0 c3419690 0 0 c34193f0 dgram 0 0 0 c34195e8 0 0 c34195e8 dgram 0 0 c346c9b4 0 c34192a0 0 /var/run/logpriv c3419690 dgram 0 0 c346cac8 0 c3419348 0 /var/run/log |
#ping 192.168.30.126
PING 192.168.30.126 (192.168.30.126): 56 data bytes ^C --- 192.168.30.126 ping statistics --- 11 packets transmitted, 0 packets received, 100.0% packet loss |
#netstat -n
Active Internet connections Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 192.168.16.21.22 192.168.16.254.2613 ESTABLISHED Active UNIX domain sockets Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr c3419d20 stream 0 0 c346c450 0 0 0 /var/run/devd.pipe c34192a0 dgram 0 0 0 c34195e8 0 c34193f0 c3419348 dgram 0 0 0 c3419690 0 0 c34193f0 dgram 0 0 0 c34195e8 0 0 c34195e8 dgram 0 0 c346c9b4 0 c34192a0 0 /var/run/logpriv c3419690 dgram 0 0 c346cac8 0 c3419348 0 /var/run/log |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default fobos UGS 0 11 re0 localhost localhost UH 0 0 lo0 192.168.16.0 link#1 UC 0 0 re0 net.nt 00:07:e9:0c:45:0c UHLW 2 745 re0 1200 192.168.30.128/26 link#2 UC 0 0 re1 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UHL lo0 fe80::%lo0 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5:: fe80::1%lo0 UC lo0 ff02::%lo0 fe80::1%lo0 UC lo0 |
#ee /etc/rc.conf
|
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default fobos UGS 0 11 re0 localhost localhost UH 0 0 lo0 192.168.16.0 link#1 UC 0 0 re0 net.nt 00:07:e9:0c:45:0c UHLW 2 792 re0 920 192.168.30.128/26 link#2 UC 0 0 re1 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UHL lo0 fe80::%lo0 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5:: fe80::1%lo0 UC lo0 ff02::%lo0 fe80::1%lo0 UC lo0 |
#ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:00:01 inet 192.168.16.21 netmask 0xffffff00 broadcast 192.168.16.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:01:01 inet 192.168.30.129 netmask 0xffffffc0 broadcast 192.168.30.191 ... options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:02:01 inet 192.168.30.190 netmask 0xffffffc0 broadcast 192.168.30.191 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> metric 0 mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 |
#ee /etc/rc.conf
--- /tmp/l3-saved-2158.15178.10214 2011-12-12 18:21:47.000000000 +0200 +++ /etc/rc.conf 2011-12-12 18:22:04.000000000 +0200 @@ -11,8 +11,8 @@ font8x8="cp866-8x8" hostname="freebsd1.net.nt" ifconfig_re0="inet 192.168.16.21 netmask 255.255.255.0" -ifconfig_re1="inet 192.168.30.129 netmask 255.255.255.192" -ifconfig_re2="inet 192.168.30.190 netmask 255.255.255.192" +ifconfig_re1="inet 192.168.30.126 netmask 255.255.255.192" +ifconfig_re2="inet 192.168.30.129 netmask 255.255.255.192" inetd_enable="YES" keymap="ru.koi8-r" mousechar_start="3" |
#/etc/netstart
devd already running? (pid=750). Setting hostuuid: a675e116-d753-774a-e67e-2adb8a64c1d9. Setting hostid: 0x4f43d0e9. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:00:01 ... media: Ethernet autoselect (100baseTX <full-duplex>) status: active re2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> ether 00:16:4e:00:02:01 inet 192.168.30.129 netmask 0xffffffc0 broadcast 192.168.30.191 media: Ethernet autoselect (100baseTX <full-duplex>) status: active add net default: gateway 192.168.16.254 Additional routing options: IP gateway=YES. |
#route add default 192.168.30.126
route: writing to routing socket: File exists add net default: gateway 192.168.30.126: route already in table |
#ping 192.168.30.1
PING 192.168.30.1 (192.168.30.1): 56 data bytes ^C --- 192.168.30.1 ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss |
#ping 192.168.30.65
PING 192.168.30.65 (192.168.30.65): 56 data bytes ^C --- 192.168.30.65 ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss |
#ping 192.168.30.62
PING 192.168.30.62 (192.168.30.62): 56 data bytes ^C --- 192.168.30.62 ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss |
#route add default 192.168.30.65
route: writing to routing socket: File exists add net default: gateway 192.168.30.65: route already in table |
#ping 192.168.30.65
PING 192.168.30.65 (192.168.30.65): 56 data bytes ^C --- 192.168.30.65 ping statistics --- 7 packets transmitted, 0 packets received, 100.0% packet loss |
#ping 192.168.30.65
PING 192.168.30.65 (192.168.30.65): 56 data bytes 64 bytes from 192.168.30.65: icmp_seq=0 ttl=64 time=8.092 ms 64 bytes from 192.168.30.65: icmp_seq=1 ttl=64 time=1.694 ms 64 bytes from 192.168.30.65: icmp_seq=2 ttl=64 time=1.593 ms 64 bytes from 192.168.30.65: icmp_seq=3 ttl=64 time=1.363 ms ^C --- 192.168.30.65 ping statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 1.363/3.186/8.092/2.835 ms |
#ping ya.ru\
> ^C |
#ping ya.ru
PING ya.ru (87.250.250.3): 56 data bytes 64 bytes from 87.250.250.3: icmp_seq=0 ttl=58 time=23.328 ms 64 bytes from 87.250.250.3: icmp_seq=1 ttl=58 time=25.001 ms 64 bytes from 87.250.250.3: icmp_seq=2 ttl=58 time=22.722 ms 64 bytes from 87.250.250.3: icmp_seq=3 ttl=58 time=22.564 ms 64 bytes from 87.250.250.3: icmp_seq=4 ttl=58 time=22.768 ms 64 bytes from 87.250.250.3: icmp_seq=5 ttl=58 time=22.883 ms ^C --- ya.ru ping statistics --- 6 packets transmitted, 6 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 22.564/23.211/25.001/0.835 ms |
#traceroute
Version 1.4a12+FreeBSD Usage: traceroute [-adDeFInrSvx] [-f first_ttl] [-g gateway] [-i iface] [-m max_ttl] [-p port] [-P proto] [-q nqueries] [-s src_addr] [-t tos] [-w waittime] [-A as_server] [-z pausemsecs] host [packetlen] |
#traceroute ya.ru
traceroute: Warning: ya.ru has multiple addresses; using 77.88.21.3 traceroute to ya.ru (77.88.21.3), 64 hops max, 40 byte packets 1 net.nt (192.168.16.254) 0.722 ms 0.619 ms 0.685 ms 2 10.0.3.4 (10.0.3.4) 7.428 ms 1.541 ms 1.435 ms 3 10.0.64.145 (10.0.64.145) 0.695 ms 0.691 ms 0.709 ms 4 texekspert.lsr01-kiev-vlan3416.top.net.ua (77.88.206.213) 1.627 ms 1.531 ms 1.957 ms 5 yandex-10g-gw.ix.net.ua (195.35.65.88) 1.241 ms 3.762 ms 1.404 ms 6 panas-vlan601.yandex.net (87.250.233.69) 27.006 ms 30.561 ms 43.666 ms 7 l3-dante-panas.yandex.net (213.180.213.118) 22.327 ms 21.820 ms 22.082 ms 8 213.180.213.102 (213.180.213.102) 23.082 ms 22.272 ms 23.036 ms ^C |
#ping ya.ru
PING ya.ru (213.180.204.3): 56 data bytes 64 bytes from 213.180.204.3: icmp_seq=0 ttl=57 time=22.706 ms 64 bytes from 213.180.204.3: icmp_seq=1 ttl=57 time=24.204 ms 64 bytes from 213.180.204.3: icmp_seq=2 ttl=57 time=23.306 ms 64 bytes from 213.180.204.3: icmp_seq=3 ttl=57 time=22.972 ms 64 bytes from 213.180.204.3: icmp_seq=4 ttl=57 time=23.143 ms ^C --- ya.ru ping statistics --- 5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 22.706/23.266/24.204/0.509 ms |
#ping 192.168.30.254
PING 192.168.30.254 (192.168.30.254): 56 data bytes ^C --- 192.168.30.254 ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss |
#vim /etc/rc.
--- /tmp/l3-saved-4071.18965.23615 2011-12-12 18:35:11.000000000 +0200 +++ /etc/rc.conf 2011-12-12 18:36:19.000000000 +0200 @@ -19,3 +19,5 @@ saver="daemon" scrnmap="koi8-r2cp866" sshd_enable="YES" +natd_enable="YES" +natd_interface="re1" |
#vim /etc/rc.
|
#vim /etc/rc.conf
|
#service network restart
network does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d) |
#/etc/rc.d/n
named netoptions nfsclient nisdomain ntpd natd network_ipv6 nfsd nscd ntpdate netif newsyslog nfsserver nsswitch |
#/etc/rc.d/n
named netoptions nfsclient nisdomain ntpd natd network_ipv6 nfsd nscd ntpdate netif newsyslog nfsserver nsswitch |
#/etc/rc.d/n
named netoptions nfsclient nisdomain ntpd natd network_ipv6 nfsd nscd ntpdate netif newsyslog nfsserver nsswitch |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default fobos UGS 0 70 re0 localhost localhost UH 0 0 lo0 192.168.16.0 link#1 UC 0 0 re0 192.168.16.1 00:16:3e:00:00:01 UHLW 1 0 re0 1074 net.nt 00:07:e9:0c:45:0c UHLW 2 625 re0 1079 192.168.30.64/26 link#2 UC 0 0 re1 192.168.30.65 00:16:3e:00:02:03 UHLW 1 13 re1 987 192.168.30.126 00:16:4e:00:01:01 UHLW 1 0 lo0 192.168.30.128/26 link#3 UC 0 0 re2 192.168.30.190 00:16:3e:00:01:02 UHLW 1 2 re2 415 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UHL lo0 fe80::%lo0 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5:: fe80::1%lo0 UC lo0 ff02::%lo0 fe80::1%lo0 UC lo0 |
#vim /etc/rc.conf
|
#ping 192.168.30.65
PING 192.168.30.65 (192.168.30.65): 56 data bytes 64 bytes from 192.168.30.65: icmp_seq=0 ttl=64 time=3.844 ms 64 bytes from 192.168.30.65: icmp_seq=1 ttl=64 time=1.334 ms ^C --- 192.168.30.65 ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 1.334/2.589/3.844/1.255 ms |
#ping 192.168.30.190
PING 192.168.30.190 (192.168.30.190): 56 data bytes 64 bytes from 192.168.30.190: icmp_seq=0 ttl=64 time=5.925 ms 64 bytes from 192.168.30.190: icmp_seq=1 ttl=64 time=1.823 ms ^C --- 192.168.30.190 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 1.823/3.465/5.925/1.772 ms |
#ping 192.168.30.129
PING 192.168.30.129 (192.168.30.129): 56 data bytes 64 bytes from 192.168.30.129: icmp_seq=0 ttl=64 time=0.038 ms 64 bytes from 192.168.30.129: icmp_seq=1 ttl=64 time=0.034 ms ^C --- 192.168.30.129 ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.034/0.036/0.038/0.002 ms |
#ping 192.168.30.193
PING 192.168.30.193 (192.168.30.193): 56 data bytes ^C --- 192.168.30.193 ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss |
#ping 192.168.30.190
PING 192.168.30.190 (192.168.30.190): 56 data bytes 64 bytes from 192.168.30.190: icmp_seq=0 ttl=64 time=1.944 ms 64 bytes from 192.168.30.190: icmp_seq=1 ttl=64 time=1.701 ms ^C --- 192.168.30.190 ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 1.701/1.823/1.944/0.121 ms |
#route add default 192.168.30.65
route: writing to routing socket: File exists add net default: gateway 192.168.30.65: route already in table |
#vim /etc/rc.conf
--- /tmp/l3-saved-1169.18488.3467 2011-12-12 18:41:09.000000000 +0200 +++ /etc/rc.conf 2011-12-12 18:43:06.000000000 +0200 @@ -21,3 +21,5 @@ sshd_enable="YES" natd_enable="YES" natd_interface="re1" +firewall_enable="YES" +firewall_type="OPEN" |
#route add default 192.168.30.65
route: writing to routing socket: File exists add net default: gateway 192.168.30.65: route already in table |
#ping 192.168.30.62
PING 192.168.30.62 (192.168.30.62): 56 data bytes ^C --- 192.168.30.62 ping statistics --- 4 packets transmitted, 0 packets received, 100.0% packet loss |
#firewall_type="OPEN"
bash: netstar: command not found |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default fobos UGS 0 0 re0 localhost localhost UH 0 0 lo0 192.168.16.0 link#1 UC 0 0 re0 192.168.16.1 00:16:3e:00:00:01 UHLW 1 0 re0 1073 net.nt 00:07:e9:0c:45:0c UHLW 2 265 re0 1169 192.168.30.64/26 link#2 UC 0 0 re1 192.168.30.65 link#2 UHLW 1 0 re1 192.168.30.128/26 link#3 UC 0 0 re2 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UHL lo0 fe80::%lo0 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5:: fe80::1%lo0 UC lo0 ff02::%lo0 fe80::1%lo0 UC lo0 |
#netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.16.254 UGS 0 0 re0 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.16.0/24 link#1 UC 0 0 re0 192.168.16.1 00:16:3e:00:00:01 UHLW 1 0 re0 1069 192.168.16.254 00:07:e9:0c:45:0c UHLW 2 291 re0 1165 192.168.30.64/26 link#2 UC 0 0 re1 192.168.30.65 link#2 UHLW 1 0 re1 192.168.30.128/26 link#3 UC 0 0 re2 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UHL lo0 fe80::%lo0/64 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5::/32 fe80::1%lo0 UC lo0 ff02::%lo0/32 fe80::1%lo0 UC lo0 |
#ping 192.168.30.1
PING 192.168.30.1 (192.168.30.1): 56 data bytes ^C --- 192.168.30.1 ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss |
#route add default 192.168.30.65
route: writing to routing socket: File exists add net default: gateway 192.168.30.65: route already in table |
#route add default 192.168.30.65 dev re1
route: bad address: dev |
#ping 192.168.30.65
PING 192.168.30.65 (192.168.30.65): 56 data bytes 64 bytes from 192.168.30.65: icmp_seq=0 ttl=64 time=5.938 ms 64 bytes from 192.168.30.65: icmp_seq=1 ttl=64 time=1.439 ms ^C --- 192.168.30.65 ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 1.439/3.688/5.938/2.249 ms |
#route delete default gw
route: bad address: gw |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire localhost localhost UH 0 0 lo0 192.168.16.0 link#1 UC 0 0 re0 192.168.16.1 00:16:3e:00:00:01 UHLW 1 0 re0 857 net.nt 00:07:e9:0c:45:0c UHLW 1 535 re0 1188 192.168.30.64/26 link#2 UC 0 0 re1 192.168.30.65 00:16:3e:00:02:03 UHLW 1 3 re1 1053 192.168.30.128/26 link#3 UC 0 0 re2 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UHL lo0 fe80::%lo0 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5:: fe80::1%lo0 UC lo0 ff02::%lo0 fe80::1%lo0 UC lo0 |
#netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127.0.0.1 127.0.0.1 UH 0 0 lo0 192.168.16.0/24 link#1 UC 0 0 re0 192.168.16.1 00:16:3e:00:00:01 UHLW 1 0 re0 852 192.168.16.254 00:07:e9:0c:45:0c UHLW 1 561 re0 1183 192.168.30.64/26 link#2 UC 0 0 re1 192.168.30.65 00:16:3e:00:02:03 UHLW 1 3 re1 1048 192.168.30.128/26 link#3 UC 0 0 re2 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UHL lo0 fe80::%lo0/64 fe80::1%lo0 U lo0 fe80::1%lo0 link#5 UHL lo0 ff01:5::/32 fe80::1%lo0 UC lo0 ff02::%lo0/32 fe80::1%lo0 UC lo0 |
#route add default 192.168.30.65
add net default: gateway 192.168.30.65 |
Время первой команды журнала | 09:31:15 2011-12-12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 17:50:09 2011-12-12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 29.70 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.69 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.46 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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