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


Groups > comp.os.linux.networking > #1869 > unrolled thread

Adding 2nd network route

Started byherbert.burnswell@gmail.com
First post2012-12-12 07:09 -0800
Last post2012-12-19 22:28 +0100
Articles 10 — 8 participants

Back to article view | Back to comp.os.linux.networking


Contents

  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

#1869 — Adding 2nd network route

Fromherbert.burnswell@gmail.com
Date2012-12-12 07:09 -0800
SubjectAdding 2nd network route
Message-ID<2b6999b6-a2d9-44ba-a784-f5157e32a42e@googlegroups.com>
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.

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.

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

# /etc/init.d/network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:                                [  OK  ]
Bringing up interface eth1:  RTNETLINK answers: File exists
                                                           [  OK  ]

# 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
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 eth1
0.0.0.0         10.10.10.1      0.0.0.0         UG    0      0        0 eth0

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.

Hopefully I am making a simple mistake and need to just tweak the set-up a bit to get it to work.  Any guidance is greatly appreciated.

Thanks in advance,

Herb

[toc] | [next] | [standalone]


#1871

FromPascal Hambourg <boite-a-spam@plouf.fr.eu.org>
Date2012-12-13 00:52 +0100
Message-ID<kab5cp$l7e$1@saria.nerim.net>
In reply to#1869
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 ?

[toc] | [prev] | [next] | [standalone]


#1873

Fromherbert.burnswell@gmail.com
Date2012-12-12 17:57 -0800
Message-ID<f18a5399-abcf-43fc-be46-75c4de541cd3@googlegroups.com>
In reply to#1869
Thank you for your reply.

> 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'm not sure what you mean.


> 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. 

Yes, both reached through default gateway.


> 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. 

Yes, I am not sure if I even need this file.  Nor am I sure what I need to put in the file.  If I do not use a route-<interface> file both eth0 and eth1 start properly but I am unable to communicate with any 10.10.12.0/23 systems.

> # 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) ? 

Yes, that is correct.

>>What is eth1 connected to ?

I'm not sure what you are referring to.

My goal, which I though was simple, is to add eth1 with the 10.10.13.250 IP address.  However as soon as I add it, I can no longer communicate with any 10.10.12.0/23 systems.  

If there are no glaring mistakes in what I have presented above then this leads me to believe that the problem may be a routing issue outside of this system.

Thoughts?

Thanks again,

Herb

[toc] | [prev] | [next] | [standalone]


#1874

FromTauno Voipio <tauno.voipio@notused.fi.invalid>
Date2012-12-13 09:03 +0200
Message-ID<kabujj$3ba$1@dont-email.me>
In reply to#1873
On 13.12.12 3:57 , herbert.burnswell@gmail.com wrote:
> Thank you for your reply.
>
>> 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'm not sure what you mean.
>
>
>> 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.
>
> Yes, both reached through default gateway.
>
>
>> 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.
>
> Yes, I am not sure if I even need this file.
Nor am I sure what I need to put in the file.
If I do not use a route-<interface> file both eth0 and eth1 start properly
but I am unable to communicate with any 10.10.12.0/23 systems.
>
>> # 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) ?
>
> Yes, that is correct.
>
>>> What is eth1 connected to ?
>
> I'm not sure what you are referring to.

This is a perfectly valid question. If I may guess, you're running
a virtual machine and adding an interface (eth1) that is not
connected to anything at the host side.

> My goal, which I though was simple, is to add eth1 with the 10.10.13.250 IP address.
However as soon as I add it, I can no longer communicate with any 
10.10.12.0/23 systems.

If you want to set an extra IP address to the existing virtual
interface, use the Ethernet alias mechanism:

   ifconfig eth0:0 10.10.13.250/23

-- 

Tauno Voipio

[toc] | [prev] | [next] | [standalone]


#1875

FromRichard Kettlewell <rjk@greenend.org.uk>
Date2012-12-13 09:12 +0000
Message-ID<87y5h2s4cj.fsf@araminta.anjou.terraraq.org.uk>
In reply to#1873
herbert.burnswell@gmail.com writes:

>>> Your lines are too long. 
>
> I'm not sure what you mean.

You need to wrap them at 70 or so columns.

> Yes, I am not sure if I even need this file.  Nor am I sure what I
> need to put in the file.  If I do not use a route-<interface> file
> both eth0 and eth1 start properly but I am unable to communicate with
> any 10.10.12.0/23 systems.

You’ve left out a lot of details about your configuration.  At a guess
(which could be wrong) you have the guest’s eth0 bridged with the host’s
network adapter which is attached to the same network as 10.10.10.1,
which evidently can reach 10.10.12.0/23 somehow.  What you’ve not stated
how the guest’s eth1 is configured at all, nor why you think it might be
able to reached 10.10.12.0/23, nor why you think the extra interface is
even necessary in the first place (indeed the initial description
suggests that it’s completely unnecessary and you’re just making work
for yourself).

-- 
http://www.greenend.org.uk/rjk/

[toc] | [prev] | [next] | [standalone]


#1876

FromPascal Hambourg <boite-a-spam@plouf.fr.eu.org>
Date2012-12-14 00:00 +0100
Message-ID<kadmm1$1gqf$1@saria.nerim.net>
In reply to#1873
herbert.burnswell@gmail.com a écrit :
>
>> 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. 
> 
> Yes, both reached through default gateway.

No. The route to 10.10.10.1/23 has no gateway, meaning that destination
is reachable on the network directly attached to the interface.

>> What is eth1 connected to ?
> 
> I'm not sure what you are referring to.

A network interface must be connected to a network, otherwise it is useless.

> My goal, which I though was simple, is to add eth1 with the 10.10.13.250 IP address.  However as soon as I add it, I can no longer communicate with any 10.10.12.0/23 systems.  

That is not a goal but a means to achieve some goal. What is the real
goal, i.e. why you do want to add eth1 with address 10.10.13.250 ?

[toc] | [prev] | [next] | [standalone]


#1877

FromGordon <Gordon@clear.net.nz>
Date2012-12-19 06:33 +0000
Message-ID<ajd5d4Ffbk5U1@mid.individual.net>
In reply to#1873
On 2012-12-13, herbert.burnswell@gmail.com <herbert.burnswell@gmail.com> wrote:
> Thank you for your reply.
>
>> 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'm not sure what you mean.

They are over 80 characters long. Set your word wrap at 72 to 80 characters.
Then the lines will be able to be read by all, easily.

[toc] | [prev] | [next] | [standalone]


#1878

FromAragorn <stryder@telenet.be.invalid>
Date2012-12-19 07:52 +0100
Message-ID<karo7n$d7n$1@dont-email.me>
In reply to#1877
On Wednesday 19 December 2012 07:33, Gordon conveyed the following to 
comp.os.linux.networking...

> On 2012-12-13, herbert.burnswell@gmail.com
> <herbert.burnswell@gmail.com> wrote:
>
>> Thank you for your reply.
>>> 
>>> 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'm not sure what you mean.
> 
> They are over 80 characters long. Set your word wrap at 72 to 80
> characters. Then the lines will be able to be read by all, easily.

Google Groups does not allow one to do that, Gordon.  And even if it 
did, its users wouldn't know about Usenet netiquette, since they are 
firmly and rigidly convinced that Usenet is a web-based forum run by 
Google. :p

-- 
= Aragorn =
(registered GNU/Linux user #223157)

[toc] | [prev] | [next] | [standalone]


#1879

FromIan Zimmerman <itz@buug.org>
Date2012-12-19 12:48 -0800
Message-ID<20121219124825.33b0c9d2.itz@buug.org>
In reply to#1878
Newsgroups: comp.os.linux.networking

On Wed, 19 Dec 2012 07:52:39 +0100,
Aragorn <stryder@telenet.be.invalid> wrote:

Gordon> They are over 80 characters long. Set your word wrap at 72 to 80
Gordon> characters. Then the lines will be able to be read by all,
Gordon> easily.

Aragorn> Google Groups does not allow one to do that, Gordon.  And even
Aragorn> if it did, its users wouldn't know about Usenet netiquette,
Aragorn> since they are firmly and rigidly convinced that Usenet is a
Aragorn> web-based forum run by Google. :p

But you can always:

1. use an extension like ItsAllText, or

2. edit your post in a decent text editor (which allows
filling/wrapping) and paste it into the webby input field.

Of course that doesn't help with the second hurdle ;-)

-- 
Ian Zimmerman
gpg public key: 1024D/C6FF61AD
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
http://www.gravatar.com/avatar/c66875cda51109f76c6312f4d4743d1e.png
Rule 420: All persons more than eight miles high to leave the court.

[toc] | [prev] | [next] | [standalone]


#1880

FromRalph Spitzner <rasp@spitzner.org>
Date2012-12-19 22:28 +0100
Message-ID<44o9q9-0d9.ln1@spitzner.org>
In reply to#1878
Aragorn wrote:
[...]
> did, its users wouldn't know about Usenet netiquette, since they are
> firmly and rigidly convinced that Usenet is a web-based forum run by
> Google. :p
>

What ?
No embedded images, no (gr)Avatars ?
No links that open in div/iframes?


How archaic :-P

	-rasp


-- 
Where's that fucking 'any' key ?

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.linux.networking


csiph-web