0

network

I have not configured the network yet. Every vlan will have a different subnet. I want to assign ip addresses to the switches on the network from another subnet. How can i provide a default gateway for the switches ? If i give the same ip addresses as default gateway to the layer 3 switches for the other switches, how i can give the layer 3 switches static ip addresses ? I want to assign static ip addresses to the layer 3 switches and i want to use them as a default gateway for the layer 2 switches. How can i do this thing ? I have been confused.

SVI's of the layer 3 switches

interface Vlan1
 ip address 192.168.1.94 255.255.255.224
 ip helper-address 192.168.1.33
!
interface Vlan20
 mac-address 0050.0f1a.5301
 ip address 192.168.1.6 255.255.255.248
 ip helper-address 192.168.1.33
!
interface Vlan21
 mac-address 0050.0f1a.5302
 ip address 192.168.1.14 255.255.255.248
 ip helper-address 192.168.1.33
!
interface Vlan22
 mac-address 0050.0f1a.5303
 ip address 192.168.1.22 255.255.255.248
 ip helper-address 192.168.1.33
!
interface Vlan23
 mac-address 0050.0f1a.5304
 ip address 192.168.1.30 255.255.255.248
!
interface Vlan24
 mac-address 0050.0f1a.5305
 ip address 192.168.1.62 255.255.255.224
!
ip default-gateway 192.168.1.94
2
  • 1
    I would suggest trying to practice on a smaller network until you get the basic concepts. Two layer 2 switches with one L3 switch in the middle - try making that one work, then complicate further.
    – manish ma
    Sep 15, 2023 at 14:08
  • @manishma Thanks.
    – shiva13
    Sep 15, 2023 at 14:28

1 Answer 1

1

Every vlan will have a different subnet.

OK.

I want to assign ip addresses to the switches on the network from another subnet.

Each IP address you assign to an SVI needs to match the subnet that's running within that VLAN.

How can i provide a default gateway for the switches ?

Depending on the switch model and config (L2/L3), using something along ip default-gateway 10.10.10.1 or set ip route default <gateway>.

If i give the same ip addresses as default gateway to the layer 3 switches for the other switches, how i can give the layer 3 switches static ip addresses ?

All nodes connected to the same uplink subnet should probably use the same default gateway (not sure if I get your question).

I want to assign static ip addresses to the layer 3 switches and i want to use them as a default gateway for the layer 2 switches.

Yes, that's how you do it.

If there are multiple uplinks and you'd like multiple default gateways, you can configure each of them for a specific interface, or use a redundant routing setup (e.g. HSRP or VRRP) for the uplink router. You have not provided us with sufficient details on your concept to see which may be better.

If your access layer is layer-2 only then your end nodes need to be able to use multiple default gateways. This can be cumbersome, so a redundant (virtual) router is likely a better option.

To build a concept, you should work your way down from the network layer: draw a layer-3-only map (only routers and subnets) how you want your network to route. Based on that, draw a layer-2 map (switches, VLANs, trunks, plain links) to distribute the subnets. If needed, add a physical-layer map with link sizings, link aggregation and medium details.

11
  • Thank you much. I would give static ip to "int vlan 1" but after that i would use "int vlan 1" for the default gateways for the other switches came to my mind. That's way i was confused. @Zac67
    – shiva13
    Sep 15, 2023 at 14:42
  • Not sure if I understand - of course, you need to configure the IP address as default gateway that you have configured on the upstream L3 switch's SVI. If you're too confused, please add the proposed switch configurations to your question (as text, using the editor's {} preformat option).
    – Zac67
    Sep 15, 2023 at 14:53
  • I have done it. I've used vlan1's SVI as default gateway. In this situation, how i can assign static ip addresses to those layer 3 switches ?
    – shiva13
    Sep 15, 2023 at 15:37
  • Like in your question?!? interface vlan x ip address a.b.c.d m.n.o.p
    – Zac67
    Sep 15, 2023 at 16:30
  • I know it. Should i create another vlan for static ip addresses or should i use int vlan 1 for static ip addresses ?
    – shiva13
    Sep 15, 2023 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.