LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-23-2003, 09:20 AM   #1
Tonza22
LQ Newbie
 
Registered: Dec 2002
Location: Zagreb, Croatia
Posts: 4

Rep: Reputation: 0
lan to lan routing


First I'd like to aplologise on my lousy english

Sorry if my problem is already solved, if so, I would like somebody to provide me with the link to the solution.

The problem is this:

I have two networks in my office, one is 192.168.1.1 and the other one is 192.168.0.1

I used RedHat Linux 8 and tried to set it up as a router.
I must say that I don't know almoust anything about routers and routing, but hey, let me try.

OK, so I grabed RH8, installed two ethernet adapters, both working very nice on eth0 and eth1 aliases

eth0: 192.168.0.1
eth1: 192.168.1.1

next, I installed zebra, since it's a routing software (that should work like a regular router), installed it start it and voila:

routing doesn't work.

From the 192.168.1.1 network I can ping both interfaces of the "router" (192.168.1.1 & 192.168.0.1), but nothing else.

Ok... www.google.com to the rescue...
no way...
I spend three days surfing the net, reading man pages and , but all I found was adv Linux routing with iproute2; everybody is setting up gateways to provide access to the net, and so on.
Nowhere how-to to set up a lan to lan router.

So, if anyone has an idea or can help, please do, cause I'm pretty much lost here.

Thanks,

Tonza
 
Old 01-23-2003, 09:44 AM   #2
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Rep: Reputation: 30
i don't know anything about zebra. i think you want to make a bridge (to joint two distinct networks).

you might want to do a couple of things:

1. post your routing table on your router/bridge. open a terminal as root and type:

route -n > routetable.txt

this will create a text file in your /root directory that you can upload or cut and paste back here

Last edited by rioguia; 01-23-2003 at 09:47 AM.
 
Old 01-23-2003, 09:54 AM   #3
Tonza22
LQ Newbie
 
Registered: Dec 2002
Location: Zagreb, Croatia
Posts: 4

Original Poster
Rep: Reputation: 0
OK, here's my route -n

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo

and ifconfig too:

eth0 Link encap:Ethernet HWaddr 00:C0F:0F:7E:93
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:78 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12215 (11.9 Kb) TX bytes:4713 (4.6 Kb)
Interrupt:10 Base address:0xc000

eth1 Link encap:Ethernet HWaddr 00:C0F:07:7D:04
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:85 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12600 (12.3 Kb) TX bytes:60 (60.0 b)
Interrupt:11 Base address:0xe000

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:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1428 (1.3 Kb) TX bytes:1428 (1.3 Kb)

I forgot to tell you in my previous post that I tried to ask a man who is teaching at a cisco academy in my City, and he said that he just plug the cords in his router, and all is working pretty nice.
So I thought that I should plug in the cords, configure eth0 & eth1, start router (zebra ) and go... bu no go there ...
 
Old 01-23-2003, 10:20 AM   #4
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
First off, you don't want a bridge, a bridge is for when you have the same subnet on both sides of the linux box ie 192.168.0.x to 192.168.0.x.

Second off, did you tell the other computers on the segments that they can get out by going through the linux box? On each segment set all the machines' default route (gateway) to the linux box, if there is already a router on a segment then add a route to it's table that points to the linux box's IP on that segment as a route to the other segment, I think in linux it is:

route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.1.1

but don't quote me on that.
 
Old 01-23-2003, 10:45 AM   #5
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Rep: Reputation: 30
Darin's right. it's clear i misread your post after seeing your routing table.
 
Old 01-23-2003, 02:25 PM   #6
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
Is IP forwarding turned on?

cat /proc/sys/net/ipv4/ip_forward

should return a "1" and not a "0"

-kevin
 
Old 01-23-2003, 09:24 PM   #7
thanhnx
Member
 
Registered: Jan 2003
Posts: 36

Rep: Reputation: 15
The same problems

I have a similar problem.

With three computers, called [1],[2],[3], connected together by a hub. Each of them has only one network card.

Ip addrees in 192.168.0.x

I have set [2] comp to a router ( traffic from [1] to [3] must go through [2])

First, I set [2] to have 2 alias address by ifconfig eth0:1 and eth0:2.

Then, I set ifconfig netmask in order to have [1] and [2] in the same subnet, as well as [2] and [3].

I think it is ok. But it does't work. What happens?

Thanks.

PS: should I disable the use of ARP protocol.
 
Old 01-23-2003, 09:53 PM   #8
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
rioguia I wasn't rippin ya for suggesting a bridge I just wanted to make sure he didn't try to set one up only to find out it didn't help

thanhnx you may want to start a new thread with your question since it appears to be different enough from this one. Also I think you overcomplicated the situation, why do you need two aliases for your network card? What is your internet connection (DSL/cable modem/dialup/ISDN?) and how does it plug into your router (USB/ethernet/internal card/external com port?) Don't disable ARP.
 
Old 01-24-2003, 01:29 AM   #9
Tonza22
LQ Newbie
 
Registered: Dec 2002
Location: Zagreb, Croatia
Posts: 4

Original Poster
Rep: Reputation: 0
Sorry guys, I solved the problem.
I forgot to setup a gateway entry on the testing PC inside of 192.168.1.0 subnet.
Thanks anyway and sorry for being such a stupid ass
 
Old 01-24-2003, 10:20 AM   #10
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
Re: The same problems

Quote:
Originally posted by thanhnx
I have a similar problem.

With three computers, called [1],[2],[3], connected together by a hub. Each of them has only one network card.

Ip addrees in 192.168.0.x

I have set [2] comp to a router ( traffic from [1] to [3] must go through [2])

First, I set [2] to have 2 alias address by ifconfig eth0:1 and eth0:2.

Then, I set ifconfig netmask in order to have [1] and [2] in the same subnet, as well as [2] and [3].

I think it is ok. But it does't work. What happens?

Thanks.

PS: should I disable the use of ARP protocol.


Please post specifics about IP addresses and subnet masks that you are using. I think you are subnetting incorrectly.. maybe.

-KevinJ
 
Old 01-25-2003, 02:51 AM   #11
thanhnx
Member
 
Registered: Jan 2003
Posts: 36

Rep: Reputation: 15
Thanks KevinJ,
I have post another thread according to not disturb the original question of Tonza, it is in http://www.linuxquestions.org/questi...threadid=42575

Please visit and show your idea.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
basic LAN routing captain_b Linux - Networking 1 11-18-2005 10:46 AM
poptop and routing to the LAN muxman Linux - Networking 4 10-14-2004 05:11 PM
remote lan modem routing Puzzled Linux - Networking 2 09-06-2004 01:19 AM
Routing LAN -> WAN -> LAN with unhelpful router synx13 Linux - Networking 2 06-14-2004 02:35 PM
linux routing on lan bruj3w Linux - Networking 8 03-11-2004 01:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration