Статические маршруты и таблица маршрутизации

Ну, Ваш апач ест большую часть Вашей мадам. Я подозреваю, что Вы загружаете файлы, которые Вы хотите передать потоком полностью в RAM, и пуф там идет Ваша RAM. Посмотрите трудно на свое приложение, существует низко висящий плод для оптимизации (вероятно),

1
задан 1 September 2012 в 21:45
2 ответа

The routing entries direct traffic to various networks to the respective interfaces. Traffic to 127.0.0.0/8 (localhost) goes to the interface with the address 127.0.0.1. Traffic to 192.168.0.0/24 (the LAN) goes to the interface with the address 192.168.0.5. Multicast traffic (224.0.0.0/4) as well as broadcast traffic (255.255.255.255/32) first goes to the interface with the address 192.168.0.5, and if that interface should be unavailable it goes to the interface with the address 127.0.0.1 (this is controlled via the metric, smaller value means higher preference).

If the host is multi-homed (i.e. has more than one external interface), that interface has its own address and associated rules. If two interfaces have addresses from the same network range, they'll both have a network route, thus it's not too good an idea to do that (and for other reasons as well).

An additional network interface dedicated to VM traffic should not be shared with the host OS, and will thus have neither an IP address nor a route.

2
ответ дан 3 December 2019 в 19:06

the "Interface" column represents which networking (either physical network card or VPN) the route is for. But keep in mine that a network card can be tied to more then one IP (so just because you see multiple IP interfaces doesn't mean you have multiple cards)

in this case '127.0.0.1' is the Loopback interface and 192.168.0.5 is the LAN card

You can only have one default route, so any given IP will almost always have one possible routing solution (either Loopback or Ethernet in this case)

If you did have two networking interfaces tied to the same network (i.e. route), it would pick the route with the lower metric (which is a representation of the speed of the network - including how much data is currently being sent through it, latency, etc http://en.wikipedia.org/wiki/Metrics_(networking)) - which is why the very first route (to your local router @192.168.0.1) is the lowest number - that's the one it will always try last

You'll see a couple lines with the same route, but one is for interface 127.0.0.1 and the other is 192.168.0.5 - the 127 one is always higher because it has less traffic (because most traffic is going through the Ethernet) - It tries that first and then when it gets no response it tries the next lowest metric until it gets to the default gatway

That way it always picks the interface w/ the lowest utilization (and the most available bandwidth)

1
ответ дан 3 December 2019 в 19:06

Теги

Похожие вопросы