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

Содержание

Журнал

Понедельник (06/01/09)

/dev/pts/1
16:43:25
#init 6

прошло 12 минут
/dev/pts/1
16:55:36
#vlan help
bash: vlan: команда не найдена
16:55:45
#vconfig
Expecting argc to be 3-5, inclusive.  Was: 1
Usage: add             [interface-name] [vlan_id]
       rem             [vlan-name]
       set_flag        [interface-name] [flag-num]       [0 | 1]
       set_egress_map  [vlan-name]      [skb_priority]   [vlan_qos]
       set_ingress_map [vlan-name]      [skb_priority]   [vlan_qos]
       set_name_type   [name-type]
* The [interface-name] is the name of the ethernet card that hosts
  the VLAN you are talking about.
* The vlan_id is the identifier (0-4095) of the VLAN you are operating on.
* skb_priority is the priority in the socket buffer (sk_buff).
* vlan_qos is the 3 bit priority in the VLAN header
* name-type:  VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
              DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
* FLAGS:  1 REORDER_HDR  When this is set, the VLAN device will move the
            ethernet header around to make it look exactly like a real
            ethernet device.  This may help programs such as DHCPd which
            read the raw ethernet packet and make assumptions about the
            location of bytes.  If you don't need it, don't turn it on, because
            there will be at least a small performance degradation.  Default
            is OFF.
16:55:56
#vconfig add eth0 vlan 101
ERROR: trying to add VLAN #0 to IF -:eth0:-  error: File exists
/dev/pts/4
16:58:34
#ssh root@10.0.35.100
root@10.0.35.100's password:
Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 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.
Last login: Mon Jun  1 17:11:52 2009 from linux6.unix.nt
l3-agent is already running: pid=1765; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/1
16:59:44
#vconfig add eth0 101
Added VLAN with VID == 101 to IF -:eth0:-
/dev/pts/4
17:00:20
#screen -x
/dev/pts/1
17:05:06
#ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:1b:fc:7d:bb:47
          inet addr:192.168.15.1  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:fcff:fe7d:bb47/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6418 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4156 errors:0 dropped:0 overruns:0 carrier:6
          collisions:0 txqueuelen:1000
          RX bytes:2593746 (2.4 MiB)  TX bytes:302685 (295.5 KiB)
eth0.0    Link encap:Ethernet  HWaddr 00:1b:fc:7d:bb:47
          BROADCAST MULTICAST  MTU:1500  Metric:1
...
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
17:05:18
#ifconfig eth0.101 192.168.101.1 netmask 255.255.255.0

17:06:50
#ip route
192.168.101.0/24 dev eth0.101  proto kernel  scope link  src 192.168.101.1
192.168.15.0/24 dev eth0  proto kernel  scope link  src 192.168.15.1
default via 192.168.15.254 dev eth0
17:07:05
#history
  353  fdisk -lu /devsda
  354  fdisk -lu /dev/sda
  355  fdisk -lu /dev/sdb
  356  apt-get install mkisofs
  357  apt-get install dvd+rw-tools
  358  mount -o loop /root/etc.iso /mnt
  359  ls -l /dev/loop1
  360  ls -l /dev/loop2
  361  mdadm
  362  ndadm -C --help | less
...
  492  vlan
  493  vlan help
  494  vconfig
  495*
  496  ping 192.168.15.254
  497  vconfig add eth0 101
  498  ifconfig -a
  499  ifconfig eth0.101 192.168.101.1 netmask 255.255.255.0
  500  ip route
  501  history
/dev/pts/4
17:09:00
#screen -x
17:09:09
#da
bash: da: команда не найдена
17:09:17
#ssh root@10.0.35.100
ssh: connect to host 10.0.35.100 port 22: Connection refused
/dev/pts/4
17:10:09
#ssh root@192.168.15.254
The authenticity of host '192.168.15.254 (192.168.15.254)' can't be established.
RSA key fingerprint is 7e:ed:6a:01:cb:0b:a2:37:07:c5:64:c0:e0:23:f1:e4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.15.254' (RSA) to the list of known hosts.
We'd like to keep you up to date about:
  * Software feature updates
  * New product announcements
  * Special events
Please register your products now at:  www.ProCurve.com
root@192.168.15.254's password:
Received disconnect from 192.168.15.254: 2:
Sorry, the maximum number of sessions are active.  Try again later.
/dev/pts/4
17:12:46
#screen -x
/dev/pts/4
17:12:59
#ssh 192.168.15.254
We'd like to keep you up to date about:
  * Software feature updates
  * New product announcements
  * Special events
Please register your products now at:  www.ProCurve.com
root@192.168.15.254's password:
Received disconnect from 192.168.15.254: 2:
Sorry, the maximum number of sessions are active.  Try again later.
17:13:53
#ssh 192.168.15.254
We'd like to keep you up to date about:
  * Software feature updates
  * New product announcements
  * Special events
Please register your products now at:  www.ProCurve.com
root@192.168.15.254's password:
Received disconnect from 192.168.15.254: 2:
Sorry, the maximum number of sessions are active.  Try again later.
прошло 12 минут
/dev/pts/1
17:26:05
#echo 1 > /proc/sys/net/ipv4/ip_forward

Вторник (06/02/09)

/dev/pts/1
09:29:36
#iproute
bash: iproute: команда не найдена
/dev/pts/4
09:29:56
#ssh 192.168.15.254
Connection to 192.168.15.254 closed by remote host.
/dev/pts/1
09:35:34
#ip route
192.168.15.0/24 dev eth0  proto kernel  scope link  src 192.168.15.1
default via 192.168.15.254 dev eth0
09:35:38
#vconfig eth0 101
WARNING:  Could not open /proc/net/vlan/config.  Maybe you need to load the 8021q module, or maybe you are not using PROCFS??
Unknown command -:eth0:-
Usage: add             [interface-name] [vlan_id]
       rem             [vlan-name]
       set_flag        [interface-name] [flag-num]       [0 | 1]
       set_egress_map  [vlan-name]      [skb_priority]   [vlan_qos]
       set_ingress_map [vlan-name]      [skb_priority]   [vlan_qos]
       set_name_type   [name-type]
* The [interface-name] is the name of the ethernet card that hosts
  the VLAN you are talking about.
...
* vlan_qos is the 3 bit priority in the VLAN header
* name-type:  VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
              DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
* FLAGS:  1 REORDER_HDR  When this is set, the VLAN device will move the
            ethernet header around to make it look exactly like a real
            ethernet device.  This may help programs such as DHCPd which
            read the raw ethernet packet and make assumptions about the
            location of bytes.  If you don't need it, don't turn it on, because
            there will be at least a small performance degradation.  Default
            is OFF.
09:40:10
#vconfig
Expecting argc to be 3-5, inclusive.  Was: 1
Usage: add             [interface-name] [vlan_id]
       rem             [vlan-name]
       set_flag        [interface-name] [flag-num]       [0 | 1]
       set_egress_map  [vlan-name]      [skb_priority]   [vlan_qos]
       set_ingress_map [vlan-name]      [skb_priority]   [vlan_qos]
       set_name_type   [name-type]
* The [interface-name] is the name of the ethernet card that hosts
  the VLAN you are talking about.
* The vlan_id is the identifier (0-4095) of the VLAN you are operating on.
* skb_priority is the priority in the socket buffer (sk_buff).
* vlan_qos is the 3 bit priority in the VLAN header
* name-type:  VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
              DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
* FLAGS:  1 REORDER_HDR  When this is set, the VLAN device will move the
            ethernet header around to make it look exactly like a real
            ethernet device.  This may help programs such as DHCPd which
            read the raw ethernet packet and make assumptions about the
            location of bytes.  If you don't need it, don't turn it on, because
            there will be at least a small performance degradation.  Default
            is OFF.
09:40:34
#vconfig eth0 101
WARNING:  Could not open /proc/net/vlan/config.  Maybe you need to load the 8021q module, or maybe you are not using PROCFS??
Unknown command -:eth0:-
Usage: add             [interface-name] [vlan_id]
       rem             [vlan-name]
       set_flag        [interface-name] [flag-num]       [0 | 1]
       set_egress_map  [vlan-name]      [skb_priority]   [vlan_qos]
       set_ingress_map [vlan-name]      [skb_priority]   [vlan_qos]
       set_name_type   [name-type]
* The [interface-name] is the name of the ethernet card that hosts
  the VLAN you are talking about.
...
* vlan_qos is the 3 bit priority in the VLAN header
* name-type:  VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
              DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
* FLAGS:  1 REORDER_HDR  When this is set, the VLAN device will move the
            ethernet header around to make it look exactly like a real
            ethernet device.  This may help programs such as DHCPd which
            read the raw ethernet packet and make assumptions about the
            location of bytes.  If you don't need it, don't turn it on, because
            there will be at least a small performance degradation.  Default
            is OFF.
09:41:09
#vconfig add eth0 101
WARNING:  Could not open /proc/net/vlan/config.  Maybe you need to load the 8021q module, or maybe you are not using PROCFS??
Added VLAN with VID == 101 to IF -:eth0:-
09:41:21
#ifconfi -a
bash: ifconfi: команда не найдена
09:41:29
#ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:1b:fc:7d:bb:47
          inet addr:192.168.15.1  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::21b:fcff:fe7d:bb47/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4372 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3867 errors:0 dropped:0 overruns:0 carrier:2
          collisions:0 txqueuelen:1000
          RX bytes:4360597 (4.1 MiB)  TX bytes:433388 (423.2 KiB)
eth0.101  Link encap:Ethernet  HWaddr 00:1b:fc:7d:bb:47
          BROADCAST MULTICAST  MTU:1500  Metric:1
...
          collisions:0 txqueuelen:0
          RX bytes:276 (276.0 B)  TX bytes:0 (0.0 B)
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
09:41:33
#ifconfig eth0.101 192.168.101.1 netmask 255.255.255.0

09:42:41
#ip route
192.168.101.0/24 dev eth0.101  proto kernel  scope link  src 192.168.101.1
192.168.15.0/24 dev eth0  proto kernel  scope link  src 192.168.15.1
default via 192.168.15.254 dev eth0
09:44:10
#echo 1 > /proc/sys/net/ipv4/ip_forward

09:50:32
#ip route
192.168.101.0/24 dev eth0.101  proto kernel  scope link  src 192.168.101.1
192.168.15.0/24 dev eth0  proto kernel  scope link  src 192.168.15.1
default via 192.168.15.254 dev eth0
09:50:43
#vi /etc/sysctl.conf
09:52:01
# 41 +q436f+q6b75+q6b64+q6b72+q6b6c+q2332+q2334+q2569+q2a37+q6b31
 48 #net.ipv4.conf.all.accept_redirects = 0
 49 #net.ipv6.conf.all.accept_redirects = 0
 50 # _or_
 51 # Accept ICMP redirects only for gateways listed in our default
 52 # gateway list (enabled by default)
 53 # net.ipv4.conf.all.secure_redirects = 1
 54 #
 55 # Do not send ICMP redirects (we are not a router)
 56 #net.ipv4.conf.all.send_redirects = 0
 57 #
 58 # Do not accept IP source route packets (we are not a router)
 59 #net.ipv4.conf.all.accept_source_route = 0
 60 #net.ipv6.conf.all.accept_source_route = 0
 61 #
 62 # Log Martian Packets
 63 #net.ipv4.conf.all.log_martians = 1
 64 #
 65 # The contents of /proc/<pid>/maps and smaps files are only visible to
 66 # readers that are allowed to ptrace() the process
 67 # kernel.maps_protect = 1
"/etc/sysctl.conf" 67L, 2274C записано
09:53:28
#ping 192.168.15.102
PING 192.168.15.102 (192.168.15.102) 56(84) bytes of data.
From 192.168.15.1 icmp_seq=1 Destination Host Unreachable
From 192.168.15.1 icmp_seq=2 Destination Host Unreachable
From 192.168.15.1 icmp_seq=3 Destination Host Unreachable
From 192.168.15.1 icmp_seq=4 Destination Host Unreachable
From 192.168.15.1 icmp_seq=5 Destination Host Unreachable
From 192.168.15.1 icmp_seq=6 Destination Host Unreachable
^C
--- 192.168.15.102 ping statistics ---
7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6030ms
, pipe 3
09:54:05
#ping 192.168.101.2
PING 192.168.101.2 (192.168.101.2) 56(84) bytes of data.
64 bytes from 192.168.101.2: icmp_seq=1 ttl=64 time=0.229 ms
64 bytes from 192.168.101.2: icmp_seq=2 ttl=64 time=0.221 ms
64 bytes from 192.168.101.2: icmp_seq=3 ttl=64 time=0.222 ms
64 bytes from 192.168.101.2: icmp_seq=4 ttl=64 time=0.222 ms
^C
--- 192.168.101.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2998ms
rtt min/avg/max/mdev = 0.221/0.223/0.229/0.015 ms
09:54:22
#ping 192.168.101.3
PING 192.168.101.3 (192.168.101.3) 56(84) bytes of data.
^C
--- 192.168.101.3 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1008ms
09:54:27
#ip route
192.168.101.0/24 dev eth0.101  proto kernel  scope link  src 192.168.101.1
192.168.15.0/24 dev eth0  proto kernel  scope link  src 192.168.15.1
default via 192.168.15.254 dev eth0
09:54:59
#ping 192.168.15.254
PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data.
64 bytes from 192.168.15.254: icmp_seq=1 ttl=64 time=0.656 ms
64 bytes from 192.168.15.254: icmp_seq=2 ttl=64 time=0.642 ms
64 bytes from 192.168.15.254: icmp_seq=3 ttl=64 time=0.651 ms
64 bytes from 192.168.15.254: icmp_seq=4 ttl=64 time=0.648 ms
64 bytes from 192.168.15.254: icmp_seq=5 ttl=64 time=0.643 ms
64 bytes from 192.168.15.254: icmp_seq=6 ttl=64 time=0.650 ms
64 bytes from 192.168.15.254: icmp_seq=7 ttl=64 time=0.621 ms
64 bytes from 192.168.15.254: icmp_seq=8 ttl=64 time=0.656 ms
64 bytes from 192.168.15.254: icmp_seq=9 ttl=64 time=0.699 ms
^C
--- 192.168.15.254 ping statistics ---
9 packets transmitted, 9 received, 0% packet loss, time 8000ms
rtt min/avg/max/mdev = 0.621/0.651/0.699/0.037 ms
09:55:39
#ip route
192.168.101.0/24 dev eth0.101  proto kernel  scope link  src 192.168.101.1
192.168.15.0/24 dev eth0  proto kernel  scope link  src 192.168.15.1
default via 192.168.15.254 dev eth0
09:58:20
#vi /etc/sysctl.conf
10:06:43
#ssh root@192.168.101.2
The authenticity of host '192.168.101.2 (192.168.101.2)' can't be established.
RSA key fingerprint is 34:6c:c2:da:38:7c:d7:17:e9:cd:17:8d:e7:cf:f1:a6.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.101.2' (RSA) to the list of known hosts.
root@192.168.101.2's password:
Linux linux2 2.6.29-2-686 #1 SMP Sun May 17 17:56:29 UTC 2009 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.
Last login: Mon Jun  1 13:55:29 2009 from linux14.unix.nt
10:11:32
#dpkg -l | grep tcpdump
ii  tcpdump                              4.0.0-2                      A powerful tool for network monitoring and data acquisition
10:11:53
#tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
^C
0 packets captured
0 packets received by filter
0 packets dropped by kernel
/dev/pts/6
10:13:25
#tcpdump -i eth0.101 -n
10:14:59.620254 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 31488:31696, ack 1, win 215, options [nop,nop,TS val 617018 ecr 810009], length 208
10:14:59.620299 IP 192.168.101.1.22 > 192.168.101.2.37622: Flags [P.], seq 31696:31904, ack 1, win 215, options [