Bug 84193 - no functional route add
Summary: no functional route add
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: initscripts   
(Show other bugs)
Version: phoebe
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-13 10:00 UTC by Martin Sitar
Modified: 2014-03-17 02:34 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-20 17:32:11 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch for ifup-routes, ifup-post, ifup-aliases (2.09 KB, patch)
2003-02-20 03:21 UTC, Bill Nottingham
no flags Details | Diff

Description Martin Sitar 2003-02-13 10:00:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030120

Description of problem:
when you set 
$# route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.217.113.20 
$# route 
10.217.113.20   *               255.255.255.255 UH    0      0        0 ppp0
192.168.17.0    *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
10.0.0.0        10.217.113.20   255.0.0.0       UG    0      0        0 ppp0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         somehost.a      0.0.0.0         UG    0      0        0 eth0
manually everytning is OK but when tou use redhat-config-network 
with following values in Static network routes menu: 
Address: 10.0.0.0
Subnet Mask: 255.0.0.0
Gateway: 10.217.113.20
route tables look thus :
10.217.113.20   *               255.255.255.255 UH    0      0        0 ppp0
192.168.17.0    *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         somehost.a      0.0.0.0         UG    0      0        0 eth0
according to my mind it is bug. 


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.redhat-config-network
2.setup route configuration
3.dial account
    

Additional info:

Comment 1 Harald Hoyer 2003-02-17 11:31:05 UTC
workx for me for non-dialup routes... maybe a bug in initscripts?

Comment 2 Bill Nottingham 2003-02-17 16:52:35 UTC
What do your network config files look like?

Comment 3 Martin Sitar 2003-02-18 08:09:08 UTC
There is how my default network configuration looks like, sometimes I need to
set up dial-up with static route. 
$# route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.217.113.20 
witch would route all trafic from 10.0.0.0 network over gw 10.217.113.20
From command like it work pretty good, but with using redhat-config-network
dial-up values:
Address: 10.0.0.0
Subnet Mask: 255.0.0.0
Gateway: 10.217.113.20
It doesn`t change my routing table. I think it`s a bug !?

------------------------------------------------------------------------------

eth0      ZapouzdÅení:Ethernet  HWadr 00:C0:9F:1C:57:DE
          inet adr:192.168.17.51  VÅ¡esmÄr:192.168.17.255 Maska:255.255.255.0
          AKTIVOVÃNO VÅ ESMÄROVÃ_VYSÃLÃNà BÄŽà MULTICAST  MTU:1500  Metrika:1
          RX packets:1095 errors:0 dropped:0 overruns:0 frame:0
          TX packets:931 errors:0 dropped:0 overruns:0 carrier:0
          kolizí:0 délka odchozí fronty:100
          RX bytes:884387 (863.6 Kb)  TX bytes:135242 (132.0 Kb)
          PÅeruÅ¡ení:11 VstupnÄ/Výstupní port:0x3000
route
Adresát         Brána           Maska           PÅízn Metrik Odkaz  Užt Rozhraní
192.168.17.0    *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         somehost.a.cz   0.0.0.0         UG    0      0        0 eth0
-------------------------------------------------------------------------------


Comment 4 Bill Nottingham 2003-02-18 16:50:59 UTC
Again, what *exactly* do your config files (/etc/sysconfig/network,
/etc/sysconfig/network-scripts/ifcfg-*) look like? To debug the problem, I need
to know exactly how your system is set up?

Comment 5 Martin Sitar 2003-02-19 08:01:18 UTC
[citron@citron citron]$ cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=citron.i.cz
GATEWAY=192.168.17.1
[citron@citron citron]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
BROADCAST=192.168.17.255
IPADDR=192.168.17.51
NETMASK=255.255.255.0
NETWORK=192.168.17.0
ONBOOT=yes
USERCTL=no
PEERDNS=no
TYPE=Ethernet
[citron@citron citron]$ cat /etc/sysconfig/network-scripts/ifcfg-ppp0
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
USERCTL=yes
PEERDNS=yes
TYPE=Modem
DEVICE=ppp0
BOOTPROTO=dialup
ONBOOT=no
NAME=skoda-auto
CCP=off
PC=off
AC=off
BSDCOMP=off
VJ=off
VJCCOMP=off
LINESPEED=57600
MODEMPORT=/dev/modem
IDLETIMEOUT=600
DEMAND=no
PROVIDER=skoda-auto
DEFROUTE=no
PERSIST=no
PAPNAME=xxx
WVDIALSECT=skoda-auto
MODEMNAME=Modem0

Comment 6 Bill Nottingham 2003-02-19 14:54:35 UTC
Sorry, need /etc/sysconfig/network-scripts/*route* too.

Comment 7 Martin Sitar 2003-02-19 14:59:46 UTC
[citron@citron citron]$ ls  /etc/sysconfig/network-scripts/*route*
/etc/sysconfig/network-scripts/ifup-routes
[citron@citron citron]$ cat /etc/sysconfig/network-scripts/ifup-routes
#! /bin/bash
#
# adds static routes which go through device $1
if [ -z "$1" ]; then
    echo $"usage: ifup-routes <net-device>"
    exit 1
fi
                                                                               
                            
# Older format
if [ -f "/etc/sysconfig/network-scripts/route-$1" ]; then
 while read line; do
    /sbin/ip route add $line
 done < "/etc/sysconfig/network-scripts/route-$1"
fi
 
# Red Hat network configuration format
 
CONFIG="/etc/sysconfig/networking/devices/$1.route"
[ -f $CONFIG ] || exit 0
 
. $CONFIG
 
 
routenum=0
while [ "x$(eval echo '$'ADDRESS$routenum)x" != "xx" ]; do
    eval `ipcalc -p $(eval echo '$'ADDRESS$routenum) $(eval echo
'$'NETMASK$routenum)`
    line="$(eval echo '$'ADDRESS$routenum)/$PREFIX"
    if [ "x$(eval echo '$'GATEWAY$routenum)x" != "xx" ]; then
        line="$line via $(eval echo '$'GATEWAY$routenum)"
    fi
    line="$line dev $1"
    /sbin/ip route add $line
    routenum=$(($routenum+1))
done

Comment 8 Bill Nottingham 2003-02-19 15:02:34 UTC
Woops. Sorry, need the actual stuff written by redhat-config-network.
/etc/sysconfig/networking/devices/*.route.

Comment 9 Martin Sitar 2003-02-19 15:08:54 UTC
[root@citron root]# ls /etc/sysconfig/networking/devices/*.route
/etc/sysconfig/networking/devices/skoda-auto.route
[root@citron root]# cat /etc/sysconfig/networking/devices/skoda-auto.route
GATEWAY0=10.217.113.20
NETMASK0=255.0.0.0
ADDRESS0=10.0.0.0

Comment 10 Bill Nottingham 2003-02-19 15:13:14 UTC
What happens if you rename that to ppp0.route?

Comment 11 Martin Sitar 2003-02-19 15:24:50 UTC
Bingo - name of device sould be good and name of connection is wrong...
When I rename it from skoda-auto.route on ppp0.route it makes good route but it
is not visible in redhat-config-network configuration .. when I save it in 
redhat-config-network it`s saved by name of connection (skoda-auto.route) and it
doesn`t set a right route .. 

Martin

Comment 12 Bill Nottingham 2003-02-20 03:20:17 UTC
Does the attached make it work for you?

Comment 13 Bill Nottingham 2003-02-20 03:21:03 UTC
Created attachment 90203 [details]
patch for ifup-routes, ifup-post, ifup-aliases

Comment 14 Martin Sitar 2003-02-20 08:10:18 UTC
[root@citron network-scripts]# patch -p0 <initscripts.patch
patching file ifup-aliases
patching file ifup-post
patching file ifup-routes
Then dial-up and .. 
[root@citron network-scripts]# route
SmÄrovací tabulka v jádru pro IP
Adresát         Brána           Maska           PÅízn Metrik Odkaz  Užt Rozhraní
10.217.113.20   *               255.255.255.255 UH    0      0        0 ppp0
192.168.17.0    *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
10.0.0.0        10.217.113.20   255.0.0.0       UG    0      0        0 ppp0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         somehost.a.     0.0.0.0         UG    0      0        0 eth0

YES IT WORKS .. 
Thaks for solution ..
Regards Martin




Comment 15 Bill Nottingham 2003-02-20 17:32:11 UTC
Fixed in 7.09-1.


Note You need to log in before you can comment on or make changes to this bug.