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 have a VPS (CentOS 5.6). Here is my routing table.

Kernel IP routing table

Destination | Gateway | Genmask       | Flags | Metric | Ref | Use Iface
192.x.x.0   | 0.0.0.0 | 255.255.255.0 | U     | 0      | 0   | 0  venet0
169.x.0.0   | 0.0.0.0 | 255.255.0.0   | U     | 0      | 0   | 0  venet0
0.0.0.0     | 0.0.0.0 | 0.0.0.0       | U     | 0      | 0   | 0  venet0

It works fine but I can't understand where is my gateway. Can somebody tell me how it works?

Thanks.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

You have a device-based default route, rather than an address-based default route. That last line says to the kernel "if you want to get packets to anywhere else, just shove them out venet0. That's a virtual ethernet interface, so I assume you're on a VPS of some kind - and the hosting server's OS will know how to get traffic to and from other physical hosts.

share|improve this answer
add comment

Looks like you haven't got one or haven't restarted networking since setting one;

Just edit /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=whatever

GATEWAY=whatever

Then restart networking using /etc/init.d/network restart

share|improve this answer
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.