[CentOS] Building a basic router with two nic's

Eduardo Grosclaude eduardo.grosclaude at gmail.com
Wed Aug 16 22:09:08 UTC 2006


On 8/16/06, kai <centos at sandsengen.com> wrote:
>
> Chris Mauritz wrote:
> > By the way, if you just want to set up a simple bridge between two
> > networks, I remember reading an article in Linux Journal last year
> > sometime (fires up Google....here it is):
> >
> > http://www.linuxjournal.com/article/8172
> Thank you for the link to the article, yes that's the funksion I'm
> looking for.
> But then, maybe a lame question,
> How to set up a router that just forward packets to next hop?
>
> I have googled my self blue without anything.
>
> Yes I have 2 nic,s on the same machine and using a crossed cable, so
> hooking up on each side works fine.
>
> I need to hook up equipment on the one side to monitor packets used, and
> also I would like to use the CentOS as a router towards the wan with my
> new sangoma s518 card, but if I can't route between two simple nic's I
> feel stuck.



>From you original post: Is this OK?
 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
IIUC this seems to be your remote network, behind 192.168.1.150 which is
your gw. These routes claim that 192.168.2.0 is directly connected to your
host --is it right?. If yes, I can hardly see any purpose in having both
interfaces on the same IP subnetwork. I think you may want to further
clarify your situation with a silly ASCII art diagram, and state how you are
testing your setup.

I assume you are testing with ping. Are you sure the machines you want to
reach really know the way back to the originating node so they are able to
acknowledge your pings (i.e. do they know the route to 192.168.1.0/24)?
Have you had a look at what really comes in and out the interfaces (with,
say, tcpdump)? For instance
# tcpdump -i eth 1 host 192.168.2.1
may show you something interesting when pinging 192.168.2.1.

-- 
Eduardo Grosclaude
Universidad Nacional del Comahue
Neuquen, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20060816/deb7c2cb/attachment.html>


More information about the CentOS mailing list