DaemonForums  

Go Back   DaemonForums > Miscellaneous > General Hardware

General Hardware General hardware related questions.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 28th January 2015
PingPing's Avatar
PingPing PingPing is offline
Real Name: Hammond
Port Guard
 
Join Date: Jan 2015
Location: United Kingdom
Posts: 18
Default Gigabit Switch plugged into 10/100 Router

This is a basic networking question and something that I struggle with.

Say I have a switch with a number of Gigabit Ethernet ports on them and the switch is plugged into a Fast Ethernet port on a router.

If I connect my PC to one Gigabit port on the switch and my NAS to another Gigabit port on the same switch (in order to transfer large files from the PC to the NAS), does the traffic go through the router and, therefore, is the Fast Ethernet port on the router throttling the Gigabit ports on the switch so that they only operate at 100Mbps max?

Or does the traffic go directly between the Gigabit ports (at 1000Mbps) and bypass the Fast Ethernet port on the router?

I'm thinking the former, but a categorical answer would be appreciated.

Cheers.
Reply With Quote
  #2   (View Single Post)  
Old 28th January 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Hello, and welcome!
Quote:
If I connect my PC to one Gigabit port on the switch and my NAS to another Gigabit port on the same switch (in order to transfer large files from the PC to the NAS), does the traffic go through the router....
I'll draw a "picture" -- please correct any mistakes or misunderstandings.
Code:
      [router]
         |
         |
         |
    [switch]
      |   |
      |   |
      |   |
[NAS]-+   +-[PC]
If both the PC and the NAS device are on the same Ethernet segment (also called a broadcast domain), and also on the same IP subnet, traffic will go directly between the two devices, connected through the switch, and the router will not be involved in PC <-> NAS communication.

(It is possible to configure the devices on separate IP subnets, or with a managed switch on separate VLANs. Then, the traffic must be routed. You would have had a specific operational need to do this, and the knowledge you were doing it.)

Last edited by jggimi; 28th January 2015 at 06:03 PM. Reason: clarity
Reply With Quote
  #3   (View Single Post)  
Old 28th January 2015
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by PingPing View Post
...a categorical answer would be appreciated.
At boot-time, a switch will know nothing about what MAC addresses are attached, so the initial traffic is broadcasted to all active switch ports. As traffic commences, the source & destination addresses within each packet encountered will be looked at, & placed into the switch's ARP table keyed by the switch port attachment. The presence of gigabyte & slower ports should not make any difference.

If you interested in empirically testing, enable logging through the router's packet filter. If the end points are on the same network segment, packets do not need to go through the router at all. No logging will be seen.

However, packets can be forced through the router if the switch supports virtual networks or VLAN's. The endpoints would need to reside on different VLAN's, & the router would have to be configured to send packets from one VLAN to the next. In this scenario, the packets would have to traverse the router to reach their destination. This topology is frequently called a "router on a stick".

Most consumer switches targeting the home market do not support VLAN's.

Last edited by ocicat; 28th January 2015 at 07:46 PM. Reason: Insert missing participle
Reply With Quote
  #4   (View Single Post)  
Old 28th January 2015
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 429
Default

To further beat a dead horse on describing this issue (just kidding, ocicat and jggimi! Great explanations...I'm just OCD about this stuff), the switch cares nothing about what ip address a packet is sent to. It only deals with mac addresses/ethernet frames. In other words, if host A looks in its route table and sees that host B falls within the same subnet as host A, it will send the traffic directly (i.e. the frame with have host Bs mac address and the packet within the frame will contain host Bs ip). If, however, host A notices that host B resides outside of host As subnet (different vlan/subnet/whatever), then it will send the packet as before with host Bs ip, but the containing frame will instead have host As default gateways mac address, with the understanding that host As default gateway will forward the packet down the line (even if that means back to the switch =)

None of this matters if host A and host B are on the same subnet/vlan, though, as the packets/frames will then be forwarded by the switch and not touch the router.
__________________
Linux/Network-Security Engineer by Profession. OpenBSD user by choice.
Reply With Quote
  #5   (View Single Post)  
Old 29th January 2015
PingPing's Avatar
PingPing PingPing is offline
Real Name: Hammond
Port Guard
 
Join Date: Jan 2015
Location: United Kingdom
Posts: 18
Default

Thank you all for your responses. My question has been well and truly answered!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gigabit ethernet usage at home IdOp General Hardware 9 11th April 2015 08:41 AM
system slow when plugged to network albator OpenBSD General 9 14th November 2013 07:56 PM
Trouble with ZFS switch dewarrn1 FreeBSD General 2 11th September 2008 11:58 PM
Realtek Gigabit 8169SC Network card not workies!! ashleyd FreeBSD General 5 11th August 2008 12:50 PM
Booting with external USB drive plugged in? Bruco FreeBSD General 29 17th May 2008 05:39 PM


All times are GMT. The time now is 02:30 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick