cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5474
Views
10
Helpful
5
Replies

How to relay a DHCP from another router on a SVI L3

Good Day Guys!

Im new here so please bear with me ;).

Please help ! this is my scenario.

I have a DHCP Server on a  router B.

I have a L3 switch and my end devices are in Router A.

I have configure Intervlan routing in L3 sw and i want to relay may dhcp request over an  OSPF environment. but the problem is ony vlan 10 devices are able to get IP address. when i do sh ip route on router B its only showing the vlan 10 which is 10.10.10.0 network my other vlan 20 10.10.20.0 is not on the routing table of router B. 

My config.

Router A>

router ospf 1

network 0.0.0.0 255.255.255.255 area 0

 

ip route 10.10.0.0 0.0.255.255 10.10.10.1 

-------------------------------------------------

Router B>

router ospf 1

network 0.0.0.0 255.255.255.255 area 0

--------------------------------

L3>

ip routing

ip route 0.0.0.0 0.0.0.0 10.10.10.10 <- ip of my R1

int vlan10

10.10.10.1 255.255.255.0

int vlan20

10.10.20.1 255.255.255.0

int vlan30

10.10.30.1 255.255.255.0

vlan10

vlan20

vlan30

 

int fa0/1 <- connection from L3 to RA

switchport mode access 

switchport access vlan 10 

------------------------------------

I want my DHCP to relay also on different vlan in R1.

how can i do that ?

My assumption is ospf can only advertise my directly connected network in my case vlan 10 because this is the vlan which the Router A belong if so how can i solve the problem without using router on the stick setup.

 

advance Thanks!

 

 

 

1 Accepted Solution

Accepted Solutions

Hey @patrickjuliuspa...,

I'm not telling you to configure any dynamic routing in your L3 Switch. Your L3 Switch will remain with its static routes. It won't have the routes of Router B in its routing table, just the default route that you've already configured.

The dynamic routing is between the routers, right? So, the redistribute command that I gave you will only apply between Router A and B. Prove it and you will see.

In router A, the "network 10.10.0.0 0.0.0.255.255" command won't advertise all those networks but the directly connected networks of router A. In this case 10.10.50.0/24.

The route "O 10.10.50.0" is only visible in router B because it's the only route that Router A is directly connected to. A L3 device cannot advertise a non-directly connected route unless it's learned via another dynamic routing protocol. That's why.

See the attached file and test it.

HTH.

Don't forget to rate.

Rgrds,

Martin, IT Specialist

 

View solution in original post

5 Replies 5

Martin Moran
Level 3
Level 3

Hi @,

You can redistribute the static route configured in router A to point to the L3 Sw into the OSPF process, so router B will know how to reach the rest of the subnets in the L3 Sw. Also, make sure that you have the "ip helper-address" configured in all the SVIs in the L3 Sw as well as in the interface of the router A that face the L3 Sw.

You can do so by typing these commands:

In the L3 Sw:

interface Vlan10

 ip helper-address "IP of the DHCP server"

interface Vlan20

 ip helper-address "IP of the DHCP server"

interface Vlan30

 ip helper-address "IP of the DHCP server"

-

In the router A:

interface Ethernet1/0

 ip helper-address "IP of the DHCP server"

router ospf 1

 redistribute static subnets

-

After you do this, check the routing table of router B and you'll see the following route advertised:

O E2    10.10.0.0/16 [110/20] via <ip address of router A pointing router B>

Then, try to obtain the IPs from the PCs.

Let me know if that could help you.

Rgrds,

Martin, IT Specialist

 

Hi Moran,

sorry for incosistencies on my initial post (im just too tired that from my work) but thanks for the advice yes i know redistribution will work but if possible  i dont want to configure any dynamic routing protcol in My L3 because it defeats my goal  of  having L3 focus only in my Internal network and my Router focus only in  routing my external network.


I just want to relay the Dhcp form RouterB to L3 in RouterA.  
is this possible without doing any OSPF config in L3 switch ?

alternative method aside from dynamic routing protocol  will do as long as im able to relay DHCP  from RouterB to RouterA L3 SVI.

Thanks again.

 

heres my config


----------------
RouterA>
int fa0/0 <- connection to RouterB
ip add 200.200.10.1 255.255.255.252

router ospf 1
network 200.200.10.0 0 0.0.0.3
network 10.10.0.0 0.0.0.255.255 <- advertise all internal network from L3 to OSPF


int fa1/0 <- connection to L3
ip add 10.10.50.2 255.255.255.0
ip helper-address 192.168.1.2


ip route 10.10.0.0 255.255.0.0 fa1/0 <- *Allow routes destined to 10.10.0.0 network forward to L3* 

------------------
L3>
int fa0/1 <- connection to RouterA
switchport mode access
switchport access vlan 50

int vlan10
ip add 10.10.10.1 255.255.255.0
ip helper-address 192.168.1.2


int vlan20
ip add 10.10.20.1 255.255.255.0
ip helper-address 192.168.1.2

int vlan30
ip add 10.10.30.1 255.255.255.0
ip helper-address 192.168.1.2

int vlan50 <- management vlan
ip add 10.10.50.1 255.255.255.0


vlan 10
vlan 20
vlan 30
vlan 40
vlan 50

spanning-tree mode rapid-pvst
spanning-tree vlan 10 priority 0
spanning-tree vlan 20 priority 0
spanning-tree vlan 30 priority 0
spanning-tree vlan 40 priority 0
spanning-tree vlan 50 priority 0


ip route 0.0.0.0 0.0.0.0 10.10.50.2 <- * Forward all unknown routes to RouterA (default gateway)

ip routing

----------------------------
RouterB>
int fa0/0 <- connection to RouterA
ip add 200.200.10.2 255.255.255.252

int fa1/0 <- connection to DHCP server
192.168.1.1 255.255.255.0


router ospf 1
network 200.200.10.0 0.0.0.3
network 192.168.1.0 0.0.0.255

-------------------------------

 

RouterB>
sh ip route in Router B

O 10.10.50.0 <- only vlan 50 is showing up

--------------------------------  

 

Hey @patrickjuliuspa...,

I'm not telling you to configure any dynamic routing in your L3 Switch. Your L3 Switch will remain with its static routes. It won't have the routes of Router B in its routing table, just the default route that you've already configured.

The dynamic routing is between the routers, right? So, the redistribute command that I gave you will only apply between Router A and B. Prove it and you will see.

In router A, the "network 10.10.0.0 0.0.0.255.255" command won't advertise all those networks but the directly connected networks of router A. In this case 10.10.50.0/24.

The route "O 10.10.50.0" is only visible in router B because it's the only route that Router A is directly connected to. A L3 device cannot advertise a non-directly connected route unless it's learned via another dynamic routing protocol. That's why.

See the attached file and test it.

HTH.

Don't forget to rate.

Rgrds,

Martin, IT Specialist

 

Hi Martin,

where is the attached file i cant seem to find it? :)

I applied redistribution connected subnets  like you said in Router A but the SVI in L3 is still not showing up in RouterB routing table please help :/.

Hi @patrickjuliuspa...,

The fact that those routes are not showing up in RouterB is because they're being sent as a summarized route (the static route from router A that is redistributed with the "redistribute static subnets" under the OSPF process).

The only way to have each subnet in the router B routing table is to have router-on-a-stick configured in router A and passing those subnets in the OSPF process.

Although router B doesn't have each subnet in its routing table, it can ping any device on the L3 Sw side. That's because the static route that is being passed from router A.

HTH.

Don't forget to rate.

Rgrds,

Martin, IT Specialist

Review Cisco Networking products for a $25 gift card