[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: strange ifconfig output..



Paul van Berlo wrote:
> 
> Heya..
> 
> I finally got my ISDN running.. but now I'm experiencing some strange
> ifconfig output, something like this:
> 
> ippp0     Link encap:Point-Point Protocol
>           inet addr:194.109.15.56  P-t-P:194.109.31.5
> Mask:255.255.255.255
>           UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
>           RX packets:0 errors:74 dropped:0 overruns:0
>           TX packets:0 errors:0 dropped:83 overruns:0
> 
> RX shows 74 errors and TX shows 83 dropped packets.. This can't be right,
> since I succesfully logged on a telnet account during that session.. I'm
> using kernel release 2.1.29.. I'm also experiencing another problem.. I
> rewrote the isdn script and added a line that reads:
>   route add default netmask 255.255.255.0 dev ippp0
> Since 2.1.29 needs a netmask with the route command.. After doing this I'm
> getting name lookup errors when trying to telnet or ftp or whatever. I
> cant connect to anything. When I remove the 'netmask 255.255.255.0 dev
> ippp0' and change it to 'route add default ippp0' it works fine.. Maybe my
> netmask is wrong but I doubt it..
> 
> Any help on solving these 2 'problems' is welcomed (and I doubt its a big
> problem.. maybe I just overlooked something...)
> 
> -Paul van Berlo
> 

Yes, your netmask is wrong. For a default route it should be 0.0.0.0
since a default route is supposed to match *any* IP address. That is,
the routing algorithm compares the destination IP address of an IP  
packet with each route, testing for a match by checking if:

  (dest-IP & netmask) == (route & netmask)

More than one route may match in which case the route with the most
netmask bits wins. Note that if netmask is 0.0.0.0 each side of the
above equation will be zero no matter what the dest-IP and route
are. This is why they call it a "default" route.

-- 
Jens B. Jorgensen
jjorgens@bdsinc.com


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: