RIPv2 & OSPF Basic Configuration Guide for Cisco Routers
RIPv2 Basic Configuration
Configuring Router-Switch Connections
R1(config)#interface fa0/0
R1(config-if)#ip address 172.30.1.1 255.255.255.0
R1(config-if)#duplex auto
R1(config-if)#speed auto
R1(config-if)#no shutdown
R1(config)#interface se0/0/0
R1(config-if)#ip address 209.165.200.230 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
Configuring RIPv2
R1(config)#router rip
R1(config-router)#passive-interface fa0/0
R1(config-router)#passive-interface fa0/1
R1(config-router)#network 172.30.0.0
R1(config-router)#network 109.165.200.0
R1(config)#line con 0
R1(config-line)#line vty 0 4
R1(config-line)#login
R2(config)#interface fa0/0
R2(config-if)#ip address 10.1.0.1 255.255.0.0
R2(config-if)#duplex auto
R2(config-if)#speed auto
R2(config-if)#no shutdown
R2(config)#interface serial 0/0/0
R2(config-if)#ip address 109.65.200.229 255.255.255.252
R2(config-if)#no shutdown
R2(config)#interface serial 0/0/1
R2(config-if)#ip address 209.165.200.233 255.255.255.252
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
R2(config)#router rip
R2(config-router)#passive-interface fastethernet 0/0
R2(config-router)#network 10.0.0.0
R2(config-router)#network 209.165.200.0
R2(config)#line con 0
R2(config-line)#line vty 0 4
R2(config-line)#login
R2#show ip interface brief
R3(config)#interface fa0/0
R3(config-if)#ip address 172.30.100.1 255.255.255.0
R3(config-if)#duplex auto
R3(config-if)#speed auto
R3(config-if)#no shutdown
R3(config)#interface s0/0/1
R3(config-if)#ip address 209.165.200.234 255.255.255.252
R3(config-if)#no shutdown
R3(config)#interface loopback0
R3(config-if)#ip address 172.30.110.1 255.255.255.0
R3(config)#interface loopback1
R3(config-if)#ip address 172.30.200.17 255.255.255.240
R3(config)#router rip
R3(config-router)#passive-interface fa0/0
R3(config-router)#network 172.30.0.0
R3(config-router)#network 209.15.200.0
R3(config)#line con 0
R3(config-line)#line vty 0 4
R3(config-line)#login
Enabling RIP Version 2
R2(config)#router rip
R2(config-router)#version 2
R1(config)#router rip
R1(config-router)#version 2
R3(config)#router rip
R3(config-router)#version 2
Disabling Automatic Summarization
R2(config)#router rip
R2(config-router)#no auto-summary
R1(config)#router rip
R1(config-router)#no auto-summary
R3(config)#router rip
R3(config-router)#no auto-summary
OSPF Basic Configuration
Configuring Router Interfaces
R1(config)#interface fa0/0
R1(config-if)#ip address 172.16.1.17 255.255.255.240
R1(config-if)#no shutdown
R1(config)#interface s0/0/0
R1(config-if)#ip address 192.168.10.1 255.255.255.252
R1(config-if)#no shutdown
R1(config)#interface s0/0/1
R1(config-if)#ip address 192.168.10.5 255.255.255.252
R1(config-if)#no shutdown
R2(config)#interface fa0/0
R2(config-if)#ip address 10.10.10.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface s0/0/0
R2(config-if)#ip address 192.168.10.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#interface s0/0/1
R2(config-if)#ip address 192.168.10.9 255.255.255.252
R2(config-if)#no shutdow
R3(config)#interface fa0/0
R3(config-if)#ip address 172.16.1.33 255.255.255.248
R3(config-if)#no shutdown
R3(config-if)#interface s0/0/0
R3(config-if)#ip address 192.168.10.6 255.255.255.252
R3(config-if)#no shutdown
R3(config-if)#interface s0/0/1
R3(config-if)#ip address 192.168.10.10 255.255.255.252
R3(config-if)#no shutdown
Configuring OSPF on Routers
R1(config)#router ospf 1
R1(config-router)#network 172.16.1.16 0.0.0.15 area 0
R1(config-router)#network 192.168.10.0 0.0.0.3 area 0
R1(config-router)#network 192.168.10.4 0.0.0.3 area 0
R2(config)#router ospf 1
R2(config-router)#network 10.10.10.0 0.0.0.255 area 0
R2(config-router)#network 192.168.10.0 0.0.0.3 area 0
R2(config-router)#network 192.168.10.8 0.0.0.3 area 0
R3(config)#router ospf 1
R3(config-router)#network 172.16.1.32 0.0.0.7 area 0
R3(config-router)#network 192.168.10.4 0.0.0.3 area 0
R3(config-router)#network 192.168.10.8 0.0.0.3 area 0
Changing Router IDs with Loopback Addresses
R1(config)#interface loopback 0
R1(config-if)#ip address 10.1.1.1 255.255.255.255
R2(config)#interface loopback 0
R2(config-if)#ip address 10.2.2.2 255.255.255.255
R3(config)#interface loopback 0
R3(config-if)#ip address 10.3.3.3 255.255.255.255
Saving Configuration and Reloading
R1#copy running-config startup-config
R1#reload
Configuring OSPF Cost
Adjusting Serial Interface Bandwidth
R1(config)#interface serial0/0/0
R1(config-if)#bandwidth 64
R1(config-if)#interface serial0/0/1
R1(config-if)#bandwidth 64
R2(config)#interface serial0/0/0
R2(config-if)#bandwidth 64
R2(config)#interface serial0/0/1
R2(config-if)#bandwidth 64
Setting OSPF Cost on R3 Serial Interfaces
R3(config)#interface serial0/0/0
R3(config-if)#ip ospf cost 1562
R3(config-if)#interface serial0/0/1
R3(config-if)#ip ospf cost 1562
Redistributing a Default OSPF Route
Simulating ISP Link with Loopback
R1(config)#interface loopback1
R1(config-if)#ip address 172.30.1.1 255.255.255.252
Creating Default Route
R1(config)#ip route 0.0.0.0 0.0.0.0 loopback1
Redistributing Default Route via OSPF
R1(config)#router ospf 1
R1(config-router)#default-information originate