[Gllug] Numpty Networking

Ian Norton bredroll at darkspace.org.uk
Mon Nov 15 20:01:01 UTC 2004


Do the ip_forward thing on both boxes,

Somthing puzzles me, if all you want to do is hool to LANs together via a
router why do you need 2 machines?

you can do the same with just one of them

assuming the following.:-

Network A 10.0.1.0/24
Network B 10.0.6.0/24

eth0 - connected to network A
eth1 - connected to network B

ifconfig eth0 10.0.1.110 netmask 255.255.255.0
ifconfig eth1 10.0.6.101 netmask 255.255.255.0
echo 1 > /proc/sys/net/ipv4/ip_forward

new inform the machines on the B side that 10.0.6.101 is thier route to
10.0.1.0/24 by doing:-

route add -net 10.0.1.0 netmask 255.255.255.0 gw 10.0.6.101

and the same for A machines

route add -net 10.0.6.0 netmask 255.255.255.0 gw 10.0.1.110

obviously, you should be doing stuff like routes manually, you can get your
DHCP server (if you have one) on each LAN to isse the routes from there. 

Ian


On Mon, Nov 15, 2004 at 06:39:15PM +0000, Darren Beale wrote:
> Hi
> 
> I'm trying without success to link two networks together by means of
> two machines with 2 NICs and a crossover cable, as illustrated below:
> 
> Network A 10.0.1.0/24
>       |
>       | eth0: 10.0.1.110
>       |
> ------|-----------
> |
> | Machine A
> |
> | Kernel IP routing table
> | Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> | 10.0.6.0        10.0.7.2        255.255.255.0   UG    0      0        0 eth1
> | 10.0.1.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
> | 0.0.0.0         10.0.1.1        0.0.0.0         UG    0      0        0 eth0
> |
> ------------------
>       |
>       | eth1: 10.0.7.2
>       |
> [Crossover cable]
>       |
>       | eth1: 10.0.7.1
>       |
> ------|------------
> |    Machine B     |
> | Routing tables   |
> | untouched so far |
> -------------------
>       |
>       | eth0: 10.0.6.101
>       |
> 
> Network B 10.0.6.0/24
> 
> 
> Note Machine A, I've created a static route to 10.0.6.0/24 by use of
> the command:
> 
> route add -net 10.0.6.0/24 gw 10.0.7.2
> 
> So from A -> B I would hope I could ping something on 10.0.6.0/24 from
> A but I can't (it just sits there), so I've obviously got something
> wrong, but what? The only thing that I can do is ping 10.0.7.[1|2]
> from the respective machines
> 
> regs
> 
> Darren
> -- 
> Gllug mailing list  -  Gllug at gllug.org.uk
> http://lists.gllug.org.uk/mailman/listinfo/gllug

-- 
/* www.darkspace.org.uk {
 web development, application development, consultancy, firewalls 
 */
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list