Note: HDLC is the default serial encapsulation. Both ends of serial link must be configured the same.
Configure PPP Encapsulation for Serial 0 at both R1 and R2
R1 (config) # int s0/0/0
R1 (config-if) # encapsulation ppp / encap ppp
Note: If OSPF was already configured, the link will go down, until the other end has also been configured as PPP and the link should go up.
R2 (config) # int s0/0/0
R2 (config-if) # encapsulation ppp / encap ppp
R1 (config) # do show int s0/0/0
Configure PPP (with CHAP or PAP Authentication) at Serial 0 for both R1 and R2
Hostname = username
password = cisco
R1 (config) # username R2 password cisco (or secret class)
R1 (config) # int s0/0/0
R1 (config-if) # encapsulation ppp / encap ppp
R1 (config-if) # ppp authentication chap / ppp auth chap (or pap)
If secret class is used,
R1 (config-if) # ppp chap (or pap) sent-username R1 password cisco
Note: If OSPF was already configured, the link will go down, until the other end has also been configured as PPP and the link should go up.
R2 (config) # username R1 password cisco (or secret class)
R2 (config) # int s0/0/0
R2 (config-if) # encapsulation ppp / encap ppp
R2 (config-if) # ppp authentication chap / ppp auth chap (or pap)
If secret class is used,
R1 (config-if) # ppp chap (or pap) sent-username R1 password cisco
R1 (config) # do show int s0/0/0
The info presented here is only for the purpose of quick reference to CISCO Commands. You should refer to CISCO website for further info.
Tuesday, 26 November 2019
Link Aggregation by EtherChannel using PAgP or LACP
Note: Both ends of the channel must be configured to use the same interface range and protocol.
Mismatch will cause the entire LAN to go down.
Do below for S1. Do the same for S2.
S1 (config) # int range f0/3-4
For PAgP
S1 (config-if-range) # channel-group 1 mode desirable
For LACP
S1 (config-if-range) # channel-group 1 mode active
S1 (config-if-range) # no shut
S1 (config-if-range) # do show etherchannel summary / do sh e s
S1 (config) # int port-channel 1
S1 (config-if) # switchport mode trunk
S1 (config-if) # switchport trunk native vlan 99
Mismatch will cause the entire LAN to go down.
Do below for S1. Do the same for S2.
S1 (config) # int range f0/3-4
For PAgP
S1 (config-if-range) # channel-group 1 mode desirable
For LACP
S1 (config-if-range) # channel-group 1 mode active
S1 (config-if-range) # no shut
S1 (config-if-range) # do show etherchannel summary / do sh e s
S1 (config) # int port-channel 1
S1 (config-if) # switchport mode trunk
S1 (config-if) # switchport trunk native vlan 99
Host Standby Routing Protocol (HSRP) for First Hop Redundancy Protocol (FHRP)
Configure R1 as Active Router at the Gateway Interface G0/1 to PC-A
Default priority = 100.
Use Virtual IP Address = 192.168.1.254 and Group = 1.
R1 (config) # int g0/1
R1 (config-if) # standby version 2
R1 (config-if) # standby 1 ip 192.168.1.254
R1 (config-if) # standby 1 priority 150
R1 (config-if) # standby 1 prempt
Configure R2 as Standby Router at the Gateway Interface G0/1 to PC-B
Default priority = 100.
Use Virtual IP Address = 192.168.1.254 and Group = 1.
R2 (config) # int g0/1
R2 (config-if) # standby version 2
R2 (config-if) # standby 1 ip 192.168.1.254
R2 (config-if) # do show standby brief
Note: Remember to use virtual IP address as default gateway address for PC-A and PC-B.
Likewise do the same for switches, if used in the same LAN.
Default priority = 100.
Use Virtual IP Address = 192.168.1.254 and Group = 1.
R1 (config) # int g0/1
R1 (config-if) # standby version 2
R1 (config-if) # standby 1 ip 192.168.1.254
R1 (config-if) # standby 1 priority 150
R1 (config-if) # standby 1 prempt
Configure R2 as Standby Router at the Gateway Interface G0/1 to PC-B
Default priority = 100.
Use Virtual IP Address = 192.168.1.254 and Group = 1.
R2 (config) # int g0/1
R2 (config-if) # standby version 2
R2 (config-if) # standby 1 ip 192.168.1.254
R2 (config-if) # do show standby brief
Note: Remember to use virtual IP address as default gateway address for PC-A and PC-B.
Likewise do the same for switches, if used in the same LAN.
RIP
RIP version 2
R1 (config) # router rip
R1 (config-router) # version 2
R1 (config-router) # network 10.0.0.0 (for Class A network /8)
R1 (config-router) # network 192.168.1.0 (for Class C network /24)
Default static route
Using Loopback 1 as exit interface, This is useful for simulating an Internet connection to ISP.
Usually passive-interface lo1 is recommended.
R1 (config) # ip route 0.0.0.0 0.0.0.0 lo1
Propagate and redistribute
R1 (config-router) # default-information originate / def orig
R1 (config) # router rip
R1 (config-router) # version 2
R1 (config-router) # network 10.0.0.0 (for Class A network /8)
R1 (config-router) # network 192.168.1.0 (for Class C network /24)
Default static route
Using Loopback 1 as exit interface, This is useful for simulating an Internet connection to ISP.
Usually passive-interface lo1 is recommended.
R1 (config) # ip route 0.0.0.0 0.0.0.0 lo1
Propagate and redistribute
R1 (config-router) # default-information originate / def orig
VLAN, Spanning Tree, Rapid PVST, PortFast and BPDU Guard
Create and Name VLAN
S1 (config) # vlan 10
S1 (config-vlan) # name User
S1 (config) # vlan 99
S1 (config-vlan) # name Management
Management VLAN
S1 (config) # int vlan 99
S1 (config-if) # ip add 192.168.99.1 255.255.255.0
S1 (config-if) # no shut
Interface Trunk Native VLAN
S1 (config) # int f0/10
S1 (config-if) # no shut
S1 (config-if) # switchport mode trunk
S1 (config-if) # switchport trunk native vlan 99
or
S1 (config) # int port-channel 1
S1 (config-if) # switchport mode trunk
S1 (config-if) # switchport trunk native vlan 99
Interface Access VLAN, PortFast and BPDU Guard
S1 (config) # int f0/1
S1 (config-if) # no shut
S1 (config-if) # switchport mode access
S1 (config-if) # switchport access vlan 10
S1 (config-if) # spanning-tree portfast / span port
S1 (config-if) # spanning-tree bpduguard enable / span bpdu
Primary and Secondary Root Bridge, Rapid PVST
S1 (config) # spanning-tree vlan 1,10,99 root primary / span vlan 1,10,99 root pri
S1 (config) # spanning-tree mode rapid-pvst / span mode rapid
S2 (config) # spanning-tree vlan 1,10,99 root secondary / span vlan 1,10,99 root sec
S2 (config) # spanning-tree mode rapid-pvst / span mode rapid
S2 (config) # show spanning-tree
S2 (config) # show run | inc span mode
S1 (config) # vlan 10
S1 (config-vlan) # name User
S1 (config) # vlan 99
S1 (config-vlan) # name Management
Management VLAN
S1 (config) # int vlan 99
S1 (config-if) # ip add 192.168.99.1 255.255.255.0
S1 (config-if) # no shut
Interface Trunk Native VLAN
S1 (config) # int f0/10
S1 (config-if) # no shut
S1 (config-if) # switchport mode trunk
S1 (config-if) # switchport trunk native vlan 99
or
S1 (config) # int port-channel 1
S1 (config-if) # switchport mode trunk
S1 (config-if) # switchport trunk native vlan 99
Interface Access VLAN, PortFast and BPDU Guard
S1 (config) # int f0/1
S1 (config-if) # no shut
S1 (config-if) # switchport mode access
S1 (config-if) # switchport access vlan 10
S1 (config-if) # spanning-tree portfast / span port
S1 (config-if) # spanning-tree bpduguard enable / span bpdu
Primary and Secondary Root Bridge, Rapid PVST
S1 (config) # spanning-tree vlan 1,10,99 root primary / span vlan 1,10,99 root pri
S1 (config) # spanning-tree mode rapid-pvst / span mode rapid
S2 (config) # spanning-tree vlan 1,10,99 root secondary / span vlan 1,10,99 root sec
S2 (config) # spanning-tree mode rapid-pvst / span mode rapid
S2 (config) # show spanning-tree
S2 (config) # show run | inc span mode
OSPFv2 for IPV4 LAN
Router Configuration
R1> enable / en
R1> enable / en
R1 # config terminal / conf t
Clock Rate to DCE Interface
Unit is in bps.
R1 (config) # int s0/0/0
R1 (config-if) # clock rate 128000
Bandwidth to Specific Interface
Unit is in kbps. Default for Serial is 1544 kbps that produces the Link Cost of 64.
R1 (config) # int s0/0/1
R1 (config-if) # bandwidth 128 or band 128
Default static route
Using Loopback 1 as exit interface, This is useful for simulating an Internet connection to ISP.
Usually passive-interface lo1 is recommended.
R1 (config) # ip route 0.0.0.0 0.0.0.0 lo1
Go to Router Configuration
Process ID = 1 (Note: Process ID is locally significant
R1 (config) # router ospf 1 / router os 1
Router ID
(Note: Router ID is network significant that can affect Router Election)
R1 (config-router) # router-id 1.1.1.1
Network to be advertised OSPF
Advertising Link-State Updates (LSUs) within Backbone Area (Area 0)
R1 (config-router) # network 192.168.1.0 0.0.0.255 area 0 (for single-area in backbone area)
R1 (config-router) # network 192.168.2.0 0.0.0.255 area 1 (for multi-area)
Passive Interface (to prevent sending or receiving LSUs)
R1 (config-router) # passive-interface lo1 / pass lo1
or
R1 (config-router) # passive-interface default / pass def
Propagate and redistribute
R1 (config-router) # default-information originate / def orig
Auto-Cost Reference-Bandwidth
Unit is in Mbps. Default is 100 Mbps. Using 1 Gbps = 1000 Mbps as example.
R1 (config-router) # auto-cost reference-bandwidth 1000 / auto ref 1000
OSPF Cost to Specific Interface
Using serial 0/0/1 and 16000 as example.
R1 (config) # interface s0/0/1
R1 (config-if) # ip ospf cost 16000
OSPF Priority for DR, BDR and DROther to Specific Interface
(Default = 1 and Maximum = 255)
R1 (config) # interface g0/1
R1 (config-if) # ip ospf priority 100
R1 (config-if) # end
Note: Remember to adjust the priority for all other routers at specific interfaces.
Save all configurations. Then reload to ensure status change in DR, BDR and DROther for all routers.
Clear OSPF Process ID
R1 (config-router) # end
R1 # wr (Note: Always remember to save all your running config to startup config)
R1 # ip clear ospf 1 process
Then reload the startup config.
R1# reload
Clock Rate to DCE Interface
Unit is in bps.
R1 (config) # int s0/0/0
R1 (config-if) # clock rate 128000
Bandwidth to Specific Interface
Unit is in kbps. Default for Serial is 1544 kbps that produces the Link Cost of 64.
R1 (config) # int s0/0/1
R1 (config-if) # bandwidth 128 or band 128
Default static route
Using Loopback 1 as exit interface, This is useful for simulating an Internet connection to ISP.
Usually passive-interface lo1 is recommended.
R1 (config) # ip route 0.0.0.0 0.0.0.0 lo1
Go to Router Configuration
Process ID = 1 (Note: Process ID is locally significant
R1 (config) # router ospf 1 / router os 1
Router ID
(Note: Router ID is network significant that can affect Router Election)
R1 (config-router) # router-id 1.1.1.1
Network to be advertised OSPF
Advertising Link-State Updates (LSUs) within Backbone Area (Area 0)
R1 (config-router) # network 192.168.1.0 0.0.0.255 area 0 (for single-area in backbone area)
R1 (config-router) # network 192.168.2.0 0.0.0.255 area 1 (for multi-area)
Passive Interface (to prevent sending or receiving LSUs)
R1 (config-router) # passive-interface lo1 / pass lo1
or
R1 (config-router) # passive-interface default / pass def
Propagate and redistribute
R1 (config-router) # default-information originate / def orig
Auto-Cost Reference-Bandwidth
Unit is in Mbps. Default is 100 Mbps. Using 1 Gbps = 1000 Mbps as example.
R1 (config-router) # auto-cost reference-bandwidth 1000 / auto ref 1000
OSPF Cost to Specific Interface
Using serial 0/0/1 and 16000 as example.
R1 (config) # interface s0/0/1
R1 (config-if) # ip ospf cost 16000
OSPF Priority for DR, BDR and DROther to Specific Interface
(Default = 1 and Maximum = 255)
R1 (config) # interface g0/1
R1 (config-if) # ip ospf priority 100
R1 (config-if) # end
Note: Remember to adjust the priority for all other routers at specific interfaces.
Save all configurations. Then reload to ensure status change in DR, BDR and DROther for all routers.
Clear OSPF Process ID
R1 (config-router) # end
R1 # wr (Note: Always remember to save all your running config to startup config)
R1 # ip clear ospf 1 process
Then reload the startup config.
R1# reload
Basic Device Configuration
Hostname
Router (config) # hostname R1 / host R1
Router (config) # no ip domain-lookup / no ip domain-look
Encrypt Plaintext Passwords
Router (config) # service pass-encryption / service pass
Privileged Exec Password
Router (config) # enable secret class / enable sec class
Console
Router (config) # line console 0 / line con 0
Router (config-line) # password cisco / pass cisco
Router (config-line) # login
Router (config-line) # logging synchronous / logging syn
Router (config-line) # no exec (optional to disable console timeout to avoid hassle of re-entering passwords)
Router (config-line) # exit
VTY
Router (config) # line vty 0 15
Router (config-line) # password cisco / pass cisco
Router (config-line) # login
Router (config-line) # logging synchronous / logging syn
Router (config-line) # exit
Banner
Router (config) # banner motd #For Authorised Access Only#
Saving Running Configuration to Startup-Configuration
Router # copy running-config startup-config / copy run start / write mem / write / wr
(Note: wr is the fastest as it saves you the hassle to choose Y/N after executing a copy run start command)
Do Command
This command allows you to execute from a higher configuration level.
For example:
Router (config) # end
Router # write
You can simply do this to save you the hassle to exit or end from higher level:
Router (config) # do wr
Show Running Configuration
R1 # show running-config
or from other level
R1 (config-router) # do sh ru
Router (config) # enable secret class / enable sec class
Console
Router (config) # line console 0 / line con 0
Router (config-line) # password cisco / pass cisco
Router (config-line) # login
Router (config-line) # logging synchronous / logging syn
Router (config-line) # no exec (optional to disable console timeout to avoid hassle of re-entering passwords)
Router (config-line) # exit
VTY
Router (config) # line vty 0 15
Router (config-line) # password cisco / pass cisco
Router (config-line) # login
Router (config-line) # logging synchronous / logging syn
Router (config-line) # exit
Banner
Router (config) # banner motd #For Authorised Access Only#
Saving Running Configuration to Startup-Configuration
Router # copy running-config startup-config / copy run start / write mem / write / wr
(Note: wr is the fastest as it saves you the hassle to choose Y/N after executing a copy run start command)
Do Command
This command allows you to execute from a higher configuration level.
For example:
Router (config) # end
Router # write
You can simply do this to save you the hassle to exit or end from higher level:
Router (config) # do wr
Show Running Configuration
R1 # show running-config
or from other level
R1 (config-router) # do sh ru
Subscribe to:
Posts (Atom)