# baselayout-1.12_pre17 net scripts add default route (SOLVED)

## b-s-a

I have router with 3 ethernet interfaces:

eth0 (192.168.0.1/24) - my LAN

eth1 (192.168.253.1/26) - ISP #1 LAN

eth2 (10.67.4.144/24) ISP #2 LAN

all interfaces are in runlevel default.

/etc/conf.d/net:

```
modules=(   "iproute2"

            "dhcp" )

config_eth0=( "192.168.0.1/24 brd 192.168.0.255" )

config_eth1=( "dhcp" )

dhcpcd_eth1=( "-t 20" )

fallback_eth1=( "192.168.253.19/26 brd 192.168.253.63" )

dhcp_eth1="nodns nogateway nontp"

routes_eth1=(

    "192.168.19.230 via 192.168.253.1"

    "192.168.30.25 via 192.168.253.1"

    "192.168.253.1"

)

config_eth2=( "10.67.4.114/24 brd 10.67.4.255" )

routes_eth2=(

    "10.0.0.0/8 via 10.67.4.1"

    "192.168.0.0/16 via 10.67.4.1"

    "172.16.0.0/12 via 10.67.4.1"

    "213.33.170.0/24 via 10.67.4.1"

    "81.211.62.0/24 via 10.67.4.1"

)
```

as you see no default routes defined.

But when I boot up server my route output is:

```

192.168.253.0   0.0.0.0         255.255.255.192 U     0      0        0 eth1

81.211.62.0     10.67.4.1       255.255.255.0   UG    0      0        0 eth2

192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

213.33.170.0    10.67.4.1       255.255.255.0   UG    0      0        0 eth2

10.67.4.0       0.0.0.0         255.255.255.0   U     0      0        0 eth2

192.168.0.0     10.67.4.1       255.255.0.0     UG    0      0        0 eth2

172.16.0.0      10.67.4.1       255.240.0.0     UG    0      0        0 eth2

239.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 eth0

10.0.0.0        10.67.4.1       255.0.0.0       UG    0      0        0 eth2

127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

0.0.0.0         a.b.c.d         0.0.0.0         UG    0      0        0 eth1

0.0.0.0         x.y.w.z         0.0.0.0         UG    0      0        0 eth2

```

gateways (a.b.c.d and x.y.w.z) I can not remember because quickly downgrade baselayout.

Is this a bug or feature?

Note: baselayout-1.11.14-r7 works properly.Last edited by b-s-a on Mon Apr 17, 2006 6:46 am; edited 1 time in total

----------

## UberLord

Does pre16 work properly?

----------

## b-s-a

I do not try it.  :Sad: 

Server must be on-line... And I cannot try update baselayout at near time.

----------

## UberLord

Well, can't you test in a sandbox environment?

----------

## b-s-a

How can I do it?

I try to do it tomorrow...

----------

## b-s-a

Can you explain me (or give me a link to doc) how to use sandbox for this purpose? Because I cannot find any useful information about it (I search in man, info, and google).

----------

## UberLord

Well, in this instance the sandbox would be a seperate machine with three interfaces and the same config, but is non essential to work so it can have plently of downtime.

BTW, I've not heard of this issue before and I cannot think of any baselayout changes that could possibly cause this. This only thing slighty wrong with your config is that you have specified dhcp as a module - there is no dhcp module as such and it's safe to remove.

----------

## b-s-a

This config work properly with baselayout-1.12_pre16-r3:

```
modules=(   "iproute2"

            "dhcpcd" )

config_eth0=( "192.168.0.1/24 brd 192.168.0.255" )

config_eth1=( "dhcp" )

dhcpcd_eth1=( "-t 20" )

fallback_eth1=( "192.168.253.19/26 brd 192.168.253.63" )

dhcp_eth1="nodns nogateway nontp"

routes_eth1=(

    "192.168.19.230 via 192.168.253.1"

    "192.168.30.25 via 192.168.253.1"

    "192.168.253.1"

)

config_eth2=( "10.67.4.114/24 brd 10.67.4.255" )

routes_eth2=(

    "10.0.0.0/8 via 10.67.4.1"

    "192.168.0.0/16 via 10.67.4.1"

    "172.16.0.0/12 via 10.67.4.1"

    "213.33.170.0/24 via 10.67.4.1"

    "81.211.62.0/24 via 10.67.4.1"

)
```

----------

## UberLord

OK, so what is adding the default routes? You'll have to provide that answer. I've replicated your config on a box with 3 interfaces and no default routes are applied to the interfaces.

I'll you to work out what is adding the default routes. Let's start with hopefully an easy one. Set RC_VERBOSE="yes" in /etc/conf.d/rc and post the full output of all the interfaces starting please.

----------

## b-s-a

I try to do it later (at evening or tomorrow).

I do not need default routes. They are added when I start ppp0 and ppp1 interfaces and hands-written script, which check interfaces to operate and set route throw operating interface.

But with new ppp and baselayout packages I cannot properly run one of ppps (it starts, I correct routes, but ping not work). I had much problems with it on stable baselayout and ppp (it adds some route which block itself, to fix it I add "ip route del ..." to ip-up.local, but with new baselayout+ppp this trick [I try to do it manually] isn't work).

P.S.: with baselayout-1.12_pre17 were problem: 2(!!!) default routes, but I need 0; and eth0 time to time lose IP. baselayout-1.12_pre16 havn't this problem.

----------

## UberLord

So it maybe ppp that is adding these routes? I'm sure it's something external to baselayout .....

----------

## b-s-a

no, problem with ppp is other theme.  :Wink: 

default routes were added before any ppp start!!! But, only with baselayout-1.12_pre17 (I try this only one time)!!! with baselayout-1.12_pre16-r3 no such problem.

----------

## b-s-a

With baselayout-1.12_pre17-r2 no this problem.

----------

