Anda, As Vedu explained earlier, the IP address of the logical router interface is completely inconsequential and is not used in any forwarding at all. You can rest assured that with .100 addresses, the connectivity is expected to work. Also, gateway of a network cannot be changed.
The way it works is, we allocate a route target for the logical router and attach it to each of the VNs so that the VRFs for each of those VNs can import each other’s routes. Now From the output you sent, it seems the route target is only connected to the logical router, not the two virtual networks. Could you please make sure contrail-schema is running and active? If it is, please check its logs for any errors. Sachin On Jul 12, 2017, at 2:51 AM, Anda Nicolae <anico...@lenovo.com<mailto:anico...@lenovo.com>> wrote: I have errors in contrail-api.log such as: Error while accessing route_target uuid 408155ef-22d0-46e8-b0c2-07f3fec44dae The above uuid does not correspond neither to subnet, net, net or logical router assigned to my networks. I don't think that the RT is exported. I have followed the links and I arrived at https://<controller<https://%3ccontroller/> IP>:8143/proxy?proxyURL=http://<controller management IP>:8082/route-target/5654b306-a359-4ccb-93d8-dfa8dbf7afea. I don't see any route here. (below is the output) {"route-target": {"fq_name": ["target:64512:8000014"], "uuid": "5654b306-a359-4ccb-93d8-dfa8dbf7afea", "href":"https:// <controller IP>:8143/proxy?proxyURL=http:// <controller management IP>:8082/route-target/5654b306-a359-4ccb-93d8-dfa8dbf7afea", "perms2": {"owner": "cloud-admin", "owner_access": 7, "global_access": 0, "share": []}, "id_perms": {"enable": true, "uuid": {"uuid_mslong": 6220793826397211851, "uuid_lslong": 10653510834882850794}, "created": "2017-07-12T07:32:05.894686", "description": null, "creator": null, "user_visible": true, "last_modified": "2017-07-12T07:32:05.894686", "permissions": {"owner": "cloud-admin", "owner_access": 7, "other_access": 7, "group": "cloud-admin-group", "group_access": 7}}, "logical_router_back_refs": [{"to": ["default-domain", "anda", "lrouter"], "href":"https://<controller IP>:8143/proxy?proxyURL=http:// <controller management IP>:8082/logical-router/48b2f8f1-d16f-4e6d-8ab4-5caec740eaf8", "attr": null, "uuid": "48b2f8f1-d16f-4e6d-8ab4-5caec740eaf8"}], "display_name": "target:64512:8000014", "name": "target:64512:8000014"}} The problem that I think it is is that both subnets have a gateway that is already set (1.1.1.1 and 2.2.2.1, respectively). Contrail GUI assigns gateway IP address as <network IP address>.1. So, the logical router that I create connects these 2 subnets. Therefore, logical router interfaces should have the same IP addresses as the gateway of each subnet (1.1.1.1 instead of 1.1.1.100 and 2.2.2.1 instead of 2.2.2.100). If I use neutron commands to create the logical router, the interfaces of the logical router created from neutron commands have the IP addresses of the gateway of each subnet. As workaround, if I try to change the gateway IP address of a subnet (from 1.1.1.1 to 1.1.1.100, in order to match the IP address of the virtual router), I receive the following error: Error: Virtual-Network(default-domain:anda:aaa) has invalid subnet(1.1.1.0/24) Thanks, Anda From: Vedamurthy Ananth Joshi [mailto:vjo...@juniper.net] Sent: Wednesday, July 12, 2017 10:00 AM To: Anda Nicolae; dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org> Subject: Re: [opencontrail-dev] Contrail GUI Virtual Router IP address So 1.1.1.102/32 and 2.2.2.102/32 are not seen in each other’s tables. Are there any errors in contrail-schema logs? Can you check if the RT of the logical-router object is both imported and exported in both routing-instances? RT of the router can be got from UI Monitor>Infrastructure> Config Nodes> <node-name>, Click on ‘Config’ link at the bottom. Then follow logical-routers link Routing instance details can be got from http://<control-node<http://%3ccontrol-node/> ip>:8083/Snh_ShowRoutingInstanceSummaryReq?search_string= Vedu From: Anda Nicolae <anico...@lenovo.com<mailto:anico...@lenovo.com>> Date: Tuesday, July 11, 2017 at 5:49 PM To: Vedamurthy Ananth Joshi <vjo...@juniper.net<mailto:vjo...@juniper.net>>, "dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>" <dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>> Subject: RE: [opencontrail-dev] Contrail GUI Virtual Router IP address Thank you, Vedu. I have created 2 VMs, first VM having an IP address from VN1 subnet and the 2nd VM having an IP address from VN2 subnet. route -n command on the 1st VM shows that default gateway is 1.1.1.1 route -n command on the 2nd VM shows that default gateway is 2.2.2.1. As I have written in the above e-mail, virtual router IP address is 1.1.1.100. I have retrieved the vrf associated to each VN and below it is the routing table associated to each vrf. [root@Hercules ~]$rt --dump 4 Flags: L=Label Valid, P=Proxy ARP, T=Trap ARP, F=Flood ARP vRouter inet4 routing table 0/4/unicast Destination PPL Flags Label Nexthop Stitched MAC(Index) 0.0.0.0/8 0 - 0 - 1.0.0.0/16 0 - 0 - 1.1.0.0/24 0 - 0 - 1.1.1.0/32 24 TF - 1 - 1.1.1.1/32 32 PT - 8 - 1.1.1.2/32 24 TF - 1 - 1.1.1.3/32 24 TF - 1 - 1.1.1.4/32 24 TF - 1 - 1.1.1.5/32 24 TF - 1 - 1.1.1.6/32 24 TF - 1 - 1.1.1.7/32 24 TF - 1 - 1.1.1.8/32 24 TF - 1 - [truncated output] 1.1.1.100/32 24 TF - 1 - 1.1.1.101/32 32 P - 69 2:ae:a9:f1:8e:71(218780) 1.1.1.102/32 24 TF - 1 - [truncated output] [root@Hercules ~]$rt --dump 7 Flags: L=Label Valid, P=Proxy ARP, T=Trap ARP, F=Flood ARP vRouter inet4 routing table 0/7/unicast Destination PPL Flags Label Nexthop Stitched MAC(Index) 0.0.0.0/8 0 - 0 - 1.0.0.0/8 0 - 0 - 2.0.0.0/16 0 - 0 - 2.1.0.0/16 0 - 0 - 2.2.0.0/24 0 - 0 - 2.2.1.0/24 0 - 0 - 2.2.2.0/32 24 TF - 1 - 2.2.2.1/32 32 PT - 8 - 2.2.2.2/32 32 PT - 8 - 2.2.2.3/32 24 TF - 1 - 2.2.2.4/32 24 TF - 1 - 2.2.2.5/32 24 TF - 1 - 2.2.2.6/32 24 TF - 1 - 2.2.2.7/32 24 TF - 1 - 2.2.2.8/32 24 TF - 1 - [truncated output] 2.2.2.100/32 24 TF - 1 - 2.2.2.101/32 24 TF - 1 - 2.2.2.102/32 32 P - 82 2:7c:84:1c:eb:e9(209628) [truncated output] Thanks, Anda From: Vedamurthy Ananth Joshi [mailto:vjo...@juniper.net] Sent: Tuesday, July 11, 2017 2:02 PM To: Anda Nicolae; dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org> Subject: Re: [opencontrail-dev] Contrail GUI Virtual Router IP address IIRC, the port-ip assigned to the router ports does not affect the forwarding. I think you should check if the routes of the other VN is present in the routing table of each VN(route-target of the router object is used to ensure that it happens). You may want to dump the object details to check. Vedu From: Dev <dev-boun...@lists.opencontrail.org<mailto:dev-boun...@lists.opencontrail.org>> on behalf of Anda Nicolae <anico...@lenovo.com<mailto:anico...@lenovo.com>> Date: Tuesday, July 11, 2017 at 12:54 PM To: "dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>" <dev@lists.opencontrail.org<mailto:dev@lists.opencontrail.org>> Subject: [opencontrail-dev] Contrail GUI Virtual Router IP address Hi all, I am currently investigating https://bugs.launchpad.net/opencontrail/+bug/1696760. I have a setup with 3 VMs: 1st VM is Openstack node, the 2nd VM is Contrail controller node and the 3rd VM is Contrail compute node. CentOS is running on all the 3 VMs. I have used fab command to install Contrail on VMs. From Contrail GUI I have created 2 Virtual Networks each with its own (different) IP subnet (1.1.1.0/24 and 2.2.2.0/24). By default, Contrail GUI adds 1.1.1.1 as gateway IP address for the 1st VN and 2.2.2.1 as gateway IP address for the 2nd VN. I need to create a logical router to route the traffic between the Virtual Networks above. There are 2 ways in which I can create this virtual router: 1. Using neutron cmds: neutron router-create router1 neutron router-interface-add router1 <name of 1.1.1.0/24 subnet> neutron router-interface-add router1 <name of 2.2.2.0/24 subnet> In this case, the IP addresses of the router interfaces are 1.1.1.1 and 2.2.2.1, which matches the gateway IP address of each subnet. 2. Using Contrail GUI In this case, the IP addresses of the router interfaces are 1.1.1.100 and 2.2.2.100, which doesn't match the gateway IP address of each subnet, and the traffic is not router between VNs. I have started looking over the code to see where is gateway IP address .100 configured. I am stuck at /usr/lib/python2.7/site-packages/vnc_cfg_api_server/gen/resource_client.py, line 5762, function: def virtual_router_ip_address(self, virtual_router_ip_address). The above file is autogenerated and this is a setter function. Can you please give a hint on how to continue my investigation? Thanks, Anda _______________________________________________ Dev mailing list Dev@lists.opencontrail.org<mailto:Dev@lists.opencontrail.org> http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org
_______________________________________________ Dev mailing list Dev@lists.opencontrail.org http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org