NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

s1yfa's avatar
s1yfa
Aspirant
Feb 04, 2014

XSM7224S Issue range of IPs to certain ports

Hi,

I have an XSM7224S (awesome bit of kit by the way!) that is my core switch. Into which will be 7 other switches over fibre (mostly GSM7228PS) and some devices connected directly over copper.

What I want to do is use the XSM as DHCP server, then anything connecting to the first 7 ports (my edge switches will have static IPs) will be issued an IP in the range of 10.10.10.1 to 10.10.10.196

Anything connecting into ports 8 onwards will be issued an address from 10.10.10.197 to 10.10.10.244

The last 10 IPs will be used for my static addresses for my switches and a router.

A device plugged into one of the first 7 ports should still be able to communicate to a device on a later port. Basically I am trying to segregate certain devices by IP, even though they will still all be on the same subnet.

I am thinking I could create 2 new VLANs, VLAN 2 for A devices with ports 1-7 tagged, and VLAN 3 for B devices with ports 8-24 tagged. How can I ensure DHCP will dish out an address in the correct range when plugged into a port?

Am I doing this the hard way? Can anyone recommend a better way to achieve what I want?

Thanks in advance!

1 Reply

  • I think you should rework your whole plan but if you must then here is one way you can accomplish close to what you are trying to do.

    If you have pool range between 0.10.10.1 to 10.10.10.196 and 10.10.10.197 to 10.10.10.244

    First figure out if we can even do a network for each one since the DHCP will be broadcast packet to the network and since you are addressing the ports into separate vlans we need to make sure we can get DHCP server in each network.

    First let figure out the network. Since I can't do 1-196 via subnet-ting into 1 network, I will need to create pools to hande out address in 3 ranges.

    10.10.10.0 /25 will get you address range of 10.10.10.0 - 10.10.10.127
    10.10.10.128 /26 will get you address range of 10.10.10.128 - 10.10.10.191
    10.10.10.192 /26 will get you address range of 10.10. 10.10.10.192 - 10.10.10.255

    So you could split your port into 3 separate vlan and assign out address from the above ranges.


    #Let make 3 vlans and assign routing interface to each to hand them DHCP address
    #
    vlan database
    vlan 10
    vlan 20
    vlan 30
    vlan routing 10
    vlan routing 20
    vlan routing 30
    exit
    config
    #
    #Let enable routing and make some routing interfaces for each vlan
    ip routing
    interface vlan 10
    ip address 10.10.10.1 255.255.255.128
    routing
    exit
    interface vlan 20
    ip address 10.10.10.129 255.255.255.192
    routing
    exit
    interface vlan 30
    ip address 10.10.10.193 255.255.255.192
    routing
    exit
    #
    # Let enable DHCP and create the DHCP pools
    #
    service dhcp
    ip dhcp pool vlan10
    dns-server 8.8.8.8 4.2.2.2
    default-router 10.10.10.1
    network 10.10.10.0 255.255.255.128
    exit
    ip dhcp pool vlan20
    dns-server 8.8.8.8 4.2.2.2
    default-router 10.10.10.129
    network 10.10.10.128 255.255.255.192
    exit
    ip dhcp pool vlan30
    dns-server 8.8.8.8 4.2.2.2
    default-router 10.10.10.193
    network 10.10.10.192 255.255.255.192
    exit
    #
    #Let exclude the address you don't want to give out from the pool. The gateway address is auto excluded.
    ip dhcp excluded-address 10.10.10.245 10.10.10.254
    #



    Thing I did not address in the above, I did not configure a default route or configure the ports. How you configure the port is up to you since I assume you plan to connect switches to XSM switch.



    Now the real answer. If you read this much then I suggest you review your plan first since there are things you are not thinking about here.

    Few things to keep mind.
    1. Do not use Switch as DHCP server. Better to use a full DHCP server and use the switch to relay from each vlan to the DHCP server. If XSM is your core switch then you can do all your vlan routing on it as well.

    2. DHCP is broadcast method so we need the DHCP to be able to respond to broadcast from different vlan, this is either done via relay or by having DHCP or switch interface on each vlan.

    Example if I make a DHCP pool below on a switch which hands out address from 10.10.10.2 - 10.10.10.254 range
    ip dhcp pool test
    dns-server 8.8.8.8 4.2.2.2
    default-router 10.10.10.1
    network 10.10.10.0 255.255.255.0

    exit

    making the pool won't do anything since there is no way for the switch to talk to the network 10.10.10.x

    Until we make a interface on the switch that can take an IP that belong to that network.

    So i could make interface like this below
    interface 1/0/1
    ip address 10.10.10.230 255.255.255.0
    routing
    exit

    OR we can do vlan 1 instead
    vlan database
    vlan routing 1
    exit
    config
    interface vlan 1
    ip address 10.10.10.230 255.255.255.0
    routing
    exit

    Now if I connect something like a switch or PC to port 1 which is by default untagged vlan 1 then that computer or devices on that switch will get address from the dhcp pool.
    OR if I connect a PC or switch to port that is tagged or untagged member or vlan 1. same applies.

    Work out how many vlan you need since creating vlan means your separating broadcast (DHCP is broadcast by design) so you need to relay different vlan DHCP request to DHCP server or you need to have DHCP server sitting in each vlan either via physical connection or virtual interface as i did in first example.

    Then figure out what network each vlan needs to be. Subnet the network as needed and the setup routing if needed to allow intervlan routing and setup dhcp pool for each network as needed.

    If you are connecting switches to the XSM then dont' worry about ports since most port are uplinks to other switch that can hopefully understand vlans. So you can just tag all the vlans to every port and then on each closet switch you can configure which ports goes in which vlan and configure the port to XSM with all the vlans.

    I hope the above helps.

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More