cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1800
Views
5
Helpful
3
Replies

DHCP with multiple VLANs via SVI inter vlan routing.

noah5E
Level 1
Level 1

 

Hello all .

I'm trying to configure DHCP server in a c2911 router , to serve multiple VLAN (10 , 20)


(1) i created SVI interfaces in the MLSW1 and activated routing

(2) i turned interfaces (Fa0/1 , Fa0/2 , Fa0/3) to Trunk


i know i can do it by creating subinterfaces in the router , each as the default-gateway for each VLAN (ROAS)

but is there no way to configure this via SVI ? what i messed ?

 

 

 

MLSW2 config :

version 12.2(37)SE1


ip routing

!

spanning-tree mode pvst

!

!

interface FastEthernet0/1

switchport access vlan 10

switchport mode access

switchport nonegotiate

!

interface FastEthernet0/2

switchport access vlan 20

switchport mode access

switchport nonegotiateswitch

!

interface FastEthernet0/3

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface Vlan1

no ip address

shutdown

!

ip classless

!!

end

 

 

MLSW1 config :

version 12.2(37)SE1

!

spanning-tree mode pvst

!

interface FastEthernet0/1

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface FastEthernet0/2

switchport trunk encapsulation dot1q

switchport mode trunk

!

!

interface Vlan1

no ip address

shutdown

!

interface Vlan10

mac-address 00e0.a3e9.1301

ip address 10.0.0.1 255.255.255.0

ip helper-address 192.168.1.1

!

interface Vlan20

mac-address 00e0.a3e9.1302

ip address 20.0.0.1 255.255.255.0

ip helper-address 192.168.1.1


!

end

 


router config :

version 15.1

hostname Router

!

ip dhcp excluded-address 10.0.0.1

ip dhcp excluded-address 20.0.0.1

!

ip dhcp pool VLAN_10

network 10.0.0.0 255.255.255.0

default-router 10.0.0.1

dns-server 8.8.8.8


ip dhcp pool VLAN_20

network 20.0.0.0 255.255.255.0

default-router 20.0.0.1

dns-server 8.8.8.8

!

!

spanning-tree mode pvst

!

interface GigabitEthernet0/0

ip address 192.168.1.1 255.255.255.0

duplex auto

speed auto

!

interface Vlan1

no ip address

shutdown

!

end


Thanks in advance

 

 

1 Accepted Solution

Accepted Solutions

Hello


@noah5E wrote:

 

Hello all .

i know i can do it by creating subinterfaces in the router , each as the default-gateway for each VLAN (ROAS)

but is there no way to configure this via SVI ? what i messed ?


Yes, you just need to create the dhcp pool on the rtr and have a L3 connection between the rtr and switch, laslty on the switch SVI's append a ip helper address pointing to the rtr.

 

 

 

In your example please append the following and test again.
mlsw1
ip routing

int x/x
description toward RTR
ip address 192.168.1.2 255.255.255..0

ip route 0.0.0.0 0.0.0.0 <interface> 192.168.1.1

mlsw2
no ip routing

 

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

3 Replies 3

Hello


@noah5E wrote:

 

Hello all .

i know i can do it by creating subinterfaces in the router , each as the default-gateway for each VLAN (ROAS)

but is there no way to configure this via SVI ? what i messed ?


Yes, you just need to create the dhcp pool on the rtr and have a L3 connection between the rtr and switch, laslty on the switch SVI's append a ip helper address pointing to the rtr.

 

 

 

In your example please append the following and test again.
mlsw1
ip routing

int x/x
description toward RTR
ip address 192.168.1.2 255.255.255..0

ip route 0.0.0.0 0.0.0.0 <interface> 192.168.1.1

mlsw2
no ip routing

 

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello,

 

you have posted three configs, one of a L3 switch (ip routing enabled), one of a layer 2 switch, and one of a router. How are these devices connected, and what do you want to achieve ?

the main idea i want to achieve is to make devices in different VLANs to get ip from the DHCP server which is connected to the Core Layer 

it would be helpful if you told me the main steps of the configs 

 

here is the main topology :

Review Cisco Networking for a $25 gift card