Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am having an issue with setting up a static route in Fedora.

I need to route some traffic to an external gateway(105.101.67.70 - public IP address of a VPN router). Any request sent to 125.106.67.70 needs to be routed to VPN router gateway 105.101.67.70 and the router will connect it to a VPN network. Fedore server, VPN router and the VPN network are located in different locations and all connected through internet.

Tried following steps in command line:

route add -net 125.106.0.0 netmask 255.255.0.0 gw 105.101.67.70 dev eth0

The result:

SIOCADDRT: No such process

Route info:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.250.0   *               255.255.255.0   U     0      0        0 eth0
link-local      *               255.255.0.0     U     0      0        0 eth0
default         192.168.250.241 0.0.0.0         UG    0      0        0 eth0
share|improve this question
    
YYY.YYY.YYY.YYY is public IP address of VPN router. –  taras Jul 24 '11 at 7:08
1  
There's a reason why obfuscating your IP addresses is a really bad idea. Real IPs please. –  womble Jul 24 '11 at 7:27
    
YYY.YYY.YYY.YYY meant to be a confidential. –  taras Jul 24 '11 at 7:41
add comment

1 Answer 1

up vote 2 down vote accepted

This almost certainly means that you don't have a route for YYY.YYY.YYY.YYY (i.e. 105.101.67.70).

Given lack of detail, I am going to assume you don't have anything unusual going on. Basically your route statement is never going to work given the addresses you have posted currently. To add a route the gateway must be on a network that is directly connected, and given your current route table, it means the gateway for that route must be an address on the network 192.168.250.0/24.

To use a gateway your box must be able to directly send the packets to the gateway, on Ethernet, that means your computer must be able to successfully receive an ARP response for YYY.YYY.YYY.YYY. That can only really happen if YYY.YYY.YYY.YYY is on a subnet that is locally connected. By locally connected I mean there is no layer 3 devices between your box and YYY.YYY.YYY.YYY. If YYY.YYY.YYY.YYY is not local, then you are almost certainly trying to add a route on the wrong device, and you should be adding it on the router that is directly connected to YYY.YYY.YYY.YYY.

share|improve this answer
    
yes, this is the issue i am trying to solve. –  taras Jul 24 '11 at 7:38
    
thanks for comments, added more info in the body. –  taras Jul 24 '11 at 7:55
    
Thou you added some detail you haven't really added the correct details. What we need to understand is where is YYY.YYY.YYY.YYY in relation to the external interface of your router? Is it directly connected? Is it inside, where is it? –  Zoredache Jul 24 '11 at 9:18
    
Thou you added some detail you haven't really added the correct details. What we need to understand is where is YYY.YYY.YYY.YYY in relation to the external interface of your router? Is it directly connected? Is it inside, where is it? A network diagram would probably be the most helpful here. –  Zoredache Jul 24 '11 at 9:29
    
thanks for comments. i think i understood the limitation. YYY.YYY.YYY.YYY is outside of the network, i will move put it in the same network and try. thanks. –  taras Jul 24 '11 at 10:20
add comment

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.