Hello Guest, Welcome to Apnea Board !
As a guest, you are limited to certain areas of the board and there are some features you can't use.
To post a message, you must create a free account using a valid email address.

or Create an Account


New Posts   Today's Posts

Networking question (basic)
#1
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?

[Image: pBt22Od.jpg]
Post Reply Post Reply
#2
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.
Post Reply Post Reply
#3
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.
______________________
Useful Links -or- When All Else Fails:
Posting SleepyHead Charts in 5 Easy Steps
Robysue's Beginner's Guide to Sleepyhead
Apnea Helpful Tips
Post Reply Post Reply


#4
(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.
Post Reply Post Reply
#5
(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.

[Image: pBt22Od.jpg]
Post Reply Post Reply
#6
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".


______________________
Useful Links -or- When All Else Fails:
Posting SleepyHead Charts in 5 Easy Steps
Robysue's Beginner's Guide to Sleepyhead
Apnea Helpful Tips
Post Reply Post Reply


#7
(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.
[Image: pBt22Od.jpg]
Post Reply Post Reply
#8
(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.
______________________
Useful Links -or- When All Else Fails:
Posting SleepyHead Charts in 5 Easy Steps
Robysue's Beginner's Guide to Sleepyhead
Apnea Helpful Tips
Post Reply Post Reply
#9
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.
[Image: pBt22Od.jpg]
Post Reply Post Reply


#10
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.
Post Reply Post Reply


Forum Jump:

New Posts   Today's Posts




About Apnea Board

Apnea Board is an educational web site designed to empower Sleep Apnea patients.

For any more information, please use our contact form.