#Show current login usersshow users
# terminal a userclear line vty 0
Set Session timeout
exec timeout command is sused to specify the timeout for exec sessions[telnet/ssh] whereas session timeout command specifies the idle timeout period for all the sessions.
1
2
3
4
5
6
7
config t
line vty 015exec-timeout 10session-timeout 10#Check configuresh run | be line vty
How to fix %Error opening tftp://255.255.255.255/network-confg (Timed out)
1
no service config
Set ip address and default gateway
1
2
3
4
ip default-gateway 192.168.0.1
interface vlan 1ip address 192.168.0.2 255.255.255.0
Set hostname and domain-name
1
2
3
config t
hostname myswitch
ip domain-name mydomain.com
Enable ssh login
Generate the RSA keys
1
2
3
4
5
6
7
8
myswitch(config)# crypto key generate rsa The name for the keys will be: myswitch.thegeekstuff.com
Choose the size of the key modulus in the range of 360 to 2048for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 1024 % Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
Setup the line vty configurations
1
2
3
4
5
6
line vty 04session-timeout 10transport input ssh
login localpassword 7exit
Set the console line
1
2
3
line console 0logging synchronus
login local
Create the username password
1
2
3
config t
username $USERNAME password $MYPASSWORDenable secret $MYENABLEPASSWORD
# Enable PBR on cisco 3750xsdm prefer routing
#save configurationwrite
#Reload switch to let it works.reload
#check sdm statusshow sdm prefer
# Define access listip access-list extended wifi
permit ip 10.32.200.0 0.0.0.255 any
deny ip any any
#define reout-map and set routing policyroute-map wifi-2rd-gw permit 10 match ip address wifi
set ip next-hop 192.168.99.2
#select a vlan to apply PBR interface Vlan30
ip policy route-map wifi-2rd-gw