- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Linux router lan to lan
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2005 05:18 PM
тАО07-18-2005 05:18 PM
Can someone point me to documents, the only docs I found are for setting up a router/firewall lan to internet (WAN)
I have two network segments 196.168.0.X/24 and a 172.16.X.X/16 network segment witch I need to connect.
I'm not a linux wizard, I have little to non experience using linux / unix or wathever.
Any help would be appriciated.
Sincerly
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2005 05:42 PM
тАО07-18-2005 05:42 PM
Re: Linux router lan to lan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2005 05:52 PM
тАО07-18-2005 05:52 PM
Re: Linux router lan to lan
Then it's simple. No firewalling *required* (but can be done if wanted).
It's called "route".
Set up a simple linux box with two NIC's, each with an IP from their respective subnets.
Turn on IP Forwarding using '/etc/sysctl.conf' (net.ipvr.ip_forward = 1), and 'sysctl -p' to re-read the config (or 'echo 1 > /proc/sys/net/ipv4/ip_forward').
Set the linux box as the default route (or add a network route for the opposing subnet) to go to the Linux box.
On the linux box it's self though, set a default route to the interface of the 172 subnet, and that should be it.
Simple. ;)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2005 06:31 PM
тАО07-18-2005 06:31 PM
Re: Linux router lan to lan
if you are having two network cards each connecting to two different networks then it is not a problem as stuart mentioned.
Make sure that all the client boxes point to this machine (which connects to both the network) as default gateway. This machine should have ip_forward enabled.
Regards,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2005 07:15 PM
тАО07-18-2005 07:15 PM
Re: Linux router lan to lan
I wouldn├В┬┤t use the linux router as the default gateway on the clients. Better set a static route for the networks with the linux router as gateway.
The router itself is pretty simple. Active ip-forwarding and use the command "route" to add the routes for the different networks (look at Stuarts posting :) ). A firewall is not required, but sometimes usefull to block traffic between the networks.
Regards,
Patrick
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2005 10:48 PM
тАО07-18-2005 10:48 PM
Re: Linux router lan to lan
As mentioned above:
Turn on IP Forwarding using '/etc/sysctl.conf' (net.ipvr.ip_forward = 1), and 'sysctl -p' to re-read the config (or 'echo 1 > /proc/sys/net/ipv4/ip_forward').
Can someone explain this a little more in detail? I believe I have to change some parameters in the sysctl.conf file?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2005 11:05 PM
тАО07-18-2005 11:05 PM
Solutionyou can activate ip forwarding on two ways.
1. Run on the shell or in a terminal window under X11 the following command:
echo 1 > /proc/sys/net/ipv4/ip_forward
After a reboot you need to rerun this command to activate ip forwarding. You can write yourself a little init-script which do that for you. But there is a second way to activate ip forwarding.
2. You need to change the file /etc/sysctl.conf with an editor of you joice (VI, EMACS, nano, kate....). You need to add or modify this entry.
net.ipv4.ip_forward = 1
After that you can reboot the system or just run the command "sysctl -p" to apply this change.
Regards,
Patrick
Patrick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2005 11:13 PM
тАО07-18-2005 11:13 PM
Re: Linux router lan to lan
There are two methods to achieve this, either temporaray (which will last till system reboot) or permanent.
echo 1 >/proc/sys/net/ip_forward is a temporary method which will enable routing capcity in the linux box. On next reboot this will reset it back to the kernel default (which is more likely 0, disable forwarding). To make it permanent sysctl is used.
sysctl has a configuration file(/etc/sysctl.conf) which will contain all the kernel variables and their values, on every reboot the distribution runs sysctl -p which reads the values from sysctl.conf and modifies kernel parameters accordingly.
You can have all your kernel parameters value in /etc/sysctl.conf which will get updated during server boot.
For more information check 'man sysctl'
Regards,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-19-2005 05:16 PM
тАО07-19-2005 05:16 PM
Re: Linux router lan to lan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-20-2005 06:33 PM
тАО07-20-2005 06:33 PM