Documente Academic
Documente Profesional
Documente Cultură
1)
OSPF configuration on Cisco routers for single area and for multiple areas.
Link state routing and OSPF operation for a single area in typical situations (including adjacency
setup and topology changes).
and 1 is a "don't care" bit, e.g. 0.0.255.255 indicates a match in the first two bytes of the address.
- Modify the priority of the router for Designated Router (DR) and Backup Designated Router (BDR) election
on a multi-access network:
router(config-if)#ip ospf priority number (from 0 to 255)
Priority 0 indicates that the router cannot be DR/BDR.
- Set up a loopback interface to be used as OSPF Router-ID:
router(config)#interface loopback 0
router(config-if)#ip address address mask
- Configure the OSPF Router-ID:
router(config-router)#router-id address
- Modify the cost (metric) for an interface/link:
router(config-if)#ip ospf cost cost (from 1 to 65535)
8
Cisco's OSPF default cost assignment is based on the links bandwidth using the formula 10 /Bandwidth.
All interfaces connected to the same link must agree on the link's cost. Examples of default costs: 10 for
10BASE-T Ethernet. 1 for 100-Mbps Fast Ethernet. 64 for T1 (1.544-Mbps serial link). Use the
bandwidth command to specify the real speed for a serial link (e.g., 1785 for 56-kbps serial link.).
- Instruct an ABR to summarize routes for an area (when advertised in other areas):
router(config-router)#area area-id range address mask
Advertises a single route to the aggregated address block identified by the address and mask.
- Configure an area as a stub area. On each router in the area:
router(config-router)#area area-id stub
- Examine OSPF configuration and state:
router# show ip ospf [interface | neighbor | database]
- Examine IP routing protocols and routing table:
router# show ip protocols
router# show ip route
- OSPF debugging:
router# debug ip ospf [...]
If the CPU load does not decrease to a low level, adjust the Idle PC parameter (right-click on the router and
select Idle-PC); ask the instructor if necessary.
Then start the entire network, and check that the CPU load falls to a low level once all routers boot up.
1.3. Start router consoles.
Start consoles for all the 5 routers using GNS (use the Console button in the toolbar or right-click on the
router and select Console). In each console window you should see the Cisco CLI prompt router-name#
for privileged mode, that allows you to enter any command for configuring the router or examining its status.
1.4. Start packet capture.
Start packet capture on the interface e0/0 of router RC using GNS (right-click on the link and select Start
capturing). We'll examine the captured packets later on during the experiments.
For each step, verify if the current router configuration and operation are correct, then save the configuration
and the GNS project, before proceeding to the next step. To speed up the configuration process, edit at each
step the batches of commands for all the routers you configure using a text editor, and then copy each batch
from the text editor to the router's console window (right-click).
2. Basic IP Configuration
2.1. Configure IP on all routers according to Figure 1.
The sequence of configuration commands for the router RC is listed below; the configuration of the other
routers is similar.
conf term
interface e0/0
ip address 172.16.3.2 255.255.255.0
no shutdown
interface e0/1
ip address 172.17.1.1 255.255.255.0
no shutdown
interface s1/0
ip address 172.16.4.2 255.255.255.0
no shutdown
RD
172.17.100.2/32
RE
172.18.100.1/32
The sequence of configuration commands for the router RC is listed below; the configuration of the other
routers is similar.
conf term
interface loopback 0
ip address 172.17.100.1 255.255.255.255
2.3. Verify the router configuration (show run), save it (copy run start), then save the GNS project.
2.4. Examine the status of the router interfaces using the commands listed below.
show interface if-name
Are all the interfaces used in the network topology shown in Figure 1 working properly? (You should see:
interface if-name is up, line protocol is up.)
Are the IP addresses of the interfaces correctly configured?
2.5. Examine the status of IP routing using the commands listed below.
show ip route
show ip protocols
The initial routing table of each router should contain only the routes to directly connected networks. We
haven't started so far any routing protocol, so the second command should display nothing.
3.2. Verify the router configuration (show run), save it (copy run start), then save the GNS project.
3.3. Examine the current OSPF status.
Note that in our setting it may take several tens of seconds until the protocol reaches a stable state.
4
Examine the status of the routers after OSPF configuration using the following commands:
show ip protocols
Is OSPF running? What is the Router-ID? For how many areas does it work?
Does it report all the other routers as routing information sources?
show ip ospf
OSPF adjacencies.
The information displayed by the second command is different depending on interface type, Ethernet
(multi-access, broadcast) or Serial (point-to-point). Check for each interface:
- Is OSPF running for that interface? To what area is the interface assigned?
- What is the link cost and type of network connected to the interface?
- What neighbors have been found in the network connected to the interface? Is the router DR or BDR or
none, for that network? (Explain.) What adjacencies have been established? (Explain.)
3.4. Examine the OSPF link costs (metric).
The default OSPF link cost on Cisco routers is computed based on the links bandwidth (data rate) using
the formula cost = 108/Bandwidth [bps]. Examples of default costs: 1 for 100-Mbps Fast Ethernet, 10 for
10 Mbps Ethernet, 64 for T1 serial interfaces with 1.544 Mbps bandwidth.
You can set the link cost for an interface to any value using in interface configuration mode the command:
router(config-if)#ip ospf cost cost
Alternatively, you can set the bandwidth of the interface, used in the default link cost calculation, using in
interface configuration mode the command (value in Kbps):
router(config-if)# bandwidth value
We shall not change the default values in this lab. Just check if the link cost matches the bandwidth of the
interface using show ip ospf interface.
3.5. Examine the routing table (show ip route).
- Which routes are provided by OSPF? Does the router have routes to all the subnets?
- The path metric for each route is displayed as a pair of values, e.g., 110/74. The second value is the
actual OSPF cost (the first one is an administrative metric). Check if the path cost, interface, and next hop
of the routes correspond indeed to the shortest paths and the link costs.
- Examine the routing tables and figure out what happens when there are alternate paths to a destination
with the same cost and with different costs. Do you see alternate paths for any route?
3.6. Examine the OSPF topological database.
Examine the Link State Advertisements (LSA) in the OSPF topological database using the following
commands:
show ip ospf database router
Router LSAs.
Network LSAs.
Summary LSAs.
How did OSPF acquire this information? How is this information used by OSPF?
Compare the information in the database with the network topology.
3.7. Test network connectivity and paths.
Test connectivity between the routers RA and RE using the command:
5
ping 172.18.2.1
Determine the path used to forward packets from RA to RE using the command:
traceroute ip 172.18.2.1
Is it the shortest path?
no shutdown
- Check that the route to 172.16.1.0/24 is back in the routing tables of all routers.
- Examine using Wireshark the OSPF packets exchanged by RC after this event (you should see an LS
Update followed by LS Acknowledge). Explain what happened.
5.2. Link failure with alternate routes: failed link between RA and RC.
- Examine the route to 172.16.1.0/24 on RD.
- Shut down the interface s0/1 of the router RA. Check what happens to the route to 172.16.1.0/24.
- Turn on the interface s0/1 of the router RA. Check what happens to the route to 172.16.1.0/24.
6.3. Verify the router configuration (show run), save it (copy run start), then save the GNS project.
6.4. Examine the current OSPF status.
7
Examine the status of the routers after OSPF configuration using the following commands:
show ip protocols
show ip ospf
Is OSPF running? For how many areas does it work? Does it report all the other routers as routing
information sources? Is the router an ABR (Area Border Router)?
6.5. Examine the routing table (show ip route).
What has changed with respect to the routing tables in the configuration with a single area?
6.6. Examine the OSPF topological database.
Examine the LSAs in the topological database of the routers using the following commands:
show ip ospf database
All LSAs.
Summary of LSAs.
What has changed with respect to the topological database in the configuration with a single area?
7. Route Summarization
OSPF supports route summarization (aggregation) in order to reduce the size of the routing tables and the
amount of routing information exchanged between areas. This feature is disabled in the default configuration.
In the next experiment, you'll enable it on the Area Border Routers (ABRs) in order to aggregate inter-area
routes.
7.1. Configure on the ABRs route summarization for each area.
The sequence of configuration commands for the router RC is listed below; the configuration of the other
ABR, RD, is similar.
conf term
router ospf 1