Assigning IP Addresses to Interfaces

Objective:

To configure and assign IP addresses to router and PC interfaces in GNS3 using Cisco CLI.

Scenario Overview

  • Network Name: Assigning IP addresses to interfaces

  • Devices Required:

    • 2 Cisco Routers (e.g., Cisco 7200)

    • 2 PCs (Using Virtual PCs in GNS3 or VPCS)

    • 2 Switches (Optional)

  • IP Addressing Scheme:

    • Network A: 192.168.1.0/24 (Between R1 and PC1)

    • Network B: 192.168.2.0/24 (Between R2 and PC2)

    • Network C: 10.0.0.0/30 (Link between R1 and R2)

Step 1: Setting Up the Topology

  1. Open GNS3 and create a new project.

  2. Drag and drop the following devices:

    • Two Routers (R1 and R2)

    • Two Virtual PCs (PC1 and PC2)

    • Two Switches (Optional)

  3. Connect the devices as follows:

    • R1 (fa0/0) ↔ Switch1 ↔ PC1

    • R2 (fa0/0) ↔ Switch2 ↔ PC2

    • R1 (G2/0) ↔ R2 (G2/0) (Point-to-Point Link)

Topology

Step 2: Assigning IP Addresses to Router Interfaces

Router 1 (R1) Configuration

  • Open the CLI for R1 and enter privileged EXEC mode:

  • Assign IP address to fastEthernet 0/0 (Connected to PC1):

  • Assign IP address to GigabitEthernet 2/0 (Connected to R2):

  • Save the configuration:

Router 2 (R2) Configuration

  • Open the CLI for R2 and enter privileged EXEC mode:

  • Assign IP address to fastEthernet 0/0 (Connected to PC2):

  • Assign IP address to GigabitEthernet 2/0 (Connected to R1):

  • Save the configuration:

Step 3: Assigning IP Addresses to PCs

PC1 (192.168.1.2)

  • Open PC1 (VPCS) CLI and set its IP address:

PC2 (192.168.2.2)

  • Open PC2 (VPCS) CLI and set its IP address:

Step 4: Testing Connectivity

1. Test PC to Router Connectivity

  • From PC1, ping R1:

  • From PC2, ping R2:

2. Test Router-to-Router Connectivity

  • From R1, ping R2:

  • From R2, ping R1:

Step 5: Enable Routing (Optional)

If you want PC1 to communicate with PC2, you need to configure static routing or a dynamic routing protocol (RIP, OSPF, or EIGRP).

Static Route Configuration (On R1)

Static Route Configuration (On R2)

Now PC1 can ping PC2 and vice versa.

Keywords

GNS3, CCNA, IP Addressing, Cisco Router, Interface Configuration, Subnetting, Routing, Static Route, Dynamic Routing, Ping Test, VPCS (Virtual PC Simulator), Switching, Network Topology, Point-to-Point Link, Gateway Configuration, Packet Forwarding, Connectivity Testing, OSPF Configuration, EIGRP Configuration, Troubleshooting Networks, سیسکو , آموزش سیسکو

Last updated