Switch apparently using DHCP against my wishes inside VLAN

AdaptiveGroup

Reputable
Jul 17, 2014
3
0
4,510
Hello there,

I've found a problem in my work network, and I was hoping anyone knows what can be done to solve it. I'm not a network management expert, nor do I know why everything is set the way it is, it was like this before I had to took charge of it recently.

Switch: Cisco SG300-52
Routers: Mikrotik RB1200

Network Structure Image

Each modem has 7 IPs assigned by the ISP, and uses DHCP to deliver them. The thing is, 6 out of each 7 router interfaces get their IPs correctly, but the seventh one never gets a DHCP lease. I checked with the ISP and the missing IPs are all assigned to the SG300 MAC address, which leads me to believe that in each VLAN, the switch must be using DHCP to get its IP.

Why is this happening? The switch is set to layer 2, so I can't set each interface to use Static IPs (that kind of options are available when using the "layer 3 switch" mode). I imagined a Layer 2 Switch wouldn't emit DHCP Requests.

Any help is appreciated, thank you very much.
 
Solution
I would completely remove the interfaces.

no int vlan x

The normal IOS way you would configure a blank switch to put the first 5 ports in a vlan is

Int range g0/1 - 5
sw
sw mode ac
sw ac vlan x
spanning-tree portfast

end

You may have to put entries in the vlan database but most time its creates them dynamically it varies a lot

vlan database
vlan x,y,z
exit

There is nothing created that can even take a IP address.

Urumiko

Distinguished
Dec 28, 2013
505
0
19,160
Perhaps this is beyond my understanding... but this doesn't make a lot of sense to me. The diagram would snuggest that you have 7 interfaces on any one router all connected to the same vlan. this just sounds wrong.

Are you sure the switch is runing at l2?? i know some big switches like 6500 you have to specify "switchport no ip-address" or something like that as they are l3 by default, which is the opposite to the normal for access switches.

is there anything else going on likr GLBP/vrrp?

If you could post any config it would be good.
 
I was waiting to post hoping someone had used these after I discovered this is another one of those NON IOS based switches. I thought cisco learned their lesson with the linksys stuff.

Generally on a cisco IOS based switch other than the management vlan 1 that is configured with a DHCP in a default config there is no other DHCP. In fact you must create the vlan interfaces manually. Most cisco layer 2 only switches will not even use them even if you configure them since you are only allowed a single management vlan. This is pretty much what makes a layer 2 and a layer 3 switch different. Still you would have to manually configure each vlan interface to take DHCP.

In this case I would try to use the CLI instead of the gui and try a show run command to see if you see DHCP settings in the config. Hard to say how you would change this stuff...it seems the CLI is only similar to IOS based cisco not exactly the same.
 

AdaptiveGroup

Reputable
Jul 17, 2014
3
0
4,510


The design sucks, and the same could probably be done with just one router instead of switch+3 routers, but it's not that easy to shutdown everything and change stuff inside a company, although it's certainly something I am pushing for in the next "big maintenance".

Functionality-wise, the switch is certainly running at L2 (or at least says so in its configuration). Each modem should hand an IP to each router interface though DHCP, that's why they are separated in VLANs that way (which I know, is a really bad way to do it, but it works and someone decided it was the way to go).

There is no other configuration in the switch beyond the definition of the 3 separate VLANs.

 

AdaptiveGroup

Reputable
Jul 17, 2014
3
0
4,510


I'm using CLI. DHCP settings are apparently disabled, but interfaces 2, 3 and 4 (the 3 VLANs) don't have any static IP assigned. Maybe the default behavior is to use DHCP? I'm using this manual, but I see no way to list the DHCP leases / dynamic IPs per interface in Layer 2, only the static ones (which makes perfect sense, a L2 Switch shouldn't use DHCP on its interfaces, right?).

Thanks!
 
I would completely remove the interfaces.

no int vlan x

The normal IOS way you would configure a blank switch to put the first 5 ports in a vlan is

Int range g0/1 - 5
sw
sw mode ac
sw ac vlan x
spanning-tree portfast

end

You may have to put entries in the vlan database but most time its creates them dynamically it varies a lot

vlan database
vlan x,y,z
exit

There is nothing created that can even take a IP address.

 
Solution

Urumiko

Distinguished
Dec 28, 2013
505
0
19,160
You should be able to confirm with sh ip arp, or sh mac-address table, i would have thought. You should be able to match the mac address seen in the DHCP lease to an int.

But yes bill001g is right. you only need a flat layer 2 vlan by the sound of it, there is no need for a l3 vlan interface (SVI)
 

TRENDING THREADS