13 Replies Latest reply: Sep 29, 2010 11:39 AM by deonvj665 RSS

    About connecting 2 different subnets with a Router

    student

      Hello Guys,

       

      I have a question about 2 different subnets connected 2 a Cisco Router,for example if I have a subnet of 192.168.4.0/24 and 192.168.3.0/24.

      I connect the subnet 192.168.4.0/24(LAN1) with a switch 1 and 192.168.3.0/24(LAN2) with a switch2 and both of these switches are connected to a Cisco

      Router. I wanted to know that do I just have to do the following settings on my Cisco Router inorder to make communication between both LAN1 and LAN2?

       

      1) Assign IP addresses statically based on their network ids to each LAN(Fast Ethernet)interface of the Router which are connected to both LANs.

       

      2) Ping the LAN interface of the Router from any computers of each LAN inorder to make sure their is connectivity between these computers and Router.

       

      3) Updating the Routing table of the Router with the TCP/IP configuration assigned to each computer.

       

       

      Now is their anything else I have to do inorder to make sure their is successful communication between computers of both LAN?

      Please tell me do I have to use the static routing command for networks directly connected to the Router or it is only used for those networks that are indirectly

      connected to our Router?

       

      I hope my questions are clear.

       

      Also please note I have WinXP with latest SP on each computers in LAN .  

        • 1. Re: About connecting 2 different subnets with a Router
          student

          One more thing I forgot to add, pls note that I am just connecting these 2 different subnets with a router, this router is not connected to Internet or any WAN.

           

          Please note that all the computers in LAN are assigned IP addresses statically.

           

           

          I hope my quiery is clear.

           

          Looking forward to a prompt reply

           

          Thanks

          • 2. Re: About connecting 2 different subnets with a Router
            Krishna Rajput

            Dear,

            There is no need to do any thing now, just enable ip routing in Router and put the routers IP as a default gatewy to all the PC's according to their subnet & start working.

            • 3. Re: About connecting 2 different subnets with a Router
              samychihi21

              Hi student;

               

              You don't need to do anything else,

              actually if

              -the ports are not down

              -IP Addresses are set for each Fa

              -network addresses are set

              -PC's are correctly configured with IP Addresses set in the Fa eth

              -and default gateway is correctly configured

               

              you dhould be able to ping any int or pc.

               

              Good luck

               

              Regards.

              Samy

              • 4. Re: About connecting 2 different subnets with a Router
                student

                Thanks for your reply,

                 

                Samy,by ports,do you mean serial and fast ethernet interfaces of the Routers?

                 

                 

                Rajput, by IP routing,do you mean static routing?

                • 5. Re: About connecting 2 different subnets with a Router
                  Krishna Rajput

                  No Dear, Jst enable IP Routing in Global Configuration Mode, No Static Routes if Both the Networks are on same router.

                  And as Sam said check the Interface on which u have configured both networks ip, both ur Ethernet or FastEthernet interface whether they are up or not, jst check it by pinging the ip from the router only what u have given on the interface.

                  • 6. Re: About connecting 2 different subnets with a Router
                    student

                    Ok Rajput and Samy,

                     

                    Thanks for your clarification, so in this Router,we have to use the command of IP Routing, pls correct me if I am wrong, through IP routing ,you make sure that

                    computers in 1 LAN can communicate with each other without the need of default gateway but inorder for them to communicate with computers in other LAN,they should be using the default gateways.

                     

                    Yes I know how to check connectivity issues in such situations, it is only the configuration for which I need help.

                     

                    Can you please tell me which command should I use for IP routing?

                    • 7. Re: About connecting 2 different subnets with a Router
                      khalid.awale

                      U want to configure the interface on the router that is connected the two switches.

                       

                      From what u are saying, u have a router with the fastethernet interfaces

                       

                      LAN 1 192.168.4.0/24

                      LAN 2 192.168.3.0/24

                       


                      if i understand correclty what u need is the help with configuring of the router interfaces

                       

                      login to ur router

                       

                      go into the global configuration mode

                       

                      'interface fastethernet x/x'     (slot/port number)

                      'ip add 192.168.4.1 255.255.255.0

                      'no shutdown'

                      exit

                      'interface fastethernet x/x'

                      ip add 192.168.3.1 255.255.255.0

                      'no shutdown'

                       

                      about the pc connect to the switches use the (interface addresss as gateway)

                      e.q pc 192.168.4.2 255.255.255.0 gateway 192.168.4.1

                      likewise for pc connect to the other switch

                      192.168.3.2 255.255.255.0 gateway 192.168.3.1

                      • 8. Re: About connecting 2 different subnets with a Router
                        student

                        Thanks for your help Khalid,

                         

                         

                        Yes you are absolutely right, I just want to connect 2 fast ethernet interfaces of my Router with 2 different LANs without using the serial interface.

                         

                        Yes I know how to assign IP address to the interfaces of the Router and how to enable the interfaces ,so is this what IP routing simply all about?

                         

                        I don't have to do anything else in IP routing? If I simply assign IP addresses to the fast ethernet interfaces of the Router and enable these interfaces ,will the routing table of the Router will get updated with both networks(LAN1 &LAN2) directly connected to it?

                         

                        My other question is that if I statically assign IP addresses to all the computers in my LAN and set the default gateway in my computer as the IP address of the Fast Ethernet Interface of my Router,will the routing table in the router update itself automatically with the IP addresses of these computers?

                         

                        I know if I set the dhcp pool in the Router,the computers in LAN can get the tcp/ip configuration dynamically from the router and the routing table will get updated itself.

                         

                         

                        I hope my question is clear.

                         

                        Thanks for the attached file.

                        • 9. Re: About connecting 2 different subnets with a Router
                          deonvj665

                          Hi,

                           

                          Assigning IP addresses from a pool has nothing to do with the routing, except that you specify a default-router and that IP should be the one you assign to the ethernet ports.  You must remember that if you are going to create dhcp pools you will need two one for each range.  You should maybe consider naming the vlans to remove confusion later.  Otherwise the rest of the configuration should be the same.

                           

                          Hope it helps.

                           

                          D.

                          • 10. Re: About connecting 2 different subnets with a Router
                            student

                            Hi,

                             

                            Yes but routing will take place between 2 different subnets when each computer in the LAN has unique IP addresses?

                             

                            Now lets suppose, each computers are geting TCP/IP configuration dynamically from dhcp pool in router and the fast ethernet interfaces of the Router has the IP addresses,the interfaces are enabled and all the computers are able to ping their default gateway, now what ?What is the command of IP routing that I should use?

                             

                            Thanks

                            • 11. Re: About connecting 2 different subnets with a Router
                              deonvj665

                              Hi student,

                               

                              In the text file I have attached you will see the configs for the ethernet interfaces, the dhcp pools and the routing table from the router.  In the routing table you will see that the two networks are indicated as being directly connected.  I also included a ping test to show that a PC from one of the networks 192.168.4.3 can ping PC 192.168.3.3.  So you can see that data can route between the two networks/LAN segments.  You must remember that the router does not need a "route" to move data between two directly connected LAN segments.  If you were going to use multiple VLANS, or routing over the WAN link etc. you would need to look at using a routing protocol or static routes.

                               

                              As one of the previous people mentioned you must just make sure that the PCs have a default gateway or this will not work.

                               

                              Rgds

                               

                              D.

                              • 12. Re: About connecting 2 different subnets with a Router
                                student

                                Thanks for your reply and for the attached file. I'll look into it and if I find any problem then I'll get back to you.

                                • 13. Re: About connecting 2 different subnets with a Router
                                  deonvj665

                                  Hope it helps.