Static Routing/ Route
Static Routing is a process in which routing is performed with the help of manually configured routes in router. In static routing all the remote networks are configured on routers connected in network.
Command to Configure Static Route of networks in router
ip route <other network address> <subnet mask> <source exit interface number/ destination entry interface IP Address>
Default Route
Default Route is a setting which is used to define the rules of packet forwarding which are to be used when there is no specific route is determined in network to forward the packet for the given IP (Internet Protocol) address of destination. All packets having destination addresses which are not in routing table are sent through Default Route from one network to other network.
Command to Configure Default Route of networks in router
ip route 0.0.0.0 0.0.0.0 <source exit interface number/ destination entry interface IP Address>
Configuration
Test Router 1
Router>enable
Router#configure terminal
Router(config)#hostname TestRouter1
TestRouter1(config)#enable password cisco (Plain Text Password)
TestRouter1(config)#enable secret class (Enycrpted Password)
TestRouter1(config)#username TestRouter secret csico
TestRouter1(config)#ip domain-name cisco.com
TestRouter1(config)#crypto key generate rsa
(Set key between 360 - 2048)
TestRouter1(config)#line console 0
TestRouter1(config-line)#password cisco
TestRouter1(config-line)#login
TestRouter1(config-line)#exit
TestRouter1(config)#line vty 0 4
TestRouter1(config-line)#transport input ssh
TestRouter1(config-line)#login local
TestRouter1(config-line)#exit
TestRouter1(config)#interface gigabitEthernet 0/0
TestRouter1(config-if)#ip address 192.168.1.1 255.255.255.0
TestRouter1(config-if)#no shutdown
TestRouter1(config-if)#exit
TestRouter1(config)#interface gigabitEthernet 0/1
TestRouter1(config-if)#ip address 192.168.2.1 255.255.255.0
TestRouter1(config-if)#no shutdown
TestRouter1(config-if)#exit
TestRouter1(config)#interface serial 0/0/0
TestRouter1(config-if)#ip address 172.16.1.1 255.255.255.252
TestRouter1(config-if)#no shutdown
TestRouter1(config-if)#exit
!Static and Default Route Configuration
TestRouter1(config)#ip route 192.168.3.0 255.255.255.0 (serial 0/0/0)/ (172.16.1.2)
TestRouter1(config)#ip route 192.168.4.0 255.255.255.0 (serial 0/0/0)/ (172.16.1.2)
TestRouter1(config)#ip route 0.0.0.0 0.0.0.0 (serial 0/0/0)/ (172.16.1.2)
TestRouter1(config)#exit
TestRouter1#copy running-config startup-config
TestRouter1(config)#ip route 192.168.3.0 255.255.255.0 (serial 0/0/0)/ (172.16.1.2)
Test Router 2
Router>enable
Router#configure terminal
Router(config)#hostname TestRouter2
TestRouter2(config)#enable password cisco (Plain Text Password)
TestRouter2(config)#enable secret class (Enycrpted Password)
TestRouter2(config)#username TestRouter secret csico
TestRouter2(config)#ip domain-name cisco.com
TestRouter2(config)#crypto key generate rsa
(Set key between 360 - 2048)
TestRouter2(config)#line console 0
TestRouter2(config-line)#password cisco
TestRouter2(config-line)#login
TestRouter2(config-line)#exit
TestRouter2(config)#line vty 0 4
TestRouter2(config-line)#transport input ssh
TestRouter2(config-line)#login local
TestRouter2(config-line)#exit
TestRouter2(config)#interface gigabitEthernet 0/0
TestRouter2(config-if)#ip address 192.168.3.1 255.255.255.0
TestRouter2(config-if)#no shutdown
TestRouter2(config-if)#exit
TestRouter2(config)#interface gigabitEthernet 0/1
TestRouter2(config-if)#ip address 192.168.4.1 255.255.255.0
TestRouter2(config-if)#no shutdown
TestRouter2(config-if)#exit
TestRouter2(config)#interface serial 0/0/0
TestRouter2(config-if)#ip address 172.16.1.2 255.255.255.252
TestRouter2(config-if)#no shutdown
TestRouter2(config-if)#exit
!Static and Default Route Configuration
TestRouter2(config)#ip route 192.168.1.0 255.255.255.0 (serial 0/0/0)/ (172.16.1.1)
TestRouter2(config)#ip route 192.168.2.0 255.255.255.0 (serial 0/0/0)/ (172.16.1.1)
TestRouter2(config)#ip route 0.0.0.0 0.0.0.0 (serial 0/0/0)/ (172.16.1.1)
TestRouter2(config)#exit
TestRouter2#copy running-config startup-config
TestRouter2(config)#ip route 192.168.1.0 255.255.255.0 (serial 0/0/0)/ (172.16.1.1)
Test Switch 1
Switch>enable
Switch#configure terminal
Switch(config)#hostname TestSwitch1
TestSwitch1(config)#enable password cisco (Plain Text Password)
TestSwitch1(config)#enable secret class (Enycrpted Password)
TestSwitch1(config)#line console 0
TestSwitch1(config-line)#password cisco
TestSwitch1(config-line)#login
TestSwitch1(config-line)#exit
TestSwitch1(config)#line vty 0 15
TestSwitch1(config-line)#password cisco
TestSwitch1(config-line)#login
TestSwitch1(config-line)#exit
TestSwitch1(config)#exit
TestSwitch1#copy running-config startup-config
Test Switch 2
Switch>enable
Switch#configure terminal
Switch(config)#hostname TestSwitch2
TestSwitch2(config)#enable password cisco (Plain Text Password)
TestSwitch2(config)#enable secret class (Enycrpted Password)
TestSwitch2(config)#line console 0
TestSwitch2(config-line)#password cisco
TestSwitch2(config-line)#login
TestSwitch2(config-line)#exit
TestSwitch2(config)#line vty 0 15
TestSwitch2(config-line)#password cisco
TestSwitch2(config-line)#login
TestSwitch2(config-line)#exit
TestSwitch2(config)#exit
TestSwitch2#copy running-config startup-config
Switch>enable
Switch#configure terminal
Switch(config)#hostname TestSwitch2
TestSwitch2(config)#enable password cisco (Plain Text Password)
TestSwitch2(config)#enable secret class (Enycrpted Password)
TestSwitch2(config)#line console 0
TestSwitch2(config-line)#password cisco
TestSwitch2(config-line)#login
TestSwitch2(config-line)#exit
TestSwitch2(config)#line vty 0 15
TestSwitch2(config-line)#password cisco
TestSwitch2(config-line)#login
TestSwitch2(config-line)#exit
TestSwitch2(config)#exit
TestSwitch2#copy running-config startup-config
Test Switch 3
Switch>enable
Switch#configure terminal
Switch(config)#hostname TestSwitch3
TestSwitch3(config)#enable password cisco (Plain Text Password)
TestSwitch3(config)#enable secret class (Enycrpted Password)
TestSwitch3(config)#line console 0
TestSwitch3(config-line)#password cisco
TestSwitch3(config-line)#login
TestSwitch3(config-line)#exit
TestSwitch3(config)#line vty 0 15
TestSwitch3(config-line)#password cisco
TestSwitch3(config-line)#login
TestSwitch3(config-line)#exit
TestSwitch3(config)#exit
TestSwitch3#copy running-config startup-config
Switch>enable
Switch#configure terminal
Switch(config)#hostname TestSwitch3
TestSwitch3(config)#enable password cisco (Plain Text Password)
TestSwitch3(config)#enable secret class (Enycrpted Password)
TestSwitch3(config)#line console 0
TestSwitch3(config-line)#password cisco
TestSwitch3(config-line)#login
TestSwitch3(config-line)#exit
TestSwitch3(config)#line vty 0 15
TestSwitch3(config-line)#password cisco
TestSwitch3(config-line)#login
TestSwitch3(config-line)#exit
TestSwitch3(config)#exit
TestSwitch3#copy running-config startup-config
Test Switch 4
Switch>enable
Switch#configure terminal
Switch(config)#hostname TestSwitch4
TestSwitch4(config)#enable password cisco (Plain Text Password)
TestSwitch4(config)#enable secret class (Enycrpted Password)
TestSwitch4(config)#line console 0
TestSwitch4(config-line)#password cisco
TestSwitch4(config-line)#login
TestSwitch4(config-line)#exit
TestSwitch4(config)#line vty 0 15
TestSwitch4(config-line)#password cisco
TestSwitch4(config-line)#login
TestSwitch4(config-line)#exit
TestSwitch4(config)#exit
Switch>enable
Switch#configure terminal
Switch(config)#hostname TestSwitch4
TestSwitch4(config)#enable password cisco (Plain Text Password)
TestSwitch4(config)#enable secret class (Enycrpted Password)
TestSwitch4(config)#line console 0
TestSwitch4(config-line)#password cisco
TestSwitch4(config-line)#login
TestSwitch4(config-line)#exit
TestSwitch4(config)#line vty 0 15
TestSwitch4(config-line)#password cisco
TestSwitch4(config-line)#login
TestSwitch4(config-line)#exit
TestSwitch4(config)#exit
No comments:
Post a Comment