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 184.108.40.206 from network 220.127.116.11 and the second IP is 18.104.22.168 from network 22.214.171.124 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:-
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.
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&gt;enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface FastEthernet0/0 Router(config-if)#ip address 126.96.36.199 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 188.8.131.52 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………………….: 184.108.40.206 Subnet Mask…………………: 255.0.0.0 Default Gateway……………..: 220.127.116.11
Here you can see that the IP address of the first computer is 18.104.22.168 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 22.214.171.124 results of ping command is given below.
PC>ping 126.96.36.199 Pinging 188.8.131.52 with 32 bytes of data: Reply from 184.108.40.206: bytes=32 time=1ms TTL=127 Reply from 220.127.116.11: bytes=32 time=0ms TTL=127 Reply from 18.104.22.168: bytes=32 time=1ms TTL=127 Reply from 22.214.171.124: bytes=32 time=0ms TTL=127 Ping statistics for 126.96.36.199: 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 188.8.131.52 and 184.108.40.206 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.
Comment your thoughts.