Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.networking > #1871

Re: Adding 2nd network route

From Pascal Hambourg <boite-a-spam@plouf.fr.eu.org>
Newsgroups comp.os.linux.networking
Subject Re: Adding 2nd network route
Date 2012-12-13 00:52 +0100
Organization Plouf !
Message-ID <kab5cp$l7e$1@saria.nerim.net> (permalink)
References <2b6999b6-a2d9-44ba-a784-f5157e32a42e@googlegroups.com>

Show all headers | View raw


Hello,

herbert.burnswell@gmail.com a écrit :
> Hi All,
> 
> I've been reading about how to add a 2nd network connection on a different subnet but haven't been able to get it to work.

Your lines are too long.

> I have a virtual machine (v-sphere 5.1) running RHEL 6.3 with the following set-up:
> 
> # cat /etc/sysconfig/network-scripts/ifcfg-eth0
> DEVICE="eth0"
> ONBOOT="yes"
> BOOTPROTO=none
> NETMASK=255.255.254.0
> IPADDR=10.10.11.8
> 
> # cat /etc/sysconfig/network
> NETWORKING=yes
> NETWORKING_IPV6=no
> HOSTNAME=host.domain
> GATEWAY=10.10.10.1
> 
> # route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 10.10.10.0      0.0.0.0         255.255.254.0   U     0      0        0 eth0
> 169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
> 0.0.0.0         10.10.10.1      0.0.0.0         UG    0      0        0 eth0
> 
> With the above set-up I can ping/communicate with any 10.10.10.0/23 system or any 10.10.12.0/23 system.

There is no specific route to 10.10.12.0/23, so I suppose this network
is reached through the default gateway 10.10.10.1.

> I add the 2nd interface:
> 
> # cat /etc/sysconfig/network-scripts/ifcfg-eth1
> DEVICE="eth1"
> ONBOOT="yes"
> BOOTPROTO=none
> NETMASK=255.255.254.0
> IPADDR=10.10.13.250
> 
> # cat /etc/sysconfig/network-scripts/route-eth1
> 10.10.12.0/23 via 10.10.12.1 dev eth1

This route does not make any sense. The gateway belongs to the
destination network ! Either the network is directly attached and there
is no need to provide a gateway, or the network is not directly attached
and you must provide a gateway which is on a directly attached network.

> # route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> 10.10.12.0      0.0.0.0         255.255.254.0   U     0      0        0 eth1
> 10.10.10.0      0.0.0.0         255.255.254.0   U     0      0        0 eth0
> 0.0.0.0         10.10.10.1      0.0.0.0         UG    0      0        0 eth0

The nonsensical route is absent.

> After adding eth1, I can communicate with any 10.10.10.0/23 system but cannot commuicate with any 10.10.12.0/23 system.

IIUC, you could communicate with 10.10.12.0/23 before (trough gateway
10.10.10.1 on eth0), but not after (directly on eth1) ?
What is eth1 connected to ?

Back to comp.os.linux.networking | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Adding 2nd network route herbert.burnswell@gmail.com - 2012-12-12 07:09 -0800
  Re: Adding 2nd network route Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2012-12-13 00:52 +0100
  Re: Adding 2nd network route herbert.burnswell@gmail.com - 2012-12-12 17:57 -0800
    Re: Adding 2nd network route Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2012-12-13 09:03 +0200
    Re: Adding 2nd network route Richard Kettlewell <rjk@greenend.org.uk> - 2012-12-13 09:12 +0000
    Re: Adding 2nd network route Pascal Hambourg <boite-a-spam@plouf.fr.eu.org> - 2012-12-14 00:00 +0100
    Re: Adding 2nd network route Gordon <Gordon@clear.net.nz> - 2012-12-19 06:33 +0000
      Re: Adding 2nd network route Aragorn <stryder@telenet.be.invalid> - 2012-12-19 07:52 +0100
        Re: Adding 2nd network route Ian Zimmerman <itz@buug.org> - 2012-12-19 12:48 -0800
        Re: Adding 2nd network route Ralph Spitzner <rasp@spitzner.org> - 2012-12-19 22:28 +0100

csiph-web