CISCO Router Commands: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
Line 109: Line 109:


=== OSPF ===
=== OSPF ===
Advertise each subnet to be distributed.  The subnet needs to exist on the router for the route to be distributed.
<pre>
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
</pre>
==== 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.
<pre>
enable
configure terminal
!
router ospf 1
redistribute static subnets
</pre>


=== BGP ===
=== BGP ===

Revision as of 01:20, 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

Loopback

enable
configure terminal
!
interface loopback 1
ip address 172.16.0.254 255.255.255.252
exit

Show

enable
!
show ip interface brief
!
show interfaces
show interfaces FastEthernet 0/0
show interfaces Port-channel 1

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

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

=== 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

BGP

RIP