Bug 14175

Summary: route for ip aliasing
Product: Base System Reporter: jch <jch>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description jch 1999-10-07 09:20:01 UTC
I add an alias on my network interface (de0), and when I do a
'netstat -rn' I dont have the complete route.
I've
192.168.1 instead of 192.168.1.0
perhaps it's normal....

How-To-Repeat: ifconfig de0 inet 192.168.1.20 netmask 255.255.255.0 alias
netstat -rn
Comment 1 dfr freebsd_committer freebsd_triage 1999-10-07 09:39:38 UTC
Responsible Changed
From-To: freebsd-alpha->freebsd-bugs

Misfiled PR 

Comment 2 Tony Fleisher 2001-05-30 08:48:52 UTC
Jean-Claude wrote:
>    I add an alias on my network interface (de0), and when I do a
>    'netstat -rn' I dont have the complete route.
>    I've
>    192.168.1 instead of 192.168.1.0
>    perhaps it's normal....
>    I add an alias on my network interface (de0), and when I do a
>    'netstat -rn' I dont have the complete route.
>    I've
>    192.168.1 instead of 192.168.1.0
>    perhaps it's normal....


I believe that this is a normal output result (do to conversion
through inet_netof(3), perhaps?).

Tony.
Comment 3 ru freebsd_committer freebsd_triage 2001-06-07 15:00:15 UTC
State Changed
From-To: open->closed

Asked and answered.
Comment 4 vova 2001-06-07 15:23:31 UTC
ru@FreeBSD.ORG writes:
 > Synopsis: route for ip aliasing
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: ru
 > State-Changed-When: Thu Jun 7 07:00:15 PDT 2001
 > State-Changed-Why: 
 > Asked and answered.

Actual I think not good idea support different address schemes for
netstat -r and route(8) utilites:

# route add 10.0.0.0/16 192.168.14.1
add net 10.0.0.0: gateway 192.168.14.1
# netstat -rn | egrep \^10
10/16              192.168.14.1       UGSc        0        0     fxp0
# route delete 10/16
route: writing to routing socket: No such process
delete net 10: not in table
# route delete 10.0.0.0/16
delete net 10.0.0.0
#

if netstat deal with addreses like 10/16, I think route need to deal
with them too.

--
TSB Russian Express, Moscow
Vladimir B. Grebenschikov, vova@express.ru
Comment 5 ru freebsd_committer freebsd_triage 2001-06-08 10:08:48 UTC
Thanks for reminding!
Fixed in route.c,v 1.46 and route.8,v 1.24.

On Thu, Jun 07, 2001 at 06:23:31PM +0400, Vladimir B. Grebenschikov wrote:
> ru@FreeBSD.ORG writes:
>  > Synopsis: route for ip aliasing
>  > 
>  > State-Changed-From-To: open->closed
>  > State-Changed-By: ru
>  > State-Changed-When: Thu Jun 7 07:00:15 PDT 2001
>  > State-Changed-Why: 
>  > Asked and answered.
> 
> Actual I think not good idea support different address schemes for
> netstat -r and route(8) utilites:
> 
> # route add 10.0.0.0/16 192.168.14.1
> add net 10.0.0.0: gateway 192.168.14.1
> # netstat -rn | egrep \^10
> 10/16              192.168.14.1       UGSc        0        0     fxp0
> # route delete 10/16
> route: writing to routing socket: No such process
> delete net 10: not in table
> # route delete 10.0.0.0/16
> delete net 10.0.0.0
> #
> 
> if netstat deal with addreses like 10/16, I think route need to deal
> with them too.
> 
> --
> TSB Russian Express, Moscow
> Vladimir B. Grebenschikov, vova@express.ru

-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age
Comment 6 vova 2001-06-08 10:23:58 UTC
Ruslan Ermilov writes:
 > Thanks for reminding!
 > Fixed in route.c,v 1.46 and route.8,v 1.24.
 
May be allow similar semantic in ifconfig too ?

ifconfig if0 192.168.1.1/28 
instead of
ifconfig if0 192.168.1.1 netmask 255.255.255.240 
? 

 > On Thu, Jun 07, 2001 at 06:23:31PM +0400, Vladimir B. Grebenschikov wrote:
 > > ru@FreeBSD.ORG writes:
 > >  > Synopsis: route for ip aliasing
 > >  > 
 > >  > State-Changed-From-To: open->closed
 > >  > State-Changed-By: ru
 > >  > State-Changed-When: Thu Jun 7 07:00:15 PDT 2001
 > >  > State-Changed-Why: 
 > >  > Asked and answered.
 > > 
 > > Actual I think not good idea support different address schemes for
 > > netstat -r and route(8) utilites:
 > > 
 > > # route add 10.0.0.0/16 192.168.14.1
 > > add net 10.0.0.0: gateway 192.168.14.1
 > > # netstat -rn | egrep \^10
 > > 10/16              192.168.14.1       UGSc        0        0     fxp0
 > > # route delete 10/16
 > > route: writing to routing socket: No such process
 > > delete net 10: not in table
 > > # route delete 10.0.0.0/16
 > > delete net 10.0.0.0
 > > #
 > > 
 > > if netstat deal with addreses like 10/16, I think route need to deal
 > > with them too.
 > > 
 > > --
 > > TSB Russian Express, Moscow
 > > Vladimir B. Grebenschikov, vova@express.ru
 > 
 > -- 
 > Ruslan Ermilov		Oracle Developer/DBA,
 > ru@sunbay.com		Sunbay Software AG,
 > ru@FreeBSD.org		FreeBSD committer,
 > +380.652.512.251	Simferopol, Ukraine
 > 
 > http://www.FreeBSD.org	The Power To Serve
 > http://www.oracle.com	Enabling The Information Age
 > 

--
TSB Russian Express, Moscow
Vladimir B. Grebenschikov, vova@express.ru
Comment 7 jch 2001-06-08 10:29:53 UTC
> Ruslan Ermilov writes:
>  > Thanks for reminding!
>  > Fixed in route.c,v 1.46 and route.8,v 1.24.
>  
> May be allow similar semantic in ifconfig too ?
> 
> ifconfig if0 192.168.1.1/28 
> instead of
> ifconfig if0 192.168.1.1 netmask 255.255.255.240 
> ? 

instead of, no.
It's important to let the actual configuration parameters of ifconfig.
However, add the prefix in the parameters of ifconfig can be consider
as a different way to set the mask and should be appreciate.

> 
>  > On Thu, Jun 07, 2001 at 06:23:31PM +0400, Vladimir B. Grebenschikov wrote:
>  > > ru@FreeBSD.ORG writes:
>  > >  > Synopsis: route for ip aliasing
>  > >  > 
>  > >  > State-Changed-From-To: open->closed
>  > >  > State-Changed-By: ru
>  > >  > State-Changed-When: Thu Jun 7 07:00:15 PDT 2001
>  > >  > State-Changed-Why: 
>  > >  > Asked and answered.
>  > > 
>  > > Actual I think not good idea support different address schemes for
>  > > netstat -r and route(8) utilites:
>  > > 
>  > > # route add 10.0.0.0/16 192.168.14.1
>  > > add net 10.0.0.0: gateway 192.168.14.1
>  > > # netstat -rn | egrep \^10
>  > > 10/16              192.168.14.1       UGSc        0        0     fxp0
>  > > # route delete 10/16
>  > > route: writing to routing socket: No such process
>  > > delete net 10: not in table
>  > > # route delete 10.0.0.0/16
>  > > delete net 10.0.0.0
>  > > #
>  > > 
>  > > if netstat deal with addreses like 10/16, I think route need to deal
>  > > with them too.
>  > > 
>  > > --
>  > > TSB Russian Express, Moscow
>  > > Vladimir B. Grebenschikov, vova@express.ru
>  > 
>  > -- 
>  > Ruslan Ermilov		Oracle Developer/DBA,
>  > ru@sunbay.com		Sunbay Software AG,
>  > ru@FreeBSD.org		FreeBSD committer,
>  > +380.652.512.251	Simferopol, Ukraine
>  > 
>  > http://www.FreeBSD.org	The Power To Serve
>  > http://www.oracle.com	Enabling The Information Age
>  > 
> 
> --
> TSB Russian Express, Moscow
> Vladimir B. Grebenschikov, vova@express.ru

-- 
Jean-Claude Christophe / jch@oleane.net
Comment 8 vova 2001-06-08 10:37:01 UTC
Jean-Claude Christophe writes:
 > > Ruslan Ermilov writes:
 > >  > Thanks for reminding!
 > >  > Fixed in route.c,v 1.46 and route.8,v 1.24.
 > >  
 > > May be allow similar semantic in ifconfig too ?
 > > 
 > > ifconfig if0 192.168.1.1/28 
 > > instead of
 > > ifconfig if0 192.168.1.1 netmask 255.255.255.240 
 > > ? 
 > 
 > instead of, no.
 > It's important to let the actual configuration parameters of ifconfig.
 > However, add the prefix in the parameters of ifconfig can be consider
 > as a different way to set the mask and should be appreciate.

Of course, I mean only one more possible way.
 

--
TSB Russian Express, Moscow
Vladimir B. Grebenschikov, vova@express.ru
Comment 9 ru freebsd_committer freebsd_triage 2001-06-08 11:16:16 UTC
On Fri, Jun 08, 2001 at 01:23:58PM +0400, Vladimir B. Grebenschikov wrote:
> Ruslan Ermilov writes:
>  > Thanks for reminding!
>  > Fixed in route.c,v 1.46 and route.8,v 1.24.
>  
> May be allow similar semantic in ifconfig too ?
> 
> ifconfig if0 192.168.1.1/28 
> instead of
> ifconfig if0 192.168.1.1 netmask 255.255.255.240 
> ? 
> 
It's already available in 5.0-CURRENT and 4.3-STABLE.
With the exception that the syntax for ifconfig(8)
is host/mask.


Cheers,
-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age