Hi all, I would like to set mpls via java api, but I have some problems with it. I want to do java calls equal to this
ip route add 10.10.2.3/32 table 1 via 10.10.1.2 host-veth out-label 1003 which creates this entry in show ip fib index 1 10.10.2.3/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:27 buckets:1 uRPF:19 to:[0:0]] [0] [@10]: mpls-label:[1]:[1003:255:0:eos] [@1]: arp-mpls: via 10.10.1.2 host-veth11 so I create DTO, which sets fields matching parameters in CLI command: IpAddDelRoute addRoute = new IpAddDelRoute(); addRoute.isAdd = 1; addRoute.tableId = 2; final Ipv4Prefix prefix = new Ipv4Prefix(("10.10.2.3/32"); addRoute.dstAddress = Ipv4Translator.INSTANCE.ipv4AddressPrefixToArray(prefix); addRoute.dstAddressLength = Ipv4Translator.INSTANCE.extractPrefix(prefix); addRoute.nextHopAddress = Ipv4Translator.INSTANCE.ipv4AddressNoZoneToArray("10.10.1.2"); addRoute.nextHopSwIfIndex = 1; int[] labels = new int[1]; labels[0] = 1003; addRoute.nextHopNOutLabels = (byte) labels.length; addRoute.nextHopOutLabelStack = labels; api.ipAddDelRoute(addRoute).toCompletableFuture().get() but show ip fib index 2 shows different result 10.10.2.3/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:44 buckets:1 uRPF:44 to:[0:0]] [0] [@3]: arp-ipv4: via 10.10.1.2 host-veth11 Is it a bug, or am I doing something wrong? Another question I'd like to ask is whether is it possible to create MPLS local-label via jvpp. I could't find local label API in mpls.api file. Thanks Andrej Andrej Mak Software Developer PANTHEON technologies s.r.o. Janka Kr??a 9, 974 01 Bansk? Bystrica Slovakia Tel / +421 220 665 111 MAIL / andrej....@pantheon.tech WEB / https://pantheon.tech
_______________________________________________ vpp-dev mailing list vpp-dev@lists.fd.io https://lists.fd.io/mailman/listinfo/vpp-dev