Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Apr 2016
    Posts
    717
    Member #
    53891
    Liked
    11 times

    networking question, packet switching

    So I'm studying switches and I read that a switch only establishes a connection long enough for the packet to be sent, then it terminates the connection or switches it off or whatever, so how is a session established through a switch?

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    The next non-switch node establishes the session. For instance, if you have a PC that goes to a switch, then the switch connects to a router, the session is established on the router. Switches only look at the destination IP/MAC, attempt match it on their table and forward out the port that leads there.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    Senior Member
    Join Date
    Apr 2016
    Posts
    717
    Member #
    53891
    Liked
    11 times
    I'm not sure I follow, the switch determines where to send a single packet relevant to a mac address it has on its table (do routers have mac addresses too?) so lets say this packet is a request for a facebook login page, the switch reads the mac address that's at the datalink layer, then sends it to a router, how does the router get back to the client?

  5. #4
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    First: every single IP enabled device has a MAC address. IPv4 uses both the device's IP address and MAC address to find and communicate with devices on a network.

    So, every device maintains a table of the devices it's connected to. The process is quite a bit more complex than that, but suffice it to say, a switch, router or other device knows which physical port to send data through based on this table. A switch's function is to split a small area of a network without actually doing any routing. In other words, when, say you request facebook.com, your device doesn't request it from the switch. It requests it from its default gateway, which is almost always a router, modem or combination of the 2. The request goes to the switch, the switch sees that you're looking for info from the router, and passes it on through the physical port the router is on.

    Now, sessions. Transmission Control Protocol, or TCP enables a session for transmission of data. Switches only process TCP packets so far as to see where they need to go. Most consumer switches don't even recreate the packet. They just pass it on to the next device. So, when you request Facebook.com, your device requests a session with the router/modem/whatever on the other side of the switch. Once the session is established, the request is sent. Usually, you're only talking 1 packet for the request. Then, the response happens the same way. The router requests a session with the device, then the packets are sent and then assembled into the data returned from facebook.com and passed to your browser.

    I learned all of this, no kidding, in the last 2 weeks. I'm taking a college class on networking right now.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  6. #5
    Senior Member
    Join Date
    Apr 2016
    Posts
    717
    Member #
    53891
    Liked
    11 times
    does the router send the data back through the switch or does it find a different way?

  7. #6
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Devices will always use the quickest path. So, if that is the quickest path or only path, it will go back thru the switch. If there is another path, and that way is faster, perhaps due to network congestion, it may take another path.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  8. #7
    Senior Member
    Join Date
    Apr 2016
    Posts
    717
    Member #
    53891
    Liked
    11 times
    I don't understand how can it send it back through the switch if a session cant be established through a switch?

  9. #8
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Because the switch just splits off the network. It just blindly passes the packet on to the device.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  10. #9
    Junior Member
    Join Date
    May 2018
    Posts
    19
    Member #
    59071
    Server was configured for Gigabit by default. Server will attempt to connect at that speed, via autonegotiation. (auto is the only option for Gigabit)

    But as I said, the switchport was hard-coded for 100/full. This results in a speed mismatch.

    The end result was the link was established, but as 100/half, which neither end wanted and resulted in many errors and collisions on the link. The link did work, in that connectivity was established, but it was not at all optimal.

    Once the switchport was fixed, a proper 1000/full link was established, by autonegotiation. No more collisions, no more errors, we finally have a happy connection.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:47 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com