Router(config-line)#login
Router(config-line)#password cisco
Router(config-line)#login
Router(config-line)#password cisco
Router(config-line)#exec-timeout 0 0
Set the enable secret password to peter:
Set secret password as peter. This password overrides the enable password and is encrypted in the configuration file.
Router(config-router)#network 172.16.0.0
Router(config-router)#network 172.16.0.0
Enable the http server to SDM can be used: Enable the http server to use SDM.
Router(config)#ip http server
Defines a username and password: Set username (sue) and password (cisco). Can be used for PPP authentication or user access.
Router(config)#username sue password cisco
Specify the local host file in unix, like:
/etc/hosts in unix
Router(config)#ip host mypc 10.1.1.3
Disable Disables DNS lookup. Useful when a command is typed in error.
Router(config)#no ip domain-lookup
Sets the logical (not physical) bandwidth for the interface. Commonly used by routing protocols, SNMP queries.
Router(config)#int s0
Router(config-if)#bandwidth
Set up physical clock
Router(config-if)#clock rate 64000
Set the serial interface WAN encapsulation: In addition to hdlc, there are other options: PPP and frame-relay.
Router(config-if)#encapsulation hdlc
Authentication on PPP is optional: Authentication on PPP is optional. This command enables chap on the interface, another option is PAP.
Router(config-if)#ppp authentication chap
Select LMI style. If the LMI type is not configured correctly it will be detected automatically.
Router(config-if)#frame-relay lmi-type cisco
Static routing. Static routing has an Administrative Distance (AD) of 1, so it overrides any dynamic routing.
Router(config)#ip route 50.0.0.0 255.0.0.0
10.1.2.1
Enables RIP version 1 on all LOCAL interfaces which have a 10.xxx address: Enables RIP v1 on all LOCAL interfaces with address 10.xxx
Enables RIP version 2: Enable RIP v2
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#version 2
Enable the router to provide a DHCP service: Set up DHCP on the router.
Router(config)#ip dhcp pool MYPOOL
Router(dhcp-config)#network 10.1.1.0 255.255.255.0
Router(dhcp-config)#default-router 10.1.1.1 Router(dhcp-config)#exit
Router(config)#ip dhcp excluded-address 10.1.1.1 10.1.1.99
Set up config register: Specify what the router will do when it boots up.
Router(config)#config-register 0x2102
Create a sub logical interface under the physical interface.
Enable 802.1q trunking on the interface.
Set IP address.
Router(config)#int fa0/0.1
Router(config-subif)#encapsulation dot1Q 1
Router(config-subif)#ip address 10.1.1.1
255.255.255.0
Enable OSPF on any local interface starting with IP address 10.1.xx
Router(config-)#router ospf 1
Router(config-router)#network 10.1.0.0
0.0.255.255 area 0
EIGRP can be configured the same as RIP or using the mask option.
Router(config)#router eigrp 1
Router(config-router)#network 172.16.0.0 Or
Router(config-router)#network 172.16.2.0
0.0.0.255
Set up ACL standards. This standard uses numbers from 1 to 99.
Router(config)#access-list 1 permit
172.16.1.1
Set up Extended ACL. The first address is the source IP address.
Router(config)#access-list 101 deny tcp host
172.16.1.1 host 172.16.2.1 eq telnet Router(config)#access-list 101 permit ip any any
Use the group command to attach an ACL to an interface: Use the group command to attach an ACL to an interface.
Router(config)#interface fa0/0
Router(config-if)#ip access-group 1 out
Example of using ACL names instead of numbers.
Router(config)#ip access-list extended my_list
Router(config-ext-nacl)# deny tcp host
172.16.1.1 host 172.16.2.1 eq ftp
Router(config-ext-nacl)# permit ip any any
Assign ACL to interface by name.
Router(config)#int fa0/0
Router(config-if)#ip access-group my_list in
Configuring a static NAT to allow a server to be accessed via the Internet, using the IP address on interface s0/0/1: Configuring a static NAT to allow a server to be accessed via the Internet, using the IP address on interface s0/0 /1.
Router(config)#ip nat inside source static
10.1.1.2 interface s0/0/1
Defining interface which NAT takes place between: Determine the interface on which NAT occurs.
Router(config)#int fa0/0.1
Router(config-if)#ip nat inside
Enables RIPng: Enable RIPng
Router(config)#ipv6 unicast-routing
Router(config)#ipv6 router rip ccna
Router(config)#int s0/0/0
Router(config-if)#ipv6 rip ccna enable