How to configure a cisco router to connect two different networks?

This is about the configuration of routers and how to configure a cisco router to connect two different networks? 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 the second IP is 2.0.0.1 from network 2.0.0.0 these IPs cannot connect with each other through a switch and for connecting these types of IP we use routers. If we want to connect more than two networks using routers then we have to do routings on them such as configuring Static routing on the routers.

When we work with a single router we don’t need to do any routing on the router because the router is a device that is used to connect different networks. So just to connect two networks with a router follow the steps:-

If you want to learn basic switch configurations like how to set a hostname on the switch then click here and try it by yourself.

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

The image below shows the connection of PC’s in different networks connected with a route.

how to configure a cisco router to conect two different networks

After connection, the PCs will not ping/connects. To make them connect with each other on different networks we have to assign IP to the router ports as well as on the pc ports by following way.

Click on the router and open command prompt by click on CLI and apply command.

Continue with configuration dialog? [yes/no]: n
Press RETURN to get started!
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

After assigning IP address to the router ports they will turn on and becomes green.

The IP address on the router’s port is assigned successfully. Now, we have to assign an IP address on the PCs too.

to assign IP to the computer click on the computer then click on the desktop panel from the config panel. After that open the IP configuration box and assign IP address with the subnet mask and the default gateway to both the pc with the IP of their respective networks. The default gateway is the IP of the router’s port which is connected to that network.

Now if you try to ping those systems they will work. You can use the ping command to check whether those two PCs which are present in the different networks are connected or not.

first of all, we have to check the IP address by using the command prompt on the PC so we can ping them by their IPs. To do so go to pc and open command prompt and use given below commands.

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

Here you can see that the IP address of the first computer is 1.0.0.2 Now to use ping command go to the second network and choose a PC to ping with this IP. Like here I choose PC that’s IP address is 2.0.0.2 results of ping command is given below.

PC>ping 1.0.0.2
Pinging 1.0.0.2 with 32 bytes of data:
Reply from 1.0.0.2: bytes=32 time=1ms TTL=127
Reply from 1.0.0.2: bytes=32 time=0ms TTL=127
Reply from 1.0.0.2: bytes=32 time=1ms TTL=127
Reply from 1.0.0.2: bytes=32 time=0ms TTL=127
Ping statistics for 1.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

Here you can see that there is a 0% loss of the packets that means the connection is working in between network 1.0.0.0 and 2.0.0.0 and our router is configured successfully. Now you can send data between these two networks easily.

If these types of results 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.

THAT’S IT

Comment your thoughts.

You may also like...

Leave a Reply

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

%d bloggers like this: