cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6781
Views
17
Helpful
8
Replies

Copy HTTP VRFaware

mario.jost
Level 3
Level 3

Dear community


i would like to use a command like this:

copy http://ciscoiosimages.company.local/image123.bin flash:image123.bin vrf LAN

I know there are things like:

ip ftp source-interface Loopback0
ip tftp source-interface Loopback0

But there isnt a command for HTTP like:

ip http source-interface Loopback0

So how am i supposed to copy something via HTTP if all the interfaces belong to a VRF? We use a fairly new-ish IOS version 15.5(3)M6a. We have to use that version, as it is approved by our provider.

 

Note: Had to use a wrong label, as all other things that fit the topic, did not get accepted. Couldn't post this without a label.

1 Accepted Solution

Accepted Solutions

Peter L
Level 1
Level 1

Hi

I know this is an old thread but saw this when searching for the same thing. Though it would be good to post an answer if someone else stumble upon this thread.

You can use 

ip http client source-interface GigabitEthernet0

To get copy http to work when the interface belongs to an vrf.

 

/Peter

View solution in original post

8 Replies 8

balaji.bandi
Hall of Fame
Hall of Fame

This is very good question and intresting.

 

Let me address what best i can.  Most of the time we use VRF MGMT for out of band management to get the config our of box, not to use other data VRF. which support both you have mentioned.

 

But in regard to http, this we expect to use most of the time passing the traffic using normal Data VRF, so you can directly copy using http, there is no special requirement for this, as long as you have routing set to reach the destination.

 

i did my best to answer...make sense ?

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hey BB

 

Your post seems to be some sort of a translated from another language, as it is hard to make sense of what you are trying to say. As i wrote, all interfaces belong to a VRF. That means that the global routing table is empty. So there is no way i can copy anything wihout specifying a VRF.

 

So, your post did not help at all, im afraid. The question was: How to copy HTTP within a VRF?

@mario.jost

 

Kindly share the exact code of your IOS and platform in order to provide you the solution.

 

BR

Tayyab

*** Please rate all helpful responses and mark solutions***

I already posted the IOS version we use: 15.5(3)M6a. That's on the Cisco 89x series mainly. But i tested IOS-XE on ISR4400 devices, and they don't support copying HTTP over VRF aswell. But if you can provide a solution on any Cisco router with any IOS version, i would be glad.

 

But please do not just post anything just so that this post has an answer. In that case, other people do not read this post anymore, as it already has answers. Therefore it will remain unresolved. Again, the question is rather simple: How to copy HTTP within a VRF?

 

why you need HTTP to copy the IOS? are you trying to run the python script to automate the process?

 

However,  I will test in my lab before posting here.

 

BR

Tayab

*** Please rate all helpful responses and mark solutions***

Peter L
Level 1
Level 1

Hi

I know this is an old thread but saw this when searching for the same thing. Though it would be good to post an answer if someone else stumble upon this thread.

You can use 

ip http client source-interface GigabitEthernet0

To get copy http to work when the interface belongs to an vrf.

 

/Peter

Great input. Sadly, this does only work for downloading stuff. If you try to upload something with following command:

copy flash:vlan.dat http://someserver.company.local/vlan.txt

It will still try to use the global routing instance instead of using the VRF where GigabitEthernet0 resides in. But nevertheless, your answer is closest to a solution, so i marked it. Thanks for sharing your wisdom with the human race.

Hi folks, 

Just to add to Peter's post. I found that you may also need to disable names resolution in the global routing table to make http copy work in a different vrf.

no ip domain-lookup  ! better as no delay before vrf aware http copy starts 

or

no ip domain name your.domain.com ! ditch all dns stuff in grt

no ip domain lookup source-interface... ! works but there is a bit of a delay before copy starts

no name-server 123.123.123.123 ! etc 


You may need names resolution in your management vrf for example:

ip name-server vrf Mgmt-vrf 208.67.222.222 208.67.220.220
ip domain lookup vrf Mgmt-vrf source-interface GigabitEthernet0/0
ip domain name vrf Mgmt-vrf your.domain.com

 

Hope this helps!

Rob.

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:

Review Cisco Networking products for a $25 gift card