summaryrefslogtreecommitdiffstats
path: root/docs/usecases
AgeCommit message (Expand)AuthorFilesLines
2021-10-13docs: better docs, mv doxygen to sphinxNathan Skrzypczak71-5230/+5788
2021-04-21docs: document "make test-help"Dave Barach1-66/+66
2021-03-16docs: ikev2 usecasesFilip Tehlar5-0/+535
2021-01-22docs: vpp stateless traffic generatorDave Barach2-0/+106
2020-12-16docs: revise home gateway use-case documentationDave Barach3-286/+498
2020-04-09docs: Fix the Use Cases IndexJohn DeNisco1-15/+15
2020-03-27docs: document lxd container bootstrap procedureDave Barach1-0/+130
2020-03-23docs: add container functional test writeupDave Barach2-0/+511
2020-02-11http_static: VPP web application HowToDave Barach2-1/+275
2019-12-11docs: Rework the startup configuration sectionJohn DeNisco1-4/+1
2019-11-06docs: add spellcheck to 'make docs' sphinx docsPaul Vinciguerra3-3/+3
2019-10-28docs: cleanup typos on readthroughPaul Vinciguerra13-19/+19
2019-08-08docs: Add Ray's ACL use casejdenisco2-0/+489
2019-07-22docs: improve home gateway use-case documentationDave Barach1-18/+131
2019-06-27docs: Update the vhost sectionjdenisco3-6/+9
2019-05-16docs: Update sphinx, requirements, support markdown tablesjdenisco5-10/+10
2019-04-25docs: Add VPP inside the CloudFrancesco Spinelli6-2/+445
2019-04-08fixing typosJim Thompson1-1/+1
2019-03-21docs: break up long lines in vmxnet3.rst to avoid line wrapSteven Luong1-21/+34
2019-03-19docs: Update vmxnet3 usecaseSteven Luong1-12/+36
2019-01-31docs: Instructions for using vmxnet3 on macjdenisco1-0/+22
2018-12-17docs: Add vmxmet3 driverjdenisco2-0/+129
2018-12-06nsim: add packet loss simulation, docsDave Barach2-1/+91
2018-11-27docs: Add more on trexjdenisco6-20/+223
2018-10-30DOC-ONLY: document packet intialization from scratchDave Barach1-40/+5
2018-10-30docs: Add VPP with iperf and trexjdenisco7-3/+554
2018-10-22add Contiv-VPP installation guidance on Aarch64Lijian Zhang1-0/+10
2018-10-05docs: add contiv vppScott Keeler17-0/+2632
2018-08-17docs: Moved installing up a level, removed guides.John DeNisco2-48/+0
2018-08-09DOCS: General cleanup (did not move any sections)andrew3-37/+39
2018-08-01docs: change code blocks from "shell" to "console"John DeNisco3-33/+33
2018-07-26Initial commit of Sphinx docsJohn DeNisco15-0/+1234
an class="n">ip_add_del_route(dst4, 24, cls.pg1.remote_ip4n) cls.vapi.ip_add_del_route(dst6, 16, cls.pg1.remote_ip6n, is_ipv6=1) except Exception: super(TestKP, cls).tearDownClass() raise def tearDown(self): super(TestKP, self).tearDown() if not self.vpp_dead: self.logger.info(self.vapi.cli("show ku vip verbose")) def getIPv4Flow(self, id): return (IP(dst="90.0.%u.%u" % (id / 255, id % 255), src="40.0.%u.%u" % (id / 255, id % 255)) / UDP(sport=10000 + id, dport=3306)) def getIPv6Flow(self, id): return (IPv6(dst="2001::%u" % (id), src="fd00:f00d:ffff::%u" % (id)) / UDP(sport=10000 + id, dport=3306)) def generatePackets(self, src_if, isv4): self.reset_packet_infos() pkts = [] for pktid in self.packets: info = self.create_packet_info(src_if, self.pg1) payload = self.info_to_payload(info) ip = self.getIPv4Flow(pktid) if isv4 else self.getIPv6Flow(pktid) packet = (Ether(dst=src_if.local_mac, src=src_if.remote_mac) / ip / Raw(payload)) self.extend_packet(packet, 128) info.data = packet.copy() pkts.append(packet) return pkts def checkInner(self, udp): self.assertEqual(udp.dport, 3307) def checkCapture(self, nat4, isv4): self.pg0.assert_nothing_captured() out = self.pg1.get_capture(len(self.packets)) load = [0] * len(self.pods) self.info = None for p in out: try: podid = 0 udp = None if nat4: ip = p[IP] podid = int(ip.dst.split(".")[3]) self.assertEqual(ip.version, 4) self.assertEqual(ip.flags, 0) self.assertEqual(ip.dst, "10.0.0.%u" % podid) self.assertEqual(ip.proto, 17) self.assertEqual(len(ip.options), 0) self.assertGreaterEqual(ip.ttl, 63) udp = p[UDP] else: ip = p[IPv6] podid = ip.dst.split(":") podid = podid[len(podid) - 1] podid = 0 if podid == "" else int(podid) self.assertEqual(ip.version, 6) self.assertEqual(ip.tc, 0) self.assertEqual(ip.fl, 0) self.assertEqual( socket.inet_pton(socket.AF_INET6, ip.dst), socket.inet_pton(socket.AF_INET6, "2002::%u" % podid) ) self.assertEqual(ip.nh, 17) self.assertGreaterEqual(ip.hlim, 63) udp = UDP(str(p[IPv6].payload)) # self.assertEqual(len(ip.options), 0) self.checkInner(udp) load[podid] += 1 except: self.logger.error(ppp("Unexpected or invalid packet:", p)) raise # This is just to roughly check that the balancing algorithm # is not completly biased. for podid in self.pods: if load[podid] < len(self.packets) / (len(self.pods) * 2): self.log( "Pod isn't balanced: load[%d] = %d" % (podid, load[podid])) raise Exception("Kube-proxy algorithm is biased") def test_kp_ip4_nat4(self): """ Kube-proxy NAT44 """ try: self.vapi.cli("ku vip 90.0.0.0/8 port 3306 target_port 3307 nat4") for podid in self.pods: self.vapi.cli("ku pod 90.0.0.0/8 10.0.0.%u" % (podid)) self.pg0.add_stream(self.generatePackets(self.pg0, isv4=True)) self.pg_enable_capture(self.pg_interfaces) self.pg_start() self.checkCapture(nat4=True, isv4=True) finally: for podid in self.pods: self.vapi.cli("ku pod 90.0.0.0/8 10.0.0.%u del" % (podid)) self.vapi.cli("ku vip 90.0.0.0/8 nat4 del") self.vapi.cli("test kube-proxy flowtable flush") @unittest.skipUnless(running_extended_tests(), "part of extended tests") def test_kp_ip6_nat4(self): """ Kube-proxy NAT64 """ try: self.vapi.cli("ku vip 90.0.0.0/8 port 3306 target_port 3307 nat4") for podid in self.pods: self.vapi.cli("ku pod 2001::/16 10.0.0.%u" % (podid)) self.pg0.add_stream(self.generatePackets(self.pg0, isv4=False)) self.pg_enable_capture(self.pg_interfaces) self.pg_start() self.checkCapture(nat4=True, isv4=False) finally: for podid in self.pods: self.vapi.cli("ku pod 2001::/16 10.0.0.%u del" % (podid)) self.vapi.cli("ku vip 2001::/16 nat4 del") self.vapi.cli("test kube-proxy flowtable flush") @unittest.skipUnless(running_extended_tests(), "part of extended tests") def test_kp_ip4_nat6(self): """ Kube-proxy NAT46 """ try: self.vapi.cli("ku vip 90.0.0.0/8 port 3306 target_port 3307 nat6") for podid in self.pods: self.vapi.cli("ku pod 90.0.0.0/8 2002::%u" % (podid)) self.pg0.add_stream(self.generatePackets(self.pg0, isv4=True)) self.pg_enable_capture(self.pg_interfaces) self.pg_start() self.checkCapture(nat4=False, isv4=True) finally: for podid in self.pods: self.vapi.cli("ku pod 90.0.0.0/8 2002::%u del" % (podid)) self.vapi.cli("ku vip 90.0.0.0/8 nat6 del") self.vapi.cli("test kube-proxy flowtable flush") @unittest.skipUnless(running_extended_tests(), "part of extended tests") def test_kp_ip6_nat6(self): """ Kube-proxy NAT66 """ try: self.vapi.cli("ku vip 2001::/16 port 3306 target_port 3307 nat6") for podid in self.pods: self.vapi.cli("ku pod 2001::/16 2002::%u" % (podid)) self.pg0.add_stream(self.generatePackets(self.pg0, isv4=False)) self.pg_enable_capture(self.pg_interfaces) self.pg_start() self.checkCapture(nat4=False, isv4=False) finally: for podid in self.pods: self.vapi.cli("ku pod 2001::/16 2002::%u del" % (podid)) self.vapi.cli("ku vip 2001::/16 nat6 del") self.vapi.cli("test kube-proxy flowtable flush")