adding extra network routes

2004-01-12 Thread Alphonse Ogulla
After I got tired of adding a network route everytime I started my 
machine, I added the ensuing line to a file 'route00' and saved it in 
/etc/network/if-up.d

 route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0

This works, but what I don't understand is why run-parts attempts to run the 
script five times, or is it because I have five virtual interfaces on eth0?

run-parts echoes the following error on startup.

 Configuring network interfaces: SIOCADDRT: No such device
 run-parts: /etc/network/if-up.d/00route exited with return code 7
 SIOCADDRT: File exists
 done.

The last three lines are repeated five times. This brings me to my question. 
Where should I put my one line script 'route00' in order to add an extra 
route to a network without seeing the above errors on startup?

Thanks  regards,

-- 

Alphonse Ogulla
Nairobi, Kenya



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: adding extra network routes

2004-01-12 Thread Laurence J. Lane
On Mon, Jan 12, 2004 at 02:27:49PM +0300, Alphonse Ogulla wrote:

 The last three lines are repeated five times. This brings me to my
 question. Where should I put my one line script 'route00' in order
 to add an extra route to a network without seeing the above errors
 on startup?

A few thoughts...

Test $IFACE and exit the script appropriately.
  
  #!/bin/sh
  [ $IFACE = eth0 ] || exit
  route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0

Add the line directly to your /etc/network/interfaces stanza.

  auto eth0
  iface eth0 inet dhcp
  up route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0

Or a variation of the last one. Run the script from somewhere
other than the .d/ directories.

  auto eth0
  iface eth0 inet dhcp
up /path/to/my/script


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: NETWORK ROUTES

2002-10-25 Thread Ángel Carrasco
I cannot do it because, the big router has a little bandwidth only used by
these servers.

I try to use the office network to give internet all rest.


And the second, I would have to do NAT because, each router only manages his
range.
- Original Message -
From: Jeff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 24, 2002 11:38 PM
Subject: Re: NETWORK ROUTES


 Ángel Carrasco, 2002-Oct-24 22:21 +0200:
  I have two routers because I use one for internal users and other to use
  with public internet servers. Ok? And I cannot manage or add new rules
in
  these routers because they are administrated  by other company.
 
  Can you help me,please?

   My public network is:213.250.143.240/28 and his IP is:
213.250.143.242.

   0.0.0.0 172.16.16.254   0.0.0.0 UG0  0  0  eth3

 Try this, remove the above route and replace it with one to
 213.250.143.242:

 # route del default gw 172.16.16.254
 # route add default gw 213.250.143.242

 and see it that fixes it.  I believe my previous post is all wrong as
 far as what I thought the route table should look like.  I think this
 is all you need to do.

 jc

 --
 Jeff Coppock Systems Engineer
 Diggin' Debian Admin and User


 --
 To UNSUBSCRIBE, email to [EMAIL PROTECTED]
 with a subject of unsubscribe. Trouble? Contact
[EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




NETWORK ROUTES

2002-10-24 Thread Ángel Carrasco



Hi all,

I have a debian server with 4 network cards: 
The first card is used to connect to public network and this network 
connects with a big router.The Second, third and fourth cards are used by 
other networks.The first card used a dinamic route with the big 
router.The other cards used a static route with a little router.All runs 
good but my problem is when I try to use the IP of my first card in my internals 
networksdoesn't work because, all information doesn't go by internals 
networks, it goes by the big network.Could you help me, please?


Thank you very much,



Ángel


Re: NETWORK ROUTES

2002-10-24 Thread Sebastiaan
Hi,

please turn on line wrap at 72 characters. Thanks.

On Thu, 24 Oct 2002, [iso-8859-1] Ángel Carrasco wrote:

 Hi all,

 I have a debian server with 4 network cards:  The first card is used to
 connect to public network and this network connects with a big router.
 The Second, third and fourth cards are used by other networks. The first
 card used a dinamic route with the big router. The other cards used a
 static route with a little router. All runs good but my problem is when
 I try to use the IP of my first card in my internals networks doesn't
 work because, all information doesn't go by internals networks, it goes
 by the big network. Could you help me, please?


Could you give us more specific information, like the address ranges,
ifconifg and route -n?


Greetz,
Sebastiaan

 Thank you very much,



 Ángel



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: NETWORK ROUTES

2002-10-24 Thread Ángel Carrasco
Ok:

My office network is: 172.16.16.0/24 and his IP is: 172.16.16.1.
My web network is: 172.16.8.0/24 and his IP is: 172.16.8.1
My service network is: 172.16.4.0/24 and his IP is: 172.16.4.1
My public network is:213.250.143.240/28 and his IP is: 213.250.143.242.

The public router is 213.250.143.241 (and only works with the range
213.250.143.240/28)
The office router is 172.16.16.254 (and only works with the range
172.16.16.0/24)

The static default route is 172.16.16.254

This is my route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric RefUse
Iface
213.250.143.240 0.0.0.0 255.255.255.240 U 0  00 eth0
172.16.4.0  0.0.0.0 255.255.255.0   U 0  00 eth1
172.16.16.0 0.0.0.0 255.255.255.0   U 0  00 eth3
172.16.8.0  0.0.0.0 255.255.255.0   U 0  00 eth2
0.0.0.0 172.16.16.254   0.0.0.0 UG0  00 eth3

And my dinamic route to using the public network is:
ip rule add from 213.250.143.242 table publica
ip route add from default via 213.250.143.241 dev eth0 table publica
ip route flush cache


And the problem is when I try to use 213.250.143.242 in my internals
networks doesnt run because the information goes by 213.250.143.241 and not
in the normal routes.


Can you help me, please?


- Original Message -
From: Sebastiaan [EMAIL PROTECTED]
To: Ángel Carrasco [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, October 24, 2002 9:39 AM
Subject: Re: NETWORK ROUTES


Hi,

please turn on line wrap at 72 characters. Thanks.

On Thu, 24 Oct 2002, [iso-8859-1] Ángel Carrasco wrote:

 Hi all,

 I have a debian server with 4 network cards:  The first card is used to
 connect to public network and this network connects with a big router.
 The Second, third and fourth cards are used by other networks. The first
 card used a dinamic route with the big router. The other cards used a
 static route with a little router. All runs good but my problem is when
 I try to use the IP of my first card in my internals networks doesn't
 work because, all information doesn't go by internals networks, it goes
 by the big network. Could you help me, please?


Could you give us more specific information, like the address ranges,
ifconifg and route -n?


Greetz,
Sebastiaan

 Thank you very much,



 Ángel



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact
[EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




RE: NETWORK ROUTES

2002-10-24 Thread Ángel Carrasco
I have two routers because I use one for internal users and other to use
with public internet servers. Ok? And I cannot manage or add new rules in
these routers because they are administrated  by other company.

Can you help me,please?


Ángel

-Mensaje original-
De: Jeff [mailto:jcoppock1;attbi.com]
Enviado el: jueves, 24 de octubre de 2002 19:20
Para: [EMAIL PROTECTED]
Asunto: Re: NETWORK ROUTES


Ángel Carrasco, 2002-Oct-24 10:26 +0200:
 Ok:

 My office network is: 172.16.16.0/24 and his IP is: 172.16.16.1.
 My web network is: 172.16.8.0/24 and his IP is: 172.16.8.1
 My service network is: 172.16.4.0/24 and his IP is: 172.16.4.1
 My public network is:213.250.143.240/28 and his IP is: 213.250.143.242.

 The public router is 213.250.143.241 (and only works with the range
 213.250.143.240/28)
 The office router is 172.16.16.254 (and only works with the range
 172.16.16.0/24)

 The static default route is 172.16.16.254

 This is my route -n
 Kernel IP routing table
 Destination Gateway Genmask Flags Metric RefUse
 Iface
 213.250.143.240 0.0.0.0 255.255.255.240 U 0  00
eth0
 172.16.4.0  0.0.0.0 255.255.255.0   U 0  00
eth1
 172.16.16.0 0.0.0.0 255.255.255.0   U 0  00
eth3
 172.16.8.0  0.0.0.0 255.255.255.0   U 0  00
eth2
 0.0.0.0 172.16.16.254   0.0.0.0 UG0  00
eth3

This system is your gateway to the internet.  You must have the
default route point to 213.250.143.242.  All the networks on your
private network are known and can be specified in the route tables,
but you cannot specify all the internet routes.  So, the above route
table should look something like:

213.250.143.240   0.0.0.0
172.16.4.0172.16.16.254
172.16.16.0   172.16.16.254
172.16.8.0172.16.16.254
0.0.0.0   213.250.143.242

 And my dinamic route to using the public network is:
 ip rule add from 213.250.143.242 table publica
 ip route add from default via 213.250.143.241 dev eth0 table publica
 ip route flush cache


 And the problem is when I try to use 213.250.143.242 in my internals
 networks doesnt run because the information goes by 213.250.143.241 and
not
 in the normal routes.

I'm not clear on whether you have internal routers, but if so they
should all have default routes to the gateway system as well as
specific routes to the local networks.  The gateway IP for the local
PC's should be the router interface nearest them.


 Can you help me, please?

I hope this helps,
jc


--
Jeff CoppockSystems Engineer
Diggin' Debian  Admin and User


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: NETWORK ROUTES

2002-10-24 Thread Jeff
Ángel Carrasco, 2002-Oct-24 10:26 +0200:
 Ok:
 
 My office network is: 172.16.16.0/24 and his IP is: 172.16.16.1.
 My web network is: 172.16.8.0/24 and his IP is: 172.16.8.1
 My service network is: 172.16.4.0/24 and his IP is: 172.16.4.1
 My public network is:213.250.143.240/28 and his IP is: 213.250.143.242.
 
 The public router is 213.250.143.241 (and only works with the range
 213.250.143.240/28)
 The office router is 172.16.16.254 (and only works with the range
 172.16.16.0/24)
 
 The static default route is 172.16.16.254
 
 This is my route -n
 Kernel IP routing table
 Destination Gateway Genmask Flags Metric RefUse
 Iface
 213.250.143.240 0.0.0.0 255.255.255.240 U 0  00 eth0
 172.16.4.0  0.0.0.0 255.255.255.0   U 0  00 eth1
 172.16.16.0 0.0.0.0 255.255.255.0   U 0  00 eth3
 172.16.8.0  0.0.0.0 255.255.255.0   U 0  00 eth2
 0.0.0.0 172.16.16.254   0.0.0.0 UG0  00 eth3

This system is your gateway to the internet.  You must have the
default route point to 213.250.143.242.  All the networks on your
private network are known and can be specified in the route tables,
but you cannot specify all the internet routes.  So, the above route
table should look something like:

213.250.143.240   0.0.0.0
172.16.4.0172.16.16.254
172.16.16.0   172.16.16.254
172.16.8.0172.16.16.254
0.0.0.0   213.250.143.242

 And my dinamic route to using the public network is:
 ip rule add from 213.250.143.242 table publica
 ip route add from default via 213.250.143.241 dev eth0 table publica
 ip route flush cache
 
 
 And the problem is when I try to use 213.250.143.242 in my internals
 networks doesnt run because the information goes by 213.250.143.241 and not
 in the normal routes.

I'm not clear on whether you have internal routers, but if so they
should all have default routes to the gateway system as well as
specific routes to the local networks.  The gateway IP for the local
PC's should be the router interface nearest them.
 
 
 Can you help me, please?

I hope this helps,
jc


--
Jeff CoppockSystems Engineer
Diggin' Debian  Admin and User


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: NETWORK ROUTES

2002-10-24 Thread Pietro Cagnoni
This is my route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric RefUse
Iface
213.250.143.240 0.0.0.0 255.255.255.240 U 0  00 eth0
172.16.4.0  0.0.0.0 255.255.255.0   U 0  00 eth1
172.16.16.0 0.0.0.0 255.255.255.0   U 0  00 eth3
172.16.8.0  0.0.0.0 255.255.255.0   U 0  00 eth2
0.0.0.0 172.16.16.254   0.0.0.0 UG0  00 eth3


an easy try: what is the default gateway setting on the internal 
networks hosts?

for instance, on network 172.16.4.0/24, if the router nic is on 
172.16.4.1, the default gateway on any other host must be 172.16.4.1 
(hope i've been clear :-) )

eventually, you can try to dump completely static routing. static 
routing is good for causing headaches.

hope this helps.

pietro.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: NETWORK ROUTES

2002-10-24 Thread Ángel Carrasco
I don't understand you because all my hosts can connect without problems but
my public IP, I cannot use internal. This is my big problem.

Sorry My English is bad, can you explain me, plesae?

- Original Message -
From: Pietro Cagnoni [EMAIL PROTECTED]
To: Ángel Carrasco [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, October 24, 2002 5:19 PM
Subject: Re: NETWORK ROUTES


  This is my route -n
  Kernel IP routing table
  Destination Gateway Genmask Flags Metric RefUse
  Iface
  213.250.143.240 0.0.0.0 255.255.255.240 U 0  00
eth0
  172.16.4.0  0.0.0.0 255.255.255.0   U 0  00
eth1
  172.16.16.0 0.0.0.0 255.255.255.0   U 0  00
eth3
  172.16.8.0  0.0.0.0 255.255.255.0   U 0  00
eth2
  0.0.0.0 172.16.16.254   0.0.0.0 UG0  00
eth3

 an easy try: what is the default gateway setting on the internal
 networks hosts?

 for instance, on network 172.16.4.0/24, if the router nic is on
 172.16.4.1, the default gateway on any other host must be 172.16.4.1
 (hope i've been clear :-) )

 eventually, you can try to dump completely static routing. static
 routing is good for causing headaches.

 hope this helps.

 pietro.



 --
 To UNSUBSCRIBE, email to [EMAIL PROTECTED]
 with a subject of unsubscribe. Trouble? Contact
[EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: NETWORK ROUTES

2002-10-24 Thread Jeff
Ángel Carrasco, 2002-Oct-24 22:21 +0200:
 I have two routers because I use one for internal users and other to use
 with public internet servers. Ok? And I cannot manage or add new rules in
 these routers because they are administrated  by other company.
 
 Can you help me,please?

  My public network is:213.250.143.240/28 and his IP is: 213.250.143.242.

  0.0.0.0 172.16.16.254   0.0.0.0 UG0  0  0  eth3

Try this, remove the above route and replace it with one to
213.250.143.242:

# route del default gw 172.16.16.254
# route add default gw 213.250.143.242

and see it that fixes it.  I believe my previous post is all wrong as
far as what I thought the route table should look like.  I think this
is all you need to do.

jc

--
Jeff CoppockSystems Engineer
Diggin' Debian  Admin and User


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Network routes

2000-11-18 Thread Kyle J. Moore
I have just started using Debian in something other
than a simple network. I'm looking for what file and
syntax I should put entries for static routes. I'm
used to RedHat and things seem to be different in
Debian. Most of the docs I've seen while researching
this refer to putting things in the
/etc/init.d/network script. This doesn't seem like a
good idea as it would get overwritten during an
upgrade and it also doesn't seem to be supported
anymore as the script looks totally different? Do I
put this in /etc/network/interfaces or what? An
example of syntax would also be helpful.

Thanks.

-Kyle

__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/



Re: Network routes

2000-11-18 Thread Alson van der Meulen
On Sat, Nov 18, 2000 at 11:41:10AM -0800, Kyle J. Moore wrote:
 I have just started using Debian in something other
 than a simple network. I'm looking for what file and
 syntax I should put entries for static routes. I'm
 used to RedHat and things seem to be different in
 Debian. Most of the docs I've seen while researching
 this refer to putting things in the
 /etc/init.d/network script. This doesn't seem like a
 good idea as it would get overwritten during an
 upgrade and it also doesn't seem to be supported
 anymore as the script looks totally different? Do I
/etc/init.d/network is the 2.1/slink (old) way,
in potato and up, /etc/network/interfaces is used,
and /etc/init.d/networking that calls ifup/ifdown
and sets up some things like ip spoofing protection,
but i don't recommend to edit it directly, it's nice
(imho) that all routes are reset if you do
ifdown -a; ifup -a.


 put this in /etc/network/interfaces or what? An
 example of syntax would also be helpful.

i usually do it in /etc/network/interfaces like:
 iface eth0 inet static
 address 192.168.1.1
 network 192.168.1.0
 netmask 255.255.255.0
 broadcast 192.168.1.255
 gateway 192.168.1.254
 up route add -net 192.168.2.0 netmask 255.255.255.0 dev eth0 gw 
192.168.1.250
 down route del -net 192.168.2.0 netmask 255.255.255.0

after up/down, just normal commands can be enterd.
i constrol my firewalls this way too, like 

up /root/bin/firewall-eth0 start
down /root/bin/firewall-eth0 stop

man 5 interfaces for more info

it could be a good idea to make a seperate script for
adding/removing the correct routes for an iface,
like i did for firewalling.
it isn't very managable if you have 30 'up' lines
in interfaces.

-- 
,---.
 Name:   Alson van der Meulen  
 Personal:   [EMAIL PROTECTED]   
 School:   [EMAIL PROTECTED]
`---'
You can do this patch with the system up...
-



rejecting network routes

1999-02-09 Thread dan
Does anyone know how to remove a rejecting route from the kernel's
routing tables?

Here is a transcript that captures what I'm trying to do:

# route add -net 207.46.0.0 netmask 255.255.0.0 reject  
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric RefUse Iface
res-net *   255.255.255.0   U 0  00 eth0
207.46.0.0  -   255.255.0.0 ! 0  -0 -
localnet*   255.0.0.0   U 0  00 lo
default gatewayhost.mrs 0.0.0.0 UG0  00 eth0
# route del -net 207.46.0.0
SIOCDELRT: Invalid argument

Is there another way to remove the route, or could
this be a bug in the route program?

Pleaes CC to me, as I'm not on the list.  Thanks!
-- 
Dan Gohman
[EMAIL PROTECTED]


Re: rejecting network routes

1999-02-09 Thread Mirek Kwasniak
On Tue, Feb 09, 1999 at 10:43:36AM -0600, dan wrote:
 Does anyone know how to remove a rejecting route from the kernel's
 routing tables?
 
 Here is a transcript that captures what I'm trying to do:
 
 # route add -net 207.46.0.0 netmask 255.255.0.0 reject  
 # route
 Kernel IP routing table
 Destination Gateway Genmask Flags Metric RefUse Iface
 res-net *   255.255.255.0   U 0  00 eth0
 207.46.0.0  -   255.255.0.0 ! 0  -0 -
 localnet*   255.0.0.0   U 0  00 lo
 default gatewayhost.mrs 0.0.0.0 UG0  00 eth0
 # route del -net 207.46.0.0
 SIOCDELRT: Invalid argument
 

# route add -net 207.46.0.0 netmask 255.255.0.0 reject
# route |grep 207.46.0.0
207.46.0.0  -   255.255.0.0 ! 0  -0 -
# route del -net 207.46.0.0 netmask 255.255.0.0 reject
# route |grep 207.46.0.0
#

Mirek