cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1052
Views
0
Helpful
1
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Mathias Tonn on 07-03-2013 10:01:29 AM
Hi ,
I would like to call an http url via ::http::geturl  from a TCL script. The router is configured with vrf and has no default route.
Is there a way to execute an HTTP request via VRF?
 
Mathias

Subject: RE: call an http url via vrf
Replied by: Yaw-Ming Chen on 07-03-2013 12:10:09 PM
Sorry don't have a direct answer for you.
1. There are a few different Tcl application, IOS tcl shell, EEM Tcl and Tcl IVR API which is this forum discussing don't which one you are referring to ?
2. Tcl IVR API is in application layer, know nothing about routing stuff. All lower layer stuff is handled by IOS.
3. Never tried in this way before, so my guess is if IOS is allowed to do in this way then maybe Tcl IVR API can do.

Subject: RE: call an http url via vrf
Replied by: Mathias Tonn on 08-03-2013 02:29:58 AM
Thanks.
We use the Tcl IVR API in our project. To test we have used Sockets in the IOS tcl shell environment. An acces via vrl was possible with sockets. The Tcl IVR API does not support sockets. It only supports http. I have not seen any possibility to use VRF with HTTP geturl requests.  Without vrf we have no route to the endpoint.
1source "tmpsys:lib/tcl/http.tcl"
2set gotit [::http::geturl "http://10.X.X.X/Number2NameService" ]
3puts [::http::data $gotit]


Subject: RE: call an http url via vrf
Replied by: Geevarghese Cheria on 11-03-2013 02:18:33 AM
Hi Mathias,
   It is not possible to call a vrf interface using http::geturl .
Thanks and Regards,
Geevarghese
Comments
jaakkorau1
Community Member

By using TCL sockets it is possible this way:

set chan [socket -myvrf VRFTEST 1.1.1.1 80]

puts $chan "GET /yourURL HTTP/1.1"

puts $chan ""

flush $chan

puts "[gets $chan]"

close $chan

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links