Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Im having troubles with my routing table, im getting RTNETLINK answers: file exist

How do i set my default gateway (internet) to 192.168.100.1? and a static route going to 10.169.5.0 /26?

i have 2 GW as shown in flags, how do i remove the G on my route line # 2?

Destination    Gateway          Genmask         Flags    Metric    Ref   Use    Iface
0.0.0.0        192.168.100.1     0.0.0.0         UG       100      0      0      eth0
10.169.5.0     10.169.5.1     255.255.255.192    UG        0       0      0      eth1
192.168.5.0     0.0.0.0       255.255.255.0      U         0       0      0      eth2
share|improve this question
    
Why do you need to remove the G? The G means gateway, it doesn't mean that it's a default route. The G has to be there if you are adding a route for the network 10.169.5.0/26, because the packets will go through a "gateway". The Destination 0.0.0.0 is what denotes that it's a default route, which is your first line. So your routing table is currently configured correctly according to your question: How do I set my default gateway (internet) to 192.168.100.1? and a static route going to 10.169.5.0 /26? When and where do you get the error RTNETLINK answers: file exist? –  Alaa Ali Jun 3 '13 at 13:56
    
10.169.5.1 is a gateway to other network as well, it conflicts with my 192.168.100.1 how can i tell the system to route everything to 192.169.5.1 when dealing with 10.169.5.0 destinations? –  user1645034 Jun 3 '13 at 14:08
    
i managed to answer my question by issuing this command: route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.169.5.1 –  user1645034 Jun 3 '13 at 14:12
1  
Hmm, that's strange, because the settings in your question should achieve what you wanted in your first comment. The command you issued is now routing all the 10.0.0.0/8 network to 10.169.5.1, not just 10.169.5.0/26. Anyways, you got it fixed! You should answer your own question and accept the answer. –  Alaa Ali Jun 3 '13 at 15:01

1 Answer 1

up vote 0 down vote accepted

for some strange reasons, playing with my routing table, i managed to make it work by issuing this route

route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.169.5.1

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.