← Back to team overview

ubuntuforums-unanswered team mailing list archive

Re: [Question #78504]: Default gateway set for each eth device

 

Question #78504 on Ubuntu changed:
https://answers.launchpad.net/ubuntu/+question/78504

    Status: Answered => Open

framegrace is still having a problem:
Uhmm...
I don't understand your answers. 

I wan to remove the default gateway to 192.168.100.1. 
So I want:

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.100.0   0.0.0.0         255.255.255.0   U     1      0        0 eth1
192.168.10.0    0.0.0.0         255.255.255.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth1
0.0.0.0         192.168.10.1    0.0.0.0         UG    100    0        0 eth0

Instead of:

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.100.0   0.0.0.0         255.255.255.0   U     1      0        0 eth1
192.168.10.0    0.0.0.0         255.255.255.0   U     1      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth1
0.0.0.0         192.168.100.1   0.0.0.0         UG    0      0        0 eth1
0.0.0.0         192.168.10.1    0.0.0.0         UG    100    0        0 eth0

The default gateway of the office it's 192.168.10.1 not 192.168.100.1
(this is itself,is eth1 address).

BTW, I tried to use gateway 0.0.0.0 on eth1 interface and do not do
nothing. The default route still appears...

What I'm seeing is that looks like "ifup" and interfaces have nothing to do with this... I'm suspecting this route is setted up   after ifup has done its work...
There's some script that runs afterwards that assumes that all interfaces have a gateway, and it's allways the x.x.x.1 address of the network.

I tried this configuration:

auto lo eth1 eth0
iface lo inet loopback
iface eth0 inet dhcp
iface eth1 inet static
        address 192.168.100.1
        netmask 255.255.255.0
        broadcast 192.168.100.255
        network 192.168.100.0
        gateway 192.168.10.1

Which supossedly had to add another default gateway to 192.168.10.1,
which will be OK (Ugly, repeated gateways, but will work).  But nope,
the default route to 192.168.100.1 is still there...

So I think that ifup/interfaces is not the guilty here...

-- 
You received this question notification because you are a member of UF
Unanswered Posts Team, which is an answer contact for Ubuntu.