VLANs Across 2 Switches with a Single Trunk
I am not familiar with the particular Netgear switch, but I know exactly how VLAN tags work. You need the ports between the switches to be tagged for both VLANs, and all other ports untagged. If I understood your setup correctly, the following is what you need:
- Port 7 should belong to, and tagged for both VLANs 4 and 5.
- Port 1 should simply belong to VLAN 5.
- Port 2~6 should simply belong to VLAN 4.
You shouldn't have to change any other default settings.
Also a few things aren't clear:
- Do you wish to aggregate ports 7 and 8? If so, the trunked interface should be added to, and tagged for both VLANs 4 and 5.
- I would be very surprised that you aren't able to choose which interface to perform DHCP request on. When you enable DHCP on the switch, do you not have to choose a VLAN to enable it on?
Related videos on Youtube
fred russell
Updated on September 18, 2022Comments
-
fred russell almost 2 years
I'm trying to use
cProfile
from: https://docs.python.org/2/library/profile.html#module-cProfileI can get the data to print but I want to be able to manipulate the data and sort so that I get just the info I want. To get the data to print I use:
b = cProfile.run("function_name")
But after that runs and prints,
b = None
and I cannot figure out where the data is that it printed so that I can manipulate the data. Of course, I can see the data, but in order to analyze the data I need to able to get some sort of output into my IED editor. I've tried pstats but I get error messages. It seems that to use pstats I have to save some sort of file but I cannot figure out how to run the program and save it to a file.UPDATE:
I almost have a solution
cProfile.run('re.compile("foo|bar")', 'restats')
There is a second argument where you can save a file as 'restats'. Now I should be able to open it and read it.
SOLVED:
cProfile.run("get_result()", 'data_stats') p = pstats.Stats('data_stats') p.strip_dirs().sort_stats(-1).print_stats() p.sort_stats('name')
-
Jayden Ng over 11 yearsThat all seems to make sense (I'll accept once I've tried it). The intent is to aggregate ports 7 and 8, once I have this working, but I wanted to get the theory right before tackling that. There is a "Management VLAN ID" field on the IP Configuration page, but I'm fairly certain that's for identifying which VLAN is allowed to administer the switch.
-
Toby Speight over 6 yearsThank you for this code snippet, which might provide some limited short-term help. A proper explanation would greatly improve its long-term value by showing why this is a good solution to the problem, and would make it more useful to future readers with other, similar questions. Please edit your answer to add some explanation, including the assumptions you've made.
-
Verthais over 2 yearsAll i get when i run
p.print_stats()
is some<pstats.Stats oobject at 0x00...>
which is useles. how to fixthis?