Do you like this site? Remember to share it to all your friends on Facebook and Twitter!

Friday, February 13, 2015

Some handy commands I use to save my time doing Cisco IOS XR labs

Remember: Default behaviors of Cisco IOS XR are there to secure your router even we forget to configure them. Never try to disable them on any production network!

For lab practice, however, security is not my concern at all. I list some of my handy configuration fragments to save me time when I do IOS XR labs. I hope they are also helpful to you!

Flower of strawberry.
Photo taken in Hsinchu County, Taiwan.

[Stop console automatic logout]
line console
 exec-timeout 0 0
line default
 exec-timeout 0 0

[Enable SSH Server]
crypto key generate rsa
(enter)
conf
ssh server v2
commit

[Enable TELNET Server]
telnet ipv4 server max-servers 100

[Enable CDP]
conf
cdp
interface g0/0/0/0
 cdp
commit

[Pass-any route policy. The name is 'pass'.]
route-policy pass
  pass
end-policy


[Prefix set 'PrivateNetRFC1918' and route policy 'ListPrivateNetRFC1918']
prefix-set PrivateNetRFC1918
  10.0.0.0/8 ge 8,
  172.16.0.0/12 ge 12,
  192.168.0.0/16 ge 16
end-set

route-policy ListPrivateNetRFC1918
  if destination in PrivateNetRFC1918 then
    pass
  endif
end-policy



One more thing...

I put them together so you can easily copy all and paste as a configuration template.

--- CUT HERE ---

crypto key generate rsa


conf
ssh server v2

line console
 exec-timeout 0 0
line default
 exec-timeout 0 0

telnet ipv4 server max-servers 100

route-policy pass
  pass
end-policy

prefix-set PrivateNetRFC1918
  10.0.0.0/8 ge 8,
  172.16.0.0/12 ge 12,
  192.168.0.0/16 ge 16
end-set

route-policy ListPrivateNetRFC1918
  if destination in PrivateNetRFC1918 then
    pass
  endif
end-policy

cdp
interface g0/0/0/0
 cdp

commit


--- END ---
Do you like this post? You really should consider Subscribing by Email!


Related Posts with Thumbnails

No comments:

Post a Comment

Tip: you can also anonymously comment here.

Popular Posts