Post Reply 
Networking question (basic)
Author Message
justMongo Offline

Monitors

Posts: 3,846
Joined: Sep 2013

Machine: ResMed VPAP Auto (S9)
Mask Type: Full face mask
Mask Make & Model: ResMed Mirage Quattro
Humidifier: ResMed H5i
CPAP Pressure: 18 IPAPmax - 11 EPAPmin, PS=5
CPAP Software: Other Software

Other Comments: μολὼν λαβέ

Sex: Male
Location: Калифорния

Post: #1
Networking question (basic)
Setup: A router with 4 ports is connected to the internet. To one of those 4 ports, an 8 port switch is connected. The router does local IP handout via DHCP. The router also always assigns the same IP to devices via DHCP reservation which is based on the MAC unique identifier of each connected device. Now, suppose two devices that are both connected to the 8 port switch are transferring information to/from each other.

Question: Other that having assigned IP addresses, what roll does the router play? Or, more to the point, does the traffic between the two devices connected to the 8 port switch have to pass through the router which is essentially upstream?

INFORMATION ON APNEA BOARD FORUMS OR ON APNEABOARD.COM SHOULD NOT BE CONSIDERED AS MEDICAL ADVICE. ALWAYS SEEK THE ADVICE OF A PHYSICIAN BEFORE SEEKING TREATMENT FOR MEDICAL CONDITIONS, INCLUDING SLEEP APNEA. INFORMATION POSTED ON THE APNEA BOARD WEB SITE AND FORUMS ARE PERSONAL OPINION ONLY AND NOT NECESSARILY A STATEMENT OF FACT.
05-31-2015 12:34 PM
Find all posts by this user Post Reply Quote this message in a reply

Donate to Apnea Board
eplantz Online

Preferred Members

Posts: 46
Joined: Mar 2013

Machine: S9 AutoSet
Mask Type: Nasal pillows
Mask Make & Model: Airfit P10
Humidifier: H5I
CPAP Pressure: 15-20
CPAP Software: SleepyHead

Other Comments:

Sex: Male
Location: Chicago

Post: #2
RE: Networking question (basic)
the router performs NAT (network address translation) which allows one Internet IP address to service multiple locally-assigned IP addresses. It knows how to determine when a reply comes in from the Internet how to get that back to the local IP that issued it.

Plus, these days, most routers also provide firewall protection services.

Depending upon your router, there may be other services it can or does provide.
05-31-2015 01:51 PM
Find all posts by this user Post Reply Quote this message in a reply
Crimson Nape Offline

Monitors

Posts: 1,327
Joined: Oct 2014

Machine: ResMed S9 Autoset
Mask Type: Other
Mask Make & Model: P-10 / F&P Simplus / DreamWear
Humidifier: H5i w/Climateline
CPAP Pressure: 8 - EPR 3
CPAP Software: SleepyHead

Other Comments: CMS-50F & 50IW

Sex: Male
Location: Georgia

Post: #3
RE: Networking question (basic)
No, all local traffic will stay within the switch. When you initiate a request, the network will look for a destination address. If the returned address value is within the domain ip/mask setting then it stays local. If the address returned is outside of the local ip/mask, then it will pass it to the router to look for the address on the wan. Since you have 4 LAN ports and 1 WAN port, you could have 4 separate networks, unable to see each other, and all of them would have the same internet access but you wouldn't be able to use the router as a DHCP for all networks.

Statistics prove that people who have more birthdays live longer.
05-31-2015 02:00 PM
Find all posts by this user Post Reply Quote this message in a reply

Donate to Apnea Board
archangle Offline
Wiki Editor
Advisory Members

Posts: 3,159
Joined: Feb 2012

Machine: ResMed S9 AutoSet
Mask Type: Nasal pillows
Mask Make & Model: ResMed Swift FX
Humidifier: ResMed S9 H5i
CPAP Pressure: 16-20
CPAP Software: ResScan SleepyHead EncoreBasic

Other Comments: Happy PAPper

Sex: Undisclosed
Location: USA

Post: #4
RE: Networking question (basic)
(05-31-2015 02:00 PM)sgearhart Wrote:  No, all local traffic will stay within the switch. When you initiate a request, the network will look for a destination address. If the returned address value is within the domain ip/mask setting then it stays local. If the address returned is outside of the local ip/mask, then it will pass it to the router to look for the address on the wan. Since you have 4 LAN ports and 1 WAN port, you could have 4 separate networks, unable to see each other, and all of them would have the same internet access but you wouldn't be able to use the router as a DHCP for all networks.

Assume this is all on the local network, as determined by the subnet mask and IP address.

When a program initiates a request to a particular IP address, the software within your computer will look up that IP address in its internal table that lists MAC addresses. If it has a MAC address for that IP address, it will send the request out onto its network with that MAC address.

If the switch knows that MAC address, it will send it directly to the other device, it will send it to only that port and it won't be seen by the router or any other devices. The switch watches traffic flowing through it to see what MAC address is attached to which port.

If your computer doesn't know the MAC address associated with a particular IP address, it will send out an ARP request looking for that IP address. The ARP request gets sent to all devices on the whole local network. If any device matches the IP address, it replies with its MAC address. Your computer remembers that MAC and sends any future requests for that IP directly to that MAC address. The network will then route that back through the switch to the right port.

If the IP address is not in the local subnet, your computer will send the data to the MAC address of your default gateway. (Router)

That's the basic theory. There are more and more "tweaks" to how things work and it may work out a little differently in some cases, depending on how "smart" and complicated the network is configured.

The boundaries are also getting fuzzy. Your "router" may actually contain a "router", a switch, a NAT device, a firewall, a VPN device, a WiFi access point, a cable modem, and other things. Your "switch" can be one of several levels of complexity, sometimes even doing some router functions, and may have other functions embedded as well.

(05-31-2015 02:00 PM)sgearhart Wrote:  Since you have 4 LAN ports and 1 WAN port, you could have 4 separate networks, unable to see each other, and all of them would have the same internet access but you wouldn't be able to use the router as a DHCP for all networks.

For most home routers, it will DHCP for all 4 LAN ports. The router box contains a router function and a DHCP server. The 4 LAN ports are effective attached to a dumb switch inside the case of the router box, and the DHCP server won't even know which port a device is attached to.

I guess it's possible some home routers are more complicated.

Get the free SleepyHead software here.
Useful links.
Click here for information on the main alternative to CPAP.
If it's midnight and a DME tells you it's dark outside, go and check it yourself.
05-31-2015 04:25 PM
Find all posts by this user Post Reply Quote this message in a reply
justMongo Offline

Monitors

Posts: 3,846
Joined: Sep 2013

Machine: ResMed VPAP Auto (S9)
Mask Type: Full face mask
Mask Make & Model: ResMed Mirage Quattro
Humidifier: ResMed H5i
CPAP Pressure: 18 IPAPmax - 11 EPAPmin, PS=5
CPAP Software: Other Software

Other Comments: μολὼν λαβέ

Sex: Male
Location: Калифорния

Post: #5
RE: Networking question (basic)
(05-31-2015 04:25 PM)archangle Wrote:  Assume this is all on the local network, as determined by the subnet mask and IP address.

When a program initiates a request to a particular IP address, the software within your computer will look up that IP address in its internal table that lists MAC addresses. If it has a MAC address for that IP address, it will send the request out onto its network with that MAC address.

If the switch knows that MAC address, it will send it directly to the other device, it will send it to only that port and it won't be seen by the router or any other devices. The switch watches traffic flowing through it to see what MAC address is attached to which port.
Yes, the switch is an unmanaged switch; but it does have a MAC table that it builds dynamically. This is the answer I was seeking.

If your computer doesn't know the MAC address associated with a particular IP address, it will send out an ARP request looking for that IP address. The ARP request gets sent to all devices on the whole local network. If any device matches the IP address, it replies with its MAC address. Your computer remembers that MAC and sends any future requests for that IP directly to that MAC address. The network will then route that back through the switch to the right port.

If the IP address is not in the local subnet, your computer will send the data to the MAC address of your default gateway. (Router)

That's the basic theory. There are more and more "tweaks" to how things work and it may work out a little differently in some cases, depending on how "smart" and complicated the network is configured.

The boundaries are also getting fuzzy. Your "router" may actually contain a "router", a switch, a NAT device, a firewall, a VPN device, a WiFi access point, a cable modem, and other things. Your "switch" can be one of several levels of complexity, sometimes even doing some router functions, and may have other functions embedded as well.
My router has all of the above except a modem function. I'm on DSL with my DSL modem in bridge mode. My router initiates the PPPOE session for access to the internet.

(05-31-2015 02:00 PM)sgearhart Wrote:  Since you have 4 LAN ports and 1 WAN port, you could have 4 separate networks, unable to see each other, and all of them would have the same internet access but you wouldn't be able to use the router as a DHCP for all networks.

For most home routers, it will DHCP for all 4 LAN ports. The router box contains a router function and a DHCP server. The 4 LAN ports are effective attached to a dumb switch inside the case of the router box, and the DHCP server won't even know which port a device is attached to. Yes. The DHCP server in the router will hand out LAN IPs (for my LAN) in the range of 192.168.1.100-164 The second octet is a set paramter. I generally like to not use 0 for the second octet. Only a second router in the downstream can have another DHCP handout that could be in another range. So, a second router could have a different 2nd octet and/or a different 1st octet range.

I guess it's possible some home routers are more complicated.

INFORMATION ON APNEA BOARD FORUMS OR ON APNEABOARD.COM SHOULD NOT BE CONSIDERED AS MEDICAL ADVICE. ALWAYS SEEK THE ADVICE OF A PHYSICIAN BEFORE SEEKING TREATMENT FOR MEDICAL CONDITIONS, INCLUDING SLEEP APNEA. INFORMATION POSTED ON THE APNEA BOARD WEB SITE AND FORUMS ARE PERSONAL OPINION ONLY AND NOT NECESSARILY A STATEMENT OF FACT.
05-31-2015 05:59 PM
Find all posts by this user Post Reply Quote this message in a reply

Donate to Apnea Board
Crimson Nape Offline

Monitors

Posts: 1,327
Joined: Oct 2014

Machine: ResMed S9 Autoset
Mask Type: Other
Mask Make & Model: P-10 / F&P Simplus / DreamWear
Humidifier: H5i w/Climateline
CPAP Pressure: 8 - EPR 3
CPAP Software: SleepyHead

Other Comments: CMS-50F & 50IW

Sex: Male
Location: Georgia

Post: #6
RE: Networking question (basic)
JustMongo, I didn't mean to hijack your post. I was just offering a possibility. Here is just one of the several ways I was referring to using multiple networks through the same router.
Example:
Router: IP: 192.168.0.1
Network 1: IP: 192.168.1.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
Network 2: IP: 192.168.2.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
Network 3: IP: 192.168.3.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
Network 4: IP: 192.168.4.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
One computer on each network could act as a DHCP server or assign static IP's.

The router will perform a NAT translation to the internet for each network without any of the networks seeing each other.

I use something similar to this at home when the grand kids want to go to the internet and I don't want them on my business network, as well, at customer sites for their visitors.

I didn't mean to open a "can of worms".

Statistics prove that people who have more birthdays live longer.
06-01-2015 08:35 AM
Find all posts by this user Post Reply Quote this message in a reply
justMongo Offline

Monitors

Posts: 3,846
Joined: Sep 2013

Machine: ResMed VPAP Auto (S9)
Mask Type: Full face mask
Mask Make & Model: ResMed Mirage Quattro
Humidifier: ResMed H5i
CPAP Pressure: 18 IPAPmax - 11 EPAPmin, PS=5
CPAP Software: Other Software

Other Comments: μολὼν λαβέ

Sex: Male
Location: Калифорния

Post: #7
RE: Networking question (basic)
(06-01-2015 08:35 AM)sgearhart Wrote:  JustMongo, I didn't mean to hijack your post. I was just offering a possibility. Here is just one of the several ways I was referring to using multiple networks through the same router.
Example:
Router: IP: 192.168.0.1
Network 1: IP: 192.168.1.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
Network 2: IP: 192.168.2.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
Network 3: IP: 192.168.3.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
Network 4: IP: 192.168.4.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
One computer on each network could act as a DHCP server or assign static IP's.

The router will perform a NAT translation to the internet for each network without any of the networks seeing each other.

I use something similar to this at home when the grand kids want to go to the internet and I don't want them on my business network, as well, at customer sites for their visitors.

I didn't mean to open a "can of worms".

No problem sgearhart. All answers welcome.

Yes, I get what you're saying. It does require additional DHCP servers to segregate sub LANs

I'm getting ready to update some network components. I'm thinking about using the Linksys AC3200 router and the Netgear ProSAFE GS108T 8-Port Gigabit Smart Switch.

I need to be IPv6 ready; and be able to prioritize traffic as I'm going to VoIP phone. My ROKU, OPPO BluRay Player and Channel Master DVR are attached to my network. My present "dumb" switch has 4 PoE ports that I was using for security cameras. Logitech backed out of the market for security cameras. I'm a bit concerned about trying to use those PoE ports with devices that don't require PoE. If I understand PoE, it's 48 Volts applied between twisted pairs of the CAT-5/6 LAN cable.

INFORMATION ON APNEA BOARD FORUMS OR ON APNEABOARD.COM SHOULD NOT BE CONSIDERED AS MEDICAL ADVICE. ALWAYS SEEK THE ADVICE OF A PHYSICIAN BEFORE SEEKING TREATMENT FOR MEDICAL CONDITIONS, INCLUDING SLEEP APNEA. INFORMATION POSTED ON THE APNEA BOARD WEB SITE AND FORUMS ARE PERSONAL OPINION ONLY AND NOT NECESSARILY A STATEMENT OF FACT.
06-01-2015 10:28 AM
Find all posts by this user Post Reply Quote this message in a reply

Donate to Apnea Board
Crimson Nape Offline

Monitors

Posts: 1,327
Joined: Oct 2014

Machine: ResMed S9 Autoset
Mask Type: Other
Mask Make & Model: P-10 / F&P Simplus / DreamWear
Humidifier: H5i w/Climateline
CPAP Pressure: 8 - EPR 3
CPAP Software: SleepyHead

Other Comments: CMS-50F & 50IW

Sex: Male
Location: Georgia

Post: #8
RE: Networking question (basic)
(06-01-2015 10:28 AM)justMongo Wrote:  I'm getting ready to update some network components. I'm thinking about using the Linksys AC3200 router and the Netgear ProSAFE GS108T 8-Port Gigabit Smart Switch.

I need to be IPv6 ready; and be able to prioritize traffic as I'm going to VoIP phone.
Nice selection . . You have good taste!

(06-01-2015 10:28 AM)justMongo Wrote:  I'm a bit concerned about trying to use those PoE ports with devices that don't require PoE. If I understand PoE, it's 48 Volts applied between twisted pairs of the CAT-5/6 LAN cable.

Network wire has 4 pair of wires. 10/100Mps devices use only 2 pair for communication, thus a PoE can use a pair(or 2) for power. Thar's why a PoE device is limited to 100Mbps. (At least all the ones I've seen.) A 1Gb device uses all 4 pair. Unless the PoE switch is 802.3af compliant, you could experience problems with a 1Gb device connected to it.

Statistics prove that people who have more birthdays live longer.
06-01-2015 11:19 AM
Find all posts by this user Post Reply Quote this message in a reply
justMongo Offline

Monitors

Posts: 3,846
Joined: Sep 2013

Machine: ResMed VPAP Auto (S9)
Mask Type: Full face mask
Mask Make & Model: ResMed Mirage Quattro
Humidifier: ResMed H5i
CPAP Pressure: 18 IPAPmax - 11 EPAPmin, PS=5
CPAP Software: Other Software

Other Comments: μολὼν λαβέ

Sex: Male
Location: Калифорния

Post: #9
RE: Networking question (basic)
My present switch is the DLink DGS-1008P. It's a gibabit switch and 802.3af compliant. So, the PoE is applied as a difference in common mode Voltage between twisted pairs.

I'm just not sure that all devices can manage that 48 Volt common mode difference.

INFORMATION ON APNEA BOARD FORUMS OR ON APNEABOARD.COM SHOULD NOT BE CONSIDERED AS MEDICAL ADVICE. ALWAYS SEEK THE ADVICE OF A PHYSICIAN BEFORE SEEKING TREATMENT FOR MEDICAL CONDITIONS, INCLUDING SLEEP APNEA. INFORMATION POSTED ON THE APNEA BOARD WEB SITE AND FORUMS ARE PERSONAL OPINION ONLY AND NOT NECESSARILY A STATEMENT OF FACT.
06-01-2015 11:31 AM
Find all posts by this user Post Reply Quote this message in a reply

Donate to Apnea Board
GWild Offline

Preferred Members

Posts: 88
Joined: May 2014

Machine: RemStar Sys1 560P
Mask Type: Nasal mask
Mask Make & Model: Ultra Mirage
Humidifier: Sys1
CPAP Pressure: 8 - 20 auto / 8.9 avg
CPAP Software: SleepyHead EncoreBasic

Other Comments:

Sex: Undisclosed
Location:

Post: #10
RE: Networking question (basic)
Quote:Router: IP: 192.168.0.1
Network 1: IP: 192.168.1.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
Network 2: IP: 192.168.2.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
Network 3: IP: 192.168.3.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
Network 4: IP: 192.168.4.x /24(Subnet mask: 255.255.255.0) Gateway(GW):192.168.0.1
One computer on each network could act as a DHCP server or assign static IP's.

Running on sketchy memory ... two degrees in this stuff and it is amazing how fast it goes unless you use it daily.

This generally won't work. The mask prevents the .1.x network from negotiation of any .0.x route. Remember that x.00 is the network address and that x.FF is the place devices go to (arp) find the MAC address.

It might work if you have a good router and can actually program routes.

The OP question depends on whether the switch is layer 2 or layer 3.

By the way - all a layer 2 switch does is help prevent collisions - consider it a hub of sorts that simply connects all the wires together in a way that allows multiple paths of communication. A layer 3 switch adds some capabilities useful for VN and routing.
(This post was last modified: 06-01-2015 07:01 PM by GWild.)
06-01-2015 06:50 PM
Find all posts by this user Post Reply Quote this message in a reply
Post Reply 


Forum Jump:

Who's Online (Complete List)