Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Attention: The Cisco Support Community site will be in read only mode on Dec14, 2017 from 12:01am PST to 11:30am for standard maintenance. Sorry for the inconvenience.

New Member

default gatewy and dhcp helper

Hello everyone,

i would appreciate it if any one could help me with the following

WAN network--- switch stack---- lan ( another switch stack - access switch- end devices)

i want to configure the core switch stack as a default gateway and dhcp helper for every vlan in the lan

can anyone provide a configuration template ?

Everyone's tags (6)
2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: default gatewy and dhcp helper

You would have a management address on all of your switches, but that would be for a certain vlan. You don't need to create 10 svis on the access switches if you have 10 svis on the core. Whatever your management vlan is, let's say vlan 5, would also be on the access switch. If you have vlan 5 svi addressed at 192.168.5.1 on the core, access switches 2, 3, and 4, could also have vlan 5 svi addressed at 192.168.5.2, 192.168.5.3, and 192.168.5.4 respectively.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

default gatewy and dhcp helper

Asus,

IP Routing enables routing on the switch. It only does you good if you plan on having this switch act as a L3 device. If you're going to configure it strictly as L2 (access switches), you can leave "no ip routing" and "ip default-gateway". IP default-gateway is used when routing is disabled. If routing was enabled with "ip routing", your default-gateway is no longer used, and you'd have to configure a static route of 0.0.0.0 0.0.0.0 .

For example, if you have vlan 10 on a L3 switch:

int vlan 10

ip address 192.168.10.1

And you have a L2 access switch with the following config:

no ip routing

int vlan 10

ip address 192.168.10.254

ip default-gateway 192.168.10.1

This would mean that if you're in another subnet, you could get to the swich on 192.168.10.254 because it knows to send its default traffic back to the L3 switch. I must also say that you won't have the "ip routing" on L2 switches usually, but there are some exceptions on some of the newer switches.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
17 REPLIES

default gatewy and dhcp helper

What kind of switch is your 'core'?

HTH,

John

HTH, John *** Please rate all useful posts ***
New Member

default gatewy and dhcp helper

thw core stack is 2x 3750

Re: default gatewy and dhcp helper

Okay, suppose you have two vlans - 10 and 20. Your dhcp server is on vlan 10. You would configure it like this:

int vlan 10

ip address 192.168.10.1 255.255.255.0

int vlan 20

ip address 192.168.20.1 255.255.255.0

ip helper-address 192.168.10.50

The 192.168.10.50 address is the address of your dhcp server. You don't need a helper address on vlan 10 because that vlan will see the dhcp broadcasts.

You can then add your others as desired:

int vlan 30

ip address 192.168.30.1 255.255.255.0

ip helper-address 192.168.10.50

...so on...

On the dhcp server, you'll have scopes that reference these subnets. A scope for 192.168.10.0/24, 192.168.20.0/24, etc., is required. The users will get an address from the appropriate scope. The default gateway would be the address of the vlan that they're on. For example, if you have users in the 192.168.30.0/24 subnet, their default gateway is 192.168.30.1 (the address of the svi).

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
New Member

Re: default gatewy and dhcp helper

could you confirm the following please ?

for the each vlan i need to configure the ip helper address under the interface vlan

for the default gateway, each vlan will use the corresponding svi address...  do i need to configure anything beside the SVIs  to complete the default gateway configuration for the whole box ?

default gatewy and dhcp helper

Default gateway for the whole box? Meaning the default gateway for the switch? If that's the case, you would create a default route:

ip route 0.0.0.0 0.0.0.0

As far as your vlan, and my previous response, you only need the helper address on the svis that do not have the dhcp server on it. If your dhcp server is in vlan 1, you do not need a helper address on vlan 1's svi.

The SVIs do the routing between vlans for you. Your hosts will use their respective vlan's svi as their default gateway ip address.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
New Member

Re: default gatewy and dhcp helper

John,

thank you for your support and helpful answers.

one last clarfication, the interface facing the wan on the stack is ospf enabled. in this case i don't need the default route mentioned in the above post right ?

Re: default gatewy and dhcp helper

You only need the default route for routes that you may not know about. If your switch should have knowledge of all routes, a default route wouldn't be necessary. Usually the default route points toward the firewall or router that leads to the internet.

Sent from Cisco Technical Support iPhone App

HTH, John *** Please rate all useful posts ***
New Member

Re: default gatewy and dhcp helper

Thanks for the clarification.

i have another question about the same setup

i have 25 vlans ( 1 for management and 1 for WLAN management )

in terms of vlan configuration, do i need to configure a SVI for each vlan on each layer ( core stack, aggregation stack and the access switches) ? or on just the core stack ? if yes, what do i need to configure on the aggregation stack and the access switches

Re: default gatewy and dhcp helper

No, you'll just need to configure it on the device that is routing for the vlan. All other devices will need to be a member of the vlan and the vlan needs to be trunked up to the L3 device that has the svi on it. So, to answer your question, the vlan svi needs to be on the core stack only.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
New Member

Re: default gatewy and dhcp helper

is it recommended to configure svi for the MGT and WLAN MGT on the AGG and Acess switches ? or not SVI at all ?

Re: default gatewy and dhcp helper

You would have a management address on all of your switches, but that would be for a certain vlan. You don't need to create 10 svis on the access switches if you have 10 svis on the core. Whatever your management vlan is, let's say vlan 5, would also be on the access switch. If you have vlan 5 svi addressed at 192.168.5.1 on the core, access switches 2, 3, and 4, could also have vlan 5 svi addressed at 192.168.5.2, 192.168.5.3, and 192.168.5.4 respectively.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
New Member

default gatewy and dhcp helper

ok what about the no ip routing and ip default gateway commands

on the core i have ip routing and the interface facing the wan is ospf enables.

on the aggr and access i have no ip routing and ip default gateway command to the ip address of the MGT VLan ( which is also configured as int vlan MGT on both aggr and access )

is this correct ?

default gatewy and dhcp helper

Asus,

IP Routing enables routing on the switch. It only does you good if you plan on having this switch act as a L3 device. If you're going to configure it strictly as L2 (access switches), you can leave "no ip routing" and "ip default-gateway". IP default-gateway is used when routing is disabled. If routing was enabled with "ip routing", your default-gateway is no longer used, and you'd have to configure a static route of 0.0.0.0 0.0.0.0 .

For example, if you have vlan 10 on a L3 switch:

int vlan 10

ip address 192.168.10.1

And you have a L2 access switch with the following config:

no ip routing

int vlan 10

ip address 192.168.10.254

ip default-gateway 192.168.10.1

This would mean that if you're in another subnet, you could get to the swich on 192.168.10.254 because it knows to send its default traffic back to the L3 switch. I must also say that you won't have the "ip routing" on L2 switches usually, but there are some exceptions on some of the newer switches.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
New Member

default gatewy and dhcp helper

if i understand correctly, please confirm that the following is not a problem

- on the core stack connected to the wan, i will enable ip routing and enable ospf on the wan interface. also configure int vlan

- on the agg/access switches, i will disable ip routing and configure default gateway pointing to the ip address of the int vlan configured on the core stack

default gatewy and dhcp helper

I think you're understanding correctly. That sounds right to me...

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
New Member

default gatewy and dhcp helper

is the ip address configured under the int vlan on the core layer a network addess (192.168.1.0 255.255.255.0 ?) or a normal host address ?

i know the ones configured on the agg/access layers should be host addresses

default gatewy and dhcp helper

Asus,

The core would also be a normal address like:

Core:

int vlan 1

ip address 192.168.1.1 255.255.255.0

On your access switches:

Access switch 1:

int vlan 1

ip address 192.168.1.2 255.255.255.0

Access switch 2:

int vlan 1

ip  address 192.168.1.3 255.255.255.0

etc.

Make sure that you don't have any addressing conflicts and you would be fine...

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
461
Views
27
Helpful
17
Replies
CreatePlease to create content