9 More Discussions You Might Find Interesting
1. IP Networking
I bought a Cisco 892-k9 router and I am having in issue trying to setup the initial configuration. Does someone have a sampl configuration for a single subnet that I can use for my configuration?
Thanks. (0 Replies)
Discussion started by: gandolf989
0 Replies
2. Hardware
Recently, I want to see how to get a hold of a report showing the output/ configuration on my Catalyst 2960S 24 GigE, 2 x 10G SFP+ LAN Base switch ( basically, a report stating if all ports are functioning or not). Any help would be greatly appreciated. Thank you!
Cisco WS-C2960S-24TD-L Switch... (1 Reply)
Discussion started by: Ayaerlee
1 Replies
3. Shell Programming and Scripting
I know there are better ways to do this.
I prefer snmp. I do not have the proper perl modules loaded on the platorm. Snmp isnt loaded on the platform. Telnet is not an option. I need to write an expect script to pull cisco equipment configs.
The following code is executed once I gain... (0 Replies)
Discussion started by: popeye
0 Replies
4. IP Networking
Hi experts,
I need to cope configuration from one switch/firewall to another switch/firewall.
I have copied running configs.
The question is do I have to clear the existing configuration on the dest. devices
Or can I copy it(replace) directly without clearing previous config ?
If... (2 Replies)
Discussion started by: hernand
2 Replies
5. IP Networking
Hello all,
I have set up dhcpd on a linux box for serving subnets on multiple vlans configured on a Cisco 6500 with ip helper of the dhcp server. Servers get dhcp leases just fine, however, some machines lose their connection for reboot or what not and I can not get their lease back even though... (0 Replies)
Discussion started by: closedown
0 Replies
6. IP Networking
Hello,
Does anyone know where I can find configuration information on setting up
a dial in VPN on Cicso IOS for a bunch of servers.
Could not seem to find anything in search engines.
Thanks (0 Replies)
Discussion started by: photon
0 Replies
7. IP Networking
Dear All,
I have worked with xDSL routers working in bridged mode, and linux behind them working as a Firewall utilizing IPTABLES. My question is, how this will change if the xDSL router is replaced with a Cisco Router?
I mean to ask that, can I assign a public ip on the linux machine, which... (0 Replies)
Discussion started by: tmm
0 Replies
8. Shell Programming and Scripting
All
Please help, i will telnet to router to obain the ping status and compare, if higher than normal latency, i will have further action..
if i do the telent and in perl script then ....
e.g the result i obtain from the router will be =' Success rate is 100 percent (5/5), round-trip... (4 Replies)
Discussion started by: optimus
4 Replies
9. UNIX for Advanced & Expert Users
Hi All,
I am connected to a cisco router and I want to know the hostname of this router.
I connect as telnet <IPADDRESS>
and the prompt shows
vpnaccess-bristol>
But I want to know the full hostname of the router how can i do that.
When i type the hostname command the following... (3 Replies)
Discussion started by: rahulrathod
3 Replies
Router::Simple::Cookbook(3pm) User Contributed Perl Documentation Router::Simple::Cookbook(3pm)
NAME
Router::Simple::Cookbook - The Router::Simple Cookbook
FAQ
How to create Sinatra-ish framework with Router::Simple?
Please read the following example code.
package MySinatraish;
use Router::Simple;
use Plack::Request;
sub import {
my $pkg = caller(0);
my $router = Router::Simple->new();
my $any = sub ($$;$) {
my ($pattern, $dest, $opt) = do {
if (@_ == 3) {
my ($methods, $pattern, $code) = @_;
($pattern, {code => $code}, +{method => [ map { uc $_ } @$methods ]});
} else {
my ($pattern, $code) = @_;
($pattern, {code => $code}, +{});
}
};
$router->connect(
$pattern,
$dest,
$opt,
);
};
no strict 'refs';
# any [qw/get post delete/] => '/bye' => sub { ... };
# any '/bye' => sub { ... };
*{"${pkg}::any"} = $any;
*{"${pkg}::get"} = sub {
$any->([qw/GET HEAD/], $_[0], $_[1]);
};
*{"${pkg}::post"} = sub {
$any->([qw/POST/], $_[0], $_[1]);
};
*{"${pkg}::as_psgi_app"} = sub {
return sub {
if (my $p = $router->match($_[0])) {
[200, [], [$p->{code}->()]];
} else {
[404, [], ['not found']];
}
}
};
}
package MyApp;
use MySinatraish;
get '/' => sub {
'top';
};
post '/new' => sub {
'posted';
};
as_psgi_app;
How to switch from HTTPx::Dispatcher?
HTTPx::Dispatcher is class specific declararative router.
package MyApp::Dispatcher;
use HTTPx::Dspatcher;
connect '/', {controller => 'foo', action => 'bar'};
1;
The following script is same as above.
package MyApp::Dispatcher;
use Router::Simple::Declare;
my $router = router {
connect '/', {controller => 'foo', action => 'bar'};
};
sub match { $router->match() }
How to use Router::Simple with non-strictly-MVC application?
use Router::Simple::Declare;
my $router = router {
connect '/foo/bar/' => { 'target' => '/foobar.asp' };
connect '/topics/:topic' => { target => '/my-topic.asp' };
connect '/products/{Category:.*}' => { target => '/products.asp', Category => 'All' };
connect '/zipcode/{zip:[0-9]{5,5}}' => {target => '/zipcode.asp' };
};
You can pass the target path as destination.
AUTHOR
Tokuhiro Matsuno <tokuhirom AAJKLFJEF GMAIL COM>
LICENSE
Copyright (C) Tokuhiro Matsuno
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Router::Simple
perl v5.14.2 2011-05-15 Router::Simple::Cookbook(3pm)