[LINUX:2295] routing

Ahmet Dervis (ahmetdervis@turk.net)
Sat, 5 Dec 1998 09:13:36 +0200 (EET)


selam..

makinamiz goctukten sonra linux u kurduk kernel i 2.0.36 yukselttik..
(Slackwar 3.5)

Makinanin adi : proxy

makinada bulunan ethernetlerin conf bilgileri ;
eth0> ip: 212.57.28.107 mask:255.255.255.248 gw(Router) : 212.57.28.105
Brcas: 212.57.28.111
eth1> ip: 192.168.231 mask:255.255.255.0
seklinde..

212 li olan bizim internet tarafindaki networkumuz.. 192 li olan ise
bizim ic netwokumuz...
ben 192 li tarafta bulunan makinalarin 212 li yani internet tarafina
ulasabilmelerini istiyorum..
ancak 212 networkte ki makinalarin 192 li networke ulasmalarini
istemiyorum..

route komutu ile yaptiklarim asagidaki gibi bu sayede
proxy isimli makinadan internetteki herhangi bir ip yi ping
edebiliyorum..
ayni zamanda 192 li bir adreside,
ama 192 li networkte bulunan bir makina proxy isimli makinayi ping ediyo
fakat onu gecemiyo..

route add default gw 212.57.28.105
route add -net 212.57.28.104 netmask 255.255.255.248 dev eth0
route add -net 192.168.231.0 netmask 255.255.255.0 dev eth1

DIGER BILGILER DE ASAGIDA
proxy:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
212.57.28.104 * 255.255.255.248 U 0 0 5
eth0
192.168.231.0 * 255.255.255.0 U 0 0 17
eth1
loopback * 255.0.0.0 U 0 0 3
lo
default 212.57.28.105 0.0.0.0 UG 1 0 33
eth0

proxy:~# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
RX packets:576 errors:0 dropped:0 overruns:0 frame:0
TX packets:576 errors:0 dropped:0 overruns:0 carrier:0 coll:0

eth0 Link encap:Ethernet HWaddr 00:80:AD:50:CB:ED
inet addr:212.57.28.107 Bcast:212.57.28.111
Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:122 errors:0 dropped:0 overruns:0 frame:1
TX packets:318 errors:0 dropped:0 overruns:0 carrier:0 coll:0
Interrupt:10 Base address:0xd000

eth1 Link encap:Ethernet HWaddr 00:A0:C9:96:AC:57
inet addr:192.168.231.1 Bcast:192.168.231.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2276 errors:0 dropped:0 overruns:0 frame:0
TX packets:651 errors:0 dropped:0 overruns:0 carrier:0 coll:0
Interrupt:12 Base address:0xb800

Bana acil yardimci olursaniz cok sevinicem.. bu makinayi bu gun eski
haline getirmem gerekiyo... (...u yedim)

Sevgiler.