cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2793
Views
0
Helpful
2
Replies

DHCP-scope with multiple gateways

bvj197222
Level 1
Level 1

Scenario;

I have a subnet, 192.168.1.0/23, with clients. I'm using the switch as dhcp-server. I want to route the first /24 subnet to one gateway, and the second /24 subnet to another gateway;

!

interface Vlan666

ip vrf forwarding gjest

ip address 192.168.1.0 255.255.254.0

!

The scope;

ip dhcp pool guest

   network 192.168.1.0 255.255.255.0

   network 192.168.2.0 255.255.255.0 secondary

     override default-router 192.168.1.253

   default-router 192.168.1.1

   dns-server 192.168.1.1

   lease 0 8

                  

The .1.1 is the switch, while the 1.253 is a firewall. The firewall is configured with a /23-network so the routing works. The problem is that the gw on the .2.0-network is on a different subnet according to the dhcp scope - even tho the vlan itself is /23.. How do I create this scope so that the first /24-network has .1.1 as default gw, while the second /24-network has .1.253 as default gw?

This is a Cisco 3750G-24 PS, 12.2(50)SE3, running IPSERVICES.

2 Replies 2

acampbell
VIP Alumni
VIP Alumni

Hi,

I would like to point out
that you have shown your supernet as:-

192.168.1.0/23

This means you have 192.168.0.0 to 192.168.1.254
in that supernet.

192.168.2.0 is a seperate subnet altogether

Regards,
Alex.
Please rate useful posts.

Regards, Alex. Please rate useful posts.

Yes you are right, my bad. This is the actual configuration;


ip dhcp pool GUESTS
   network 192.168.94.0 255.255.254.0

network 192.168.95.0 255.255.255.0 secondary

override default-router 192.168.94.253

   default-router 192.168.94.1
   dns-server 1.2.3.4
   lease 0 8

I tried a workaround, by routing inside VRF;

ip route vrf GUEST 0.0.0.0 0.0.0.0 192.168.94.254

ip route vrf GUEST 192.168.95.0 255.255.255.0 192.168.94.253

The problem is u get an icmp redirect, and firewalls tend not to like that. I can allow it, but it's not good. In this example 192.168.94.1 is my router/switch, which forwards all traffic to 192.168.94.254. Works fine. Then I forward the .95-traffic to 192.168.94.253, doesn't work.

Review Cisco Networking for a $25 gift card