Here is the original question with some additional comments.
> From: MARINIER "Claude Marinier" 23-SEP-1993 08:59:37.17
> To: SMTP%"sun-managers@eecs.nwu.edu"
> CC: MARINIER
> Subj: route says "File exists" (revised)
>
> Hi,
>
> This is a revised version of a previously posted question.
>
> The server for dreo.dnd.ca is:
>
> COMPstation 40 (sun4c)
> Patches 100075-09 100103-11 100121-09 100125-05 100173-10
> 100224-06 100296-04 100305-11 100376-04 100377-05
> 100383-06 100424-01 100448-01 100452-28 100482-04
> 100513-02 100542-04 100567-04 100623-03 100630-01
> 101080-01
> SunOS Release 4.1.2
> valet.dreo.dnd.ca (192.12.98.5)
>
> I have a problem with route. I want to use static routes. I use the
> following configuration file:
>
> | #
> | # Static routes
> | #
> | # The two following routes are defined automatically.
> | #
> | # host 127.0.0.1 127.0.0.1 0
> | # net 192.12.98.0 192.12.98.5 0
> | #
> | net default 192.12.98.1 1
> | net 131.136.32.0 192.12.98.3 1
> | net 131.136.33.0 192.12.98.12 1
> | net 131.136.34.0 192.12.98.9 1
> | net 131.136.35.0 192.12.98.9 1
> | net 131.136.37.0 192.12.98.11 1
> | net 131.136.206.0 192.12.98.3 1
> | net 142.92.0.0 192.12.98.16 1
>
> But do not get what I want. Instead I get:
>
> | > netstat -rn
> | Routing tables
> | Destination Gateway Flags Refcnt Use Inter
> | 127.0.0.1 127.0.0.1 UH 2 24527 lo0
> | 131.136.37.0 192.12.98.11 UG 7 35312 le0
> | 131.136.34.0 192.12.98.9 UG 0 0 le0
> | 131.136.33.0 192.12.98.12 UG 0 0 le0
> | 131.136.32.0 192.12.98.3 UG 0 0 le0
> | default 192.12.98.1 UG 0 108 le0
> | 192.12.98.0 192.12.98.5 U 18 2858404 le0
> | 142.92.0.0 192.12.98.16 UG 0 2 le0
Note that all the traffic to 131.136.0.0 addresses goes through 192.12.98.11.
> Note that the routes to 131.136.35.0 and 131.136.206.0 are missing. They
> use the same routers as 131.136.34.0 and 131.136.32.0 respectively. When I
> try to add the missing routes by hand I get:
>
> | > route add net 131.136.35.0 192.12.98.9 1
> | add net 131.136.35.0: gateway 192.12.98.9: File exists
> | > route add net 131.136.206.0 192.12.98.3 1
> | add net 131.136.206.0: gateway 192.12.98.3: File exists
The system knowns that 131.136.0.0 is a class B network and does not see
the netmask because it is outside that network. In effect I have defined
four routes to the same network. The system will not accept the other two
routes since they are identical to other routes already in the table.
> The 131.136.0.0 addresses are part of a set class B addresses which we have
> divided into sub-nets along the standard byte boundary. The /etc/netmasks
> file contains:
>
> | 131.136.0.0 255.255.255.0
>
> I can see the netmask:
>
> | > ypcat -k netmasks.byaddr
> | 131.136.0.0 255.255.255.0
>
> I have tried to use in.routed with the following /etc/gateways file:
>
> | net 0.0.0.0 gateway 192.12.98.1 metric 1 passive
> | net 131.136.32.0 gateway 192.12.98.3 metric 1 passive
> | net 131.136.33.0 gateway 192.12.98.12 metric 1 passive
> | net 131.136.34.0 gateway 192.12.98.9 metric 1 passive
> | net 131.136.35.0 gateway 192.12.98.9 metric 1 passive
> | net 131.136.37.0 gateway 192.12.98.11 metric 1 passive
> | net 131.136.206.0 gateway 192.12.98.3 metric 1 passive
> | net 142.92.0.0 gateway 192.12.98.16 metric 1 passive
>
> but the results are the same.
>
> Here is more information:
>
> | > ifconfig -a
> | le0: flags=63<UP,BROADCAST,NOTRAILERS,RUNNING>
> | inet 192.12.98.5 netmask ffffff00 broadcast 192.12.98.0
> | ether 0:80:3f:f2:6:f
> | lo0: flags=49<UP,LOOPBACK,RUNNING>
> | inet 127.0.0.1 netmask ff000000
>
> There are two questions:
>
> 1) Why is route complaining about files?
>
> 2) How can I add those two routes.
The answers to my two questions have been provided as you can see from the
following replies.
> From: gdmr@dcs.ed.ac.uk
> Date: Fri, 24 Sep 93 10:29:53 BST
>
> Ah. I don't think you can do that. 131.136 is a class-B network. If you're
> not directly attached to a subnetted network you can only define a route to
> the network as a whole, not to its subnets individually. The kernel knows
> about netmasks only in relation to interfaces, not remote routes.
> --
> George D M Ross, Department of Computer Science, University of Edinburgh
> Kings Buildings, Mayfield Road, Edinburgh, Scotland, EH9 3JZ
> Mail: gdmr@dcs.ed.ac.uk Voice: 031-650 5147 Fax: 031-667 7209
>
> Date: Thu, 23 Sep 93 17:10:55 PDT
> From: david@srv.PacBell.COM (David St. Pierre)
>
> in general, i don't believe that you can "split" an external class B.
> if you take a look at your "use" counts, it's all going out on the first
> route.
>
> you should either:
>
> 1 - convert to a 131.136 subnet
> 2 - live with only one active gateway into the class B net.
I am pursuing the first solution: we will move the server to the class B
network.
Thanks to all who replied.
---------------
Claude Marinier
marinier@ed.dreo.dnd.ca
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:17 CDT