LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Intro (https://www.linuxquestions.org/questions/linuxquestions-org-member-intro-24/)
-   -   routing in linux (https://www.linuxquestions.org/questions/linuxquestions-org-member-intro-24/routing-in-linux-724059/)

iofn 05-06-2009 02:27 AM

routing in linux
 
I got the following ip block from my ISP.

202.51.177.0/29 (Here 202.51.177.1 is my gateway which is located in my ISP's Router, My useable ip is 202.51.177.2 - 202.51.177.6)

I have a linux pc with 2 NIC. I have putted 202.51.177.2/255.255.255.252 in my eth0 which is connected to my ISP And 202.51.177.5/255.255.255.252 in my eth1. My PC is directly connected to eth1. My pc ip is 202.51.177.6/255.255.255.252 and gateway is 202.51.177.5

I can't go to internet. What I have to do in linux box. ip_forward=1 is already enabled. Plz help

datopdog 05-06-2009 03:34 AM

It is possible that your ISP router does not have a route to 202.51.177.5/255.255.255.252 that is why the traffic is not coming back.

arisnb 05-06-2009 04:38 AM

I (Tukang Nggame) have idea. Your linux pc use network 202.51.177.0/29.


(202.51.177.1/29)ISP-----(202.51.177.2/29 gw 202.51.177.1)-eth0-Your Linux PC-eth1-(192.168.0.1/24)--Client PC (192.168.0.xxx gw 192.168.0.1)

ISP-----------------eth0--YOUR Linux PC--eth1---------Client PC

In Your Linux PC use NAT !

Shamgeer 05-06-2009 06:05 AM

Hi am Networking and linux newbie

Can some one help me to understand,

why do we need to add route in our system or gateway to connect to different network???

what is the concept of "add route -p" command

please help

arisnb 05-15-2009 07:17 AM

Simple network :
Please read this artcle http://www.linuxquestions.org/blog/a...g-nggame-1960/
-------------------------------------------------------
Routing :
You can add in /etc/network/interfaces

up /sbin/route add -net [network] netmask [netmask] gw [gateway]

exp

up /sbin/route add -net 205.164.219.150 netmask 255.255.255.0 gw 205.164.219.1


All times are GMT -5. The time now is 04:39 AM.