CCNA 4 - Configure IP Routing Protocols

By Sheldon L Published at 2020-05-14 Updated at 2020-05-14


Configuration

Tips for Configuration


ip subnet-zero

line aux 0
password [password]
login

# Pipe
sh run | ?
sh run | begin interface
sh ip route | include 192.168.3.32

# Serial Interface Commands
int s0/0/0     # slot/subslot/port
clock rate ?        # need if controller differs
clock rate 1000000
sh controllers s0/0/0
bandwidth ?
bandwidth 1000

# Bringing Up an Interface
int f0/1

ip address [address] [musk]  # connected routes
ip address 172.16.10.2 255.255.255.0
ip address 172.16.20.2 255.255.255.0 secondary
do sh run

ip route                     # static routes

router rip  # nothing
ip routing
router rip  # something

ip address [address] [musk] encapsulation dot1q [vlan-id] native

channel-group
no switchport

Host# arp -a
Router# show ip route
Router# show ip arp
Router# show ip interface

Exercise

Configure hostname, IP, description, controller, login and banner

Router# erase startup-config
Router# reload

Router# show controllers int

Router(config)# hostname Corp
Corp(config)# enable secret GlobalNet

! Stops the router from trying to resolve hostnames
! which is an annoying feature unless you’ve configured a host table or DNS.
Corp(config)# no ip domain-lookup

! F0/0
Corp(config)# int f0/0
Corp(config-if)# desc Connection to LAN BackBone
Corp(config-if)# ip address 10.10.10.1 255.255.255.0
Corp(config-if)# no shut

! S0/0
Corp(config-if)# int s0/0
Corp(config-if)# desc WAN connection to SF
Corp(config-if)# ip address 172.16.10.1 255.255.255.252
Corp(config-if)# no shut

! S0/1
Corp(config-if)# int s0/1
Corp(config-if)# desc WAN connection to LA
Corp(config-if)# ip address 172.16.10.5 255.255.255.252
Corp(config-if)# no shut

! console
Corp(config-if)# line con 0
Corp(config-line)# password console
Corp(config-line)# logging
Corp(config-line)# logging sync
Corp(config-line)# exit

! vty
Corp(config)# line vty 0 ?
<1-181> Last Line number
<cr>
Corp(config)# line vty 0 181
Corp(config-line)# password telnet
Corp(config-line)# login
Corp(config-line)# exit

! banner
Corp(config)# banner motd # This is my Corp Router #
Corp(config)#^Z

! save
Corp# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]

! verification
Corp# sh ip route
[Unimportant...]
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, FastEthernet0/0
L 10.10.10.1/32 is directly connected, FastEthernet0/0
Corp#
! you won’t see the serial interfaces come up
! until the other side of the links are operational
Router# erase startup-config
Router# reload

Router# show controllers int

Router(config)# hostname SF
SF(config)# enable secret GlobalNet

SF(config)# no ip domain-lookup

SF(config)# int s0/0/0
SF(config-if)# desc WAN Connection to Corp
SF(config-if)# ip address 172.16.10.2 255.255.255.252
SF(config-if)# no shut

! Since the SF router has a DCE cable connection,
! I needed to add clock rate to this interface because DTE receives clock.
! Keep in mind that the new ISR routers will autodetect this
! and set the clock rate to 2000000.
SF(config-if)# clock rate 1000000

SF(config-if)# int f0/0
SF(config-if)# desc SF LAN
SF(config-if)# ip address 192.168.10.1 255.255.255.0
SF(config-if)# no shut

SF(config-if)# line con 0
SF(config-line)# password console
SF(config-line)# login
SF(config-line)# logging sync
SF(config-line)# exit

SF(config)# line vty 0 ?
<1-1180> Last Line number
<cr>
SF(config)# line vty 0 1180
SF(config-line)# password telnet
SF(config-line)# login

SF(config-line)# banner motd #This is the SF Branch router#
SF(config)# exit

SF# copy run start
Destination filename [startup-config]?
Building configuration...
[OK]

! look at configuration of the interfaces
SF# sh run | begin int
SF# sh ip int brief
SF# sh ip route
C 192.168.10.0/24 is directly connected, FastEthernet0/0
L 192.168.10.1/32 is directly connected, FastEthernet0/0
172.16.0.0/30 is subnetted, 1 subnets
C 172.16.10.0 is directly connected, Serial0/0/0
L 172.16.10.2/32 is directly connected, Serial0/0/0

! Serial shown, we can now ping to the Corp router from SF
SF# ping 172.16.10.1

Corp> sh ip route
172.16.0.0/30 is subnetted, 1 subnets
C 172.16.10.0 is directly connected, Serial0/0
L 172.16.10.1/32 is directly connected, Serial0/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, FastEthernet0/0
L 10.10.10.1/32 is directly connected, FastEthernet0/0
! Serial shown

! see our clocking in FS
SF# sh controllers s0/0/0
Interface Serial0/0/0
Hardware is GT96K
DCE V.35, clock rate 1000000

! see our clocking in Corp
Corp> sh controllers s0/0
Interface Serial0/0
Hardware is PowerQUICC MPC860
DTE V.35 TX and RX clocks detected.

Router# show controllers int

Router(config)# hostname LA
LA(config)# enable secret GlobalNet
LA(config)# no ip domain-lookup

LA(config)# int s0/0/1
LA(config-if)# ip address 172.16.10.6 255.255.255.252
LA(config-if)# no shut
LA(config-if)# clock rate 1000000
LA(config-if)# description WAN To Corporate

LA(config-if)# int f0/0
LA(config-if)# ip address 192.168.20.1 255.255.255.0
LA(config-if)# no shut
LA(config-if)# description LA LAN

LA(config-if)# line con 0
LA(config-line)# password console
LA(config-line)# login
LA(config-line)# logging sync
LA(config-line)# exit

LA(config)# line vty 0 ?
<1-1180> Last Line number
<cr>
LA(config)# line vty 0 1180
LA(config-line)# password telnet
LA(config-line)# login
LA(config-line)# exit
LA(config)# banner motd #This is my LA Router#
LA(config)# exit
LA#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]

LA# sh ip route

Configure DHCP and DNS

Corp# config t
Corp(config)# ip dhcp excluded-address 192.168.10.1
Corp(config)# ip dhcp excluded-address 192.168.20.1

Corp(config)# ip dhcp pool SF_LAN
Corp(dhcp-config)# network 192.168.10.0 255.255.255.0
Corp(dhcp-config)# default-router 192.168.10.1
Corp(dhcp-config)# dns-server 4.4.4.4
Corp(dhcp-config)# exit

Corp(config)# ip dhcp pool LA_LAN
Corp(dhcp-config)# network 192.168.20.0 255.255.255.0
Corp(dhcp-config)# default-router 192.168.20.1
Corp(dhcp-config)# dns-server 4.4.4.4
Corp(dhcp-config)# exit

Corp# copy run start
Destination filename [startup-config]?
Building configuration...

! Remote LA
LA# config t
LA(config)# int f0/0
LA(config-if)# ip helper-address 172.16.10.5

! Remote SF
SF# config t
SF(config)# int f0/0
SF(config-if)# ip helper-address 172.16.10.1

Configure the Static Routing

ip route [dest_network] [mask] [next-hop|exit_interface] [admin_distance] [permanent]
! Static Routing in Corp
Corp# config t
Corp(config)# ip route 192.168.10.0 255.255.255.0 172.16.10.2 150
Corp(config)# ip route 192.168.20.0 255.255.255.0 s0/1 150

Corp(config)# do show run | begin ip route
ip route 192.168.10.0 255.255.255.0 172.16.10.2 150
ip route 192.168.20.0 255.255.255.0 Serial0/1 150

Corp(config)# do show ip route
S 192.168.10.0/24 [150/0] via 172.16.10.2
172.16.0.0/30 is subnetted, 2 subnets
C 172.16.10.4 is directly connected, Serial0/1
L 172.16.10.5/32 is directly connected, Serial0/1
C 172.16.10.0 is directly connected, Serial0/0
L 172.16.10.1/32 is directly connected, Serial0/0
S 192.168.20.0/24 is directly connected, Serial0/1
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, FastEthernet0/0
L 10.10.10.1/32 is directly connected, FastEthernet0/0
! Instead of using a next-hop address, we can use an exit interface
! that will make the route show up as a directly connected network.
! The default AD of directly connected is 1, we set 150 here,
! for floating static route, AD should be high.
! If the routes don’t appear in the routing table,
! it’s because the router can’t communicate with the next-hop address.
! But you can still use the permanent parameter to keep the route.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! Static Routing in SF
! We’ll never create a static route to any network we're directly connected to.
! We must use the next hop of 172.16.10.1 since that’s our only router connection.
SF(config)# ip route 10.10.10.0 255.255.255.0 172.16.10.1 150
SF(config)# ip route 172.16.10.4 255.255.255.252 172.16.10.1 150
SF(config)# ip route 192.168.20.0 255.255.255.0 172.16.10.1 150

SF(config)# do show run | begin ip route
ip route 10.10.10.0 255.255.255.0 172.16.10.1 150
ip route 172.16.10.4 255.255.255.252 172.16.10.1 150
ip route 192.168.20.0 255.255.255.0 172.16.10.1 150

SF(config)#do show ip route
C 192.168.10.0/24 is directly connected, FastEthernet0/0
L 192.168.10.1/32 is directly connected, FastEthernet0/0
172.16.0.0/30 is subnetted, 3 subnets
S 172.16.10.4 [150/0] via 172.16.10.1
C 172.16.10.0 is directly connected, Serial0/0/0
L 172.16.10.2/32 is directly connected, Serial0/0
S 192.168.20.0/24 [150/0] via 172.16.10.1
10.0.0.0/24 is subnetted, 1 subnets
S 10.10.10.0 [150/0] via 172.16.10.1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! Static Routing in LA
LA# config t
LA(config)# ip route 10.10.10.0 255.255.255.0 172.16.10.5 150
LA(config)# ip route 172.16.10.0 255.255.255.252 172.16.10.5 150
LA(config)# ip route 192.168.10.0 255.255.255.0 172.16.10.5 150

LA(config)# do show run | begin ip route
ip route 10.10.10.0 255.255.255.0 172.16.10.5 150
ip route 172.16.10.0 255.255.255.252 172.16.10.5 150
ip route 192.168.10.0 255.255.255.0 172.16.10.5 150

LA(config)#do sho ip route
S 192.168.10.0/24 [150/0] via 172.16.10.5
172.16.0.0/30 is subnetted, 3 subnets
C 172.16.10.4 is directly connected, Serial0/0/1
L 172.16.10.6/32 is directly connected, Serial0/0/1
S 172.16.10.0 [150/0] via 172.16.10.5
C 192.168.20.0/24 is directly connected, FastEthernet0/0
L 192.168.20.1/32 is directly connected, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
S 10.10.10.0 [150/0] via 172.16.10.5

Configure the Default Routing

ip route 0.0.0.0 0.0.0.0 [default_gateway]
LA# config t
LA(config)# no ip route 10.10.10.0 255.255.255.0 172.16.10.5 150
LA(config)# no ip route 172.16.10.0 255.255.255.252 172.16.10.5 150
LA(config)# no ip route 192.168.10.0 255.255.255.0 172.16.10.5 150
LA(config)# ip route 0.0.0.0 0.0.0.0 172.16.10.5

LA(config)# do sho ip route
[output cut]
ip route 10.10.10.0 255.255.255.0 172.16.10.5 150
ip route 172.16.10.0 255.255.255.252 172.16.10.5 150
ip route 192.168.10.0 255.255.255.0 172.16.10.5 150
route 0.0.0.0 0.0.0.0 172.16.10.5

! Same as SF
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! Verification
Corp# ping 192.168.10.1
Corp# ping 192.168.20.1

! DHCP clients
SF_PC(config)#int e0
SF_PC(config-if)#ip address dhcp
SF_PC(config-if)#no shut
Interface Ethernet0 assigned DHCP address 192.168.10.8, mask 255.255.255.0
LA_PC(config)#int e0
LA_PC(config-if)#ip addr dhcp
LA_PC(config-if)#no shut
Interface Ethernet0 assigned DHCP address 192.168.20.4, mask 255.255.255.0

! Verify DHCP server
Corp# sh ip dhcp binding
Corp# sh ip dhcp pool SF_LAN
Corp# sh ip dhcp pool SA_LAN
Corp# sh ip dhcp conflict

Configure the Dynamic Routing

RIP

! RIP in Corp
Corp# sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.10.10.1 YES manual up up
Serial0/0 172.16.10.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/1 172.16.10.5 YES manual up up

Corp# config t
Corp(config)# router rip

! It’s up to the routing protocol to find the subnets
! and populate the routing tables
Corp(config-router)# network 10.0.0.0
Corp(config-router)# network 172.16.0.0
Corp(config-router)# version 2

! We typically don’t want our routing protocols summarizing for us
! because it’s better to do that manually.
! Both RIP and EIGRP (before 15.x code) auto-summarize by default.
Corp(config-router)# no auto-summary
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! RIP in SF
SF# sh ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.10.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 172.16.10.2 YES manual up up
Serial0/0/1 unassigned YES unset administratively down down

SF# config
SF(config)# router rip
SF(config-router)# network 192.168.10.0
SF(config-router)# network 172.16.0.0
SF(config-router)# version 2
SF(config-router)# no auto-summary

SF(config-router)# do show ip route
C 192.168.10.0/24 is directly connected, FastEthernet0/0
L 192.168.10.1/32 is directly connected, FastEthernet0/0
172.16.0.0/30 is subnetted, 3 subnets
R 172.16.10.4 [120/1] via 172.16.10.1, 00:00:08, Serial0/0/0
C 172.16.10.0 is directly connected, Serial0/0/0
L 172.16.10.2/32 is directly connected, Serial0/0
S 192.168.20.0/24 [150/0] via 172.16.10.1
10.0.0.0/24 is subnetted, 1 subnets
R 10.10.10.0 [120/1] via 172.16.10.1, 00:00:08, Serial0/0/0
! An R indicates that the networks were added dynamically
! using the RIP routing protocol.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! RIP in SF
LA# config t
LA(config)# no ip route 0.0.0.0 0.0.0.0
LA(config)# router rip
LA(config-router)# network 192.168.20.0
LA(config-router)# network 172.16.0.0
LA(config-router)# no auto
LA(config-router)# vers 2

LA(config-router)# do show ip route
R 192.168.10.0/24 [120/2] via 172.16.10.5, 00:00:10, Serial0/0/1
172.16.0.0/30 is subnetted, 3 subnets
C 172.16.10.4 is directly connected, Serial0/0/1
L 172.16.10.6/32 is directly connected, Serial0/0/1
R 172.16.10.0 [120/1] via 172.16.10.5, 00:00:10, Serial0/0/1
C 192.168.20.0/24 is directly connected, FastEthernet0/0
L 192.168.20.1/32 is directly connected, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
R 10.10.10.0 [120/1] via 172.16.10.5, 00:00:10, Serial0/0/1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! AD and hop count
Router(config-router)# do show ip route
10.0.0.0/24 is subnetted, 12 subnets
C 10.1.11.0 is directly connected, FastEthernet0/1
L 10.1.11.1/32 is directly connected, FastEthernet0/1
C 10.1.10.0 is directly connected, FastEthernet0/0
L 10.1.10.1/32 is directly connected, FastEthernet/0/0
R 10.1.9.0 [120/2] via 10.1.5.1, 00:00:15, Serial0/0/1
R 10.1.8.0 [120/2] via 10.1.5.1, 00:00:15, Serial0/0/1
R 10.1.12.0 [120/1] via 10.1.11.2, 00:00:00, FastEthernet0/1
R 10.1.3.0 [120/15] via 10.1.5.1, 00:00:15, Serial0/0/1
[Unimportant...]
! Notice: R 10.1.3.0 [120/15] via 10.1.5.1, 00:00:15, Serial0/0/1
! the administrative distance is 120 (default for RIP)
! but the hop count is 15 (max hop of RIP)
! means that that's bad route, and will be discard
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! Stop unwanted RIP updates (30 sec by default)
! Configure a passive-interface on the Corp router’s Fa0/1
Corp# config t
Corp(config)# router rip
Corp(config-router)# passive-interface FastEthernet 0/1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! Advertising a Default Route Using RIP, the same way with OSPF
! Imagine that our Corp router’s Fa0/0 interface is connected to
! some type of Metro-Ethernet as a connection to the Internet.
! All routers in our AS (SF and LA) must know where to send packets
! destined for networks on the Internet.
! Most people will place a default route on every router.
! But since I’m running RIPv2 on all routers,
! I’ll just add a default route on the Corp router to our ISP.
Corp(config)# ip route 0.0.0.0 0.0.0.0 fa0/0
Corp(config)# router rip
Corp(config-router)# default-information originate

! Verification
LA# sh ip route
Gateway of last resort is 172.16.10.5 to network 0.0.0.0
R 192.168.10.0/24 [120/2] via 172.16.10.5, 00:00:04, Serial0/0/1
172.16.0.0/30 is subnetted, 2 subnets
C 172.16.10.4 is directly connected, Serial0/0/1
L 172.16.10.5/32 is directly connected, Serial0/0/1
R 172.16.10.0 [120/1] via 172.16.10.5, 00:00:04, Serial0/0/1
C 192.168.20.0/24 is directly connected, FastEthernet0/0
L 192.168.20.1/32 is directly connected, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
R 10.10.10.0 [120/1] via 172.16.10.5, 00:00:04, Serial0/0/1
R 192.168.218.0/24 [120/3] via 172.16.10.5, 00:00:04, Serial0/0/1
R 192.168.118.0/24 [120/2] via 172.16.10.5, 00:00:05, Serial0/0/1
R* 0.0.0.0/0 [120/1] via 172.16.10.5, 00:00:05, Serial0/0/1
! Notice: Gateway of last resort is 172.16.10.5 to network 0.0.0.0
! Notice: R* 0.0.0.0/0 [120/1] via 172.16.10.5, 00:00:05, Serial0/0/1

SF# sh ip route

OSPF

!
Router(config)# router ospf [process-id]

! Optional:
! Setting router-id
Router(config-router)# router-id [id-value]
! OR Setting loopback the highest
Router(config)# interface loopback [number]
Router(config-router)# ip address [address] [mask]
! OR rely on the highest interface IP address

Router(config-router)# network [ip-address] [wildcard-mask] area [area-id]

!
! Migrating to OSPFv2:
! remove the network commands
Router(config)# router ospf [process-id]
Router(config-router)# no network [network-id] area [area-id]
Router(config-router)# exit
Router(config)# interface [type] [number]
Router(config-if)# ip ospf [process-id] area [area-id]

!
Router(config)# router ospf ?
<1-65535> Process ID
! A value in the range from 1 to 65,535 identifies the OSPF process ID,
! it can’t start at 0 because that’s for the backbone.

Router(config)# router ospf 1
Router(config-router)# network 10.0.0.0 0.255.255.255 area ?
  <0-4294967295> OSPF area ID as a decimal value
  A.B.C.D OSPF area ID in IP address format
Router(config-router)# network 10.0.0.0 0.255.255.255 area 0
Test# config t
Test(config)# router ospf 1
Test(config-router)# network 192.168.10.64 0.0.0.15 area 0
Test(config-router)# network 192.168.10.80 0.0.0.15 area 0
Test(config-router)# network 192.168.10.96 0.0.0.15 area 0
Test(config-router)# network 192.168.10.8 0.0.0.3 area 0

(X) R1                     (X) R2                      (X) R3
G0/0 (10.255.255.81/30) -- G0/1 (10.255.255.82/30)
                           G0/0 (10.255.255.9/30)  --  G0/1 (10.255.255.10/30)
F0/0 (192.168.10.65/29)    F0/0 (192.168.10.49/29)     F0/0 (192.168.10.17/29)
|                          |                           |
[_] PC                     [_] PC                      [_] PC

R1# config t
R1(config)# router ospf 1
R1(config-router)# network 192.168.10.64 0.0.0.7 area 0
R1(config-router)# network 10.255.255.80 0.0.0.3 area 0

R2# config t
R2(config)# router ospf 1
R2(config-router)# network 192.168.10.48 0.0.0.7 area 0
R2(config-router)# network 10.255.255.80 0.0.0.3 area 0
R2(config-router)# network 10.255.255.8 0.0.0.3 area 0

R3# config t
R3(config)# router ospf 1
R3(config-router)# network 192.168.10.16 0.0.0.7 area 0
R3(config-router)# network 10.255.255.8 0.0.0.3 area 0

(X) Corp                     (X) Boulder
F0/0 (10.10.10.1/24)  ------ F0/0 (10.10.10.2/24)
S0/0/0 (172.16.10.1/30)---
S0/0/1 (172.16.10.5/30)  |
                      |  |
(X) LA                |  |   (X) SF
S0/0/1 (172.16.10.6/30)  --- S0/0/0 (172.16.10.1/30)
F0/0 (192.168.20.1/24)---    F0/0 (192.168.10.1/24)
F0/1 (Non-OSPF network) |    |
                        |    |
[_] PC ------------------    [_] PC

!
Corp# sh ip int brief
  Interface       IP-Address  OK? Method Status  Protocol
  FastEthernet0/0 10.10.10.1  YES manual up      up
  Serial0/0       172.16.10.1 YES manual up      up
  FastEthernet0/1 unassigned  YES unset administratively down down
  Serial0/1       172.16.10.5 YES manual up      up

Corp# config t
Corp(config)# no router rip
Corp(config)# router ospf 132
Corp(config-router)# network 10.10.10.1 0.0.0.0 area 0

Corp(config-router)# network 172.16.10.1 0.0.0.0 area 0
Corp(config-router)# network 172.16.10.5 0.0.0.0 area 0
! OR, easier
Corp(config-router)#network 172.16.10.0 0.0.0.255 area 0

!
SF# sh ip int brief
  Interface        IP-Address    OK? Method Status    Protocol
  FastEthernet0/0  192.168.10.1  YES manual up        up
  FastEthernet0/1  unassigned    YES unset administratively down down
  Serial0/0/0      172.16.10.2   YES manual up        up
  Serial0/0/1      unassigned    YES unset administratively down down

  SF# config t
  SF(config)# no router rip
  SF(config)# router ospf 300
  SF(config-router)#network 192.168.10.1 0.0.0.0 area 0
  SF(config-router)#network 172.16.10.2 0.0.0.0 area 0

!
LA# sh ip int brief
  Interface        IP-Address    OK? Method Status    Protocol
  FastEthernet0/0  192.168.20.1  YES manual up        up
  FastEthernet0/1  unassigned    YES unset administratively down down
  Serial0/0/0      unassigned    YES unset administratively down down
  Serial0/0/1      172.16.10.6   YES manual up        up

LA# config t
LA(config)# router ospf 100
LA(config-router)# network 192.168.20.0 0.0.0.255 area 0
LA(config-router)# network 172.16.0.0 0.0.255.255 area 0

LA(config)# router ospf 100
LA(config-router)# passive-interface fastEthernet 0/1

!
Corp# config t
Corp(config)# ip route 0.0.0.0 0.0.0.0 Fa0/0
Corp(config)# router ospf 1
Corp(config-router)# default-information originate

!
SF#show ip route

!
Boulder(config)# int f0/0
Boulder(config-if)# ip address 10.10.10.2 255.255.255.0
Boulder(config-if)# no shut

Boulder(config-if)#router ospf 2
Boulder(config-router)#network 10.0.0.0 0.255.255.255 area 0
!
Corp# sh ip ospf
  Routing Process "ospf 1" with ID 172.16.10.5

!
Corp(config)# int loopback 0
Corp(config-if)# ip address 172.31.1.1 255.255.255.255

!
SF(config)# int loopback 0
SF(config-if)# ip address 172.31.1.2 255.255.255.255

!
LA(config)# int loopback 0
LA(config-if)# ip address 172.31.1.3 255.255.255.255

!
Corp# sh ip ospf
  Routing Process "ospf 1" with ID 172.31.1.1

!
Corp(config)# router ospf 1
Corp(config-router)# router-id 223.255.255.254
Corp(config-router)# do clear ip ospf process
Corp(config-router)# do sh ip ospf
! A loopback interface will not override the router-id command,
! and we don’t have to reboot the router to make it take effect as the RID!
Corp# show ip route
  O   192.168.10.0/24 [110/65] via 172.16.10.2, 1d17h, Serial0/0
      172.131.0.0/32 is subnetted, 1 subnets
      172.131.0.0/32 is subnetted, 1 subnets
  C   172.131.1.1 is directly connected, Loopback0
      172.16.0.0/30 is subnetted, 4 subnets
  C   172.16.10.4 is directly connected, Serial0/1
  L   172.16.10.5/32 is directly connected, Serial0/1
  C   172.16.10.0 is directly connected, Serial0/0
  L   172.16.10.1/32 is directly connected, Serial0/0
  O   192.168.20.0/24 [110/65] via 172.16.10.6, 1d17h, Serial0/1
      10.0.0.0/24 is subnetted, 2 subnets
  C   10.10.10.0 is directly connected, FastEthernet0/0
  L   10.10.10.1/32 is directly connected, FastEthernet0/0
! 110/65—that’s our administrative distance/metric.

Corp# sh ip ospf
  Routing Process "ospf 1" with ID 223.255.255.254
  [...]

Corp# sh ip ospf database

Corp# sh ip ospf int f0/0

Corp# sh ip ospf neighbor

Corp# sh ip protocols