Вообщем тут решил поизучать циску, сначала игрался на эмуляторе dynamips, но сеть в нём не завелась. Откопал на складе циску 1601, спял для него терминальный кабель, забил такие настройки:router#sh conf
Using 453 out of 7506 bytes
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname router
!
enable secret 5 $1$jWod$CHn3bwaeq4ByJjQ3dlGn41
enable password 654321
!
ip host-routing
!
interface Ethernet0
ip address 10.0.1.199 255.255.255.0 secondary
ip address 10.0.113.1 255.255.255.0
!
interface Serial0
ip address 192.168.0.1 255.255.255.0
ip broadcast-address 192.168.0.255
!
ip classless
!
line con 0
line vty 0 4
password 123456
login
!
end
Поставил два компа, на одном ИП 10.0.1.34 на втором 10.0.113.3. Так вот получился роутинг в одну сторону:
root@cyclon / # ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:5E:65:A4:1C
inet addr:10.0.1.34 Bcast:10.0.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15035 errors:0 dropped:0 overruns:0 frame:0
TX packets:4347 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3515284 (3.3 Mb) TX bytes:492875 (481.3 Kb)
Interrupt:21
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:591 errors:0 dropped:0 overruns:0 frame:0
TX packets:591 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:55440 (54.1 Kb) TX bytes:55440 (54.1 Kb)
ставлю гейтом 10.0.1.199:
root@cyclon / # ping 10.0.113.1
PING 10.0.113.1 (10.0.113.1) 56(84) bytes of data.
64 bytes from 10.0.113.1: icmp_seq=1 ttl=255 time=2.05 ms
64 bytes from 10.0.113.1: icmp_seq=2 ttl=255 time=2.00 ms
--- 10.0.113.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 2.000/2.027/2.055/0.052 ms
root@cyclon / # ping 10.0.113.3
PING 10.0.113.3 (10.0.113.3) 56(84) bytes of data.
64 bytes from 10.0.113.3: icmp_seq=1 ttl=127 time=4.39 ms
64 bytes from 10.0.113.3: icmp_seq=2 ttl=127 time=5.54 ms
--- 10.0.113.3 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 4.392/4.968/5.545/0.580 ms
далее меняю ИП машины на:
root@cyclon / # ifconfig eth0 10.0.113.34 netmask 255.255.255.0
и ставлю гейтом 10.0.113.1 и в итоге получаю:
root@cyclon / # route add default gw 10.0.113.1
root@cyclon / # ping 10.0.113.1
PING 10.0.113.1 (10.0.113.1) 56(84) bytes of data.
64 bytes from 10.0.113.1: icmp_seq=1 ttl=255 time=4.60 ms
--- 10.0.113.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 4.605/4.605/4.605/0.000 ms
root@cyclon / # ping 10.0.113.3
PING 10.0.113.3 (10.0.113.3) 56(84) bytes of data.
64 bytes from 10.0.113.3: icmp_seq=1 ttl=128 time=3.97 ms
--- 10.0.113.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 3.976/3.976/3.976/0.000 ms
root@cyclon / # ping 10.0.1.1
PING 10.0.1.1 (10.0.1.1) 56(84) bytes of data.
--- 10.0.1.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
root@cyclon / # ping 10.0.1.199
PING 10.0.1.199 (10.0.1.199) 56(84) bytes of data.
64 bytes from 10.0.1.199: icmp_seq=1 ttl=255 time=1.98 ms
--- 10.0.1.199 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 1.983/1.983/1.983/0.000 ms
т.е. пинги в сеть 10.0.1.0 из 10.0.113.0 не идут, а из 10.0.1.0 в 10.0.113.0 идут.
Вот и вопрос, почему пинги идут только в одну сторону?!
Заранее спасибо!!!