Cisco Router Configuration for Internet Access

Configuring a Cisco router and a Layer 2 switch for internet access involves setting up the WAN interface, configuring the LAN interface, assigning public IP addresses, and setting up default routes. Follow these steps to get your network up and running.

Prerequisite

  • Router WAN IP Address: 203.0.113.1/30
  • Router LAN IP Address: 198.51.100.1/24
  • Public IP Pool Range: 198.51.100.0/24
  • Default Route Gateway: 203.0.113.2
  • Switch Interface Vlan 1 IP Address: 198.51.100.2/24
  • Switch Default-gateway: 198.51.100.1

Step-by-Step Configuration

Part 1: Cabling and Physical Connections

  1. Connect the WAN Interface:
    • Connect the router’s WAN port (GigabitEthernet 0/0) to the internet modem using an Ethernet cable.
  2. Connect the LAN Interface to the Switch:
    • Connect the router’s LAN port (GigabitEthernet 0/1) to one of the switch ports (e.g., FastEthernet 0/1) using an Ethernet cable.
  3. Connect a Computer for Configuration:
    • Connect your computer to another port on the switch (e.g., FastEthernet 0/2) using an Ethernet cable.

Part 2: Router Configuration

1. Access the Router

Using Console Cable:

  • Connect the console cable to the router’s console port and the other end to your computer’s serial port.
  • Use terminal emulation software (e.g., PuTTY, Tera Term) to connect to the router using the appropriate COM port.
Router> enable
Router# configure terminal

2. Configure the WAN Interface

Set up the WAN interface with the provided IP address and subnet mask.

Router(config)# interface gigabitEthernet 0/0
Router(config-if)# ip address 203.0.113.1 255.255.255.252
Router(config-if)# no shutdown
Router(config-if)# exit

3. Configure the LAN Interface

Set up the LAN interface with the internal IP address.

Router(config)# interface gigabitEthernet 0/1
Router(config-if)# ip address 198.51.100.1 255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# exit

4. Configure the Default Route

Set up the default route to direct traffic to the internet through the specified gateway.

Router(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.2

5. Verify the Configuration

Check the configuration to ensure everything is set up correctly.

Router# show ip interface brief
Router# show ip route
Router# show running-config

6. Save the Configuration

Save the configuration to ensure it persists after a reboot.

Router# write memory

Part 3: Switch Configuration

1. Access the Switch

Using Console Cable:

  • Connect the console cable to the switch’s console port and the other end to your computer’s serial port.
  • Use terminal emulation software (e.g., PuTTY, Tera Term) to connect to the switch using the appropriate COM port.
Switch> enable
Switch# configure terminal

2. Configure the Management VLAN Interface

Set up the VLAN interface with the provided IP address and subnet mask.

Switch(config)# interface vlan 1
Switch(config-if)# ip address 198.51.100.2 255.255.255.0
Switch(config-if)# no shutdown
Switch(config-if)# exit

3. Configure the Default Gateway

Set up the default gateway to direct traffic through the router.

Switch(config)# ip default-gateway 198.51.100.1
Switch(config)# exit

4. Configure the Switch Port

Set the switch port connected to the router (e.g., FastEthernet 0/1) to access mode and assign it to VLAN 1.

Switch(config)# interface fastEthernet 0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 1
Switch(config-if)# exit

5. Verify the Configuration

Check the configuration to ensure everything is set up correctly.

Switch# show ip interface brief
Switch# show running-config

6. Save the Configuration

Save the configuration to ensure it persists after a reboot.

Switch# write memory

Verification: Dummy Ping and Traceroute Sample

Perform a ping and traceroute to verify connectivity.

Ping Test from the Router

Router# ping 8.8.8.8

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/30/40 ms

Conclusion

By following these steps, you can successfully configure your Cisco router and Layer 2 switch for internet access. The setup involves configuring the WAN and LAN interfaces on the router, setting up VLAN and default gateway on the switch, and ensuring the correct physical connections. This basic configuration provides internet connectivity to devices on your network. For enhanced security and performance, consider implementing additional configurations such as access control lists (ACLs) and monitoring tools.

By adhering to this guide, you ensure a structured and efficient network setup, laying the foundation for a robust and secure network environment.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.