Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a linux server that needs to get some routing. I'm fairly new at this and i don't find any clear source on google.

The setup should be simple:
All traffic to a server on ip 192.168.72.20 should be sent over interface 3. All other interfaces don't matter at the moment.

Here you have the output for route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.72.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.72.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.72.0    0.0.0.0         255.255.255.0   U     0      0        0 eth2
192.168.72.0    0.0.0.0         255.255.255.0   U     0      0        0 eth3
192.168.72.0    0.0.0.0         255.255.255.0   U     0      0        0 eth4
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
0.0.0.0         192.168.72.12   0.0.0.0         UG    0      0        0 eth0
share|improve this question
    
Are you using the old fashioned ifconfig and route command or the modern ip commands? (old ones would be something like route add -host 192.168.72.20 GW eth3_ip) –  Hennes Mar 29 '13 at 13:48
    
i don't know, i guess the old ones, how can i check that? –  Frederiek Mar 29 '13 at 13:58
add comment

1 Answer

up vote 0 down vote accepted

Try:

ip route add 192.168.72.20/32 dev eth3

share|improve this answer
    
Just a note: to permanently keep this configuration make sure you add it to /etc/rc.local or your distro's equivalent. It won't persist between reboots. –  ultrasawblade Mar 29 '13 at 16:32
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.