Linux automatic route after bringing up interface
From: Peteris Krumins (pkruminsREMOVETHIS_at_inbox.lv)
Date: 07/31/03
- Next message: Ian Northeast: "Re: RH 9.0 refuses to install a STATIC network config"
- Previous message: Kevin D. Quitt: "Re: how to distinguish switch or hub per software?"
- Next in thread: Job Eisses: "Re: Linux automatic route after bringing up interface"
- Reply: Job Eisses: "Re: Linux automatic route after bringing up interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jul 2003 22:08:59 GMT
Hello,
I have forgotten how to avoid linux (>2.4.x) setting up a route as soon
as
i configure an interface.
If i use netmask 255.255.255.255 no route is added but i am unable to
add
a default gw (since it is not on the same subnet as the interface?).
for example:
`ifconfig eth0 10.0.0.55 netmask 255.255.255.0 broadcast 10.0.0.255 up`
would add me a route for 10.0.0.0/24 on eth0, but this is no good if i
have to route it out via 10.0.0.1 (for example if there is some machine
inbetween).
The only workaround i have found is:
ifconfig eth0 ...
route del -net 10.0.0.0 netmask 255.255.255.0 dev eth0
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.1 dev eth0
if i try `ifconfig eth0 ... netmask 255.255.255.255 ... up` and then
no route is added (since it is a single host?) but if as soon as i try
`route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.1 dev eth0`
i get an error that the network is unreachable.
-- Eue
- Next message: Ian Northeast: "Re: RH 9.0 refuses to install a STATIC network config"
- Previous message: Kevin D. Quitt: "Re: how to distinguish switch or hub per software?"
- Next in thread: Job Eisses: "Re: Linux automatic route after bringing up interface"
- Reply: Job Eisses: "Re: Linux automatic route after bringing up interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|