- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- simple routing in linux
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
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
тАО10-28-2009 10:13 PM
тАО10-28-2009 10:13 PM
simple routing in linux
assume a scnario where i have two networks
192.168.5.x 255.255.255.0
172.16.x.x 255.255.0.0
i have machine A with IP 192.168.5.2
machine B with IP 172.16.0.2
i have a centos machine with 2 NICs, once with IP 192.168.5.1 and another with 172.16.0.1.
with iptables service off and
cat /etc/sysctl.conf | grep net.ipv4.ip_forward
net.ipv4.ip_forward=1
with this, should machines on the two networks 192.168.5.x and 172.16.x.x not be able to communicate with each other.
could you please let me know what i am missing?
i am not able to !!
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2009 11:20 PM
тАО10-28-2009 11:20 PM
Re: simple routing in linux
On B default gateway: 172.16.0.1
If you have/need other default gateways you have to add routes
On A:
ip ro add 172.16/16 via 192.168.5.1
On B:
ip ro add 192.168.5/24 via 172.16.0.1
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2009 11:51 PM
тАО10-28-2009 11:51 PM
Re: simple routing in linux
i had already assigned the default gateway the way you suggested.
machine on the 192.168.5.x network has default gateway 192.168.5.1
machine on the 172.16.x.x network has default gateway 172.16.0.1
i changed it the other way arnd jus to check. no success.!!
the centos machine with 2 NICs has IPs
172.16.0.1 and 192.168.5.1
any clues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2009 03:43 AM
тАО10-29-2009 03:43 AM
Re: simple routing in linux
Is your machine cable of routing??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2009 06:29 AM
тАО10-29-2009 06:29 AM
Re: simple routing in linux
Ensure that the ip_forward parameter is really enabled by running:
sysctl -a | grep ip_forward
sysctl -p
sysctl -a | grep ip_forward
Use the traceroute command to diagnose the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2009 03:13 PM
тАО10-30-2009 03:13 PM
Re: simple routing in linux
cat /proc/sys/net/ipv4/ip_forward
should result in "1"; if the result is "0", start looking for typos - or prehaps you didn't reboot? - in which case you can avoid the reboot with
echo 1 | sudo dd of=/proc/sys/net/ipv4/ip_forward
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-01-2009 01:06 AM
тАО11-01-2009 01:06 AM
Re: simple routing in linux
well
i see the following
sysctl -a | grep ip_forward
net.ipv4.ip_forward=1
cat /proc/sys/net/ipv4/ip_forward does show
1
i have a feeling i am not doing a few things correctly.
i initially started doing this stuff on a 3 physical machines and things didnt work correctly probably since i was making some mistake.
later i tried the same thing with vmware workstation on my laptop where in i was trying to ping an outside network when the laptop NIC didnt have an IP in the same network as the VM.
i think i have got the concept right now and i will try this in office tomorrow.
thanks all