Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. do routers contain switches ?

do routers contain switches ?

Scheduled Pinned Locked Moved Hardware & Devices
questiontutorial
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 10929916
    wrote on last edited by
    #1

    it's probably a stupid question but when packets are sent to a router that is for example at 192.168.1.1 on the LAN with a destination 192.168.1.4 the router searches a lookup table for the MAC associated with 192.168.1.4 and sends the frame just there and doesnt forward it to all connected devices so does that count as a switch ?

    J L M 3 Replies Last reply
    0
    • U User 10929916

      it's probably a stupid question but when packets are sent to a router that is for example at 192.168.1.1 on the LAN with a destination 192.168.1.4 the router searches a lookup table for the MAC associated with 192.168.1.4 and sends the frame just there and doesnt forward it to all connected devices so does that count as a switch ?

      J Offline
      J Offline
      jljamison
      wrote on last edited by
      #2

      well it wouldn't be the router searching the ARP table. The sending client would do the lookup in its own ARP table. If it didn't have an address for x.x.1.4, it would do an ARP broadcast to get it. I don't think the router has a role in this situation. Why? because if the default route is 192.168.1.1 then it is probably already on that subnet. The client is going to realize the destination is on the same subnet using the subnet mask. If the router had an integrated switch, the switch would be involved in forwarding the frame. Anyways my $0.02

      U 1 Reply Last reply
      0
      • J jljamison

        well it wouldn't be the router searching the ARP table. The sending client would do the lookup in its own ARP table. If it didn't have an address for x.x.1.4, it would do an ARP broadcast to get it. I don't think the router has a role in this situation. Why? because if the default route is 192.168.1.1 then it is probably already on that subnet. The client is going to realize the destination is on the same subnet using the subnet mask. If the router had an integrated switch, the switch would be involved in forwarding the frame. Anyways my $0.02

        U Offline
        U Offline
        User 10929916
        wrote on last edited by
        #3

        no I'm not talking about lan communication suppose you send a packet to codeproject from your pc. its trip will be (with all address change of course) 192.168.1.4->192.168.1.1(def.gate.)->10 more machines->codeproject say your external ip is 100.100.100.100 when its reply gets at 100.100.100.100 your router is in charge of sending it to x.x.x.4...I'm talking about this bit

        1 Reply Last reply
        0
        • U User 10929916

          it's probably a stupid question but when packets are sent to a router that is for example at 192.168.1.1 on the LAN with a destination 192.168.1.4 the router searches a lookup table for the MAC associated with 192.168.1.4 and sends the frame just there and doesnt forward it to all connected devices so does that count as a switch ?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          My knowledge is a bit rusty, but routing and switching occur at different protocol levels. Routing is on the network layer (like IP) and switching on the link layer (e.g.: Ethernet) I guess you are talking about a router with multiple LAN ports. I don't think there are any more unmanaged switches around, where packets are unconditionally sent out on all ports; the switch knows what devices are on which port, and will only transmit on the appropriate one (it will have to use address resolution if it doesn't know the MAC address, but this only happens once, or when the device is moved to another port) If the destination IP address is not on the local network, the router will naturally forward it to the WAN side. And it is not a stupid question :)

          1 Reply Last reply
          0
          • U User 10929916

            it's probably a stupid question but when packets are sent to a router that is for example at 192.168.1.1 on the LAN with a destination 192.168.1.4 the router searches a lookup table for the MAC associated with 192.168.1.4 and sends the frame just there and doesnt forward it to all connected devices so does that count as a switch ?

            M Offline
            M Offline
            Munchies_Matt
            wrote on last edited by
            #5

            I guess you are right. A Router must be a Switch with ARP lookup logic to determine which port to switch to.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups