Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Configuring default IP addresses of CIVS-IPC-6400 cams from remote location via MS

Hi guys,

I know here is not a shell/bash programming community, but I need a urgent help. At my customer's site there are some location that haven't any DHCP server, neither any windows machine for changing default IP addresses of cams but ony Media Server running and up with correct IP interfaces. I have prepared a shell script that use wget command to login the default IP address camera and get the sessionID from that and use it to change the IP address to the correct one. My problem is that when I have tested the script to HTTP enable cams it works prefect. But when I run it to the default config cams it fails to get the sessionID from cameras. Any ideas?

Here is my changeCamIP-HTTPs.sh script file;

#=================================

wget -d -U"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)" --no-check-certificate --server-response --post-data="version=1.0&action=login&userName=admin&password=admin" --no-check-certificate --restrict-file-names=nocontrol -O $1 https://$1/login.cs
pidof wget > wait
sessionID=$(cat $1 | grep \"sessionID\" | cut -d'=' -f4 | cut -d'"' -f2)
echo $sessionID
wget -U"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)" --no-check-certificate --restrict-file-names=nocontrol -O ret https://$1/ipaddressing.cs?version=1.0\&sessionID=$sessionID\&action=set\&ipVersion=1\&addressingType=2\&ipAddress=$2\&subnetMask=255.255.255.0\&defaultGatewayIPAddress=$3\&primaryDNSIPAddress=\&secondaryDNSIPAddress=
rm -fr $1
rm -fr ret
echo "OK"

#=================================

I am running the script with these parameters: #./changeCamIP-HTTPs.sh 192.168.0.100 New_IP New_GW

Only 3 option is enough.

When I changed the https to http it works perfectly. But default cams doesnt support HTTP..

Thanks for any help and ideas.           

  • Physical Security
Everyone's tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Silver

Re: Configuring default IP addresses of CIVS-IPC-6400 cams from

I'm willing to take a crack at this with you, if it's still an issue.

Chances are, the default / NIB (New-In-Box) cameras are presenting with an initialization screen where you set up an account initially?  I don't have the cycles to figure that part out with you, but that's what came to mind.

So what else *do* you actually have at the site?  Your own workstation?  Media Server only? 

Why not just spin up a temporary DHCP daemon on the Media Server with a tiny scope to grab your cameras temporarily so that you can get under management within VSOM and switch them to static that way?  (Don't forget to decommision the DHCP daemon after this ;-)

Best of luck!

P.S. - I have a feeling I'm *realllllly* missing something here after thinking it over for a while... You state you don't have any Windows boxes on the site?  How.... would the client actually use... VSM in this case?

Scott Olsen Solutions Specialist Bulletproof Solutions Inc. Web: www.bulletproofsi.com
4 REPLIES
Silver

Re: Configuring default IP addresses of CIVS-IPC-6400 cams from

I'm willing to take a crack at this with you, if it's still an issue.

Chances are, the default / NIB (New-In-Box) cameras are presenting with an initialization screen where you set up an account initially?  I don't have the cycles to figure that part out with you, but that's what came to mind.

So what else *do* you actually have at the site?  Your own workstation?  Media Server only? 

Why not just spin up a temporary DHCP daemon on the Media Server with a tiny scope to grab your cameras temporarily so that you can get under management within VSOM and switch them to static that way?  (Don't forget to decommision the DHCP daemon after this ;-)

Best of luck!

P.S. - I have a feeling I'm *realllllly* missing something here after thinking it over for a while... You state you don't have any Windows boxes on the site?  How.... would the client actually use... VSM in this case?

Scott Olsen Solutions Specialist Bulletproof Solutions Inc. Web: www.bulletproofsi.com
New Member

Configuring default IP addresses of CIVS-IPC-6400 cams from remo

Hİ Scott,

Yes there aren't any windows machines. But you're right we may install and dhcpd rpm on MS if available for redhat el 5.8 version. Today, we have also decided to do this with my colleague..

Thanks for reply.

New Member

Configuring default IP addresses of CIVS-IPC-6400 cams from remo

Thanks to Call Manager setup iso (which ise rhel5.8) that I have extracted dhcp rpm and install on MS. Then it works perfectly.

P.S: As Scott said that I havent start the dhcpd script automaticaly by putting link to rc3.d SXX.dhcpd etc etc. Just running /etc/init.d/dhcpd start and after setting the cameras IP address to static one then I will stop it.

Silver

Configuring default IP addresses of CIVS-IPC-6400 cams from remo

Awesome!  Where there's a will, there's a way!

Have a good day!

Scott Olsen Solutions Specialist Bulletproof Solutions Inc. Web: www.bulletproofsi.com
711
Views
0
Helpful
4
Replies
This widget could not be displayed.