0

(sorry for my basic question but I had noone to ask)

Does routers/smart-switches that foward/pass vlan packets inside same network need to have assign IP from that given VLAN that they foward packets (thru TRUNK port) or they only need one IPfrom management VLAN so administrator can access them from that single VLAN ?

Va_ni_tas
  • 26
  • 2
  • Please clarify what you mean by `VLAN packages`? Do you mean ethernet frames that have 802.1Q VLAN header in them? Or do you mean IP packets that are sent in a VLAN? – Tero Kilkanen Feb 05 '22 at 09:53
  • @TeroKilkanen both ? Each interface has some untagged VIDs. One port is a trunk port with all VLans passing thru. With a netmask of /24 while using around 50 switches/routers inside that network you would lose around 50 IP's from each VLAN network. Thats why I asked. – Va_ni_tas Feb 11 '22 at 10:56

2 Answers2

2

Routers need an IP address in every connected network they have to route from/to.

Switches, whether smart or not, only need an IP address for management, none in the networks they forward packets from/to.

Tilman Schmidt
  • 3,778
  • 10
  • 23
  • 1
    "Router" can also be a layer-3 switch used for routing. – Zac67 Feb 05 '22 at 07:49
  • Oh you could be right, its because layer-3 vs layer-4. So its would be IP-spaces-wise to use switches instead of routers when playing with a big number of devices in as small /24 netmask. Thats make a lot of sense now – Va_ni_tas Feb 11 '22 at 11:00
0

"Assigned IP" could mean a few different things.

When I use the term, I only use that for when a system always has a fixed, known IP address.

However, the DHCP protocol (which decades ago I helped develop), is there to "assign" IP addresses for all nodes that don't have one already appointed to them.

Surely EVERY node needs an IP address, and they get that address the one way or the other. As soon as they have such an address, and presuming it's known to the routing systems / software (VPN, "VLAN" or otherwise), then it can communicate anything it wants. What happens from there depends on a lot of other factors such as open ports and so forth...

Richard T
  • 1,130
  • 11
  • 26
  • "Surely EVERY node needs an IP address" - but a layer-2 switch is not a node in that sense. Only its management engine is, in the case of a managed switch. – Tilman Schmidt Feb 05 '22 at 13:01