Bug 84193 - no functional route add
no functional route add
Status: CLOSED RAWHIDE
Product: Red Hat Public Beta
Classification: Retired
Component: initscripts (Show other bugs)
phoebe
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-13 05:00 EST by Martin Sitar
Modified: 2014-03-16 22:34 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-20 12:32:11 EST
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-19 22:21 EST, Bill Nottingham
no flags Details | Diff

  None (edit)
Description Martin Sitar 2003-02-13 05:00:44 EST
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 06:31:05 EST
workx for me for non-dialup routes... maybe a bug in initscripts?
Comment 2 Bill Nottingham 2003-02-17 11:52:35 EST
What do your network config files look like?
Comment 3 Martin Sitar 2003-02-18 03:09:08 EST
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 11:50:59 EST
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 03:01:18 EST
[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 09:54:35 EST
Sorry, need /etc/sysconfig/network-scripts/*route* too.
Comment 7 Martin Sitar 2003-02-19 09:59:46 EST
[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 10:02:34 EST
Woops. Sorry, need the actual stuff written by redhat-config-network.
/etc/sysconfig/networking/devices/*.route.
Comment 9 Martin Sitar 2003-02-19 10:08:54 EST
[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 10:13:14 EST
What happens if you rename that to ppp0.route?
Comment 11 Martin Sitar 2003-02-19 10:24:50 EST
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-19 22:20:17 EST
Does the attached make it work for you?
Comment 13 Bill Nottingham 2003-02-19 22:21:03 EST
Created attachment 90203 [details]
patch for ifup-routes, ifup-post, ifup-aliases
Comment 14 Martin Sitar 2003-02-20 03:10:18 EST
[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 12:32:11 EST
Fixed in 7.09-1.

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