Question Locked

Problem with Vlan DHCP, wrong Subnet IP address

0 helpful
13 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi, I have a problem with my Vlan, the problem is; I have got a Win2k Server with DHCP configured, 1x Superscope, with 3 scopes underneath it, subnets 192.168.2.0 (range 100-254), 192.168.20.0 (range 100-254), and 192.168.30.0 (range 100-254). When I manually enter the to the port according Ip address on my client PC, it all works a treat, but when I request a DHCP address, it just gives me a 192.168.2.0 IP, and I cannot access any resources. Here is my config;

!Current Configuration:
!System Description "Dell 24 Port Gigabit Ethernet, 2.0.0.12, VxWorks5.5.1"
!System Software Version 2.0.0.12
!
configure
vlan database
vlan 10,20,30
vlan association subnet 192.168.2.0 255.255.255.0 10
vlan association subnet 192.168.20.0 255.255.255.0 20
vlan association subnet 192.168.30.0 255.255.255.0 30
exit
stack
member 1 1
exit
switch 1 priority 1
ip address 192.168.1.1 255.255.255.0
ip default-gateway 192.168.2.201
ip routing
ip route 0.0.0.0 0.0.0.0 192.168.2.201
bootpdhcprelay enable
bootpdhcprelay maxhopcount 16
bootpdhcprelay serverip 192.168.2.10
bootpdhcprelay cidridoptmode
ip helper-address 192.168.2.1 192.168.2.10 37
ip helper-address 192.168.2.1 192.168.2.10 49
ip helper-address 192.168.2.1 192.168.2.10 137
ip helper-address 192.168.2.1 192.168.2.10 138
ip helper-address 192.168.20.1 192.168.2.10 37
ip helper-address 192.168.20.1 192.168.2.10 49
ip helper-address 192.168.20.1 192.168.2.10 137
ip helper-address 192.168.20.1 192.168.2.10 138
ip helper-address 192.168.30.1 192.168.2.10 37
ip helper-address 192.168.30.1 192.168.2.10 49
ip helper-address 192.168.30.1 192.168.2.10 137
ip helper-address 192.168.30.1 192.168.2.10 138
interface vlan 10
name "Servers"
routing
ip address 192.168.2.1 255.255.255.0
ip netdirbcast
exit
interface vlan 20
name "Sales"
routing
ip address 192.168.20.1 255.255.255.0
ip netdirbcast
exit
interface vlan 30
name "Accounts"
routing
ip address 192.168.30.1 255.255.255.0
ip netdirbcast
exit
username "michi" password 4f70cfb1451a1b0ce0b872421bee6c1c level 15 encrypted
!
interface ethernet 1/g1
switchport mode general
switchport general pvid 10
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 10,20,30
exit
!
interface ethernet 1/g3
switchport mode general
switchport general pvid 10
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 10,20,30
exit
!
interface ethernet 1/g4
switchport mode general
switchport general pvid 20
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 20
exit
!
interface ethernet 1/g5
switchport mode general
switchport general pvid 10
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 10,20,30
exit
!
interface ethernet 1/g8
switchport mode general
switchport general pvid 30
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 30
exit
!
interface ethernet 1/g24
switchport mode general
switchport general pvid 10
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 10,20,30
exit
exit

Any help or comments are welcome.
Thank you Michael

13 replies

by robo_dev

Then you need to enable DHCP option 82 in your DHCP server. (option 82 is GIADDRESS)

http://slaptijack.com/networking/what-is-dhcp-option-82/

Microsoft's 'official solution' is to have a NIC on every subnet as Microsoft DHCP Server does not have default support for option 82 as it has for other standard options.

To enable DHCP-relay support:
Using DHCP Server Management console (dhcpmgmt.msc) -> -> Right Click -> Set Predefined Options..., you can add option 82 as a customized option for DHCP Server.

by acer1986

I have just looked a adding a predefined option in Server 2000sp4 DHCP server. When I click on add it asks me for a name... "DHCP-Relay"
and then for a data type; what do I select here?
code: 082

Can you help please.
Thank you

by cg it

if it doesn't all this is moot.

I can't see any reason why hosts on a VLAN would not get IP addresses from a DHCP server if intervlan routing works, and there's a DHCP relay agent that allows DHCP discover,accept,acknowledge, receipt, blah blah packets can traverse the VLANs.

If hosts are not obtaining DHCP assigned IP addresses on their respective subnets when helper addresses and relay agents are in place, I'd look at intervlan routing and/or whether DHCP can actually broadcast.

Another assumption is that 802.1Q [no tag]is being used since this is a Dell switch and that there is a router available to route traffic to the vlans. So far the questioner has only mentioned the Dell switch.
Not familiar with that model so don't know if it's a layer 2 or layer 3.

by robo_dev

does not get an address, the issue can be that the client gets an address on the wrong network, since the server, by default, does not know from which gateway the request originated.

My (shaky) understanding is that Option 82, which is GIADDR (gateway interface address) works because the DHCP-relay agent in the router/switch adds the GIADDR info to DHCP requests that come from a particular VLAN.

The server then knows to create a DHCP lease and send it back to the right VLAN, based on the GIADDR (which is the mac address of the port where the request came from).

DHCP, by default, sends a broadcast request, and my understanding is that option 82 works like a static route to get the dhcp leases to the correct vlan.

My understanding is that Microsoft really wants you to use a NIC in each vlan for redundancy and simplicity, and the option 82 stuff may make things more tricky to support.

http://tools.ietf.org/html/rfc3046

by acer1986

IP helper address is 100% definitely pointing at my DHCP Server, I can receive an IP address without Vlans

Thanks for your help

by acer1986

Sorry, did you mean tick the array box?

Should, I enable cidridoptmode (circuit ID) on my switch? Its a Dell PowerConnect 6224.

Thank you very much for your help so far

by cg it

Your right Robo in that clients on different subnets with connectivity to a DHCP server will always get the default scope address or no address if DHCP doesn't know about the subnet. GIADDR is the DHCP table that gives DHCP the subnet information.

If the network needs routing, I personally don't recommend using MS boxes. Best to use a router or layer 3 switch.

by acer1986

The switch I'm using is a L3 switch,
I am pretty sure Inter Vlan routing is working, because when I enter the IP address for the right Vlan I can access everything as you'd expect. As soon as I request an IP address in the 192.168.20.0 subnet my client PC doesn't receive any IP address at all. When I enter the show bootpdhcprelay it shows me how many packets it received and how many it relayed, there is only a few which for some reason are discarded. On my DHCP server it would seem I get a 192.168.2.0 address, but the client just stays at 0.0.0.0 and doesn't do anything. I have just updated the firmware on my switch, with the latest available. You said MS boxes are not ideal for use with DHCP with different subnets, can you point me to any alternatives?
Thank you

by acer1986

Hello thanks for all your inputs;
I have just gone to my DHCP server which is connected to port 1/g1 Vlan10 and disabled the scope for 192.168.2.0 subnet, as this is mainly used for servers with fixed IP addresses and isn't really necessary, now when I plug my client PC into port 1/g4 I receive a 192.168.20.0 address and when I plug it into port 1/g8 I receive a 192.168.30.0 address. Its working a treat. :)
One last thing, I cannot access the internet once I received a 192.168.20.0 or 192.168.30.0 IP address can you please tell me where I have gone wrong, must be something to do with my routes.
Here is my config again:
!Current Configuration:
!System Description "Dell 24 Port Gigabit Ethernet, 2.0.1.8, VxWorks5.5.1"
!System Software Version 2.0.1.8
!
configure
vlan database
vlan 10,20,30
vlan association subnet 192.168.1.0 255.255.255.0 1
vlan association subnet 192.168.2.0 255.255.255.0 10
vlan association subnet 192.168.20.0 255.255.255.0 20
vlan association subnet 192.168.30.0 255.255.255.0 30
exit
stack
member 1 1
exit
switch 1 priority 1
ip address 192.168.1.1 255.255.255.0
ip default-gateway 192.168.1.201
ip domain-name kris-starr.co.uk
ip name-server 192.168.2.10
ip name-server 192.168.2.30
ip routing
ip route 0.0.0.0 0.0.0.0 192.168.2.201
bootpdhcprelay enable
bootpdhcprelay serverip 192.168.2.10
bootpdhcprelay cidridoptmode
ip helper-address 192.168.2.1 192.168.2.10 37
ip helper-address 192.168.2.1 192.168.2.10 49
ip helper-address 192.168.2.1 192.168.2.10 137
ip helper-address 192.168.2.1 192.168.2.10 138
ip helper-address 192.168.20.1 192.168.2.10 37
ip helper-address 192.168.20.1 192.168.2.10 49
ip helper-address 192.168.20.1 192.168.2.10 137
ip helper-address 192.168.20.1 192.168.2.10 138
ip helper-address 192.168.30.1 192.168.2.10 37
ip helper-address 192.168.30.1 192.168.2.10 49
ip helper-address 192.168.30.1 192.168.2.10 137
ip helper-address 192.168.30.1 192.168.2.10 138
interface vlan 10
name "Servers"
routing
ip address 192.168.2.1 255.255.255.0
ip rip send version rip1
ip irdp
exit
interface vlan 20
name "Sales"
routing
ip address 192.168.20.1 255.255.255.0
ip rip send version rip1
exit
interface vlan 30
name "Accounts"
routing
ip address 192.168.30.1 255.255.255.0
ip netdirbcast
ip rip send version rip1
ip irdp
exit
username "michi" password 4f70cfb1451a1b0ce0b872421bee6c1c level 15 encrypted
!
interface ethernet 1/g1
switchport mode general
switchport general pvid 10
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 10,20,30
exit
!
interface ethernet 1/g3
switchport mode general
switchport general pvid 10
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 10,20,30
exit
!
interface ethernet 1/g4
switchport mode general
switchport general pvid 20
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 20
exit
!
interface ethernet 1/g5
switchport mode general
switchport general pvid 10
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 10,20,30
exit
!
interface ethernet 1/g7
switchport mode general
switchport general pvid 10
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 10
exit
!
interface ethernet 1/g8
switchport mode general
switchport general pvid 30
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 30
exit
!
interface ethernet 1/g24
switchport mode general
switchport general pvid 10
no switchport general acceptable-frame-type tagged-only
switchport general allowed vlan add 10,20,30
exit
exit

Thank you

by cg it

192.168.1.201 is what and goes where?

Do a show IP route command and post

This discussion is closed to new replies.