KonstantinC Posted November 19, 2014 На ASR1k доступны четыре алгоритма ecmp, из них дефолтный "universal" учитывает src и dst ip ASR#ip cef load-sharing algorithm ? include-ports Algorithm that includes layer 4 ports original Original algorithm tunnel Algorithm for use in tunnel only environments universal Algorithm for use in most environments Кто-нибудь знает точное описание этого алгоритма? Есть необходимость повторить его на linux И ещё... тут сказано http://www.cisco.com/c/en/us/support/docs/ip/express-forwarding-cef/116376-technote-cef-00.html что Alternate between an even and odd number of ECMP links at each layer of the network.The CEF load-balancing does not depend on how the protocol routes are inserted in the routing table. Therefore, the OSPF routes exhibit the same behavior as EIGRP. In a hierarchical network where there are several routers that perform load-sharing in a row, they all use same algorithm to load-share. The hash algorithm load-balances this way by default: 1: 1 2: 7-8 3: 1-1-1 4: 1-1-1-2 Проверил, по крайней мере на CSR это не соответствует действительности, там при четырех ecmp трафик раскидывает строго в равных пропорциях.. странно Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
KonstantinC Posted November 21, 2014 Нет мыслей куда копать? Очень нужно знать алгоритм, есть спец который сдублирует этот алгоритм в ядре линуска.. В идеале бы заставить ASR раскидывать пакеты ориентируясь только на src-ip... но железяка этого не умеет Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
nnm Posted November 21, 2014 Обычно производители не раскрывают деталей реализации алгоритмов балансировки. А зачем Вам точно такой-же алгоритм, как на ASR-е? Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
KonstantinC Posted November 21, 2014 Есть "n" ASR-к и "m" линуксовых nat серверов Нужно, чтобы сервера слали ответные пакеты обратно на тот же ASR откуда прилетел пакет Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
rus-p Posted November 25, 2014 На ASR1k доступны четыре алгоритма ecmp, из них дефолтный "universal" учитывает src и dst ip ASR#ip cef load-sharing algorithm ? include-ports Algorithm that includes layer 4 ports original Original algorithm tunnel Algorithm for use in tunnel only environments universal Algorithm for use in most environments Кто-нибудь знает точное описание этого алгоритма? Есть необходимость повторить его на linux И ещё... тут сказано http://www.cisco.com/c/en/us/support/docs/ip/express-forwarding-cef/116376-technote-cef-00.html что Alternate between an even and odd number of ECMP links at each layer of the network.The CEF load-balancing does not depend on how the protocol routes are inserted in the routing table. Therefore, the OSPF routes exhibit the same behavior as EIGRP. In a hierarchical network where there are several routers that perform load-sharing in a row, they all use same algorithm to load-share. The hash algorithm load-balances this way by default: 1: 1 2: 7-8 3: 1-1-1 4: 1-1-1-2 Проверил, по крайней мере на CSR это не соответствует действительности, там при четырех ecmp трафик раскидывает строго в равных пропорциях.. странно Из интернета: "The 'Original' algorithm is the simplest form of per source-destiation alogorith. It is susceptible to polarization. To illustrae this effect consider scenario below - Assume two host behind R1 - H1, H2, sending traffic to R6. Assume all paths are of equal cost. Now, lets say 'unluckily' , the cef hashing on R1 chooses R1-R2 for both H1-R6,H2-R6 traffic. Traffic arrives at R2; R2 runs the same algorith again; and again chooses one of the links, R2-R3 for both H1,H2 traffic. Hence all H1,H2 to R6 traffic gets polarized to R1-R2-R3-R6 path. The 'Universal' algorithm adds a router-specific seed value to the hash, to introduce another degree of variability in hashing. This helps in solving the polarization issue. Now, at R2, there is a possibilty that (seed+H1+R6) , (seed+H2+R6) provides different hash outputs." т.е. сделать как вы хотите не получиться. Этим способом раскидывания через хеш по src-ip баловались в давние времена на 7600 платформе, как раз для похожих задач. На ASR1k нужно идти другим стандартным путем - pbr. Вот тут даже говорят оно недавно из процесс свитчинга ушло - http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_pi/configuration/xe-3s/asr1000/iri-xe-3s-asr1000-book/iri-pbr-default-nexthop-route.html По поводу неровной раскладки не переживайте, это не ваш случай, а 6500 каталиста с определенной опцией cef. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
Tosha Posted November 25, 2014 Есть "n" ASR-к и "m" линуксовых nat серверов Нужно, чтобы сервера слали ответные пакеты обратно на тот же ASR откуда прилетел пакет Зачем туда же? Главное чтобы ASR пакеты одного соединения слала на один и тот же NAT сервер. Ответный пакет отсылается в соответствии с пулами адресов серверов на нужный NAT сервер автоматом. А когда NAT сервер преобразовал его в локальный адрес абонента - то абсалютно все равно через какой ASR он полетит к абоненту. Если роутинг полный - долетит. Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
KonstantinC Posted December 2, 2014 А когда NAT сервер преобразовал его в локальный адрес абонента - то абсалютно все равно через какой ASR он полетит к абоненту. Если роутинг полный - долетит. Нет, крайне важно Ибо на ASR'ах работает isg и пакет должен вернуться строго на тот ASR где уже есть ipoe сессия для данного src ip Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...
KonstantinC Posted December 3, 2014 На ASR1k нужно идти другим стандартным путем - pbr. Тоже не выйдет количество nat серверов периодически меняется, каждый раз редактировать route map не вариант да и с отказоустойчивостью будут проблемы Вставить ник Quote Ответить с цитированием Share this post Link to post Share on other sites More sharing options...