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

Содержание

Журнал

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

/dev/ttyp0
19:43:32
#ping ya.ru
PING ya.ru (77.88.21.8) 56(84) bytes of data.
64 bytes from ya.ru (77.88.21.8): icmp_seq=1 ttl=51 time=79.2 ms
--- ya.ru ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 79.218/79.218/79.218/0.000 ms

Среда (07/29/09)

/dev/ttyp7
20:12:02
#tcpd
tcpd       tcpdchk    tcpdmatch  tcpdump
20:12:02
#tcpd
tcpd       tcpdchk    tcpdmatch  tcpdump
20:12:02
#tcpdump -i eth1 -n icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
0 packets captured
0 packets received by filter
0 packets dropped by kernel
20:12:30
#sysctl -a | grep forward
error: "Operation not permitted" reading key "net.ipv6.route.flush"
error: "Operation not permitted" reading key "net.ipv4.route.flush"
net.ipv6.conf.eth1.forwarding = 0
net.ipv6.conf.eth2.forwarding = 0
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.all.forwarding = 0
net.ipv6.conf.eth0.forwarding = 0
net.ipv6.conf.lo.forwarding = 0
net.ipv4.conf.eth1.mc_forwarding = 0
net.ipv4.conf.eth1.forwarding = 0
net.ipv4.conf.eth2.mc_forwarding = 0
net.ipv4.conf.eth2.forwarding = 0
net.ipv4.conf.eth0.mc_forwarding = 0
net.ipv4.conf.eth0.forwarding = 0
net.ipv4.conf.lo.mc_forwarding = 0
net.ipv4.conf.lo.forwarding = 0
net.ipv4.conf.default.mc_forwarding = 0
net.ipv4.conf.default.forwarding = 0
net.ipv4.conf.all.mc_forwarding = 0
net.ipv4.conf.all.forwarding = 0
net.ipv4.ip_forward = 0
20:12:40
#cat /proc/sys/net/ipv4/ip_forward
0
20:13:19
#sysctl net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
20:13:56
#cat /proc/sys/net/ipv4/ip_forward
1
20:13:58
#tcpdump -i eth1 -n icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
21:15:05.671681 IP 192.168.54.158 > 93.158.134.8: ICMP echo request, id 10765, seq 282, length 64
21:15:07.473505 IP 192.168.54.158 > 93.158.134.8: ICMP echo request, id 10765, seq 283, length 64
21:15:09.275532 IP 192.168.54.158 > 93.158.134.8: ICMP echo request, id 10765, seq 284, length 64
21:15:11.077457 IP 192.168.54.158 > 93.158.134.8: ICMP echo request, id 10765, seq 285, length 64
21:15:12.879243 IP 192.168.54.158 > 93.158.134.8: ICMP echo request, id 10765, seq 286, length 64
21:15:14.681260 IP 192.168.54.158 > 93.158.134.8: ICMP echo request, id 10765, seq 287, length 64
6 packets captured
6 packets received by filter
0 packets dropped by kernel
прошло 29 минут
/dev/ttyp7
20:43:00
#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   192.168.54.94   255.255.255.224 UG    0      0        0 eth1
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
20:43:04
#route delete -net 192.168.54.64/27 gw

20:44:24
#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

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

/dev/ttyp3
17:25:27
#history | less
прошло 27 минут
/dev/ttyp4
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
прошло 50 минут
/dev/ttyp5
18:43:37
#vim /etc/network/
18:44:06
#cd /etc/network

18:44:41
#ls
if-down.d  if-post-down.d  if-pre-up.d  if-up.d  interfaces  run
18:46:45
#vim /etc/home/user/if1
18:47:05
#cd /home/user/

18:47:17
#vim if1
18:47:38
#vim /etc/network/interfaces
18:48:30
#vim /etc/network/interfaces
18:48:36
#ls
hello  if1  ug-bsdnet.pdf  ug-lnet.pdf
18:48:40
#rm if1

/dev/ttyp1
18:50:02
#vim /etc/sysctl.conf
--- /tmp/l3-saved-2850.4750.7859	2009-07-31 19:50:08.000000000 +0300
+++ /etc/sysctl.conf	2009-07-31 19:50:45.000000000 +0300
@@ -20,7 +20,7 @@
 #net.ipv4.tcp_syncookies=1
 
 # Uncomment the next line to enable packet forwarding for IPv4
-#net.ipv4.conf.default.forwarding=1
+net.ipv4.conf.default.forwarding=1
 
 # Uncomment the next line to enable packet forwarding for IPv6
 #net.ipv6.conf.default.forwarding=1
прошло 13 минут
/dev/tty1
19:03:21
#vim /etc/network/interfaces
19:03:46
#vim /etc/network/interfaces
19:03:51
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
19:03:53
#/etc/init.d/networking restart
Reconfiguring network interfaces.../etc/network/interfaces:8: too few parameters for iface line
ifdown: couldn't read interfaces file "/etc/network/interfaces"
/etc/network/interfaces:8: too few parameters for iface line
ifup: couldn't read interfaces file "/etc/network/interfaces"
failed.
19:03:59
#vim /etc/network/interfaces
--- /tmp/l3-saved-1281.4625.17535	2009-07-31 20:04:05.000000000 +0300
+++ /etc/network/interfaces	2009-07-31 20:04:38.000000000 +0300
@@ -5,11 +5,11 @@
          netmask 255.255.255.0
 #         gateway 192.168.16.254
 
-iface eth1
+iface eth1 inet static
          address 192.168.54.65
          netmask 255.255.255.224
 
-iface eth2
+iface eth2 inet static
          address 192.168.54.62
          netmask 255.255.255.224
 
19:04:38
#/etc/init.d/networking restart
Reconfiguring network interfaces...done.
19:04:39
#ifconfig
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:33 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6423 (6.2 KiB)  TX bytes:994 (994.0 b)
19:04:54
#ifconfig
~
~
~
"/etc/network/interfaces" 18L, 526C записано
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:36 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7068 (6.9 KiB)  TX bytes:1332 (1.3 KiB)
19:04:55
#/etc/init.d/networking restart
Reconfiguring network interfaces...done.
19:05:10
#/etc/init.d/networking restart
  2 iface lo inet loopback$
             address 192.168.16.5$
  3 iface  etnetmask 255.255.255.0$
  5           gateway 192.168.16.254$
  6 #
  7 $
             address 192.168.54.65$
  8 iface ethnetmask 255.255.255.224$
 10
 11 $
             address 192.168.54.62$
 12 iface ethnetmask 255.255.255.224$
 14
 15 $
 16 up route add default gw 192.168.54.33$
 17 up route add -net 192.168.54.96 netmask 255.255.255.224 gw 192.168.54.94$
 18 up route add -net 192.168.54.128 netmask 255.255.255.224 gw 192.168.54.94$
Reconfiguring network interfaces...done.
19:05:11
#ifconfig
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:26 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7668 (7.4 KiB)  TX bytes:2224 (2.1 KiB)
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
...
          collisions:0 txqueuelen:1000
          RX bytes:160 (160.0 b)  TX bytes:238 (238.0 b)
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:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:60 (60.0 b)  TX bytes:4428 (4.3 KiB)
19:05:14
#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
19:05:17
#cat /proc/sys/net/ipv4/ip_forward
1
прошло 109 минут
/dev/ttyp1
20:55:15
#apt-get install xinetd
Чтение списков пакетов... Готово
Построение дерева зависимостей... Готово
НОВЫЕ пакеты, которые будут установлены:
  xinetd
обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 55 пакетов не обновлено.
Необходимо скачать 137kБ архивов.
После рас