Need help with understanding a basic network

redgunnerredgunner Member Posts: 42 ■■□□□□□□□□
Untitled.png

Switch1 is 192.168.1.0/24 and Switch2 is 192.168.2.0/255

Can I ask in this situation how do I make PC4 ping PC1 for example?

I am very new to Cisco and I am using packettracer to simulate this, if there are any hints what I need to read next?

Thank you in advance.

Comments

  • dontstopdontstop Member Posts: 579 ■■■■□□□□□□
    Has anything been configure from the CLI or have you just connected all the devices together at this stage?

    Are you able to post the configuration from the router?
    show running-config
    
  • OctalDumpOctalDump Member Posts: 1,722
    Give the router an address on each network, on the interface connected to each.

    So say Fa0/0 is connected to Switch1, then you give it an address of 192.168.1.254 with subnet mask 255.255.255.0
    And Fa0/1 is connected to Switch2, then you give it an address of 192.168.2.254 with subnet mask 255.255.255.0

    Then for Server1, PC1, PC2 and PC3, you will need to give them each IP addresses 192.168.1.x, subnet mask 255.255.255.0, default router 192.168.1.254

    And for PC4, PC5, PC6 you give them each IP addresses in 192.168.2.x, subnet mask 255.255.255.0, default router 192.168.2.254

    The router will automatically route between directly connected networks without any more config. Each of the computers will know how to get to networks that aren't its local network, by using the default gateway.

    So I guess the part you need to read up on is configuring interfaces on a router (and enabling them).
    2017 Goals - Something Cisco, Something Linux, Agile PM
  • redgunnerredgunner Member Posts: 42 ■■□□□□□□□□
    !
    version 15.1
    no service timestamps log datetime msec
    no service timestamps debug datetime msec
    no service password-encryption
    !
    hostname Router
    !
    !
    !
    !
    ip dhcp excluded-address 192.168.1.1
    ip dhcp excluded-address 192.168.2.1
    !
    ip dhcp pool s1
    network 192.168.1.0 255.255.255.0
    ip dhcp pool s2
    network 192.168.2.0 255.255.255.0
    !
    !
    !
    ip cef
    no ipv6 cef
    !
    !
    !
    !
    license udi pid CISCO2911/K9 sn FTX1524TB3N
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    spanning-tree mode pvst
    !
    !
    !
    !
    !
    !
    interface GigabitEthernet0/0
    no ip address
    duplex auto
    speed auto
    shutdown
    !
    interface GigabitEthernet0/1
    ip address 192.168.1.1 255.255.255.0
    duplex auto
    speed auto
    !
    interface GigabitEthernet0/2
    ip address 192.168.2.1 255.255.255.0
    duplex auto
    speed auto
    !
    interface Vlan1
    no ip address
    shutdown
    !
    ip classless
    !
    ip flow-export version 9
    !
    !
    !
    !
    !
    !
    !
    line con 0
    !
    line aux 0
    !
    line vty 0 4
    login
    !
    !
    !
    end


    I have worked out that I can set my default gateway and that works fine, it can ping between the two subnets but then my follow up question is what if I have 3 switches? how do I make them all ping between each other?
  • OctalDumpOctalDump Member Posts: 1,722
    I see that you've set up DHCP pools on the router. You can set the default gateway in the DHCP pool to make life easier.

    If you wanted to add a third subnet to your set up, you could attach a switch to GigabitEthernet 0/0 and simply set it up like the others. All the end points need to know is "how do I get to networks that aren't my network?" The router knows how to get to each network, so you just need to tell the clients to send traffic for other networks to the router. Naturally, it gets more complicated if you have other routers involved.
    2017 Goals - Something Cisco, Something Linux, Agile PM
  • dontstopdontstop Member Posts: 579 ■■■■□□□□□□
    redgunner wrote: »
    I have worked out that I can set my default gateway and that works fine, it can ping between the two subnets but then my follow up question is what if I have 3 switches? how do I make them all ping between each other?

    Would the third switch be on a third subnet? If that's the case just assign another interface on the router like you did with the previous two.
  • TechnicalJayTechnicalJay Member Posts: 219 ■■■□□□□□□□
    If you want to ping PC4 to PC1 you'll have to setup an IP route.

    If PC1 has an IP of 192.168.1.10 and PC4 has an IP of 192.168.2.10
    and the router has f0/0 192.168.1.1 (PC1 side) and f0/1 192.168.2.1 (PC4 side)

    You would enter in the command in the CLI in configuration mode

    ip route 192.168.2.1 255.255.255.0 192.168.1.1
  • liz4rdliz4rd Member Posts: 51 ■■□□□□□□□□
    If you want to ping PC4 to PC1 you'll have to setup an IP route.

    If PC1 has an IP of 192.168.1.10 and PC4 has an IP of 192.168.2.10
    and the router has f0/0 192.168.1.1 (PC1 side) and f0/1 192.168.2.1 (PC4 side)

    You would enter in the command in the CLI in configuration mode

    ip route 192.168.2.1 255.255.255.0 192.168.1.1

    No ip route needed. The router is aware of both subnets as they are connected. The ping will see it's not on it's own subnet and arp for the mac of the default gateway, which will then pass on for the router to forward.
Sign In or Register to comment.