Jump to content

connect two class c networks


tr3s
 Share

Recommended Posts

any idea for this one..

 

i have two class c lan networks:

192.168.0.1/24 and 192.168.1.1/24

i have MLE 2005 running on one machine that serves as the gateway for both network. i set two virtual interfaces 192.168.0.1 and 192.168.1.1 on one NIC.

 

how can i get the two networks connect with each other? both network can ping the gateway but cannot ping the other network...

 

tnx

Edited by tr3s
Link to comment
Share on other sites

Is IP forwarding enabled? You can check with:

 

cat /proc/sys/net/ipv4/ip_forward

 

It should be set to "1" to enable forwarding. To enable for testing:

 

echo 1 > /proc/sys/net/ipv4/ip_forward

 

and see if that allows you to ping the other network. Try by pinging the other router ip, and then to machines after that.

 

To enable routing permanently, add the above echo line to /etc/rc.local. Or alternatively, a better way would be to add the following to /etc/sysctl.conf:

 

net.ipv4.ip_forward=1

Link to comment
Share on other sites

Easiest way is to disable using this:

 

service shorewall stop

 

as it could still be running. What are the results now? Still not getting through?

 

I think another way you can configure the network cards for routing is to install drakwizard using:

 

urpmi drakwizard

 

and then you can go into System/Configuration/Configure Your Computer (or MCC if you prefer), and then there are a load of wizards. I'm pretty sure there is one for configuring routing on network cards. I'd have to build a system with multiple network cards to check for sure though. You can give this a go if stopping shorewall doesn't allow the pings through. Although if routing is enabled it should do.

 

Also, as root (su and supply password), try traceroute, and see where it's going. Does it get to the gateway, and does it fail to go any further?

Link to comment
Share on other sites

ok. from client machines of each lan, i can traceroute the both gateways but cant traceroute clients from other lan. same as pinging. but from the gateway, i cant traceroute any of the clients. btw, client machines are running windows..

 

Could the router be stopping the packets?

 

how to check this?

Link to comment
Share on other sites

If you're using the Mandriva machine as the router, and the firewall is disabled. I noticed one thing, you are using one network card to do all the work.

 

Have you a spare network card? Can you install it in the machine, so that there are two network card. Then assign each invididual ip range to both cards, and see if the routing works better then.

 

I wouldn't attempt to run two IP's on one card, too many problems, things don't work that well. Two physical network cards are better in my opinion.

Link to comment
Share on other sites

is the port forwarding different from ip forwarding?

 

already tried with the firewall stopped..

 

yes, that's it. i have two NIC, one for the live ip and one for the local ip. btw, i was able to connect the two networks using win2000.

 

 

 

add:

i've already assigned the ip addresses to different NIC.. same result

Edited by tr3s
Link to comment
Share on other sites

Yes, port forwarding is to translate between public and private ip's for services, such as web, ftp, etc, etc to redirect to a machine on a private network. Far more secure than giving the public ip direct to the machine in question.

 

OK so you have two nics and it doesn't seem to work. Hmm. I'll build a Mandriva machine on my dual nic machine here shortly, and see if I can find out what's going on. I've not got an existing machine at present, but I'll check it and get back to you. Otherwise, I've no idea how to progress.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...