/l3/users/17-12-2012/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 |
|
#l3 pwd
/users/05-07-2012/NT-BSDadm/fbsd.net.nt/root |
#su user -
|
#su user -
|
$cd
|
$cd
|
$l3script
|
$l3script
|
$exit
exit |
$exit
exit |
$exit
exit |
$exit
exit |
#vim /etc/rc.conf
|
#~
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.13.21 netmask 0xffffff00 broadcast 192.168.13.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active em0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC> ether 00:16:4e:00:01:01 media: Ethernet autoselect (1000baseT <full-duplex>) ... ether 00:16:4e:00:02:01 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3<RXCSUM,TXCSUM> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 nd6 options=3<PERFORMNUD,ACCEPT_RTADV> |
#~
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.13.21 netmask 0xffffff00 broadcast 192.168.13.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active em0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC> ether 00:16:4e:00:01:01 media: Ethernet autoselect (1000baseT <full-duplex>) ... ether 00:16:4e:00:02:01 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3<RXCSUM,TXCSUM> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 nd6 options=3<PERFORMNUD,ACCEPT_RTADV> |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default net.nt UGS 1 263 re0 localhost link#5 UH 0 0 lo0 192.168.13.0 link#1 U 1 18 re0 freebsd1 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UH lo0 fe80::%lo0 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5:: fe80::1%lo0 U lo0 ff02::%lo0 fe80::1%lo0 U lo0 |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default net.nt UGS 1 263 re0 localhost link#5 UH 0 0 lo0 192.168.13.0 link#1 U 1 18 re0 freebsd1 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UH lo0 fe80::%lo0 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5:: fe80::1%lo0 U lo0 ff02::%lo0 fe80::1%lo0 U lo0 |
#netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.13.253 UGS 1 299 re0 127.0.0.1 link#5 UH 0 0 lo0 192.168.13.0/24 link#1 U 0 19 re0 192.168.13.21 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%lo0/64 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5::/32 fe80::1%lo0 U lo0 ff02::%lo0/32 fe80::1%lo0 U lo0 |
#netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.13.253 UGS 1 299 re0 127.0.0.1 link#5 UH 0 0 lo0 192.168.13.0/24 link#1 U 0 19 re0 192.168.13.21 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%lo0/64 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5::/32 fe80::1%lo0 U lo0 ff02::%lo0/32 fe80::1%lo0 U lo0 |
#vim /etc/rc.conf
|
#vim /etc/rc.conf
|
#scrnmap="koi8-r2cp866"
route: illegal option -- r usage: route [-dnqtv] command [[modifiers] args] |
#scrnmap="koi8-r2cp866"
route: illegal option -- r usage: route [-dnqtv] command [[modifiers] args] |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default fobos UGS 2 421 re0 localhost link#5 UH 0 0 lo0 192.168.13.0 link#1 U 1 23 re0 freebsd1 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UH lo0 fe80::%lo0 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5:: fe80::1%lo0 U lo0 ff02::%lo0 fe80::1%lo0 U lo0 |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default fobos UGS 2 421 re0 localhost link#5 UH 0 0 lo0 192.168.13.0 link#1 U 1 23 re0 freebsd1 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UH lo0 fe80::%lo0 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5:: fe80::1%lo0 U lo0 ff02::%lo0 fe80::1%lo0 U 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.13.21 netmask 0xffffff00 broadcast 192.168.13.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC> ether 00:16:4e:00:01:01 inet 192.168.22.50 netmask 0xffffff00 broadcast 192.168.22.255 ... inet 192.168.168.3 netmask 0xffffff00 broadcast 192.168.168.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3<RXCSUM,TXCSUM> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 nd6 options=3<PERFORMNUD,ACCEPT_RTADV> |
#ping 192.168.168.254
PING 192.168.168.254 (192.168.168.254): 56 data bytes ^C --- 192.168.168.254 ping statistics --- 4 packets transmitted, 0 packets received, 100.0% packet loss |
#ping 192.168.168.3
PING 192.168.168.3 (192.168.168.3): 56 data bytes 64 bytes from 192.168.168.3: icmp_seq=0 ttl=64 time=0.033 ms 64 bytes from 192.168.168.3: icmp_seq=1 ttl=64 time=0.038 ms ^C --- 192.168.168.3 ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.033/0.036/0.038/0.002 ms |
#ping 192.68.22.50
PING 192.68.22.50 (192.68.22.50): 56 data bytes ^C --- 192.68.22.50 ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss |
#ifconfig em0 inet 192..68.22.50/24
ifconfig: 192..68.22.50: bad value |
#ifconfig em0 inet 192..68.22.50 netmask 255.255.255.0
ifconfig: 192..68.22.50: bad value |
#ifconfig em0 inet 192.68.22.50 netmask 255.255.255.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.13.21 netmask 0xffffff00 broadcast 192.168.13.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC> ether 00:16:4e:00:01:01 inet 192.68.22.50 netmask 0xffffff00 broadcast 192.68.22.255 ... inet 192.168.168.3 netmask 0xffffff00 broadcast 192.168.168.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3<RXCSUM,TXCSUM> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 nd6 options=3<PERFORMNUD,ACCEPT_RTADV> |
#netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.13.253 UGS 2 1215 re0 127.0.0.1 link#5 UH 0 2 lo0 192.68.22.0/24 link#2 U 0 0 em0 192.68.22.50 link#2 UHS 0 0 lo0 192.168.13.0/24 link#1 U 1 17 re0 192.168.13.21 link#1 UHS 0 0 lo0 192.168.168.0/24 link#3 U 0 4 re1 192.168.168.3 link#3 UHS 0 2 lo0 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%lo0/64 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5::/32 fe80::1%lo0 U lo0 ff02::%lo0/32 fe80::1%lo0 U lo0 |
#ping 192.168.168.254
PING 192.168.168.254 (192.168.168.254): 56 data bytes ^C --- 192.168.168.254 ping statistics --- 2 packets transmitted, 0 packets received, 100.0% packet loss |
#ping 192.168.168.3
PING 192.168.168.3 (192.168.168.3): 56 data bytes 64 bytes from 192.168.168.3: icmp_seq=0 ttl=64 time=0.033 ms 64 bytes from 192.168.168.3: icmp_seq=1 ttl=64 time=0.037 ms ^C --- 192.168.168.3 ping statistics --- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.033/0.035/0.037/0.002 ms |
#ping 192.68.22.50
PING 192.68.22.50 (192.68.22.50): 56 data bytes 64 bytes from 192.68.22.50: icmp_seq=0 ttl=64 time=0.032 ms ^C --- 192.68.22.50 ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.032/0.032/0.032/0.000 ms |
#ping 192.68.22.1
PING 192.68.22.1 (192.68.22.1): 56 data bytes ^C --- 192.68.22.1 ping statistics --- 4 packets transmitted, 0 packets received, 100.0% packet loss |
#cat /etc/rc.conf
# -- sysinstall generated deltas -- # Tue Jul 3 21:38:50 2012 # Created: Tue Jul 3 21:38:50 2012 # 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. # defaultrouter="192.168.13.253" defaultrouter="192.68.22.1" font8x14="cp866-8x14" font8x16="cp866b-8x16" font8x8="cp866-8x8" gateway_enable="YES" hostname="freebsd1.net.nt" ifconfig_re0="inet 192.168.13.21 netmask 255.255.255.0" ifconfig_em0="inet 192.68.22.50 netmask 255.255.255.0" ifconfig_re1="inet 192.168.168.3 netmask 255.255.255.0" inetd_enable="YES" keymap="ru.koi8-r" mousechar_start="3" saver="daemon" scrnmap="koi8-r2cp866" sshd_enable="YES" |
#ls /etc
X11 hostid networks rc.initdiskless aliases hosts newsyslog.conf rc.resume amd.map hosts.allow nscd.conf rc.sendmail apmd.conf hosts.equiv nsmb.conf rc.shutdown auth.conf hosts.lpd nsswitch.conf rc.subr bluetooth inetd.conf ntp rc.suspend crontab libalias.conf ntp.conf regdomain.xml csh.cshrc lilalo opieaccess remote csh.login localtime opiekeys resolv.conf csh.logout locate.rc pam.d rmt ... dumpdates make.conf.bak printcap ssh fbtab manpath.config profile ssl freebsd-update.conf manpath.config.bak protocols sysctl.conf fstab master.passwd pwd.db syslog.conf ftpusers motd rc termcap gettytab mtree rc.bsdextended termcap.small gnats namedb rc.conf ttys group netconfig rc.conf~ zfs gss netstart rc.d host.conf network.subr rc.firewall |
#man e
|
#route add -net 172.30.11.0/24 192.168.168.254
add net 172.30.11.0: gateway 192.168.168.254 |
#ping 192.168.168.254
PING 192.168.168.254 (192.168.168.254): 56 data bytes ^C --- 192.168.168.254 ping statistics --- 5 packets transmitted, 0 packets received, 100.0% packet loss |
#vim /etc/rc.conf
--- /tmp/l3-saved-1452.15937.14089 2012-12-17 18:12:12.000000000 +0200 +++ /etc/rc.conf 2012-12-17 18:14:50.000000000 +0200 @@ -17,6 +17,8 @@ ifconfig_re0="inet 192.168.13.21 netmask 255.255.255.0" ifconfig_em0="inet 192.68.22.50 netmask 255.255.255.0" ifconfig_re1="inet 192.168.168.3 netmask 255.255.255.0" +route_0="add -net 172.30.11.0/24 192.168.168.254" +static_routes="0" inetd_enable="YES" keymap="ru.koi8-r" mousechar_start="3" |
#ls /etc/
X11 hostid networks rc.initdiskless aliases hosts newsyslog.conf rc.resume amd.map hosts.allow nscd.conf rc.sendmail apmd.conf hosts.equiv nsmb.conf rc.shutdown auth.conf hosts.lpd nsswitch.conf rc.subr bluetooth inetd.conf ntp rc.suspend crontab libalias.conf ntp.conf regdomain.xml csh.cshrc lilalo opieaccess remote csh.login localtime opiekeys resolv.conf csh.logout locate.rc pam.d rmt ... dumpdates make.conf.bak printcap ssh fbtab manpath.config profile ssl freebsd-update.conf manpath.config.bak protocols sysctl.conf fstab master.passwd pwd.db syslog.conf ftpusers motd rc termcap gettytab mtree rc.bsdextended termcap.small gnats namedb rc.conf ttys group netconfig rc.conf~ zfs gss netstart rc.d host.conf network.subr rc.firewall |
#/etc/netstart
devd already running? (pid=773). Setting hostuuid: 7e849979-a5fd-e5a7-4cc5-996bbbc13dc7. Setting hostid: 0xb8ad00ad. Starting Network: lo0 re0 em0 re1. lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3<RXCSUM,TXCSUM> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 nd6 options=3<PERFORMNUD,ACCEPT_RTADV> ... 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:02:01 inet 192.168.168.3 netmask 0xffffff00 broadcast 192.168.168.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active add net default: gateway 192.68.22.1 route: bad address: add Additional routing options: IP gateway=YES. |
#pwd
/root |
#netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.68.22.1 UGS 2 37 em0 127.0.0.1 link#5 UH 0 0 lo0 192.68.22.0/24 link#2 U 0 0 em0 192.68.22.50 link#2 UHS 0 0 lo0 192.168.13.0/24 link#1 U 1 4 re0 192.168.13.21 link#1 UHS 0 0 lo0 192.168.168.0/24 link#3 U 0 0 re1 192.168.168.3 link#3 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%lo0/64 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5::/32 fe80::1%lo0 U lo0 ff02::%lo0/32 fe80::1%lo0 U 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.13.21 netmask 0xffffff00 broadcast 192.168.13.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active em0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC> ether 00:16:4e:00:01:01 media: Ethernet autoselect (1000baseT <full-duplex>) ... ether 00:16:4e:00:02:01 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3<RXCSUM,TXCSUM> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 nd6 options=3<PERFORMNUD,ACCEPT_RTADV> |
#cat /etc/rc.conf
# -- sysinstall generated deltas -- # Tue Jul 3 21:38:50 2012 # Created: Tue Jul 3 21:38:50 2012 # 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. defaultrouter="192.168.13.253" # defaultrouter="192.68.22.1" font8x14="cp866-8x14" font8x16="cp866b-8x16" font8x8="cp866-8x8" ... # ifconfig_em0="inet 192.68.22.50 netmask 255.255.255.0" # ifconfig_re1="inet 192.168.168.3 netmask 255.255.255.0" # route_0="-net 172.30.11.0/24 192.168.168.254" # static_routes="0" inetd_enable="YES" keymap="ru.koi8-r" mousechar_start="3" saver="daemon" scrnmap="koi8-r2cp866" sshd_enable="YES" |
#netstat -r
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default fobos UGS 2 184 re0 localhost link#5 UH 0 48 lo0 192.168.13.0 link#1 U 1 43 re0 freebsd1 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire localhost.net.nt localhost.net.nt UH lo0 fe80::%lo0 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5:: fe80::1%lo0 U lo0 ff02::%lo0 fe80::1%lo0 U lo0 |
#netstat -n~r
netstat: illegal option -- ~ usage: netstat [-AaLnSWx] [-f protocol_family | -p protocol] [-M core] [-N system] netstat -i | -I interface [-abdhntW] [-f address_family] [-M core] [-N system] netstat -w wait [-I interface] [-d] [-M core] [-N system] [-q howmany] netstat -s [-s] [-z] [-f protocol_family | -p protocol] [-M core] [-N system] netstat -i | -I interface -s [-f protocol_family | -p protocol] [-M core] [-N system] netstat -m [-M core] [-N system] netstat -B [-I interface] netstat -r [-AanW] [-f address_family] [-M core] [-N system] netstat -rs [-s] [-M core] [-N system] netstat -g [-W] [-f address_family] [-M core] [-N system] netstat -gs [-s] [-f address_family] [-M core] [-N system] |
#netstat -nr
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.13.253 UGS 2 222 re0 127.0.0.1 link#5 UH 0 48 lo0 192.168.13.0/24 link#1 U 1 44 re0 192.168.13.21 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%lo0/64 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5::/32 fe80::1%lo0 U lo0 ff02::%lo0/32 fe80::1%lo0 U lo0 |
#route add -net 172.12.0.1/24 192.168.13.100
add net 172.12.0.1: gateway 192.168.13.100 |
#netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.13.253 UGS 2 314 re0 127.0.0.1 link#5 UH 0 48 lo0 172.12.0.0/24 192.168.13.100 UGS 0 0 re0 192.168.13.0/24 link#1 U 1 46 re0 192.168.13.21 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%lo0/64 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5::/32 fe80::1%lo0 U lo0 ff02::%lo0/32 fe80::1%lo0 U lo0 |
#route del -net 172.12.0.0./24
route: bad address: 172.12.0.0./24 |
#route del -net 172.12.0.0./24 192.168.13.100
route: bad address: 172.12.0.0./24 |
#route del -net 172.12.0.0/24
del net 172.12.0.0 |
#netstat -rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.13.253 UGS 2 482 re0 127.0.0.1 link#5 UH 0 48 lo0 192.168.13.0/24 link#1 U 1 56 re0 192.168.13.21 link#1 UHS 0 0 lo0 Internet6: Destination Gateway Flags Netif Expire ::1 ::1 UH lo0 fe80::%lo0/64 link#5 U lo0 fe80::1%lo0 link#5 UHS lo0 ff01:5::/32 fe80::1%lo0 U lo0 ff02::%lo0/32 fe80::1%lo0 U 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.13.21 netmask 0xffffff00 broadcast 192.168.13.255 media: Ethernet autoselect (100baseTX <full-duplex>) status: active em0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC> ether 00:16:4e:00:01:01 media: Ethernet autoselect (1000baseT <full-duplex>) ... ether 00:16:4e:00:02:01 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 options=3<RXCSUM,TXCSUM> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 nd6 options=3<PERFORMNUD,ACCEPT_RTADV> |
#ping ukr.net
PING ukr.net (195.214.195.105): 56 data bytes 64 bytes from 195.214.195.105: icmp_seq=0 ttl=59 time=0.831 ms 64 bytes from 195.214.195.105: icmp_seq=1 ttl=59 time=0.949 ms 64 bytes from 195.214.195.105: icmp_seq=2 ttl=59 time=0.941 ms ^C --- ukr.net ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.831/0.907/0.949/0.054 ms |
#ping ukr.net -n
usage: ping [-AaDdfnoQqRrv] [-c count] [-G sweepmaxsize] [-g sweepminsize] [-h sweepincrsize] [-i wait] [-l preload] [-M mask | time] [-m ttl] [-P policy] [-p pattern] [-S src_addr] [-s packetsize] [-t timeout] [-W waittime] [-z tos] host ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload] [-M mask | time] [-m ttl] [-P policy] [-p pattern] [-S src_addr] [-s packetsize] [-T ttl] [-t timeout] [-W waittime] [-z tos] mcast-group |
#ping -n .net
PING ukr.net (195.214.195.105): 56 data bytes 64 bytes from 195.214.195.105: icmp_seq=0 ttl=59 time=0.945 ms 64 bytes from 195.214.195.105: icmp_seq=1 ttl=59 time=0.936 ms 64 bytes from 195.214.195.105: icmp_seq=2 ttl=59 time=2.051 ms 64 bytes from 195.214.195.105: icmp_seq=3 ttl=59 time=11.670 ms ^C --- ukr.net ping statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.936/3.901/11.670/4.509 ms |
#ping -n -c 4 et
PING ukr.net (195.214.195.105): 56 data bytes 64 bytes from 195.214.195.105: icmp_seq=0 ttl=59 time=0.942 ms 64 bytes from 195.214.195.105: icmp_seq=1 ttl=59 time=0.907 ms 64 bytes from 195.214.195.105: icmp_seq=2 ttl=59 time=1.110 ms 64 bytes from 195.214.195.105: icmp_seq=3 ttl=59 time=0.908 ms --- ukr.net ping statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.907/0.967/1.110/0.084 ms |
#ping -n -w 5 et
ping: illegal option -- w usage: ping [-AaDdfnoQqRrv] [-c count] [-G sweepmaxsize] [-g sweepminsize] [-h sweepincrsize] [-i wait] [-l preload] [-M mask | time] [-m ttl] [-P policy] [-p pattern] [-S src_addr] [-s packetsize] [-t timeout] [-W waittime] [-z tos] host ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload] [-M mask | time] [-m ttl] [-P policy] [-p pattern] [-S src_addr] [-s packetsize] [-T ttl] [-t timeout] [-W waittime] [-z tos] mcast-group |
#ping -n -W5 ukr.net
PING ukr.net (195.214.195.105): 56 data bytes 64 bytes from 195.214.195.105: icmp_seq=0 ttl=59 time=0.826 ms 64 bytes from 195.214.195.105: icmp_seq=1 ttl=59 time=0.869 ms 64 bytes from 195.214.195.105: icmp_seq=2 ttl=59 time=1.105 ms 64 bytes from 195.214.195.105: icmp_seq=3 ttl=59 time=0.897 ms 64 bytes from 195.214.195.105: icmp_seq=4 ttl=59 time=0.969 ms 64 bytes from 195.214.195.105: icmp_seq=5 ttl=59 time=1.106 ms 64 bytes from 195.214.195.105: icmp_seq=6 ttl=59 time=0.909 ms 64 bytes from 195.214.195.105: icmp_seq=7 ttl=59 time=1.039 ms 64 bytes from 195.214.195.105: icmp_seq=8 ttl=59 time=0.871 ms ... 64 bytes from 195.214.195.105: icmp_seq=39 ttl=59 time=1.076 ms 64 bytes from 195.214.195.105: icmp_seq=40 ttl=59 time=0.998 ms 64 bytes from 195.214.195.105: icmp_seq=41 ttl=59 time=1.005 ms 64 bytes from 195.214.195.105: icmp_seq=42 ttl=59 time=0.969 ms 64 bytes from 195.214.195.105: icmp_seq=43 ttl=59 time=1.106 ms 64 bytes from 195.214.195.105: icmp_seq=44 ttl=59 time=1.033 ms ^C --- ukr.net ping statistics --- 45 packets transmitted, 45 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.826/1.090/3.765/0.420 ms |
#ping
usage: ping [-AaDdfnoQqRrv] [-c count] [-G sweepmaxsize] [-g sweepminsize] [-h sweepincrsize] [-i wait] [-l preload] [-M mask | time] [-m ttl] [-P policy] [-p pattern] [-S src_addr] [-s packetsize] [-t timeout] [-W waittime] [-z tos] host ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload] [-M mask | time] [-m ttl] [-P policy] [-p pattern] [-S src_addr] [-s packetsize] [-T ttl] [-t timeout] [-W waittime] [-z tos] mcast-group |
#ping ya.ru -f
usage: ping [-AaDdfnoQqRrv] [-c count] [-G sweepmaxsize] [-g sweepminsize] [-h sweepincrsize] [-i wait] [-l preload] [-M mask | time] [-m ttl] [-P policy] [-p pattern] [-S src_addr] [-s packetsize] [-t timeout] [-W waittime] [-z tos] host ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload] [-M mask | time] [-m ttl] [-P policy] [-p pattern] [-S src_addr] [-s packetsize] [-T ttl] [-t timeout] [-W waittime] [-z tos] mcast-group |
#man ping
|
#man ping
|
#man ping
|
#man ping
|
#ping ya.ru
PING ya.ru (87.250.250.3): 56 data bytes 64 bytes from 87.250.250.3: icmp_seq=0 ttl=57 time=17.676 ms ^C --- ya.ru ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 17.676/17.676/17.676/0.000 ms |
#ping ya.ru
PING ya.ru (87.250.250.3): 56 data bytes 64 bytes from 87.250.250.3: icmp_seq=0 ttl=57 time=17.676 ms ^C --- ya.ru ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 17.676/17.676/17.676/0.000 ms |
#ping ya.ru
PING ya.ru (87.250.250.3): 56 data bytes 64 bytes from 87.250.250.3: icmp_seq=0 ttl=57 time=17.676 ms ^C --- ya.ru ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 17.676/17.676/17.676/0.000 ms |
#ping ya.ru
PING ya.ru (87.250.250.3): 56 data bytes 64 bytes from 87.250.250.3: icmp_seq=0 ttl=57 time=17.676 ms ^C --- ya.ru ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 17.676/17.676/17.676/0.000 ms |
#ping -f ru
PING ya.ru (213.180.204.3): 56 data bytes ............^C. --- ya.ru ping statistics --- 446 packets transmitted, 434 packets received, 2.7% packet loss round-trip min/avg/max/stddev = 16.563/17.488/20.796/0.550 ms |
#ping -f ru
PING ya.ru (213.180.204.3): 56 data bytes ............^C. --- ya.ru ping statistics --- 446 packets transmitted, 434 packets received, 2.7% packet loss round-trip min/avg/max/stddev = 16.563/17.488/20.796/0.550 ms |
#ping -f ru
PING ya.ru (213.180.204.3): 56 data bytes ............^C. --- ya.ru ping statistics --- 446 packets transmitted, 434 packets received, 2.7% packet loss round-trip min/avg/max/stddev = 16.563/17.488/20.796/0.550 ms |
#ping -f ru
PING ya.ru (213.180.204.3): 56 data bytes ............^C. --- ya.ru ping statistics --- 446 packets transmitted, 434 packets received, 2.7% packet loss round-trip min/avg/max/stddev = 16.563/17.488/20.796/0.550 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
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
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
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] |
#man eroute
|
#man eroute
|
#man eroute
|
#vim /etc/services
|
#vim /etc/services
|
#vim /etc/services
|
#vim /etc/services
|
#Databeam Corporation
l3script: mc: command not found |
#Databeam Corporation
l3script: mc: command not found |
#Databeam Corporation
l3script: mc: command not found |
#Databeam Corporation
l3script: mc: command not found |
#telnet
telnet> quit |
#telnet
telnet> quit |
#telnet
telnet> quit |
#telnet
telnet> quit |
# -- sysinstall generated deltas -- # Tue Jul 3 21:38:50 2012 # Created: Tue Jul 3 21:38:50 2012 # 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. defaultrouter="192.168.13.253" # defaultrouter="192.68.22.1" font8x14="cp866-8x14" font8x16="cp866b-8x16" font8x8="cp866-8x8" gateway_enable="YES" hostname="freebsd1.net.nt" ifconfig_re0="inet 192.168.13.21 netmask 255.255.255.0" # ifconfig_em0="inet 192.68.22.50 netmask 255.255.255.0" # ifconfig_re1="inet 192.168.168.3 netmask 255.255.255.0" # route_0="-net 172.30.11.0/24 192.168.168.254" # static_routes="0" inetd_enable="YES" keymap="ru.koi8-r" mousechar_start="3" saver="daemon" scrnmap="koi8-r2cp866" sshd_enable="YES"
Время первой команды журнала | 19:49:52 2012- 7- 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 11:31:21 2012-12-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 22.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.74 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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