/l3/users/27-07-2009/nt-lnet/debian5.net.nt/root :1 :2 :3 :4 :5 |
|
#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 |
#tcpd
![]() tcpd tcpdchk tcpdmatch tcpdump |
#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 |
#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 |
#cat /proc/sys/net/ipv4/ip_forward
0 |
#sysctl net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1 |
#cat /proc/sys/net/ipv4/ip_forward
1 |
#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 |
#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 |
#route delete -net 192.168.54.64/27 gw
|
#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 |
#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) |
#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) |
#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) |
#cat /proc/sys
![]() sys/ sysrq-trigger sysvipc/ |
#cat /proc/sys/net/ipv4/ip_forward
1 |
#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 |
#cd /etc/network
|
#ls
if-down.d if-post-down.d if-pre-up.d if-up.d interfaces run |
#vim /etc/home/user/if1
![]() |
#cd /home/user/
|
#vim if1
|
#vim /etc/network/interfaces
|
#vim /etc/network/interfaces
|
#ls
hello if1 ug-bsdnet.pdf ug-lnet.pdf |
#rm if1
|
#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 |
#vim /etc/network/interfaces
|
#route -n
![]() Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface |
#/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. |
#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 |
#/etc/init.d/networking restart
Reconfiguring network interfaces...done. |
#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) |
#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) |
#/etc/init.d/networking restart
Reconfiguring network interfaces...done. |
#/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. |
#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) |
#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 |
#cat /proc/sys/net/ipv4/ip_forward
1 |
#apt-get install xinetd
![]() Чтение списков пакетов... Готово Построение дерева зависимостей... Готово НОВЫЕ пакеты, которые будут установлены: xinetd обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 55 пакетов не обновлено. Необходимо скачать 137kБ архивов. После рас |