connecting to the wireserver on secondary/VRF interfaces

Peter Morrow 91 Reputation points
2022-08-20T06:06:24.723+00:00

Hello,

On our VM (running a custom version of a debian based OS) I can communicate with the wire server over the primary interface which is in the default vrf:

gnos@vEdge:~$ ip route show  
default via 10.0.0.1 dev eth0   
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.4   
168.63.129.16 via 10.0.0.1 dev eth0   
169.254.169.254 via 10.0.0.1 dev eth0  

Talking to the wireserver:

gnos@vEdge:~$ curl --fail -v -X 'GET' -H "x-ms-agent-name: azure-vm-register" -H "Content-Type: text/xml;charset=utf-8" -H "x-ms-version: 2012-11-30" "http://168.63.129.16/machine/?comp=goalstate" Note: Unnecessary use of -X or --request, GET is already inferred.  
*   Trying 168.63.129.16:80...  
* Connected to 168.63.129.16 (168.63.129.16) port 80 (#0)  
> GET /machine/?comp=goalstate HTTP/1.1  
> Host: 168.63.129.16  
> User-Agent: curl/7.74.0  
> Accept: */*  
> x-ms-agent-name: azure-vm-register  
> Content-Type: text/xml;charset=utf-8  
> x-ms-version: 2012-11-30  
>   
* Mark bundle as not supporting multiuse  
< HTTP/1.1 200 OK  
< Content-Type: text/xml; charset=utf-8  
< Server: Microsoft-IIS/10.0  
< Date: Sat, 20 Aug 2022 05:54:55 GMT  
< Content-Length: 1865  
<   
<?xml version="1.0" encoding="utf-8"?>  
<GoalState xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="goalstate10.xsd">  
  <Version>2012-11-30</Version>  
  <Incarnation>1</Incarnation>  
  <Machine>  
    <ExpectedState>Started</ExpectedState>  
    <StopRolesDeadlineHint>300000</StopRolesDeadlineHint>  
    <LBProbePorts>  
      <Port>16001</Port>  
    </LBProbePorts>  
    <ExpectHealthReport>FALSE</ExpectHealthReport>  
  </Machine>  
  <Container>  
    <ContainerId>f7525b44-b0c2-4e9b-9a4a-e746824e6110</ContainerId>  
    <RoleInstanceList>  
      <RoleInstance>  
        <InstanceId>f10774f1-c502-4c60-ac63-89dcb6e84492._vEdge</InstanceId>  
        <State>Started</State>  
        <Configuration>  
          <HostingEnvironmentConfig>http://168.63.129.16:80/machine/f7525b44-b0c2-4e9b-9a4a-e746824e6110/f10774f1%2Dc502%2D4c60%2Dac63%2D89dcb6e84492.%5FvEdge?comp=config&amp;type=hostingEnvironmentConfig&amp;incarnation=1</HostingEnvironmentConfig>  
          <SharedConfig>http://168.63.129.16:80/machine/f7525b44-b0c2-4e9b-9a4a-e746824e6110/f10774f1%2Dc502%2D4c60%2Dac63%2D89dcb6e84492.%5FvEdge?comp=config&amp;type=sharedConfig&amp;incarnation=1</SharedConfig>  
          <ExtensionsConfig>http://168.63.129.16:80/machine/f7525b44-b0c2-4e9b-9a4a-e746824e6110/f10774f1%2Dc502%2D4c60%2Dac63%2D89dcb6e84492.%5FvEdge?comp=config&amp;type=extensionsConfig&amp;incarnation=1</ExtensionsConfig>  
          <FullConfig>http://168.63.129.16:80/machine/f7525b44-b0c2-4e9b-9a4a-e746824e6110/f10774f1%2Dc502%2D4c60%2Dac63%2D89dcb6e84492.%5FvEdge?comp=config&amp;type=fullConfig&amp;incarnation=1</FullConfig>  
          <ConfigName>f10774f1-c502-4c60-ac63-89dcb6e84492.0.f10774f1-c502-4c60-ac63-89dcb6e84492.0._vEdge.1.xml</ConfigName>  
        </Configuration>  
      </RoleInstance>  
    </RoleInstanceList>  
  </Container>  
* Connection #0 to host 168.63.129.16 left intact  
</GoalState>gnos@vEdge:~$   

However I have a requirement that means I need to do this on another interface which is in a VRF, so I added the static routes to allow the VRF to communicate with the wireserver:

gnos@vEdge:~$ ip route show vrf vrf2  
default via 10.0.1.1 dev vpp17 proto kernel-mgr metric 512   
unreachable default metric 4278198272   
10.0.1.0/24 dev vpp17 proto kernel scope link src 10.0.1.4   
10.0.1.0/24 dev vpp17 proto kernel-mgr scope link metric 512   
127.0.0.0/8 dev vrf2 proto kernel scope link src 127.0.0.1   
168.63.129.16 via 10.0.1.1 dev vpp17   
169.254.169.254 via 10.0.1.1 dev vpp17   
gnos@vEdge:~$  

However I cannot communicate with the wireserver:

gnos@vEdge:~$ curl --fail -v -X 'GET' -H "x-ms-agent-name: azure-vm-register" -H "Content-Type: text/xml;charset=utf-8" -H "x-ms-version: 2012-11-30" "http://168.63.129.16/machine/?comp=goalstate" --interface vrf2  
Note: Unnecessary use of -X or --request, GET is already inferred.  
*   Trying 168.63.129.16:80...  
^C  
gnos@vEdge:~$  

This is not a routing issue as I can do other operations via that VRF:

gnos@vEdge:~$ ping -I vrf2 www.google.comping: Warning: source address might be selected on device other than: vrf2  
PING www.google.com (172.253.63.147) from 10.0.1.4 vrf2: 56(84) bytes of data.  
64 bytes from bi-in-f147.1e100.net (172.253.63.147): icmp_seq=1 ttl=53 time=5.91 ms  
64 bytes from bi-in-f147.1e100.net (172.253.63.147): icmp_seq=2 ttl=53 time=5.98 ms  
64 bytes from bi-in-f147.1e100.net (172.253.63.147): icmp_seq=3 ttl=53 time=5.90 ms  
64 bytes from bi-in-f147.1e100.net (172.253.63.147): icmp_seq=4 ttl=53 time=6.05 ms  
^C  
--- www.google.com ping statistics ---  
4 packets transmitted, 4 received, 0% packet loss, time 3005ms  
rtt min/avg/max/mdev = 5.896/5.959/6.050/0.061 ms  
gnos@vEdge:~$   

When trying to communicate with the wireserver in a VRF I observed via packet capture that packets are being sent out, they are not being received back however.

gnos@vEdge:~$ sudo tcpdump -i vrf2  
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode  
listening on vrf2, link-type EN10MB (Ethernet), snapshot length 262144 bytes  
06:01:15.280748 IP 10.0.1.4.59698 > 168.63.129.16.http: Flags [S], seq 900444532, win 64240, options [mss 1460,sackOK,TS val 2926790123 ecr 0,nop,wscale 7], length 0  
06:01:16.293418 IP 10.0.1.4.59698 > 168.63.129.16.http: Flags [S], seq 900444532, win 64240, options [mss 1460,sackOK,TS val 2926791136 ecr 0,nop,wscale 7], length 0  
06:01:18.309415 IP 10.0.1.4.59698 > 168.63.129.16.http: Flags [S], seq 900444532, win 64240, options [mss 1460,sackOK,TS val 2926793152 ecr 0,nop,wscale 7], length 0  
06:01:22.437473 IP 10.0.1.4.59698 > 168.63.129.16.http: Flags [S], seq 900444532, win 64240, options [mss 1460,sackOK,TS val 2926797280 ecr 0,nop,wscale 7], length 0  
06:01:30.629472 IP 10.0.1.4.59698 > 168.63.129.16.http: Flags [S], seq 900444532, win 64240, options [mss 1460,sackOK,TS val 2926805472 ecr 0,nop,wscale 7], length 0  

Are there any restrictions on which interfaces can communicate with the wireserver? The interface which is failing here in not the primary and has AN enabled. Maybe the azure host is filtering on MAC address of the primary interface?

Thanks

Peter

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,776 questions
0 comments No comments
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 49,616 Reputation points Microsoft Employee Moderator
    2022-08-24T07:27:28.94+00:00

    Hi @Peter Morrow ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
    Apologies for the delay in my answer.

    I understand that you are trying to connect with the Wireserver IP using a secondary IP address.
    I am afraid that this is not a possible scenario.

    WireServer IP and Metadata Service IPs are platform dependent and can be reached only via primary IP.

    Please let me know if you have further queries on this.

    Cheers,
    Kapil

    ----------------------------------------------------------------------------------------------------------------

    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.


1 additional answer

Sort by: Most helpful
  1. risolis 8,741 Reputation points
    2022-08-20T21:57:40.207+00:00

    Hello @Peter Morrow

    Thank you for your post.

    I wonder if you had enabled for this case scenario this feature "IP forwarding"...

    Furthermore, I would like to know if when you tried to ping any destination target.... Were you doing this ping with the source syntax or not?

    Finally, If you did a traceroute what the final result/output was for this?

    Looking forward to your feedback,

    Cheers,

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.