How to configure a router and how to connect two different network through router?

CCNA

This tutorial is about the configuration of routers and how to connect two different networks through a router. In this tutorial, we learn about how to configure a router and use it to connect networks. for example, here I have taken two different networks. First IP is 1.0.0.1 from network 1.0.0.0 and second IP is 2.0.0.1 from network 2.0.0.0 these IP cannot connect each other through a router and for connect these type of IP we use routers.

Also Read: How to configure static routing on routers along with switches

so we use routers in companies to communicate different network with each other through the router. Now let’s start the configuration of two routers.

routing configuration
configure simple routing on a router

First of all, we go to the router and click on it and go to CLI option for configure router and type given below code to assign an IP address to interfaces of the router and up its ports.

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#interface FastEthernet0/0

Router(config-if)#ip address 1.0.0.1 255.0.0.0

Router(config-if)#no shutdown

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#exit

Router(config)#interface FastEthernet0/1

Router(config-if)#ip address 2.0.0.1 255.0.0.0

Router(config-if)#no shutdown

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Router(config-if)#exit

Now the ports of router will be up and then we go to pc and assign IP address to pc and ping other pc to communicate each other from two different networks by using routers

To assign IP address to pc

first of all, we click on pc and then click on desktop then we click on IP configuration option in it and now assign an IP address to pc through static IP configuration to all pc.

Now using ping command to that whether two pc are connected to different network or not

go to pc and open command prompt

first of all, we check IP address by using command

PC>ipconfig

FastEthernet0 Connection:(default port)

Link-local IPv6 Address………: FE80::2D0:BCFF:FED6:907E

IP Address………………….: 1.0.0.2

Subnet Mask…………………: 255.0.0.0

Default Gateway……………..: 1.0.0.1

then ping to another network by using these commands

PC>ping 2.0.0.2

Pinging 2.0.0.2 with 32 bytes of data:

Reply from 2.0.0.2: bytes=32 time=1ms TTL=127

Reply from 2.0.0.2: bytes=32 time=0ms TTL=127

Reply from 2.0.0.2: bytes=32 time=1ms TTL=127

Reply from 2.0.0.2: bytes=32 time=0ms TTL=127

Ping statistics for 2.0.0.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 1ms, Average = 0ms

these type of result will be displayed on your screen then your configuration will be completed otherwise you should repeat this process to remove error in the router configuration.

Now you see all pc are communicating with each other with having different networks.

THAT’S IT

If you have any queries about this comment below the post and contact me for any type of help. I will help you.

2 thoughts on “How to configure a router and how to connect two different network through router?

    1. If you want to know which port or interface is up on your router then use given below command in privilege mode
      Router#show interfaces

Your thoughts about this?

This site uses Akismet to reduce spam. Learn how your comment data is processed.