[567] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Problem with static routes, gated 3_5Alpha_11

daemon@ATHENA.MIT.EDU (Drew Eckhardt)
Fri Jun 23 13:42:53 1995

To: gated-alpha@gated.cornell.edu, linux-net@vger.rutgers.edu
Date: Fri, 23 Jun 1995 09:56:22 -0600
From: Drew Eckhardt <drew@poohsticks.org>


I'm running gated 3_5Alpha_11 under Linux 1.2.10, libc 5.0.9,
built with GCC 2.6.3 (ELF), with the following configuration :

traceoptions "/var/adm/gated.log" replace size 1m files 2  general policy ;

# Define all dynamic interfaces here.  Otherwise, we only deal with
# interfaces which were up when gated started. 
interfaces {
#   define 192.168.1.17 netmask 255.255.255.240 ;
    define hub-to-drew pointtopoint drew-to-hub netmask 255.255.255.240 ;
} ;

# Route via RIP
rip yes {
    nobroadcast ;
    sourcegateways hub-to-drew ;
} ;

hello no ;
ospf no ;
egp no ;
bgp no ;

# Setup "static" routes with worst preference to all dynamic nets which
# will propogate routing information to us.  192.168.1.17 is a virtual 
# interface which has the kernel filtering code setup to block all packets.

static {
    198.137.146.64 mask-length 28 gateway 192.168.1.17 preference 255 ;
    198.137.146.32 mask-length 28 gateway 192.168.1.17 preference 255 ;
    198.137.146.80 mask-length 28 gateway 192.168.1.17 preference 255 ;
    198.137.146.48 mask-length 28 gateway 192.168.1.17 preference 255 ;
} ;

And my IP interfaces setup as follows : 
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:2000  Metric:1

eth0      Link encap:10Mbps Ethernet  HWaddr 00:AA:00:0C:E8:34
          inet addr:198.137.146.99  Bcast:198.137.146.111  Mask:255.255.255.240
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

dummy0    Link encap:10Mbps Ethernet  HWaddr 00:00:00:00:00:00
          inet addr:192.168.1.17  Bcast:192.168.1.31  Mask:255.255.255.240
          UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1

With this interface dynamically added by a keepalive script :
sl0       Link encap:VJ Serial Line IP  
          inet addr:198.137.146.27  P-t-P:198.137.146.26  Mask:255.255.255.240
          UP POINTOPOINT RUNNING  MTU:296  Metric:1

My problem is that when gated sees any of those static routes, they get added 
to the kernel with a netmask of 255.255.255.0 instead of the requested 
255.255.255.240 - Ie, I get a route to network 198.137.146.0; and it doesn't
get deleted when I get routes to those nets via RIP.

It logs the right things as being added : 

Jun 22 22:57:37 trace_on: Tracing to "/var/adm/gated.log" started
Jun 22 22:57:37 
Jun 22 22:57:37 Tracing flags enabled: general policy
Jun 22 22:57:37 
Jun 22 22:57:38 inet_routerid_notify: Router ID: 198.137.146.99
Jun 22 22:57:38 
Jun 22 22:57:38 
Jun 22 22:57:38 krt_rtread: Initial routes read from kernel (via /proc/net/route):
ADD      192.168.1.17     255.255.255.255 gw 192.168.1.17    Kernel   pref -254/0 metric 0/0 dummy0 <NotInstall NoAdvise Int Hidden Gateway>
ADD      192.168.1.17     255.255.255.255  Kernel   pref 0/0 metric 0/0 <NoAdvise Active Gateway>
CHANGE   192.168.1.17     255.255.255.255  Kernel   pref 0/0 metric 0/0 <NoAdvise Delete Gateway>
RELEASE  192.168.1.17     255.255.255.255 gw 192.168.1.17    Kernel   pref -254/0 metric 0/0 dummy0 <NotInstall NoAdvise Int Release Gateway>
ADD      192.168.1.16     255.255.255.240 gw 192.168.1.17    Kernel   pref -254/0 metric 0/0 dummy0 <NotInstall NoAdvise Int Hidden Gateway>
ADD      192.168.1.16     255.255.255.240  Kernel   pref 0/0 metric 0/0 <NoAdvise Active Gateway>
CHANGE   192.168.1.16     255.255.255.240  Kernel   pref 0/0 metric 0/0 <NoAdvise Delete Gateway>
RELEASE  192.168.1.16     255.255.255.240 gw 192.168.1.17    Kernel   pref -254/0 metric 0/0 dummy0 <NotInstall NoAdvise Int Release Gateway>
ADD      198.137.146.96   255.255.255.240 gw 198.137.146.99  Kernel   pref -254/0 metric 0/0 eth0 <NotInstall NoAdvise Int Hidden Gateway>
ADD      198.137.146.96   255.255.255.240  Kernel   pref 0/0 metric 0/0 <NoAdvise Active Gateway>
CHANGE   198.137.146.96   255.255.255.240  Kernel   pref 0/0 metric 0/0 <NoAdvise Delete Gateway>
RELEASE  198.137.146.96   255.255.255.240 gw 198.137.146.99  Kernel   pref -254/0 metric 0/0 eth0 <NotInstall NoAdvise Int Release Gateway>
Jun 22 22:57:38 rt_close: 12 routes proto KRT
Jun 22 22:57:38 
Jun 22 22:57:38 if_rtup: ADD route for interface lo 127.0.0.1/255.255.255.255
ADD      127.0.0.1        255.255.255.255 gw 127.0.0.1       Direct   pref 0/0 metric 0/0 lo <NoAdvise Active Retain>
Jun 22 22:57:38 rt_close: 1 route proto IF
Jun 22 22:57:38 
Jun 22 22:57:38 if_rtup: ADD route for interface eth0 198.137.146.99/255.255.255.240
ADD      198.137.146.96   255.255.255.240 gw 198.137.146.99  Direct   pref 0/0 metric 0/0 eth0 <Int Active Retain>
Jun 22 22:57:38 rt_close: 1 route proto IF
Jun 22 22:57:38 
Jun 22 22:57:38 if_rtup: ADD route for interface dummy0 192.168.1.17/255.255.255.240
ADD      192.168.1.16     255.255.255.240 gw 192.168.1.17    Direct   pref 0/0 metric 0/0 dummy0 <Int Active Retain>
Jun 22 22:57:38 rt_close: 1 route proto IF
Jun 22 22:57:38 
Jun 22 22:57:38 
Jun 22 22:57:38 ***Routes are being installed in kernel
Jun 22 22:57:38 
Jun 22 22:57:38 
Jun 22 22:57:38 Commence routing updates
Jun 22 22:57:38 
Jun 22 22:57:38 inet_routerid_notify: Router ID: 198.137.146.99
Jun 22 22:57:38 
ADD      127              255             gw 127.0.0.1       Static   pref 0/0 metric 0/0 lo <NoAdvise Int Active Reject>
ADD      198.137.146.32   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Active Gateway>
ADD      198.137.146.48   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Active Gateway>
ADD      198.137.146.64   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Active Gateway>
ADD      198.137.146.80   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Active Gateway>
Jun 22 22:57:38 rt_close: 5 routes proto RT
Jun 22 22:57:38 
Jun 22 22:57:38 
Jun 22 22:57:38 rt_new_policy: new policy started with 9 entries
KRT RT   ERROR  127             mask 255             router 127.0.0.1       flags <>0: reject routes not supported
Jun 22 22:57:38 
Jun 22 22:57:38 krt_flash: WARNING! REJECT ROUTES NOT SUPPORTED!
Jun 22 22:57:38 
RELEASE  192.168.1.16     255.255.255.240  Kernel   pref 0/0 metric 0/0 <NoAdvise Delete Release Gateway>
RELEASE  198.137.146.96   255.255.255.240  Kernel   pref 0/0 metric 0/0 <NoAdvise Delete Release Gateway>
Jun 22 22:57:38 rt_new_policy: new policy ended with 9 entries
Jun 22 22:57:38 
Jun 22 22:57:38 target_build: ALLOC 127.0.0.1 -> 127.0.0.1 interface 127.0.0.1(lo) flags <Broadcast>
Jun 22 22:57:38 target_build: ALLOC 198.137.146.99 -> 198.137.146.111 interface 198.137.146.99(eth0) flags <Broadcast>
Jun 22 22:57:38 target_build: ALLOC 192.168.1.17 -> 192.168.1.31 interface 192.168.1.17(dummy0) flags <Broadcast>
Jun 22 22:57:38 rip_target_list: just listening
Jun 22 22:57:38 
RELEASE  192.168.1.17     255.255.255.255  Kernel   pref 0/0 metric 0/0 <NoAdvise Delete Release Gateway>
Jun 22 22:58:00 task_terminate: first terminate signal received
RELEASE  127              255             gw 127.0.0.1       Static   pref 0/0 metric 0/0 lo <NoAdvise Int Release Reject>
CHANGE   198.137.146.32   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Delete Gateway>
CHANGE   198.137.146.48   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Delete Gateway>
CHANGE   198.137.146.64   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Delete Gateway>
CHANGE   198.137.146.80   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Delete Gateway>
Jun 22 22:58:00 rt_close: 5 routes proto RT
Jun 22 22:58:00 
Jun 22 22:58:00 target_free: FREE 127.0.0.1 -> 127.0.0.1 interface 127.0.0.1(lo) flags <Broadcast>
Jun 22 22:58:00 target_free: FREE 198.137.146.99 -> 198.137.146.111 interface 198.137.146.99(eth0) flags <Broadcast>
Jun 22 22:58:00 target_free: FREE 192.168.1.17 -> 192.168.1.31 interface 192.168.1.17(dummy0) flags <Broadcast>
Jun 22 22:58:00 
Jun 22 22:58:00 rt_flash_update: updating kernel with 4 entries
RELEASE  198.137.146.32   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Delete Release Gateway>
RELEASE  198.137.146.48   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Delete Release Gateway>
RELEASE  198.137.146.64   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Delete Release Gateway>
RELEASE  198.137.146.80   255.255.255.240 gw 192.168.1.17    Static   pref 255/0 metric 0/0 dummy0 <Int Delete Release Gateway>
Jun 22 22:58:00 
Jun 22 22:58:00 Exit gated[900] version R3_5Alpha_11
Jun 22 22:58:00 

Suggestions?





home help back first fref pref prev next nref lref last post