onie icon indicating copy to clipboard operation
onie copied to clipboard

Not able to install ONIE with Link-local IPv6 address

Open Lakshmipathi-Vemuri opened this issue 3 years ago • 1 comments

Summary :-

Link-local IPv6 address should be enclosed with square brackets while downloading ONIE through http.

Steps To Reproduce :-

  1. Download ONIE with link-local IPv6 address through http as per Image Discovery & execution (Design Specification -> Operating Software Design ->Image Discovery and Execution) Refer below URL: URL :- https://opencomputeproject.github.io/onie/design-spec/discovery.html#http-ipv4-and-ipv6-neighbors
  2. Verify the results

Results :-

Actual : Continuously getting attempting message, please check the below logs for the same.

Logs :-

Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer-x86_64-ufispace_s9500_30xs-r0 ... Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer-x86_64-ufispace_s9500_30xs-r0.bin ... Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer-x86_64-ufispace_s9500_30xs ... Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer-x86_64-ufispace_s9500_30xs.bin ... Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer-ufispace_s9500_30xs ... Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer-ufispace_s9500_30xs.bin ... Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer-x86_64-bcm ... Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer-x86_64-bcm.bin ... Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer-x86_64 ... Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer-x86_64.bin ... Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer ... Info: Attempting http://fe80::4638:39ff:fe00:139e%eth0/onie-installer.bin ...

Validating packet

root@debian:/var/www/html# tcpdump -i eth1 'port 80' tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes 14:26:02.073309 IP6 fe80::4638:39ff:fe00:139e > debian.http: Flags [S], seq 251312886, win 28800, options [mss 1440,sackOK,TS val 51665 ecr 0,nop,wscale 7], length 0 14:26:02.073356 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [S.], seq 3805695720, ack 251312887, win 28560, options [mss 1440,sackOK,TS val 45617465 ecr 51665,nop,wscale 7], length 0 14:26:02.073424 IP6 fe80::4638:39ff:fe00:139e > debian.http: Flags [.], ack 1, win 225, options [nop,nop,TS val 51665 ecr 45617465], length 0 14:26:02.073472 IP6 fe80::4638:39ff:fe00:139e > debian.http: Flags [P.], seq 1:436, ack 1, win 225, options [nop,nop,TS val 51665 ecr 45617465], length 435: HTTP: GET /onie-installer-x86_64-ufispace_s9500_30xs-r0.bin HTTP/1.1 14:26:02.073499 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [.], ack 436, win 232, options [nop,nop,TS val 45617465 ecr 51665], length 0 14:26:02.073776 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [P.], seq 1:617, ack 436, win 232, options [nop,nop,TS val 45617465 ecr 51665], length 616: HTTP: HTTP/1.1 400 Bad Request 14:26:02.073794 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [F.], seq 617, ack 436, win 232, options [nop,nop,TS val 45617465 ecr 51665], length 0

Note :- Providing sample link-local IPv6 address

Expected :-

Link-local IPv6 address should be enclosed within Square brackets. If Link-local IPv6 address is within square brackets, Then we are not facing any issue and able to download ONIE through http.

Please refer the below logs for working scenario,

ONIE:/ # onie-nos-install http://[fe80::4638:39ff:fe00:139e%eth0]/onie-installer-x86_64-ufispace_s9500_30xs-r0.bin discover: installer mode detected. Stopping: discover... done. Info: Attempting http://[fe80::4638:39ff:fe00:139e%eth0]/onie-installer-x86_64-ufispace_s9500_30xs-r0.bin ... Connecting to [fe80::4638:39ff:fe00:139e%eth0] ([fe80::4638:39ff:fe00:139e]:80) installer 6% |* | 40637k 0:00:29 ETA^C ONIE:/ #

Validating packet

root@debian:/var/www/html# tcpdump -i eth1 'port 80' tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes 14:27:14.103005 IP6 fe80::4638:39ff:fe00:139e > debian.http: Flags [S], seq 3516786979, win 28800, options [mss 1440,sackOK,TS val 123694 ecr 0,nop,wscale 7], length 0 14:27:14.103073 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [S.], seq 682620436, ack 3516786980, win 28560, options [mss 1440,sackOK,TS val 45635472 ecr 123694,nop,wscale 7], length 0 14:27:14.103241 IP6 fe80::4638:39ff:fe00:139e > debian.http: Flags [.], ack 1, win 225, options [nop,nop,TS val 123695 ecr 45635472], length 0 14:27:14.103252 IP6 fe80::4638:39ff:fe00:139e > debian.http: Flags [P.], seq 1:433, ack 1, win 225, options [nop,nop,TS val 123695 ecr 45635472], length 432: HTTP: GET /onie-installer-x86_64-ufispace_s9500_30xs-r0.bin HTTP/1.1 14:27:14.103279 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [.], ack 433, win 232, options [nop,nop,TS val 45635472 ecr 123695], length 0 14:27:14.103654 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [.], seq 1:1429, ack 433, win 232, options [nop,nop,TS val 45635472 ecr 123695], length 1428: HTTP: HTTP/1.1 200 OK 14:27:14.103661 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [.], seq 1429:2857, ack 433, win 232, options [nop,nop,TS val 45635472 ecr 123695], length 1428: HTTP 14:27:14.105692 IP6 fe80::4638:39ff:fe00:139e > debian.http: Flags [.], ack 94249, win 1587, options [nop,nop,TS val 123697 ecr 45635472], length 0 14:27:14.105706 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [P.], seq 115669:117097, ack 433, win 232, options [nop,nop,TS val 45635473 ecr 123697], length 1428: HTTP 14:27:14.105712 IP6 fe80::4638:39ff:fe00:139e > debian.http: Flags [.], ack 98533, win 1653, options [nop,nop,TS val 123697 ecr 45635473], length 0 14:27:14.105837 IP6 fe80::4638:39ff:fe00:139e > debian.http: Flags [.], ack 108529, win 1810, options [nop,nop,TS val 123697 ecr 45635473], length 0 14:27:14.105855 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [.], seq 117097:118525, ack 433, win 232, options [nop,nop,TS val 45635473 ecr 123697], length 1428: HTTP 14:27:14.105858 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [.], seq 118525:119953, ack 433, win 232, options [nop,nop,TS val 45635473 ecr 123697], length 1428: HTTP 14:27:14.105860 IP6 debian.http > fe80::4638:39ff:fe00:139e: Flags [.], seq 119953:121381, ack 433, win 232, options [nop,nop,TS val 45635473 ecr 123697], length 1428: HTTP

Lakshmipathi-Vemuri avatar Nov 05 '20 11:11 Lakshmipathi-Vemuri

Nice find. Did you already look into the code, where “the request string” is created/assembled?

paulmenzel avatar Mar 26 '21 11:03 paulmenzel