Журнал лабораторных работ

Содержание

Журнал

Пятница (07/31/09)

/dev/ttyp0
17:45:43
#[root@fbsd4:~]# route add -net 192.168.54.32 255.255.255.224 192.168.54.30
[root@fbsd4:~]# /etc/netstart
devd already running? (pid=705).
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> 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> mtu 1500
        options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
        inet 192.168.16.24 netmask 0xffffff00 broadcast 192.168.16.255
        ether 00:16:4e:00:00:04
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
add net default: gateway 192.168.16.254
Additional routing options:.
17:45:43
#[root@fbsd4:~]# netstat -rn -f inet
Routing tables
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.16.254     UGS         0       11    re0
127.0.0.1          127.0.0.1          UH          0        0    lo0
192.168.16         link#1             UC          0        0    re0
192.168.16.7       00:16:3e:00:00:07  UHLW        1       18    re0   1197
192.168.16.254     00:04:75:75:46:b1  UHLW        2        2    re0   1198
192.168.54/27      link#2             UC          0        0    re1
192.168.54.30      link#2             UHLW        2        0    re1
192.168.54.32/27   192.168.54.30      UGS         0        0    re1
17:45:47
#[root@fbsd4:~]# sh /etc/rc.d/routed
[root@fbsd4:~]# sh /etc/rc.d/rout
route6d  routed   routing
Usage: /etc/rc.d/routed [fast|force|one](start|stop|restart|rcvar|status|poll)
17:46:37
#[root@fbsd4:~]# sh /etc/rc.d/routed restart

17:46:39
#[root@fbsd4:~]# netstat -rn -f inet
Routing tables
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.16.254     UGS         0       26    re0
127.0.0.1          127.0.0.1          UH          0        0    lo0
192.168.16         link#1             UC          0        0    re0
192.168.16.7       00:16:3e:00:00:07  UHLW        1       89    re0   1143
192.168.16.254     00:04:75:75:46:b1  UHLW        2        5    re0   1191
192.168.54/27      link#2             UC          0        0    re1
192.168.54.30      link#2             UHLW        2        0    re1
192.168.54.32/27   192.168.54.30      UGS         0        0    re1
17:46:47
#[root@fbsd4:~]# netstat -rn -f inet
[root@fbsd4:~]# sh /etc/rc.d/routing restart
default              192.168.16.254       done
192.168.54.32        192.168.54.30        done
add net default: gateway 192.168.16.254
Additional routing options:.
Routing tables
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.16.254     UGS         0        6    re0
127.0.0.1          127.0.0.1          UH          0        0    lo0
192.168.16         link#1             UC          0        0    re0
192.168.16.7       00:16:3e:00:00:07  UHLW        1      122    re0   1134
192.168.16.254     00:04:75:75:46:b1  UHLW        2        6    re0   1194
192.168.54/27      link#2             UC          0        0    re1
192.168.54.30      link#2             UHLW        1        0    re1
17:47:19
#[root@fbsd4:~]# route add -net 192.168.54.64/27 192.168.54.30
[root@fbsd4:~]# route add -net 192.168.54.32/27 192.168.54.30
add net 192.168.54.32: gateway 192.168.54.30
add net 192.168.54.64: gateway 192.168.54.30
17:47:27
#[root@fbsd4:~]# route add -net 192.168.54.96/27 192.168.54.30
add net 192.168.54.96: gateway 192.168.54.30
17:47:38
#[root@fbsd4:~]# netstat -rn -f inet
[root@fbsd4:~]# route add -net 192.168.54.128/27 192.168.54.30
add net 192.168.54.128: gateway 192.168.54.30
Routing tables
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.16.254     UGS         0       26    re0
127.0.0.1          127.0.0.1          UH          0        0    lo0
192.168.16         link#1             UC          0        0    re0
192.168.16.7       00:16:3e:00:00:07  UHLW        1      219    re0   1079
192.168.16.254     00:04:75:75:46:b1  UHLW        2       10    re0   1185
192.168.54/27      link#2             UC          0        0    re1
192.168.54.30      link#2             UHLW        5        0    re1
192.168.54.32/27   192.168.54.30      UGS         0        0    re1
192.168.54.64/27   192.168.54.30      UGS         0        0    re1
192.168.54.96/27   192.168.54.30      UGS         0        0    re1
192.168.54.128/27  192.168.54.30      UGS         0        0    re1
17:48:02
#[root@fbsd4:~]# vim /etc/sysctl.conf
# $FreeBSD: src/etc/sysctl.conf,v 1.8 2003/03/13 18:43:50 mux Exp $
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#
~
~
~
~
~
~
~
~
~
~
~
"/etc/sysctl.conf" 11 lines, 415 characters
17:48:19
#[root@fbsd4:~]#

17:48:19
#[root@fbsd4:~]#

17:48:19
#[root@fbsd4:~]#

17:48:20
#[root@fbsd4:~]# exit
exit
Connection to 192.168.16.24 closed.
17:48:24
$ssh 192.168.16.
The authenticity of host '192.168.16.4 (192.168.16.4)' can't be established.
RSA key fingerprint is 51:5b:32:d8:70:19:6d:04:c7:b4:11:49:13:74:dc:bc.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/user/.ssh/known_hosts).
root@192.168.16.4's password:
Last login: Wed Jul 29 21:44:37 2009 from debian.net.nt
Linux debiant 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 UTC 2007 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
l3-agent is already running: pid=1430; pidfile=/root/.lilalo/l3-agent.pid
17:48:47
#ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:16:3E:00:00:04
          inet addr:192.168.16.4  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::216:3eff:fe00:4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:68915 errors:0 dropped:0 overruns:0 frame:0
          TX packets:59672 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:23533118 (22.4 MiB)  TX bytes:11016110 (10.5 MiB)
17:49:02
#ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:16:3E:00:01:04
          inet addr:192.168.54.30  Bcast:192.168.54.31  Mask:255.255.255.224
          inet6 addr: fe80::216:3eff:fe00:104/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:360 (360.0 b)  TX bytes:510 (510.0 b)
17:49:04
#ifconfig eth3
eth3: error fetching interface information: Device not found
17:49:10
#ifconfig eth2
eth2      Link encap:Ethernet  HWaddr 00:16:3E:00:02:04
          inet addr:192.168.54.33  Bcast:192.168.54.63  Mask:255.255.255.224
          inet6 addr: fe80::216:3eff:fe00:204/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:152 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10258 (10.0 KiB)  TX bytes:2010 (1.9 KiB)
17:49:12
#cat /proc/sys/net/ipv4/ip_forward
1
17:49:46
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.54.128  192.168.54.62   255.255.255.224 UG    0      0        0 eth2
192.168.54.0    0.0.0.0         255.255.255.224 U     0      0        0 eth1
192.168.54.32   0.0.0.0         255.255.255.224 U     0      0        0 eth2
192.168.54.64   192.168.54.62   255.255.255.224 UG    0      0        0 eth2
192.168.54.96   192.168.54.62   255.255.255.224 UG    0      0        0 eth2
192.168.16.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.16.254  0.0.0.0         UG    0      0        0 eth0
17:49:48
#route delete default

17:51:31
#route add default gw 192.168.54.1

17:51:44
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.54.128  192.168.54.62   255.255.255.224 UG    0      0        0 eth2
192.168.54.0    0.0.0.0         255.255.255.224 U     0      0        0 eth1
192.168.54.32   0.0.0.0         255.255.255.224 U     0      0        0 eth2
192.168.54.64   192.168.54.62   255.255.255.224 UG    0      0        0 eth2
192.168.54.96   192.168.54.62   255.255.255.224 UG    0      0        0 eth2
192.168.16.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.54.1    0.0.0.0         UG    0      0        0 eth1
17:51:46
#exit
exit
Connection to 192.168.16.4 closed.
17:51:55
$ssh 192.168.16.5
The authenticity of host '192.168.16.5 (192.168.16.5)' can't be established.
RSA key fingerprint is 51:5b:32:d8:70:19:6d:04:c7:b4:11:49:13:74:dc:bc.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/user/.ssh/known_hosts).
root@192.168.16.5's password:
Last login: Wed Jul 29 21:43:00 2009 from debian.net.nt
Linux debiant 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 UTC 2007 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
l3-agent is already running: pid=1590; pidfile=/root/.lilalo/l3-agent.pid
17:52:34
#ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:16:3E:00:00:05
          inet addr:192.168.16.5  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::216:3eff:fe00:5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:100873 errors:0 dropped:0 overruns:0 frame:0
          TX packets:56136 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:30628459 (29.2 MiB)  TX bytes:7753554 (7.3 MiB)
17:52:38
#ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:16:3E:00:01:05
          inet addr:192.168.54.65  Bcast:192.168.54.95  Mask:255.255.255.224
          inet6 addr: fe80::216:3eff:fe00:105/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:211 errors:0 dropped:0 overruns:0 frame:0
          TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:13628 (13.3 KiB)  TX bytes:6508 (6.3 KiB)
17:52:40
#ifconfig eth2
eth2      Link encap:Ethernet  HWaddr 00:16:3E:00:02:05
          inet addr:192.168.54.62  Bcast:192.168.54.63  Mask:255.255.255.224
          inet6 addr: fe80::216:3eff:fe00:205/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:62 errors:0 dropped:0 overruns:0 frame:0
          TX packets:214 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4260 (4.1 KiB)  TX bytes:13680 (13.3 KiB)
17:52:49
#cat /proc/sys
sys/           sysrq-trigger  sysvipc/
17:52:49
#cat /proc/sys/net/ipv4/ip_forward
1
17:53:04
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.54.128  192.168.54.94   255.255.255.224 UG    0      0        0 eth1
192.168.54.32   0.0.0.0         255.255.255.224 U     0      0        0 eth2
192.168.54.64   0.0.0.0         255.255.255.224 U     0      0        0 eth1
192.168.54.96   192.168.54.94   255.255.255.224 UG    0      0        0 eth1
192.168.16.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.54.33   0.0.0.0         UG    0      0        0 eth2
17:53:07
#exit
exit
Connection to 192.168.16.5 closed.
17:54:20
#ifconfig eth0
[user@debian7:~]$ ssh 192.168.16.6
The authenticity of host '192.168.16.6 (192.168.16.6)' can't be established.
RSA key fingerprint is 51:5b:32:d8:70:19:6d:04:c7:b4:11:49:13:74:dc:bc.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/user/.ssh/known_hosts).
root@192.168.16.6's password:
Last login: Wed Jul 29 21:44:42 2009 from debian.net.nt
Linux debiant 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 UTC 2007 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
...
permitted by applicable law.
l3-agent is already running: pid=1415; pidfile=/root/.lilalo/l3-agent.pid
eth0      Link encap:Ethernet  HWaddr 00:16:3E:00:00:06
          inet addr:192.168.16.6  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::216:3eff:fe00:6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8199 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11120 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:883605 (862.8 KiB)  TX bytes:2324931 (2.2 MiB)
17:54:33
#ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:16:3E:00:01:06
          inet addr:192.168.54.94  Bcast:192.168.54.95  Mask:255.255.255.224
          inet6 addr: fe80::216:3eff:fe00:106/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:104 errors:0 dropped:0 overruns:0 frame:0
          TX packets:243 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7786 (7.6 KiB)  TX bytes:15022 (14.6 KiB)
17:54:34
#ifconfig eth2
eth2      Link encap:Ethernet  HWaddr 00:16:3E:00:02:06
          inet addr:192.168.54.97  Bcast:192.168.54.127  Mask:255.255.255.224
          inet6 addr: fe80::216:3eff:fe00:206/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:149 errors:0 dropped:0 overruns:0 frame:0
          TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9106 (8.8 KiB)  TX bytes:4432 (4.3 KiB)
17:54:37
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.54.128  192.168.54.126  255.255.255.224 UG    0      0        0 eth2
192.168.54.64   0.0.0.0         255.255.255.224 U     0      0        0 eth1
192.168.54.96   0.0.0.0         255.255.255.224 U     0      0        0 eth2
192.168.16.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.54.65   0.0.0.0         UG    0      0        0 eth1
17:54:41
#exit
exit
Connection to 192.168.16.6 closed.
17:55:00
$ssh 192.168.16.25
The authenticity of host '192.168.16.25 (192.168.16.25)' can't be established.
DSA key fingerprint is 13:3f:fb:2a:53:62:8e:f8:0e:c7:3a:c9:10:99:b6:25.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/user/.ssh/known_hosts).
Password:
Last login: Fri Jul 31 15:17:43 2009
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008
Welcome to FreeBSD!
...
   along with the mailing lists, can be searched by going to
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
17:57:45
$ssh 192.168.16.26
[root@fbsd5:~]# exit
exit
Connection to 192.168.16.25 closed.
The authenticity of host '192.168.16.26 (192.168.16.26)' can't be established.
DSA key fingerprint is 13:3f:fb:2a:53:62:8e:f8:0e:c7:3a:c9:10:99:b6:25.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/user/.ssh/known_hosts).
Password:
Last login: Fri Jul 24 17:34:52 2009 from debian.net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
...
   along with the mailing lists, can be searched by going to
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
17:59:44
#[root@fbsd6:~]#
[root@fbsd6:~]#
17:59:44
#[root@fbsd6:~]#

17:59:44
#[root@fbsd6:~]# ifconfig re0
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
        inet 192.168.16.26 netmask 0xffffff00 broadcast 192.168.16.255
        ether 00:16:4e:00:00:06
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
17:59:53
#[root@fbsd6:~]# netstat -rn
[root@fbsd6:~]# ifconfig re1
re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
        inet 192.168.54.158 netmask 0xffffffe0 broadcast 192.168.54.159
        ether 00:16:4e:00:01:06
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
Routing tables
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
...
192.168.16.254     00:04:75:75:46:b1  UHLW        1       13    re0   1183
192.168.54.128/27  link#2             UC          0        0    re1
192.168.54.129     00:16:4e:00:01:05  UHLW        2        0    re1   1134
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
18:00:45
#[root@fbsd6:~]# ping ya.ru
[root@fbsd6:~]# ping ya.ru
PING ya.ru (77.88.21.8): 56 data bytes
36 bytes from 192.168.54.129: Destination Host Unreachable
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst
 4  5  00 5400 58d1   0 0000  40  01 c831 192.168.54.158  77.88.21.8
^C
--- ya.ru ping statistics ---
7 packets transmitted, 0 packets received, 100% packet loss
õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × /var/mail/root
PING ya.ru (213.180.204.8): 56 data bytes
^C
--- ya.ru ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
18:01:26
#[root@fbsd6:~]# exit
[root@fbsd6:~]# traceroute -n ya.ru
traceroute: Warning: ya.ru has multiple addresses; using 77.88.21.8
traceroute to ya.ru (77.88.21.8), 64 hops max, 40 byte packets
 1  192.168.54.129  1.534 ms  2.634 ms  0.872 ms
 2  192.168.54.97  2.583 ms  1.813 ms  1.702 ms
 3  192.168.54.65  2.923 ms  1.497 ms  1.114 ms
 4  192.168.54.33  2.492 ms  1.976 ms  1.626 ms
 5  192.168.54.1  2.928 ms  2.220 ms  1.908 ms
 6  * *^C
exit
Connection to 192.168.16.26 closed.
18:01:31
$ssh 192.168.16.254
  7
  8 # Uncomment the following to stop low-level messages on console
  9 #kernel.printk = 4 4 1 7
 10
    r)############################################################3
 16 # Turn on Source Address Verification in all interfaces to
"/etc/sysctl.conf" 68L, 2283C
 17 # prevent some spoofing attacks
 18 #net.ipv4.conf.default.rp_filter=1
 19 #net.ipv4.conf.all.rp_filter=1 to enable Spoof protection (reverse-path filtee
 20
 21 # Uncomment the next line to enable TCP/IP SYN cookies
/dev/ttypc
18:02:26
$screen -x
прошло 10 минут
/dev/ttyp0
18:13:12
$ssh 192.168.16.24
The authenticity of host '192.168.16.24 (192.168.16.24)' can't be established.
DSA key fingerprint is 13:3f:fb:2a:53:62:8e:f8:0e:c7:3a:c9:10:99:b6:25.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/user/.ssh/known_hosts).
Password:
Last login: Fri Jul 31 18:41:09 2009 from 192.168.16.7
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008
Welcome to FreeBSD!
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
Removing stale pidfile
18:14:12
#[root@fbsd4:~]# grep route /etc/defaults/rc.conf | less
18:14:39
#[root@fbsd4:~]# grep route /etc/defaults/rc.conf | less
18:16:15
#[root@fbsd4:~]# vim /etc/rc.conf
    different instances of the same file when making changes.
    Quit, or continue with caution.
(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /etc/rc.conf"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/etc/.rc.conf.swp"
    to avoid this message.
Swap file "/etc/.rc.conf.swp" already exists!
18:16:35
#[root@fbsd4:~]#

18:16:36
#[root@fbsd4:~]#

18:16:44
#[root@fbsd4:~]# vim /etc/rc.conf
"/etc/rc.conf" 21 lines, 621 characters written
õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × /var/mail/root
18:20:37
#[root@fbsd4:~]#
[root@fbsd4:~]# mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/root": 708 messages 691 new 708 unread
 U  1 root@fbsdvm.unix.nt   Fri Jul 24 16:20  24/938   "Cron <root@fbsdvm>    "
 U  2 root@fbsdvm.unix.nt   Fri Jul 24 16:30  24/936   "Cron <root@fbsdvm>    "
 U  3 root@fbsdvm.unix.nt   Fri Jul 24 16:40  24/936   "Cron <root@fbsdvm>    "
 U  4 root@fbsdvm.unix.nt   Fri Jul 24 16:50  24/936   "Cron <root@fbsdvm>    "
 U  5 root@fbsdvm.unix.nt   Fri Jul 24 17:00  24/936   "Cron <root@fbsdvm>    "
 U  6 root@fbsdvm.unix.nt   Fri Jul 24 17:10  24/936   "Cron <root@fbsdvm>    "
 U  7 root@fbsdvm.unix.nt   Fri Jul 24 17:20  24/936   "Cron <root@fbsdvm>    "
...
Subject: Cron <root@fbsdvm>    ntpdate ntp.psn.ru
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin>
X-Cron-Env: <HOME=/var/log>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
24 Jul 19:40:23 ntpdate[959]: adjust time server 194.149.67.130 offset 0.047718 sec
& q
Saved 1 message in mbox
Held 707 messages in /var/mail/root
18:20:37
#[root@fbsd4:~]#

18:20:37
#[root@fbsd4:~]# cat /etc/rc.conf
sshd_enable="yes"
font8x14="cp866-8x14"
font8x16="cp866b-8x16"
font8x8="cp866-8x8"
keymap="ru.koi8-r"
keyrate="normal"
local_startup="/usr/local/etc/rc.d"
mousechar_start="3"
moused_enable="YES"
saver="fire"
scrnmap="koi8-r2cp866"
usbd_enable="YES"
inetd_enable=yes
defaultrouter="192.168.16.254"
ifconfig_re0="inet 192.168.16.24  netmask 255.255.255.0"
hostname="fbsd4.net.nt"
static_routes="54_32 54_64 54_96 54_128"
route_54_32="-net 192.168.54.32/27 192.168.54.30"
route_54_64="-net 192.168.54.64/27 192.168.54.30"
route_54_96="-net 192.168.54.96/27 192.168.54.30"
route_54_128="-net 192.168.54.128/27 192.168.54.30"
18:21:00
#[root@fbsd4:~]# /etc/rc.d/routing restart
[root@fbsd4:~]# netstat -rn -f inet > /tmp/before
default              192.168.16.254       done
192.168.54.32        192.168.54.30        done
192.168.54.64        192.168.54.30        done
192.168.54.96        192.168.54.30        done
192.168.54.128       192.168.54.30        done
add net default: gateway 192.168.16.254
add net 192.168.54.32: gateway 192.168.54.30
add net 192.168.54.64: gateway 192.168.54.30
add net 192.168.54.96: gateway 192.168.54.30
add net 192.168.54.128: gateway 192.168.54.30
Additional routing options:.
18:21:20
#[root@fbsd4:~]# vimdiff /tmp/after /tmp/before
  192.168.16         link#1
                                        Flags    Refs      Use  Netif Expire
  default            192.168.16.254     UGS         0     1684    re0
                                        UH          0       96    lo0
  192.168.16.204     00:16:35:7d:81:ee  UC          0        0    re0
  192.168.16.7       00:16:3e:00:00:07  UHLW        1     1107    re0    745
  192.168.16.204     00:16:35:7d:81:ee  UHLW        1     5459    re0    193
  192.168.16.254     00:04:75:75:46:b1  UHLW        2       75    re0   1175
  192.168.54/27      link#2             UC          0        0    re1
"/192.168.54.30      00:16:3e:00:01:04  UHLW        5        0    re1   1189
...
  192.168.54.96/27   192.168.54.30      UGS         0        6    re1
  192.168.54.128/27  192.168.54.30      UGS         0      772    re1
  ~
  ~
  ~
  ~
  ~
  ~
  ~
õ ×ÁÓ ÅÓÔØ ÐÏÞÔÁ × /var/mail/root
18:21:45
#[root@fbsd4:~]#

18:21:45
#[root@fbsd4:~]#

18:21:46
#[root@fbsd4:~]#

18:21:53
#[root@fbsd4:~]# /etc/netstart restart
[root@fbsd4:~]# netstat -rn
Routing tables
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.16.254     UGS         0       48    re0
127.0.0.1          127.0.0.1          UH          0       96    lo0
192.168.16         link#1             UC          0        0    re0
192.168.16.7       00:16:3e:00:00:07  UHLW        1     1235    re0    692
192.168.16.204     00:16:35:7d:81:ee  UHLW        1     5459    re0    140
192.168.16.254     00:04:75:75:46:b1  UHLW        2       79    re0   1163
...
add net default: gateway 192.168.16.254
route: writing to routing socket: File exists
add net 192.168.54.32: gateway 192.168.54.30: route already in table
route: writing to routing socket: File exists
add net 192.168.54.64: gateway 192.168.54.30: route already in table
route: writing to routing socket: File exists
add net 192.168.54.96: gateway 192.168.54.30: route already in table
route: writing to routing socket: File exists
add net 192.168.54.128: gateway 192.168.54.30: route already in table
Additional routing options:.
18:22:50
#[root@fbsd4:~]# reboot
[root@fbsd4:~]# cat /etc/sysctl.conf
# $FreeBSD: src/etc/sysctl.conf,v 1.8 2003/03/13 18:43:50 mux Exp $
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#
# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0
net.inet6.ip6.v6only=0
net.inet.ip.forwarding=1
Connection to 192.168.16.24 closed by remote host.
Connection to 192.168.16.24 closed.
18:22:58
$ping 192.168.16.24
PING 192.168.16.24 (192.168.16.24) 56(84) bytes of data.
From 192.168.16.7 icmp_seq=10 Destination Host Unreachable
From 192.168.16.7 icmp_seq=11 Destination Host Unreachable
From 192.168.16.7 icmp_seq=12 Destination Host Unreachable
From 192.168.16.7 icmp_seq=14 Destination Host Unreachable
From 192.168.16.7 icmp_seq=15 Destination Host Unreachable
From 192.168.16.7 icmp_seq=16 Destination Host Unreachable
From 192.168.16.7 icmp_seq=18 Destination Host Unreachable
From 192.168.16.7 icmp_seq=19 Destination Host Unreachable
From 192.168.16.7 icmp_seq=20 Destination Host Unreachable
...
64 bytes from 192.168.16.24: icmp_seq=91 ttl=64 time=0.440 ms
64 bytes from 192.168.16.24: icmp_seq=92 ttl=64 time=0.490 ms
64 bytes from 192.168.16.24: icmp_seq=93 ttl=64 time=0.412 ms
64 bytes from 192.168.16.24: icmp_seq=94 ttl=64 time=0.512 ms
64 bytes from 192.168.16.24: icmp_seq=95 ttl=64 time=0.383 ms
64 bytes from 192.168.16.24: icmp_seq=96 ttl=64 time=0.363 ms
64 bytes from 192.168.16.24: icmp_seq=97 ttl=64 time=0.399 ms
--- 192.168.16.24 ping statistics ---
97 packets transmitted, 65 received, +18 errors, 32% packet loss, time 96040ms
rtt min/avg/max/mdev = 0.226/25.135/1305.043/164.324 ms, pipe 3
18:30:55