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&type=hostingEnvironmentConfig&incarnation=1</HostingEnvironmentConfig>
<SharedConfig>http://168.63.129.16:80/machine/f7525b44-b0c2-4e9b-9a4a-e746824e6110/f10774f1%2Dc502%2D4c60%2Dac63%2D89dcb6e84492.%5FvEdge?comp=config&type=sharedConfig&incarnation=1</SharedConfig>
<ExtensionsConfig>http://168.63.129.16:80/machine/f7525b44-b0c2-4e9b-9a4a-e746824e6110/f10774f1%2Dc502%2D4c60%2Dac63%2D89dcb6e84492.%5FvEdge?comp=config&type=extensionsConfig&incarnation=1</ExtensionsConfig>
<FullConfig>http://168.63.129.16:80/machine/f7525b44-b0c2-4e9b-9a4a-e746824e6110/f10774f1%2Dc502%2D4c60%2Dac63%2D89dcb6e84492.%5FvEdge?comp=config&type=fullConfig&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