Switches, Hubs, and Modems
1752807 Members
5804 Online
108789 Solutions
New Discussion юеВ

Re: need help with understanding VLANs

 
Doug Matulewic
Advisor

need help with understanding VLANs

I have a 2824 switch that will be used for all of my Microsoft servers (including DHCP and DNS)...
I have a 2650 switch that will be used for all of my workstations...

The 2824 switch will be on a 192.168.1.1/24 segment.
The 2650 switch will be on a 192.168.2.1/24 segment.
(so, all my severs will have the 192.168.1.x IP, and all of my PCs will have the 192.168.2.x IP)

So how do I configure the VLANs so that when a client that is physically connected to the 2650 will get its packet routed to the 2824 when trying to communicate with a DHCP server?
16 REPLIES 16
Doug Matulewic
Advisor

Re: need help with understanding VLANs

I would also like to force communication between the switches through the higest numbered port.
(2650 port #50 is connected to 2824 port #24)

Is this possible?!
I don't understand the tagged/untagged concept and how the switch knows to route to a specific port #.
Mohieddin Kharnoub
Honored Contributor

Re: need help with understanding VLANs

Hi

You can do that in many ways, the easiest one is:

Create 2 Vlans on 2800 switch, then enable routing, untag the port connects to 2600 for Vlan2, and add the IP helper address in each Vlan poiting to your DHCP servers.

Example:
2824(config)#vlan 1 ip add 192.168.1.1/24
2824(config)#vlan 2 ip add 192.168.2.2/24
2824(config)#vlan 1 ip helper-address 192.168.1.x (DHCP Server)
2824(config)#vlan 2 ip helper-address 192.168.1.x (DHCP serber)
2824(config)#vlan 2 untag 24 (port 24 connects to 2600 switch).
2824(config)#ip routing

On the 2600 switch, create 1 Vlan, and set the default gateway for it is Vlan2 ip address on the 2800 swtich:

2650(config)#vlan 1 ip address 192.168.2.1/24
2650(config)#ip default-gateway 192.168.2.2

Thats it....
If you need internet connectivity, add a default route on the 2800 for your internet router.
2824(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.xx (internet router).

Good Luck !!!


On the 2600
Science for Everyone
Doug Matulewic
Advisor

Re: need help with understanding VLANs

I did this, but I am having some problems.
I cannot ping anything on either side of the subnet (or on each switch).

Right now, I have setup a test enviroment.
I have a server w/ 192.168.1.10 on the 2800 switch, and a laptop w/ 192.168.2.1 on the 2600 switch.

I cannot communicate between the 2 of them (firewalls are turned off).

Doug Matulewic
Advisor

Re: need help with understanding VLANs

I did this, but I am having some problems.
I cannot ping anything on either side of the subnet (or on each switch).

Right now, I have setup a test enviroment.
I have a server w/ 192.168.1.10 on the 2800 switch, and a laptop w/ 192.168.2.5 on the 2600 switch.

I cannot communicate between the 2 of them (firewalls are turned off).
Doug Matulewic
Advisor

Re: need help with understanding VLANs

oh... I figured it out, the laptop's gateway needs to be 192.168.2.2. (I had it set to 192.168.2.1)


However...
What exactly does the IP helper address do?!
To specify more - what else can I use a IP helper address for?! And how does it know 'WHEN' to use a IP helper address?
Mohieddin Kharnoub
Honored Contributor

Re: need help with understanding VLANs

Hi

Usually when you have your setup done on the proper way and you are not getting communication then it would be another problem like Gateway, Firewalls, ... or something missing.

However, the IP Helper-Address is to forward any DHCP request from any client to a specific DHCP server.

In your case, you have 2 Vlans, so you need 2 Scopes on the DHCP server, one for 192.168.1.x and the other for 192.168.2.x.

Once ip helper-address set in each Vlan, and the switch receives a DHCP request from a client it will forward it to the DHCP server that will assign the Proper IP equivalent to the DHCP scope for this Client's Vlan.

Good Luck !!!
Science for Everyone
Magnus_18
Advisor

Re: need help with understanding VLANs

Or you can simply have them both in the same subnet, 192.168.1.0/23 (and same vlan). In this case I see no real technical argument against this arrangement, unless you want access control lists between the subnets, for example, which the 2824 and 2650 doesn't support anyway.
Doug Matulewic
Advisor

Re: need help with understanding VLANs

What I still don't understand is how I determine 'which' DHCP scope the switch is sending the client to?!

If I have 2 DHCP scopes, and want the segments seperated by the physical switch that the client is on, how do I specify which scope the client needs to get an IP address from?
(everything on the 2800 uses 192.168.1.x, everything on the 2600 uses 102.168.2.x?)

-thank you very much for your responses, it is helping me greatly to understand this.
Jason Luckett
Frequent Advisor

Re: need help with understanding VLANs

The scopes are allocated by the process of anding, the subnet mask seperates the IP address into Network address and Host Address, Like the way a home address is done. the street and the house number.

The DHCP server knows which address to assign by this process ie:

The network address 192.168.1.1/24

looks like this in binary

nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
11000000.10101000.00000001.00000001

and the network address 192.168.2.1/24

looks like this in binary

nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh
11000000.10101000.00000010.00000001

so the Y octet stipulates whether they are remote or on the same network.

I hope this helps,

Jase