nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Routing

This is a discussion on Routing within the Linux software forums, part of the Linux Getting Started category; Dear All, I want to isolate my existing network. supoose i have existing network as 192.168.1.0/24 and i want to ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 06-13-2006, 07:39 PM
Junior Member
User
 
Join Date: Jan 2005
Location: Pune
Posts: 23
Rep Power: 0
rajuk
Send a message via Yahoo to rajuk
Default Routing

Dear All,
I want to isolate my existing network.
supoose i have existing network as 192.168.1.0/24 and i want to isolate it as 192.168.2.0.
I have used linux based router for this purpose. i.e. two network
cards. one card for 192.168.1.0 and second card for 192.168.2.0. but still i am not able to access the PC's from two different networks. I have keep value for net.ipv4.ip_forward = 1 in kernel sysctl configuration file.

Also route command shows following :

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.2.0 * 255.255.255.0 U 0 0 0
eth1
192.168.1.0 * 255.255.255.0 U 0 0 0
eth0
169.254.0.0 * 255.255.0.0 U 0 0 0
eth1
127.0.0.0 * 255.0.0.0 U 0 0 0
lo
default 192.168.1.90 0.0.0.0 UG 0 0 0
eth0

Thanks & Regards,
Raju
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-13-2006, 08:42 PM
tom tom is offline
Contributors
User
 
Join Date: Jun 2005
Location: London, UK
Posts: 213
Rep Power: 4
tom is on a distinguished road
Default

Hello rajuk,

You need to type or use iptables commands, then only it will route.

Code:
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
Reply With Quote
  #3 (permalink)  
Old 06-13-2006, 09:08 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 482
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

Do you want multi-homing network?

Just set correct IP for eth0 and eth1, then type command:
Code:
echo 1 > /proc/sys/net/ipv4/ip_forwarding
sysctl -p
Now you should able to use it.
Reply With Quote
  #4 (permalink)  
Old 06-16-2006, 07:08 PM
Junior Member
User
 
Join Date: Jan 2005
Location: Pune
Posts: 23
Rep Power: 0
rajuk
Send a message via Yahoo to rajuk
Default

hi,
thanks all of you for support.
It's working now.

Raju
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Routing/copying data from eth0 and send over eth1 and eth2 theVOID Networking, Firewalls and Security 2 04-14-2008 06:02 PM
Routing tables flushed milank Linux hardware 3 12-24-2007 12:51 PM
Routing Tables flushed milank CentOS / RHEL / Fedora 0 11-06-2007 12:26 AM


All times are GMT +5.5. The time now is 06:43 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36