0% found this document useful (0 votes)
3 views18 pages

Networking Guide

The document is a comprehensive configuration guide for Cisco networking, covering essential topics such as routing fundamentals, LAN setup, switch configuration, static routing, OSPF, BGP, VLANs, and router on a stick. It provides step-by-step instructions for configuring routers and switches, as well as explanations of key concepts and commands. The guide aims to equip users with the knowledge to effectively manage and configure Cisco network devices.

Uploaded by

kaliisadaniel1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views18 pages

Networking Guide

The document is a comprehensive configuration guide for Cisco networking, covering essential topics such as routing fundamentals, LAN setup, switch configuration, static routing, OSPF, BGP, VLANs, and router on a stick. It provides step-by-step instructions for configuring routers and switches, as well as explanations of key concepts and commands. The guide aims to equip users with the knowledge to effectively manage and configure Cisco network devices.

Uploaded by

kaliisadaniel1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Cisco Networking

Complete Configuration Guide

Topics Covered:
• Routing Fundamentals & Routing Tables
• Setting Up a LAN with a Router
• Switch Configuration
• Static Routing
• OSPF — Open Shortest Path First
• BGP — Border Gateway Protocol
• VLANs & Router on a Stick
• Essential Show Commands
• Sending Messages Over LAN via CMD
1. Routing Fundamentals

At its core, a router connects two or more networks and decides where to forward each packet based on its
destination IP address. It does this using a routing table.

1.1 The Routing Table


Every router maintains a routing table — a list of known networks and how to reach them.

Field Description

Destination network e.g. [Link]/24

Subnet mask Defines the network size

Next hop The next router's IP to forward to

Interface Which physical port to send it out

Metric Cost of the route (lower = preferred)

1.2 Two Main Ways to Populate the Routing Table


1. Static Routing — You manually enter routes. Good for small, simple networks.

2. Dynamic Routing — Routers automatically learn routes from each other using protocols like:

• RIP — Simple, for small networks

• OSPF — Large enterprise networks

• BGP — The internet, used between ISPs

1.3 LAN vs WAN Routing


LAN WAN

Scale Small, local Large, across distances

Protocols Static, OSPF BGP, MPLS

Speed Fast Variable

Example Office network Internet, between cities


2. Setting Up a LAN with a Router

Step 1 — Plan Your Network


Parameter Example Value

Network address [Link]

Subnet mask [Link] (/24)

Router (gateway) IP [Link]

Device IP range [Link] – [Link]

Broadcast address [Link]

Step 2 — Assign IP to Router's LAN Interface


Router> enable
Router# configure terminal
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip address [Link] [Link]
Router(config-if)# no shutdown
Router(config-if)# exit

Step 3 — Set Up DHCP


Router(config)# ip dhcp pool MY_LAN
Router(dhcp-config)# network [Link] [Link]
Router(dhcp-config)# default-router [Link]
Router(dhcp-config)# dns-server [Link]
Router(dhcp-config)# exit
Router(config)# ip dhcp excluded-address [Link] [Link]

Step 4 — Verify
Router# show ip interface brief
Router# show ip dhcp binding
3. Switch Configuration

Step 1 — Access the Switch


Connect via console cable (PuTTY / Tera Term): Speed 9600, Data bits 8, Parity None, Stop bits 1

Step 2 — Enter Modes & Set Hostname


Switch> enable
Switch# configure terminal
Switch(config)# hostname SW1

Step 3 — Set Password


SW1(config)# enable secret MyPassword123
SW1(config)# line console 0
SW1(config-line)# password cisco
SW1(config-line)# login
SW1(config-line)# exit

Step 4 — Assign Management IP


SW1(config)# interface vlan 1
SW1(config-if)# ip address [Link] [Link]
SW1(config-if)# no shutdown
SW1(config-if)# exit
SW1(config)# ip default-gateway [Link]

Step 5 — Configure VLANs


SW1(config)# vlan 10
SW1(config-vlan)# name IT_DEPARTMENT
SW1(config-vlan)# exit

SW1(config)# interface FastEthernet0/1


SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 10
SW1(config-if)# exit

Step 6 — Configure Trunk Port


SW1(config)# interface GigabitEthernet0/1
SW1(config-if)# switchport mode trunk
SW1(config-if)# exit

Step 7 — Save & Verify


SW1# write memory
SW1# show vlan brief
SW1# show interfaces trunk
SW1# show mac address-table
4. Static Routing

A static route is a manually configured path that tells the router: To reach network X, send traffic to Y.

Basic Syntax
Router(config)# ip route [destination network] [subnet mask] [next hop]

Scenario — Two LANs Connected


[PC1: [Link]] [PC2: [Link]]
| |
[Router A] ■■■■■■■■■■■■■■■ [Router B]
LAN: [Link] LAN: [Link]
WAN: [Link] WAN: [Link]

Router A Configuration
RouterA(config)# interface GigabitEthernet0/0
RouterA(config-if)# ip address [Link] [Link]
RouterA(config-if)# no shutdown
RouterA(config-if)# exit

RouterA(config)# interface GigabitEthernet0/1


RouterA(config-if)# ip address [Link] [Link]
RouterA(config-if)# no shutdown
RouterA(config-if)# exit

RouterA(config)# ip route [Link] [Link] [Link]

Router B Configuration
RouterB(config)# interface GigabitEthernet0/0
RouterB(config-if)# ip address [Link] [Link]
RouterB(config-if)# no shutdown
RouterB(config-if)# exit

RouterB(config)# interface GigabitEthernet0/1


RouterB(config-if)# ip address [Link] [Link]
RouterB(config-if)# no shutdown
RouterB(config-if)# exit

RouterB(config)# ip route [Link] [Link] [Link]

Default Route
Router(config)# ip route [Link] [Link] [Link]

[Link] [Link] means 'any destination' — this is the gateway of last resort.
Verify Static Routes
Router# show ip route

Code Meaning

S Static route

S* Default static route

C Directly connected

[1/0] Administrative distance / metric

Quick Reference
Goal Command

Route via next hop IP ip route [Link] [Link] [Link]

Route via exit interface ip route [Link] [Link] GigabitEthernet0/1

Default route ip route [Link] [Link] [Link]

Remove a route no ip route [Link] [Link] [Link]


5. OSPF — Open Shortest Path First

OSPF is a dynamic routing protocol that automatically discovers and shares routes between routers. Routers
talk to each other and build a complete map of the network.

How OSPF Works


1. Routers send Hello packets to discover neighbors

2. They share Link State Advertisements (LSAs)

3. Every router builds a complete network map (LSDB)

4. Each router runs Dijkstra algorithm to find the shortest path

5. Best paths go into the routing table

Key Concepts
Term Meaning

Router ID Unique identifier for each router (usually highest IP)

Area A group of routers — Area 0 is the backbone

Hello packets Used to discover and maintain neighbors

DR/BDR Designated Router / Backup — reduces traffic on broadcast networks

Cost OSPF metric — based on bandwidth (lower = better)

LSA Link State Advertisement — route info shared between routers

Wildcard Mask
OSPF uses a wildcard mask which is the inverse of the subnet mask ([Link] minus subnet mask):

Subnet Mask Wildcard Mask

[Link] (/24) [Link]

[Link] (/30) [Link]

[Link] (/16) [Link]

OSPF Configuration — Three Routers


Router 1
R1(config)# router ospf 1
R1(config-router)# router-id [Link]
R1(config-router)# network [Link] [Link] area 0
R1(config-router)# network [Link] [Link] area 0
R1(config-router)# exit
Router 2
R2(config)# router ospf 1
R2(config-router)# router-id [Link]
R2(config-router)# network [Link] [Link] area 0
R2(config-router)# network [Link] [Link] area 0
R2(config-router)# network [Link] [Link] area 0
R2(config-router)# exit

Router 3
R3(config)# router ospf 1
R3(config-router)# router-id [Link]
R3(config-router)# network [Link] [Link] area 0
R3(config-router)# network [Link] [Link] area 0
R3(config-router)# exit

Advertise Default Route


R1(config)# ip route [Link] [Link] [ISP gateway IP]
R1(config)# router ospf 1
R1(config-router)# default-information originate

Verification Commands
Router# show ip ospf neighbor
Router# show ip ospf database
Router# show ip route ospf
Router# show ip ospf interface

You want to see FULL in the neighbor state — this means routers have successfully exchanged all routing
information.
6. BGP — Border Gateway Protocol

BGP is called the 'protocol of the internet' — it allows different networks (ISPs, companies, universities) to
exchange routing information with each other.

OSPF vs BGP
OSPF BGP

Type IGP (Interior) EGP (Exterior)

Used within One organization Between organizations

Metric Cost (bandwidth) Path attributes

Scale Medium networks Internet scale

Neighbors Auto discovered Manually configured

Key Concepts
Term Meaning

AS (Autonomous System) A network under one organization's control

ASN Unique number identifying each AS

iBGP BGP between routers in the same AS

eBGP BGP between routers in different AS

Peer / Neighbor A router you exchange BGP routes with

Path attributes Information used to choose best route

BGP Path Attributes


Attribute Description

Weight Cisco proprietary — higher is better

Local Preference Preferred exit from your AS — higher is better

AS Path List of ASes the route passed through — shorter is better

Origin How the route was learned

MED Suggests preferred entry point to your AS

eBGP Configuration
Router 1 (AS 100)
R1(config)# router bgp 100
R1(config-router)# router-id [Link]
R1(config-router)# neighbor [Link] remote-as 200
R1(config-router)# network [Link] mask [Link]
R1(config-router)# exit

Router 2 (AS 200)


R2(config)# router bgp 200
R2(config-router)# router-id [Link]
R2(config-router)# neighbor [Link] remote-as 100
R2(config-router)# network [Link] mask [Link]
R2(config-router)# exit

BGP States
State Meaning

Idle BGP is not started or retrying

Connect Trying to establish TCP connection

Active TCP failed, trying again

OpenSent TCP connected, sending Open message

OpenConfirm Waiting for confirmation

Established Neighbors are up, exchanging routes


You want to see Established — anything else means a problem.

BGP Verification Commands


Router# show bgp summary
Router# show bgp neighbors
Router# show ip bgp
Router# show ip bgp [Link]
Router# show ip route bgp

Common BGP Problems


Problem Cause Fix

Stuck in Active Can't reach neighbor Check IP, cables, firewall

Stuck in Idle BGP not started or blocked Check neighbor config, port 179

Routes not showing Network not in routing table Add static or IGP route first

Wrong AS number Mismatch in remote-as Verify ASN on both sides


Note: BGP uses TCP port 179 — make sure firewalls allow it.
7. VLANs & Router on a Stick

A VLAN logically divides one physical switch into multiple separate networks. Devices on different VLANs
cannot communicate without a router.

Why Use VLANs?


Benefit Example

Security HR can't see Finance traffic

Performance Reduces broadcast traffic

Flexibility Group users by department not location

Cost One switch acts like many

Part 1 — Switch VLAN Configuration


Create VLANs
SW1(config)# vlan 10
SW1(config-vlan)# name IT
SW1(config-vlan)# exit

SW1(config)# vlan 20
SW1(config-vlan)# name FINANCE
SW1(config-vlan)# exit

SW1(config)# vlan 30
SW1(config-vlan)# name HR
SW1(config-vlan)# exit

Assign Access Ports


SW1(config)# interface FastEthernet0/1
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 10
SW1(config-if)# exit

SW1(config)# interface FastEthernet0/2


SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 20
SW1(config-if)# exit

Configure Trunk Port


SW1(config)# interface GigabitEthernet0/1
SW1(config-if)# switchport mode trunk
SW1(config-if)# switchport trunk allowed vlan 10,20,30
SW1(config-if)# exit
Part 2 — Router on a Stick
One physical router interface handles traffic for multiple VLANs using subinterfaces. The single link carries all
VLAN traffic — that's why it's called 'on a stick.'

Step 1 — Enable Physical Interface


Router(config)# interface GigabitEthernet0/0
Router(config-if)# no shutdown
Router(config-if)# exit

Do NOT assign an IP to the physical interface — only to subinterfaces.

Step 2 — Create Subinterfaces


Router(config)# interface GigabitEthernet0/0.10
Router(config-subif)# encapsulation dot1q 10
Router(config-subif)# ip address [Link] [Link]
Router(config-subif)# exit

Router(config)# interface GigabitEthernet0/0.20


Router(config-subif)# encapsulation dot1q 20
Router(config-subif)# ip address [Link] [Link]
Router(config-subif)# exit

Router(config)# interface GigabitEthernet0/0.30


Router(config-subif)# encapsulation dot1q 30
Router(config-subif)# ip address [Link] [Link]
Router(config-subif)# exit

Step 3 — Configure DHCP per VLAN


Router(config)# ip dhcp pool VLAN10_POOL
Router(dhcp-config)# network [Link] [Link]
Router(dhcp-config)# default-router [Link]
Router(dhcp-config)# dns-server [Link]
Router(dhcp-config)# exit

Router(config)# ip dhcp pool VLAN20_POOL


Router(dhcp-config)# network [Link] [Link]
Router(dhcp-config)# default-router [Link]
Router(dhcp-config)# exit

Step 4 — Verify
Router# show ip interface brief
Router# show ip route

You should see connected routes for each VLAN subinterface.

How Inter-VLAN Traffic Flows


Step What Happens

1 PC1 sends packet to its gateway ([Link])

2 Switch tags it with VLAN 10 and sends up the trunk

3 Router receives it on Gi0/0.10

4 Router checks routing table — finds [Link] via Gi0/0.20

5 Router sends it back down trunk tagged as VLAN 20

6 Switch delivers packet to destination PC


8. Essential Show Commands

General Router Info


Router# show version ← IOS version, uptime, hardware
Router# show running-config ← Current active configuration
Router# show startup-config ← Saved configuration (loads on reboot)
Router# show flash ← Flash memory contents

Interface Commands
Router# show ip interface brief ← Quick overview of all interfaces
Router# show interfaces ← Detailed info — errors, traffic, MTU
Router# show interfaces Gi0/0 ← Detailed info on one interface

Status Protocol Meaning

up up Working correctly

up down Layer 2 problem

admin down down Manually shut down

Routing Commands
Router# show ip route ← Full routing table
Router# show ip route static ← Only static routes
Router# show ip route ospf ← Only OSPF routes
Router# show ip route bgp ← Only BGP routes
Router# show ip route [Link] ← How to reach specific network

Code Protocol

C Connected

S Static

O OSPF

B BGP

R RIP

D EIGRP

OSPF Commands
Router# show ip ospf neighbor ← OSPF neighbors and state
Router# show ip ospf ← OSPF process details
Router# show ip ospf interface ← OSPF details per interface
Router# show ip ospf database ← Full Link State Database

BGP Commands
Router# show bgp summary ← All neighbors and state
Router# show ip bgp ← Full BGP routing table
Router# show bgp neighbors ← Detailed neighbor info
Router# show ip bgp [Link] ← Info about specific prefix

DHCP Commands
Router# show ip dhcp binding ← All DHCP assigned IPs
Router# show ip dhcp pool ← Configured DHCP pools
Router# show ip dhcp conflict ← IP address conflicts

Other Useful Commands


Router# show arp ← IP to MAC address mappings
Router# show access-lists ← ACLs and hit counts
Router# show ip nat translations ← Active NAT translations
Router# show cdp neighbors ← Directly connected Cisco devices
Router# show cdp neighbors detail ← Includes neighbor IP addresses

Troubleshooting Commands
Router# ping [Link] ← Test reachability
Router# traceroute [Link] ← Show path packets take
Router# show processes cpu ← CPU usage
Router# debug ip routing ← Real-time routing changes (use carefully)
Router# undebug all ← Turn off all debug output

Quick Reference Summary


Category Key Command

Interfaces show ip interface brief

Routing table show ip route

OSPF neighbors show ip ospf neighbor

BGP neighbors show bgp summary

DHCP leases show ip dhcp binding

ARP table show arp

Configuration show running-config

Neighbor devices show cdp neighbors

Test connectivity ping / traceroute


9. Sending Messages Over LAN via CMD

Method 1 — MSG Command (Windows)


msg /server:[IP address] * "Your message here"

Example
msg /server:[Link] * "Meeting starts in 5 minutes"

Common Options
Option Meaning

* Send to all sessions on that PC

/time:30 Message disappears after 30 seconds

/v Verbose — shows what is happening

/w Wait for user to respond

Enable MSG on Target PC


reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v AllowRemoteRPC /t REG_DWORD /d 1 /f
netsh firewall set service remoteadmin enable

Method 2 — Netcat (Cross Platform)


Receiving PC — listen on a port:
nc -l -p 1234

Sending PC — connect and type:


nc [Link] 1234

Troubleshooting MSG Errors


Error Cause Fix

Error 5 Access Denied Permissions issue Run CMD as Administrator

Error 1722 RPC unavailable RPC service blocked Enable AllowRemoteRPC registry key

Error 1825 Authentication failed Check same workgroup/domain

Message not received Firewall blocking Allow msg through Windows firewall

Always Ping First


ping [Link]

If ping fails, fix connectivity before trying to send a message.


Method Summary
Method Best For

msg command Quick Windows to Windows messages

net send Old Windows XP/2003 systems

PowerShell Remoting Advanced remote administration

Netcat Cross platform including Linux

You might also like