CISCO Router Commands: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
Line 243: Line 243:
<pre>
<pre>
show ip rip database
show ip rip database
</pre>
=== EIGRP ===
<pre>
enable
configure terminal
!
router eigrp 1
no auto summary
network 192.168.10.0 0.0.0.255
network 192.168.20.0 0.0.0.255
network 10.1.1.0 0.0.0.3
!
passive-interface fa0/0
</pre>
==== Show ====
<pre>
show ip eigrp neighbors
show ip eigrp topology
show ip route
</pre>
</pre>



Revision as of 05:35, 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

Relay

enable
configure terminal
!
ip helper-address x.x.x.x

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

As the AS number is the same for local and remote it is concidered iBGP. Making the local and remote AS number different make it eBGP.

Router 1

enable
configure terminal
!
router bgp 1001
neighbor 192.51.100.2 remote-as 1001
exit

Router 2

enable
configure terminal
!
router bgp 1001
neighbor 198.51.100.1 remote-as 1001

Show

enable
!
show ip bgp neighbors
show ip bgp summary

RIP

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

EIGRP

enable
configure terminal
!
router eigrp 1
no auto summary
network 192.168.10.0 0.0.0.255
network 192.168.20.0 0.0.0.255
network 10.1.1.0 0.0.0.3
!
passive-interface fa0/0

Show

show ip eigrp neighbors
show ip eigrp topology
show ip route

Disable Domain Lookup

no ip domain lookup