0% found this document useful (0 votes)
5 views

Router

Router detail

Uploaded by

talhasheikh1169
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Router

Router detail

Uploaded by

talhasheikh1169
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

What is a router?

A router is a physical or virtual appliance that passes information between


two or more packet-switched computer networks. A router inspects a
given data packet's destination IP address, calculates the best way for it
to reach its destination and then forwards it accordingly. A router is a
common type of gateway. It is positioned where two or more networks
meet at each point of presence on the internet. Hundreds of routers might
forward a single packet as it moves from one network to the next on the
way to its final destination. Routers exist on Layer 3, the network layer, of
the Open Systems Interconnection model.

Traditional routers are standalone devices that use proprietary software. A


virtual router is a software instance that performs the same functions as a
physical router. Virtual routers typically run on commodity servers, either
alone or packaged with other virtual network functions, such as firewall
packet filtering, load balancing and WAN optimization capabilities.

Other network devices, such as wireless access points and switches, might
include built-in router functionality.

Networking

Home Network infrastructure

Definition

router

Alissa Irei, Senior Site Editor

Jessica Scarpati

What is a router?

A router is a physical or virtual appliance that passes information between


two or more packet-switched computer networks. A router inspects a
given data packet's destination IP address, calculates the best way for it
to reach its destination and then forwards it accordingly.

A router is a common type of gateway. It is positioned where two or more


networks meet at each point of presence on the internet. Hundreds of
routers might forward a single packet as it moves from one network to the
next on the way to its final destination. Routers exist on Layer 3, the
network layer, of the Open Systems Interconnection model.
Traditional routers are standalone devices that use proprietary software. A
virtual router is a software instance that performs the same functions as a
physical router. Virtual routers typically run on commodity servers, either
alone or packaged with other virtual network functions, such as firewall
packet filtering, load balancing and WAN optimization capabilities.

Other network devices, such as wireless access points and switches, might
include built-in router functionality.

How a router works

A router examines a packet header's destination IP address and compares


it against a routing table to determine the packet's best next hop. Routing
tables list directions for forwarding data to particular network
destinations, sometimes in the context of other variables, such as cost.
They amount to an algorithmic set of rules that calculate the best way to
transmit traffic toward any given IP address.

A routing table often specifies a default route, which the router uses
whenever it fails to find a better forwarding option for a given packet. For
example, a typical home office router directs all outbound traffic along a
single default route to its ISP.

Routing tables are either static or dynamic. Static routers are manually
configured, while dynamic routers automatically update their routing
tables based on network activity and exchange information with other
devices via routing protocols.

Many routers also perform Network Address Translation (NAT), which


shields the private IP addresses of a LAN by readdressing all outgoing
traffic with a single shared public IP address. NAT helps to conserve
globally valid IP addresses and improve network security.

Types of routers

Some of the different types of routers include the following:


Core routers.

Edge routers.

Branch routers.

Logical routers.

Wireless routers.

Core routers

ISPs use core routers, which are the fastest and most powerful type of
router. Core routers sits at the center of the internet and forward
information along the main fiber optic backbone. Enterprise routers
connect large organizations' networks to core routers.

Edge routers

An edge router, also known as an access router, is a lower-capacity device


that resides at the boundary of a LAN and connects it to the public
internet, a private WAN or an external LAN. Subscriber edge routers are
edge routers used in home and small office routers.

Branch routers

Branch routers link an organization's remote office locations to its WAN,


connecting to the primary campus network's edge routers. Branch routers
often provide additional features, like time-division multiplexing, wireless
LAN management capabilities and WAN application acceleration.

Logical routers

A logical router is a configured partition of a traditional network hardware,


or physical, router. It replicates the hardware's functionality, creating
multiple routing domains within a single router. Logical routers perform a
subset of the tasks that physical routers can complete, and each logical
router can contain multiple routing instances and routing tables.

Wireless routers

A wireless router works in the same way as the router in a hard-wired


home or business LAN but enables greater mobility for notebook or
portable computers. Wireless routers use the 802.11g specification, a
standard that offers transmission over short distances.

Router protocols

Routing protocols determine how a router identifies other routers on the


network, keeps track of all possible destinations and makes dynamic
decisions for where to send each network message.

The types of routing protocols include the following:

Open Shortest Path First. OSPF finds the best path for packets as they
pass through a set of connected networks. The Internet Engineering Task
Force designates OSPF as one of several Interior Gateway Protocols.

Border Gateway Protocol. BGP manages how packets are routed across
the internet through the exchange of information between edge routers.
BGP offers network stability that guarantees routers can quickly adapt to
send packets through another reconnection if one internet path goes
down.

Interior Gateway Routing Protocol. IGRP determines how an autonomous


network exchanges routing information between gateways. Other network
protocols then use the routing information to specify how transmissions
should be routed.

Enhanced Interior Gateway Routing Protocol. EIGRP evolved from IGRP. If a


router can't find a route to a destination in one of these tables, it queries
nearby routers, which then query routers closer to them until a route is
found. When a routing table entry changes in one of the routers, it notifies
nearby routers of the change instead of sending the entire table.

Exterior Gateway Protocol. EGP determines how routing information


exchanges between two neighbor gateway hosts that each have its own
router. Hosts on the internet commonly use EGP to exchange routing table
information.

Routing Information Protocol. RIP is the original protocol that defines how
routers should share information when traffic moves among an
interconnected group of LANs. The largest number of hops allowed for RIP
is 15, which limits the size of networks that RIP can support.

In Cisco Packet Tracer, routers and cables are crucial for simulating and
configuring network topologies. Here’s how to work with them:
### **Routers in Cisco Packet Tracer**

- **Adding Routers**:

- Open Cisco Packet Tracer.

- Click on the **"Router"** icon in the device selection box.

- Drag and drop a router onto the workspace.

- **Router Models**:

- Packet Tracer includes several router models like 2800, 2900, 7200, and
others. Each model has different capabilities and interfaces.

- **Configuring Routers**:

- **Basic Configuration**:

- Click on the router and select the **"CLI"** tab to access the
Command Line Interface.

- Enter configuration commands to set up interfaces, routing protocols,


and other settings.

- **Interface Configuration**:

- Use commands like `interface <type> <number>` to configure


specific interfaces.

- Example: `interface gig0/1` for configuring a Gigabit Ethernet


interface.

- **IP Address Assignment**:

- Assign IP addresses using commands like `ip address <IP> <Subnet


Mask>` in the interface configuration mode.

- **Routing Protocols**:

- Configure routing protocols such as RIP, OSPF, or EIGRP to enable


dynamic routing.

### **Cables in Cisco Packet Tracer**


- **Types of Cables**:

- **Straight-Through Cable**:

- Used to connect different types of devices, e.g., router to switch or


router to PC.

- Click the **"Connections"** icon (lightning bolt) and select **"Copper


Straight-Through"**.

- **Crossover Cable**:

- Used to connect similar devices directly, e.g., router to router or


switch to switch.

- Select **"Copper Crossover"** from the connections options.

- **Fiber Optic Cable**:

- For high-speed, long-distance connections between devices.

- Choose **"Fiber Optic"** from the connections options.

- **Connecting Devices**:

- Drag the chosen cable from the **"Connections"** icon to the devices
you want to connect.

- Click on the source and destination ports to establish the connection.

### **Practical Steps**

1. **Add Devices**: Place routers, switches, and PCs onto the workspace.

2. **Connect Devices**: Use the appropriate cables to connect the


devices. For instance, connect a router’s Ethernet port to a switch’s
Ethernet port using a straight-through cable.

3. **Configure Interfaces**:

- Access the router CLI and configure IP addresses on the interfaces.

- Example commands:

```shell

Router> enable
Router# configure terminal

Router(config)# interface gig0/0

Router(config-if)# ip address 192.168.1.1 255.255.255.0

Router(config-if)# no shutdown

Router(config-if)# exit

Router(config)# exit

Router# write

```

4. **Test Connectivity**: Use commands like `ping` to verify that devices


can communicate.

These steps help in setting up and configuring networks in Cisco Packet


Tracer, allowing you to simulate real-world networking scenarios and learn
about router configurations and connections.

Certainly! Here's a step-by-step guide to configure two PCs and a router in


Cisco Packet Tracer, connect the PCs to the router, and create a basic
network:

### **1. Set Up the Devices**

1. **Open Cisco Packet Tracer**.

2. **Add Devices**:

- Drag and drop a **Router** (e.g., 2900 Series) from the device
selection box to the workspace.

- Drag and drop two **PCs** from the device selection box to the
workspace.

### **2. Connect Devices**


1. **Select the Right Cable**:

- Click the **"Connections"** icon (lightning bolt).

- Choose **"Copper Straight-Through"** cable.

2. **Connect PCs to Router**:

- Click on the **first PC**. Choose the **"FastEthernet"** port.

- Click on the **router**. Choose an available **Ethernet port** (e.g.,


**FastEthernet0/0**).

- Repeat for the second PC, connecting it to another Ethernet port on the
router (e.g., **FastEthernet0/1**).

### **3. Configure the Router**

1. **Access the Router CLI**:

- Click on the router and go to the **"CLI"** tab.

2. **Enter Configuration Mode**:

- Type the following commands to configure the router:

```shell

Router> enable

Router# configure terminal

```

3. **Configure Interfaces**:

- Configure **FastEthernet0/0** for the first network segment:

```shell

Router(config)# interface fastEthernet0/0


Router(config-if)# ip address 192.168.1.1 255.255.255.0

Router(config-if)# no shutdown

Router(config-if)# exit

```

- Configure **FastEthernet0/1** for the second network segment:

```shell

Router(config)# interface fastEthernet0/1

Router(config-if)# ip address 192.168.2.1 255.255.255.0

Router(config-if)# no shutdown

Router(config-if)# exit

```

4. **Exit and Save Configuration**:

```shell

Router(config)# exit

Router# write

```

### **4. Configure the PCs**

1. **Access Each PC’s Configuration**:

- Click on the **first PC**, go to the **"Desktop"** tab, and select **"IP
Configuration"**.

2. **Assign IP Address for PC1**:

- **IP Address**: `192.168.1.2`


- **Subnet Mask**: `255.255.255.0`

- **Default Gateway**: `192.168.1.1` (router’s interface for this


segment)

3. **Repeat for PC2**:

- Click on the **second PC**, go to the **"Desktop"** tab, and select


**"IP Configuration"**.

- **IP Address**: `192.168.2.2`

- **Subnet Mask**: `255.255.255.0`

- **Default Gateway**: `192.168.2.1` (router’s interface for this


segment)

### **5. Test Connectivity**

1. **Ping Test from PC1**:

- Go to **PC1’s "Desktop"** tab and select **"Command Prompt"**.

- Type `ping 192.168.2.2` to test connectivity to PC2.

2. **Ping Test from PC2**:

- Go to **PC2’s "Desktop"** tab and select **"Command Prompt"**.

- Type `ping 192.168.1.2` to test connectivity to PC1.

If the pings are successful, the PCs are correctly configured and connected
to the router. This basic setup creates two separate subnets, with each PC
in its own subnet, and confirms that they can communicate through the
router.

Creating separate subnets is not strictly necessary for all networks, but it
has specific benefits and is often used depending on the network design
and requirements. Here’s when and why you might use separate subnets:

### **Benefits of Creating Separate Subnets**


1. **Improved Network Organization**:

- **Logical Separation**: Separate subnets help logically divide a


network into different segments, making it easier to manage and
troubleshoot.

2. **Enhanced Security**:

- **Access Control**: Different subnets can have different security


policies and access controls, isolating different types of traffic and
reducing the risk of network-wide breaches.

3. **Reduced Broadcast Traffic**:

- **Broadcast Domains**: Each subnet creates its own broadcast


domain, reducing the amount of broadcast traffic and improving overall
network performance.

4. **Better Performance**:

- **Network Efficiency**: Smaller subnets mean less traffic on each


subnet, which can reduce congestion and improve network performance.

5. **Scalability**:

- **Future Growth**: Subnetting allows for easier expansion of the


network as it grows, providing a structured way to add new devices and
segments.

### **When Separate Subnets Are Not Necessary**

1. **Small Networks**:

- **Simple Configuration**: For small networks with a few devices, a


single subnet can be sufficient, simplifying configuration and
management.

2. **Limited Resources**:
- **Simplified Setup**: If the goal is to quickly set up a network without
extensive segmentation or security policies, using a single subnet might
be easier.

### **Example of a Simple Network Without Subnetting**

In a basic setup where you have a small office with a few PCs and a single
router, you can configure all devices in the same subnet if there's no need
for extensive network management or isolation. Here’s a streamlined
example:

1. **Configure Router Interface**:

- Assign a single IP address and subnet mask to the router's interface


(e.g., `192.168.1.1/24`).

2. **Configure PCs**:

- Assign IP addresses within the same subnet to each PC (e.g.,


`192.168.1.2`, `192.168.1.3`).

3. **Verify Connectivity**:

- Ensure that all devices can communicate with each other and the
router.

In summary, while creating separate subnets is not always necessary, it


provides significant benefits for larger or more complex networks. For
smaller or simpler networks, a single subnet might be sufficient.
To integrate a switch into your existing network with two PCs and a router
in Cisco Packet Tracer, follow these steps:

### **1. Add the Switch**

1. **Open Cisco Packet Tracer**.

2. **Add a Switch**:

- Click on the **"Switch"** icon in the device selection box (usually


found in the network devices section).

- Drag and drop a **Switch** (e.g., 2960) onto the workspace.

### **2. Connect Devices to the Switch**

1. **Select the Right Cable**:

- Click the **"Connections"** icon (lightning bolt).

- Choose **"Copper Straight-Through"** cable.

2. **Connect PCs to the Switch**:

- Click on **PC1**. Select the **"FastEthernet"** port.

- Click on the **Switch**. Choose an available **Ethernet port** (e.g.,


**FastEthernet0/1**).

- Repeat for **PC2**, connecting it to another Ethernet port on the


switch (e.g., **FastEthernet0/2**).

3. **Connect the Switch to the Router**:

- Click on the **Switch**. Select an available Ethernet port (e.g.,


**FastEthernet0/3**).

- Click on the **Router**. Choose an available Ethernet port (e.g.,


**FastEthernet0/0**).
### **3. Configure the Router and PCs**

The configuration for the router and PCs remains mostly the same as in
the initial setup. Here's a quick refresher:

**Router Configuration:**

1. **Access Router CLI**:

- Click on the router and go to the **"CLI"** tab.

2. **Enter Configuration Mode**:

```shell

Router> enable

Router# configure terminal

```

3. **Configure Interfaces**:

- Configure the router’s interface connected to the switch:

```shell

Router(config)# interface fastEthernet0/0

Router(config-if)# ip address 192.168.1.1 255.255.255.0

Router(config-if)# no shutdown

Router(config-if)# exit

```

4. **Exit and Save Configuration**:


```shell

Router(config)# exit

Router# write

```

**PC Configuration:**

1. **PC1 Configuration**:

- Click on **PC1**, go to the **"Desktop"** tab, and select **"IP


Configuration"**.

- **IP Address**: `192.168.1.2`

- **Subnet Mask**: `255.255.255.0`

- **Default Gateway**: `192.168.1.1`

2. **PC2 Configuration**:

- Click on **PC2**, go to the **"Desktop"** tab, and select **"IP


Configuration"**.

- **IP Address**: `192.168.1.3`

- **Subnet Mask**: `255.255.255.0`

- **Default Gateway**: `192.168.1.1`

### **4. Verify Connectivity**

1. **Test Communication from PC1**:

- Go to **PC1’s "Desktop"** tab and select **"Command Prompt"**.

- Type `ping 192.168.1.3` to test connectivity to PC2.

2. **Test Communication from PC2**:

- Go to **PC2’s "Desktop"** tab and select **"Command Prompt"**

- Type `ping 192.168.1.2` to test connectivity to PC1.


If the pings are successful, the network setup with the switch is correctly
configured, allowing all devices to communicate with each other through
the switch and router.

Certainly! Here’s a simple diagram illustrating how the switch, PCs, and
router are connected:

```

+------------+

| Router |

| |

| Fa0/0 |

+-----+------+

| Copper Straight-Through

+-----+------+

| Switch |

+-----+------+

| Fa0/1 |

| Fa0/2 |

+-----+------+

/ \

/ \

+---------+--+ +------+-+

| PC1 | | PC2 |

| | | |
| Fa0 | | Fa0 |

+------------+ +--------+

```

### **Diagram Description:**

- **Router**:

- **FastEthernet0/0** is connected to the switch.

- **Switch**:

- **FastEthernet0/1** is connected to **PC1**.

- **FastEthernet0/2** is connected to **PC2**.

- **PC1** and **PC2**:

- Both PCs are connected to the switch, allowing them to communicate


with each other.

- **Switch**:

- Connected to the router to allow access to external networks.

This setup allows PCs to communicate locally through the switch and
access external networks via the router.

You might also like