UNIT 2 Creating An Interconnected IP Network
UNIT 2 Creating An Interconnected IP Network
Network
2.1.1.2.Objectives
Upon completion of this task, you will be able to:
● Learn how to configure an IPv4 address on an interface
● Understand the functions and meanings of loopback interfaces
● Understand how direct routes are generated
● Learn how to configure static routes and understand the conditions for
the static routes to take effect
● Learn how to test the connectivity of the network layer by using the ping
tool
● Learn how to configure static routes and understand their application
scenarios
2.1.1.3.Networking Topology
R1, R2, and R3 are gateways of their networks. You need to configure these gateways to connect these
networks.
Figure 2.1.Lab topology for IPv4 addressing and routing
2.1.2.Lab Configuration
2.1.2.1.Configuration Roadmap
1. Configure IP addresses for the interfaces on the routers.
2. Configure static routes to interconnect the routers.
2.1.2.2.Configuration Procedure
Step 2 Complete basic device configuration.
# Name the devices.
R1:
R2:
R3:
Step 3 Display the IP address of the current interface and the routing table of the router.
# Display the interface status on the router.
R1:
R2:
R3:
The display ip interface brief command displays the brief information about interface IP addresses,
including the IP addresses, subnet masks, physical status, link-layer protocol status, and number of
interfaces in different states.
GigabitEthernet0/0/1 and GigabitEthernet0/0/3 on R1 are not configured with IP addresses.
Therefore, the IP Address/Mask field is in the unassigned state, the Protocol field is in the down state,
and the Physical field is in the up state.
# Display the routing table on the router (R2 in this example).
R1:
R2:
R3:
InLoopBack0 is a default loopback interface.
InLoopBack0 uses the fixed loopback address 127.0.0.1/8 to receive data packets destined for the
host where InLoopBack0 resides. The IP address of the InLoopBack0 interface cannot be changed or
advertised using a routing protocol.
Step 4 Configure IP addresses for physical interfaces.
# Configure IP addresses for physical interfaces based on the following table.
R1 GigabitEthernet0/0/1 10.0.13.1/24
GigabitEthernet0/0/3 10.0.12.1/24
R2 GigabitEthernet0/0/3 10.0.12.2/24
GigabitEthernet0/0/4 10.0.23.2/24
R3 GigabitEthernet0/0/1 10.0.13.3/24
GigabitEthernet0/0/3 10.0.23.3/24
R1:
R2:
R3:
The preceding command output shows that three direct routes are automatically generated for each
interface after the IP addresses of the interfaces are configured, which are
1. A route to the network where the interface resides
2. The host route to the interface
3. The host route to the broadcast address of the network
where the interface resides
A host route is a route with a 32-bit mask.
Step 5 Create a loopback interface.
# Configure the loopback interface according to the following table.
R1 LoopBack0 10.0.1.1/32
R2 LoopBack0 10.0.1.2/32
R3 LoopBack0 10.0.1.3/32
Loopback interfaces are logical interfaces manually configured and do not exist physically. Logical
interfaces can be used to exchange data. A loopback interface is always Up at the physical layer and
link layer unless it is manually shut down. Generally, a loopback interface uses a 32-bit mask.
Loopback interfaces are used for the following purposes:
1. Used as the address for identifying and managing the
router
2. Used as the router ID in OSPF
3. Used for improving network reliability
In this lab activity, the loopback interfaces are used to simulate clients.
# Test connectivity.
# Test the connectivity between the loopback0 interfaces of the routers by referring to the
proceeding description.
Step 7 Configure a path from R3 to R2 via R1 as the backup path from LoopBack0 of R3 to
LoopBack0 of R2.
# Configure static routes on R2 and R3.
R3:
# Shut down GigabitEthernet0/0/3 interface on R1 and R2 to invalidate the route with the highest
priority.
# Display the routing table on R2 and R3. The command output shows that the routes with a lower
priority are activated when the routes with a higher priority are invalidated.
R2:
R3:
In this case, the original static route becomes invalid and the static route with a lower priority is
activated.
# Test connectivity.
R3:
The tracert command displays the path of packets from the source to the destination.
The command output shows that the data packets pass through GigabitEthernet0/0/1 and
GigabitEthernet0/0/3 of R3 and are then forwarded to GigabitEthernet0/0/4 of R2.
In some lab environments, the devices may not respond to ICMP packets for security
reasons. Therefore, the results may vary. You can press Ctrl+C to end the tracert
operation.
Step 7 Configure default routes to connect the LoopBack0 interface of R1 and the
LoopBack0 interface of R2.
# Restore the interfaces and delete the configured routes.
R1:
R2:
R3:
Step 2 Complete the basic OSPF configuration.
You can set OSPF parameters only after creating an OSPF process. OSPF supports multiple
independent processes on one device. Route exchange between different OSPF processes is similar to
that between different routing protocols. You can specify a process ID when creating an OSPF process.
If no process ID is specified, the default process ID 1 is used.
# Create an OSPF area and specify the interfaces on which OSPF is to be enabled.
The area command creates an OSPF area and displays the OSPF area view.
The network network-address wildcard-mask command specifies the interfaces on which OSPF is to
be enabled. OSPF can run on an interface only when the following two conditions are met:
1. The mask length of the interface's IP address is not
shorter than that specified in the network command.
OSPF uses reverse mask. For example 0.0.0.255 indicates
that the mask length is 24 bits.
2. The address of the interface must be within the network
range specified in the network command.
-In this example, OSPF can be enabled on the three interfaces, and they are all added to area 0.
-If the wildcard mask in the network command is all 0s and the IP address of the interface is the same
as the IP address specified in the network-address command, the interface also runs OSPF.
The display ospf peer command displays information about neighbors in each OSPF area. The
information includes the area to which the neighbor belongs, router ID of the neighbor, neighbor
status, DR, and BDR.
# Display the routes learned from OSPF.
Authentication is not configured on other routers. Therefore, the authentication fails and no neighbor is
available.
# Configuring interface authentication on R2.
The default-route-advertise command advertises the default route to a common OSPF area. If the
always argument is not specified, the default route is advertised to other routers only when there are
active non-OSPF default routes in the routing table of the local router. In this example, no default
route exists in the local routing table. Therefore, the always argument needs to be used.
# Display the IP routing tables of R2 and R3.
R2:
R3:
Step 6 Change the cost values of interfaces on R1 so that LoopBack0 on R1 can reach LoopBack0
on R2 via R3.
# According to the routing table of R1, the cost of the route from R1 to LoopBack0 of R2 is 1, and the
cost of the route from R1 to R2 via R3 is 2. Therefore, you only need to change the cost of the route
from R1 to LoopBack0 of R2 to ensure that the value is greater than 2.
In this case, the next hop of the route from R1 to LoopBack0 on R2 is GigabitEthernet0/0/1 on R3.
# Verify the result by issuing Tracert commands.