Re: 2 Subnets on 1 Lan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Friday 13 July 2007 08:32:52 am Thom Paine wrote:
> I have a small network that is 10.10.10.x and I have a few PLC devices
> that I'd like to be able to talk to that are on a 192.168.0.x segment.
>
> Can I put some sort of a route statement into my fedora server that
> will link these two so that I can talk to the 192 devices from my pc
> on my 10 network? I use my fedora box as my router and dhcp server.
>

 Yes - this is no problem at all. Here's how to do it.
 You can put these into a script and call it from /etc/rc.local

 #!/bin/bash
 # Script may be called from rc.local
 # FIrst off use the following to add an address to the device (say eth0).

 ip address add 192.168.0.1 dev eth1
 
# Now add a route if you need it.
ip ro add 192.168.1.0/24 via 192.168.0.1 dev eth0

# end script

# ------------------------------------------------------------
# Make sure you allow packets to be forwarded 
# ie this will now route between the 2 networks
# Add this line to /etc/sysctl.conf
net.ipv4.ip_forward = 1

# To have above take effect without a reboot do
sysctl -p

g/

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux