CISCO Router Commands: Difference between revisions
From KlavoWiki
Jump to navigationJump to search
Line 156: | Line 156: | ||
==== Hello Interval ==== | ==== Hello Interval ==== | ||
All routers must be set the same | All routers must be set the same. Defaults as below. | ||
<pre> | <pre> | ||
enable | enable | ||
Line 163: | Line 163: | ||
interface FastEthernet 0/0 | interface FastEthernet 0/0 | ||
ip ospf hello-interval 5 | ip ospf hello-interval 5 | ||
ip ospf dead-interval | ip ospf dead-interval 40 | ||
</pre> | </pre> | ||
Revision as of 05:01, 12 February 2017
IP Settings
enable configure terminal ! interface fa0/0 ip address 192.168.1.200 255.255.255.0 no shutdown exit ! interface fa1/0 ip address 172.16.1.254 255.255.255.0 no shutdown exit
Multiple VLAN Single Interface
enable configure terminal ! interface FastEthernet 0/0 no shutdown ! interface FastEthernet 0/0.10 encapsulation dot1Q 10 ip address 192.168.1.254 255.255.255.0 ! interface FastEthernet 0/0.20 encapsulation dot1Q 20 ip address 192.168.2.254 255.255.255.0 ! interface FastEthernet 0/0.30 encapsulation dot1Q 30 ip address 192.168.3.254 255.255.255.0 ! exit
Show
enable ! show ip interface brief ! show interfaces show interfaces FastEthernet 0/0 show interfaces Port-channel 1
Loopback
Create
enable configure terminal ! interface loopback 1 ip address 172.18.101.9 255.255.255.255 exit ! interface loopback 2 ip address 10.77.101.5 255.255.254.0 exit
Delete
enable configure terminal ! no interface loopback 2 exit
DHCP
enable configure terminal ! ip dhcp pool Sales network 192.168.10.0 255.255.255.0 default-router 192.168.10.1 dns-server 8.8.8.8 lease h m s exit ! ip dhcp pool Admin network 192.168.20.0 255.255.255.0 default-router 192.168.20.1 exit
Show
enable ! show ip dhcp binding show ip dhcp conflict show ip dhcp relay ! show dhcp lease
Routes
Default
enable configure terminal ! ip route 0.0.0.0 0.0.0.0 FastEthernet 0/0
Static
enable configure terminal ! ip route 192.168.22.0 255.255.255.0 FastEthernet 0/0 20 ip route 172.30.11.0 255.255.255.0 FastEthernet 0/3 10
Automatic
OSPF
Advertising
Advertise each subnet to be distributed. The subnet needs to exist on the router for the route to be distributed.
router ospf 1 network 192.168.1.0 0.0.0.255 area 0 network 172.16.12.0 0.0.3.255 area 0
Exclude
Exclude an interface from OSPF broadcasts
enable configure terminal ! router ospf passive-interface FastEthernet 0/0
OSPF Static Routes
To distribute static routes. Needs to be completed on each router that has a static route that needs to be part of OSPF.
enable configure terminal ! router ospf 1 redistribute static subnets
Hello Interval
All routers must be set the same. Defaults as below.
enable configure terminal ! interface FastEthernet 0/0 ip ospf hello-interval 5 ip ospf dead-interval 40
Show
enable ! show ip ospf interface show ip ospf database show ip ospf neighbor show ip protocols show ip ospf interface FastEthernet 3/0
BGP
RIP
Advertise
The no auto-summary allows subprefix routing information to pass across classful network boundaries.
enable configure terminal ! router rip version 2 no auto-summary network 192.168.1.0 network 172.30.24.0
Exclude Interface
Disable RIP broadcasts from a particular interface.
enable configure terminal ! router rip passive-interface FastEthernet 3/0
Show
show ip rip database
Disable Domain Lookup
no ip domain lookup