dhcp ip allocation for particular vlan

  • 0
  • 1
  • Question
  • Updated 4 years ago
hi , we have extreme networks summit x460-24t switch . I want to do the following
switch should assign ip to dhcp client for particular vlan . All packet IP's unknown to switch should be passed from port 1 .

example in cisco we had 

ip dhcp pool vlan200
   network 172.16.120.0 255.255.255.0
   dns-server 196.1.105.47 
   default-router 172.16.120.1 
   lease infinite
!
interface Vlan34
ip address 192.168.0.11 255.255.255.0
!
interface GigabitEthernet0/1
 switchport access vlan 34
 mls qos vlan-based
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.0.1

I tried following in extreme

create vlan "vlan200"
configure vlan vlan131 tag 200
configure vlan vlan200 ipaddress 10.10.10.1 255.255.255.0
configure vlan vlan200 dhcp-address-range 10.10.10.2 - 10.10.10.10

Where am I going wrong ?
  

Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of rbrt_weiler

rbrt_weiler

  • 834 Points 500 badge 2x thumb
Hi Sumeet,

Assuming that the second line means "configure vlan vlan200 tag 200" you are basically just missing a default route. The Cisco command
ip route 0.0.0.0 0.0.0.0 192.168.0.1
would be
configure iproute add default 192.168.0.1
in Extreme XOS. For that to work however you would need
  • a VLAN that has an IP address in that network (in your Cisco example VLAN 34).
  • IP forwarding enabled on both VLANs (enable ipforwarding vlan <name>).
And this should be it.
Photo of Sumit Tokle

Sumit Tokle, Alum

  • 5,738 Points 5k badge 2x thumb
create vlan testconfigure vlan "test" tag 10
configure vlan "Default" delete ports 1-10
configure vlan "test" add ports 1-10
configure vlan test ipaddress 192.168.1.1/24
enable dhcp ports 1-10 vlan "test"
configure vlan "test" dhcp-address-range 192.168.1.2 - 192.168.1.20

In my example, if the request is coming from vlan 10 then only switch would be able to release IP address from 192 subnet.
Photo of Paul Russo

Paul Russo, Alum

  • 9,694 Points 5k badge 2x thumb
hello Sumeet

A few things, first you may want to add the default gateway option to the DHCP so the end devices have their default route out of the VLAN.  Second the ports to the end stations should not be tagged because their DHCP requests will be untagged, and finally you need to enable the DHCP on the ports using the command enable dhcp ports port_list vlan vlan_name


Let us know if that helps.
P
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb
hi Robert Weiler ,
I meant 'configure vlan vlan200 tag 200' as you have pointed out .

NOW , I have following configuration in cisco
* X460-24t.2 # create vlan test
* X460-24t.3 # configure vlan "test" tag 10
* X460-24t.4 # configure vlan "Default" delete ports 1-10
* X460-24t.5 # configure vlan "test" add ports 1-10
* X460-24t.8 # configure vlan test ipaddress 192.168.1.1/24
IP interface for VLAN test has been created.
* X460-24t.9 # enable dhcp ports 1-10 vlan "test"
* X460-24t.10 # configure vlan "test" dhcp-address-range 192.168.1.2 - 192.168.1.20
* X460-24t.12 # enable ipforwarding vlan test
* X460-24t.14 # create vlan vlan34
* X460-24t.15 # configure vlan vlan34  ipaddress 192.168.0.1/24
IP interface for VLAN vlan34 has been created.
* X460-24t.16 # configure vlan "Default" delete ports 11
* X460-24t.17 # configure vlan "vlan34" add ports 11
* X460-24t.18 # configure iproute add default 192.168.0.1
* X460-24t.19 # enable ipforwarding vlan vlan34

Currently what happens is
a PC attached directly to any port among 1-10 gets ip 192.168.1.[2-20] . it is able to ping 192.168.1.1 but not 192.168.0.1 .

What I want is
Firstly , i will connect a system to any one port among 1-10 which will take vlan tagged packets (in this case vlan 10) . The system passes the packet to attached multiple PC's after removing vlan 10 . Similiarly , it attaches vlan 10 to packets coming from PC's towards x460-24t.
Secondly , as paul russo has said to add default gateway of 192.168.0.1 for every vlan so that pc is able to ping 192.168.0.1 even though it is out of its subnet . How can I do that ?

Thanks robert weiler , sumit tokle , paul russo .
Photo of rbrt_weiler

rbrt_weiler

  • 834 Points 500 badge 2x thumb
Is there anything connected to port 11? If not, no port in VLAN 34 will be online, which will in effect mean that the IP interface is down as well. To force VLAN 34 to be online you can do a "enable loopback-mode vlan vlan34".
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb
this time , i connected a laptop to port 11 & another to port 3 which have vlan 10 (test) & 34 untagged respectively .
They got ip 192.168.1.2 & 192.168.0.2 respectively.
Still one laptop could not ping another .
Also 'enable loopback-mode vlan vlan34' did not cause 192.168.1.2 to ping 192.168.0.1 

Here is the log for laptop with ip 192.168.1.2
[log]
C:\Users\neha>ipconfigWindows IP Configuration
Ethernet adapter Local Area Connection:
   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 192.168.1.2
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
C:\Users\neha>ping -t 192.168.0.2
Pinging 192.168.0.2 with 32 bytes of data:
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.
[/log]
Photo of Paul Russo

Paul Russo, Alum

  • 9,694 Points 5k badge 2x thumb
Sumeet

The configure iproute command is for the switch to route out of the sub nets it has. What you don't have is the command for the switch to hand out a default gateway which is a dhcp option that I mentioned above. Not having this means the end station doesn't know the router IP address to route out.

Add this command. configure vlan dhcp-options default-gateway 192.168.1.1

Let's us know how it goes

P
Photo of rbrt_weiler

rbrt_weiler

  • 834 Points 500 badge 2x thumb
The laptop is missing a gateway (should be 192.168.1.1 in this case). Without gateway, it will never reach anything outside its subnet.
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb
After I added  
configure vlan <vlan-name> dhcp-options default-gateway <relevant-gateway>
Now I am able to ping laptops having different untagged vlan . 
Now , i will try to connect laptop to my system which accepts tagged input . 
QUESTION
I am aiming for following 
Say - my DNS server is 196.1.105.47 . My extreme networks switch does not know the direct route for reaching dns-server. I want all ip packets with similiar unknown destination to be sent to port having vlan34 untagged (currently port 11) . Port 11 will be connected to LAN which is source for internet . 
Photo of Paul Russo

Paul Russo, Alum

  • 9,694 Points 5k badge 2x thumb
Sumeet

You need to change your default route for the switch . You currently have it set to 192.168.0.1 which is the IP address of VLAN 34. I am assuming the main router is something like 192.168.0.254 let's say. Something that is on the same subnet as 192.168.0.1. You need to delete the current iproute and add a new one for the IP address to the next hop router.

P
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb
I thought i just have to add tagged while adding vlan to particular port if I want tagged input/output from port of switch . I hope , dhcp , ip address etc. parameters will remain same .
example 
configure vlan "vlan34" add ports 11
becomes 
configure vlan "vlan34" add ports 11 tagged
Is that right ?


i will report back . Office closed for next 2 days . Thanks .
Photo of Paul Russo

Paul Russo, Alum

  • 9,694 Points 5k badge 2x thumb
Hey Sumeet

A port will only be tagged if you add it with the tag word at the end.  In your example the two are not the same.  If a port is set as tagged all packets for that VLAN are tagged on the port.

P
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb
so far ,
following has worked . data coming into & going out of summit-x460-24t switch is tagged . My system accepts tagged data from summit & gives untagged data to PC . For every vlan , dhcp pool has been assigned so PC's get IP & are able to ping each other even if having different vlan because ip forwarding has been enabled in summit.
Now my questions are
(1)Can I set dhcp lease interval ? How can I find what IP's have been distributed by switch & can I ping those from putty console of summit ?
(2)Our LAN gives IP in range 192.168.8.something . So I connected LAN port to port of x460-24t having vlan 8 (ip address 192.168.8.122/24) untagged . Then I tried
# configure ip route add default 192.168.8.122
%% Ambiguous command:  "configure ip route add default 192.168.8.122"
I was hoping that a computer with ip , say 192.168.1.19, will be able to ping 192.168.8.something computer on LAN. What went wrong here ?
Photo of Paul Russo

Paul Russo, Alum

  • 9,694 Points 5k badge 2x thumb
Sumeet

To see DHCP address allocation use the command show VLAN DHCP address-allocation to set a lease timer use the command configure VLAN DHCP lease-timer.
The command you used configure IP route add default is for the switch to route out not to give to the end station. You need to set the Default gateway server address for the DHCP scope in the configure VLAN DHCP default-gateway .

P
Photo of sumeet

sumeet

  • 798 Points 500 badge 2x thumb
Understood view dhcp address allocation & setting lease timer .