From: The Derfer on
I have a (very) large amount of data to move through a Gigabit
connection
shortly. I want to use a newly-configured gigabit PCI-X card in a
Dell
server to accomplish this. The other interfaces are 100 Mbps.

If I want to add a route (static route) to force outgoing packets
that
are destined for a particular host to use that interface (eth3 on this
host)
then how do I do that? System is RedHat Enterprise Linux 3AS.
I suspect this involved the "add route default" command or whatever
the syntax is -- I did it for Solaris years ago but don't remember
exactly how.


$ Linux host1.localdomain 2.4.21-57.ELhugemem #1 SMP Fri Jun 13
00:09:04 EDT 2008 i686 i686 i386 GNU/Linux


$ ifconfig eth3
eth3 Link encap:Ethernet HWaddr 00:0A:5E:7A:E7:33
inet addr:10.156.30.176 Bcast:10.156.30.255 Mask:
255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:619971 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44019924 (41.9 Mb) TX bytes:256 (256.0 b)
Interrupt:24


Thanks in advance.

From: Luuk on
The Derfer schreef:
> I have a (very) large amount of data to move through a Gigabit
> connection
> shortly. I want to use a newly-configured gigabit PCI-X card in a
> Dell
> server to accomplish this. The other interfaces are 100 Mbps.
>
> If I want to add a route (static route) to force outgoing packets
> that
> are destined for a particular host to use that interface (eth3 on this
> host)
> then how do I do that? System is RedHat Enterprise Linux 3AS.
> I suspect this involved the "add route default" command or whatever
> the syntax is -- I did it for Solaris years ago but don't remember
> exactly how.
>
>
> $ Linux host1.localdomain 2.4.21-57.ELhugemem #1 SMP Fri Jun 13
> 00:09:04 EDT 2008 i686 i686 i386 GNU/Linux
>
>
> $ ifconfig eth3
> eth3 Link encap:Ethernet HWaddr 00:0A:5E:7A:E7:33
> inet addr:10.156.30.176 Bcast:10.156.30.255 Mask:
> 255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:619971 errors:0 dropped:0 overruns:0 frame:0
> TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:44019924 (41.9 Mb) TX bytes:256 (256.0 b)
> Interrupt:24
>
>
> Thanks in advance.
>

man route

there are some examples in there too..... ;-)

--
Luuk
From: Sidney Lambe on
The Derfer <derf109(a)gmail.com> wrote:
> I have a (very) large amount of data to move through a Gigabit
> connection
> shortly. I want to use a newly-configured gigabit PCI-X card in a
> Dell
> server to accomplish this. The other interfaces are 100 Mbps.
>
> If I want to add a route (static route) to force outgoing packets
> that
> are destined for a particular host to use that interface (eth3 on this
> host)
> then how do I do that? System is RedHat Enterprise Linux 3AS.
> I suspect this involved the "add route default" command or whatever
> the syntax is -- I did it for Solaris years ago but don't remember
> exactly how.
>
>
> $ Linux host1.localdomain 2.4.21-57.ELhugemem #1 SMP Fri Jun 13
> 00:09:04 EDT 2008 i686 i686 i386 GNU/Linux
>
>
> $ ifconfig eth3
> eth3 Link encap:Ethernet HWaddr 00:0A:5E:7A:E7:33
> inet addr:10.156.30.176 Bcast:10.156.30.255 Mask:
> 255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:619971 errors:0 dropped:0 overruns:0 frame:0
> TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:44019924 (41.9 Mb) TX bytes:256 (256.0 b)
> Interrupt:24
>
>
> Thanks in advance.
>

Not sure exactly. This is what I do for lo:

/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 dev lo

Hope this helps,

Sid

From: Allen Kistler on
The Derfer wrote:
> I have a (very) large amount of data to move through a Gigabit
> connection
> shortly. I want to use a newly-configured gigabit PCI-X card in a
> Dell
> server to accomplish this. The other interfaces are 100 Mbps.
>
> If I want to add a route (static route) to force outgoing packets
> that
> are destined for a particular host to use that interface (eth3 on this
> host)
> then how do I do that? System is RedHat Enterprise Linux 3AS.
> I suspect this involved the "add route default" command or whatever
> the syntax is -- I did it for Solaris years ago but don't remember
> exactly how.
>
> [snip]
>
> $ ifconfig eth3
>
> [snip]

You'll probably want to make the route permanent across reboots and
interface bounces. RH changed their convention for route config files,
but I believe the following convention applies to RHEL3. (It's been a
while.)

Create the file /etc/sysconfig/network-scripts/route-eth3
The contents should be
ADDRESS0=<whatever-host-address>
NETMASK0=255.255.255.255
GATEWAY0=<gateway-if-remote-or-eth3-addr-if-local>

If you want other routes, then the next set would use 1 instead of 0,
etc., for as many as you need. You must start at 0. You must not skip
any numbers. You can specify whole networks, but you asked about just
one host, so the example mask is all 1s.

Then "ifdown eth3 ; ifup eth3" will handle running "route" (or "ip
route," I forget when that changed, too) for you, plus the config is
applied automatically on reboot.
From: A_A_K on
go to root mode
route add -net <network ip>/<subnet mask> gw <gateway ip address>

to verify the route give command "route"