[linux-network] Re: Sayın Serdar KÖYLÜ Dikkatine

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Serdar KOYLU (serdar@uludag.org.tr)
Date: Mon 05 Apr 2004 - 16:22:17 EEST


Selamlar..

> traceroute -n 192.168.2.25 komutunun çıktısı şu
>
> > traceroute -n 192.168.2.25
> traceroute to 192.168.2.25 (192.168.2.25), 30 hops max, 38 byte packets
> 1 174.20.3.1 2.122 ms 1.953 ms 1.819 ms
> 2 10.201.23.6 25.692

Bu 10.201.23.6 makinesi sizin disinizda (ISP ve otesinde) bir makine
sanirim. Bu durumda sorun sizde degilde onlarda gibi gorunuyor. Ama
sizde bir garip durum mevcut.

> eth0 Link encap:Ethernet HWaddr 00:C0:26:7E:A9:BD
> inet addr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:42051 errors:0 dropped:0 overruns:0 frame:0
> TX packets:31019 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100
> RX bytes:46082588 (43.9 Mb) TX bytes:2905779 (2.7 Mb)
> Interrupt:17 Base address:0x2000
>
> eth1 Link encap:Ethernet HWaddr 00:D0:B7:88:35:37
> inet addr:174.20.3.140 Bcast:174.20.3.255 Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:41257 errors:0 dropped:0 overruns:0 frame:0
> TX packets:289 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100
> RX bytes:3371424 (3.2 Mb) TX bytes:29108 (28.4 Kb)
> Interrupt:21 Base address:0x2000 Memory:f4100000-f4100038
>
> eth2 Link encap:Ethernet HWaddr 00:08:A1:16:E4:C0
> inet addr:174.20.3.3 Bcast:174.20.3.3 Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:14503 errors:0 dropped:0 overruns:0 frame:0
> TX packets:60262 errors:0 dropped:0 overruns:0 carrier:0
> collisions:21 txqueuelen:100
> RX bytes:1510348 (1.4 Mb) TX bytes:48185445 (45.9 Mb)
> Interrupt:23 Base address:0x3000
>
> 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:10 errors:0 dropped:0 overruns:0 frame:0
> TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:700 (700.0 b) TX bytes:700 (700.0 b)
>
>
>
> route cıktısı şöyle
> > route
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 192.168.6.8 174.20.3.1 255.255.255.255 UGH 0 0 0 eth2
> 192.168.2.25 174.20.3.1 255.255.255.255 UGH 0 0 0 eth2
> 192.168.14.8 174.20.3.1 255.255.255.255 UGH 0 0 0 eth2
> 10.201.2.18 174.20.3.1 255.255.255.255 UGH 0 0 0 eth2
> 174.20.3.0 * 255.255.255.0 U 0 0 0 eth2
> 174.20.3.0 * 255.255.255.0 U 0 0 0 eth2
> 10.0.0.0 * 255.255.255.0 U 0 0 0 eth0
> 169.254.0.0 * 255.255.0.0 U 0 0 0 eth2
> 127.0.0.0 * 255.0.0.0 U 0 0 0 lo
> default 10.0.0.2 0.0.0.0 UG 0 0 0 eth0

Bu tabloda eth1 yok :) Bilmem hic farkettiniz mi? Bunun sonucu olarak
yerel networkunuza yollanacak paketler de router'a yollaniyor buyuk
ihtimalle.

Ayni sorunu eth1 ve eth2 arasinda goruyoruz. Burada inet addr ve
netmasklara bakarsak:

> eth1 Link encap:Ethernet HWaddr 00:D0:B7:88:35:37
> inet addr:174.20.3.140 Bcast:174.20.3.255 Mask:255.255.255.0

Bu network, 174.20.3.1 .... 174.20.3.254 arasindaki makineleri kapsiyor.
Yani, bu adreslere gidecek olan verilerin tumu bu ethernetten
yollanacak.

> eth2 Link encap:Ethernet HWaddr 00:08:A1:16:E4:C0
> inet addr:174.20.3.3 Bcast:174.20.3.3 Mask:255.255.255.0

Bu network ise 174.20.3.1 .... 174.20.3.254 arasindaki makineleri kapsiyor.
Yani, bu adreslere gidecek olan verilerin tumu bu ethernetten yollanacak.

Ilginc degil mi? Simdi kernel 174.20.3.1 makinesine nerden ulasacak? Yada sizin yerel networkunuza?
Daha guzel bir soru, sanirim, router'iniz icerdeki makinelere dogrudan erismek istiyor. O makineler icin paketleri Linux gw.ye yollamasi gerektigini bilmiyor.

Oncelikle interface konfigurasyonunu dogru yapmaniz gerekiyor.

Simdi interface konfigurasyonunu soyle yapabilirsiniz, bir cozum olur belki.

ifconfig eth1 174.20.3.140
ifconfig eth2 172.16.1.1

route add -host 174.20.3.1/32 eth2
ifconfig eth2:0 174.20.3.3 netmask 255.255.255.255
route add default gw 174.20.3.1 dev eth2

Boylece, LL Router'i eth2 adres alanina koyarken, yerel agi eth1 uzerinde birakmis oluyorsunuz. Bu bir cozumdur. Ama daha iyi bir cozum, router ile aranizda kalan yeni bir dummy ag olusturup LL router uzerinde yerel makineleriniz icin Linux gw.i aggecidi olarak tanimlamaniz olacaktir.

LL router'in ve yerel aginizin vs. ne yapmaya calistigini bilemedigim icin yukaridaki satirlar cozum olurmu emin degilim. Ama oncelikle bu satirlari o dosyanin basina ekler ve denerseniz sanirim biraz yol alabiliriz.

Saygi ve sevgiler..


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.