03-08-2021 10:02 AM
Unfortunately I don’t have a router configuration to show everyone because that’s what I would like the kind people on this site to send to me one.
I have a dhcp scope on my Windows 2019 server and its going to give the following computers these addresses. And these are the switches and vlan’s they are connected into.
Desktop 1 - VLAN 2 – SWITCH 1
192.168.2.5
Desktop 2 - VLAN 3 – SWITCH 2
192.168.3.6
Router is connected to switch 1. Also switch 1 is connected to switch 2.
The problem:
Desktop 1 can’t communicate with Desktop 2 and vis versa.
What is the configuration of the router and switches going to look like. ??
Solved! Go to Solution.
03-08-2021 11:42 AM - edited 03-08-2021 11:43 AM
Hello @Cisco10956 ,
I have made some assumptions on how the different network devices are connected .
>> But I must say, you are not answering the question as posted. Yes I do realize and understand what the previous person answered as correct.
Yes because you haven't provided the level of detail.
There is one point I have missed and it is how to deliver DHCP addresses on multiple subnets.
Let us suppose the DHCP server has IP address 192.168.2.10
All hosts in Vlan 2 can get an IP address directly from the DHCP server that is able to listen to their DHCP requests that are sent as broadcasts.
What happens for hosts in VLAN 3 ?
They send out DHCP request as non routable broadcast frames.
The router can help on this translating the 255.255.255.255 destination to server address 192.168.2.10
All you need is to use the ip helper-address feature
int gi0/0.3
enc dot1q 3
ip address 192.168.3.1 255.255.255.0
ip helper-address 192.168.2.10
This feature has made the use of centralized DHCP servers possible in enteprise networks.
In preparing the packet to be sent to the server the gi address field is populated with 192.168.3.1 so that the DHCP server is able to pick the right DHCP pool and to choice a free address in that pool for the answer that is sent to 192.168.3.1.
Then the router sends as a broadcast or unicast to the client the DHCP offer and this allows hosts in vlan 3 to be able to get an IP address.
Hope to help
Giuseppe
03-08-2021 10:22 AM - edited 03-08-2021 10:26 AM
Hello @Cisco10956 ,
you have already a good example of configuration provided by Paul Driver in your other thread
we make the following assumption inter VLAN routing is made by the router using the so called Router on a stick ROAS
the router connects to switch1: port gi0/1
switch 1: needs to have defined both VLANs 2 and 3
vlan 2
name DATA2
exit
vlan 3
name DATA3
int gi0/1
desc to Router gi0/0
switchport
switchport mode trunk
on router side
int gi0/0
desc to switch1:g0/1
no ip address
int gi0/0.2
enc dot1q 2
ip address 192.168.2.1 255.255.255.0
int gi0/0.3
enc dot1q 3
ip address 192.168.3.1 255.255.255.0
switch1 gi0/24 connects to switch 2 gi0/24 both interfaces are configured as trunk carrying all VLANs
int gi0/24
desc to switch2:gi0/24
switchport
switchport mode trunk
on switch1 we use port gi0/5 to connect DEsktop1
int gi0/5
descr to desktop 1
switchport
switchport mode access
switchport access vlan 2
on switch 2
You need to be sure that Vlan 2 and Vlan 3 exists
so after connecting gi0/24 to gi0/24 wait a few minutes then issue
show vlan and see if vlan 2 and 3 appear
if they do not create them locally
conf t
vlan 2
name DATA2
vlan 3
name DATA3
int gi0/5
descr to desktop 2
switchport
switchport mode access
switchport access vlan 3
Edit:
to have and end to end communication correct default gateways have to be set on desktop 1 it must be 192.168.2.1 on desktop2 must be 192.168.3.1.
Hope to help
Giuseppe
03-08-2021 10:48 AM
03-08-2021 11:42 AM - edited 03-08-2021 11:43 AM
Hello @Cisco10956 ,
I have made some assumptions on how the different network devices are connected .
>> But I must say, you are not answering the question as posted. Yes I do realize and understand what the previous person answered as correct.
Yes because you haven't provided the level of detail.
There is one point I have missed and it is how to deliver DHCP addresses on multiple subnets.
Let us suppose the DHCP server has IP address 192.168.2.10
All hosts in Vlan 2 can get an IP address directly from the DHCP server that is able to listen to their DHCP requests that are sent as broadcasts.
What happens for hosts in VLAN 3 ?
They send out DHCP request as non routable broadcast frames.
The router can help on this translating the 255.255.255.255 destination to server address 192.168.2.10
All you need is to use the ip helper-address feature
int gi0/0.3
enc dot1q 3
ip address 192.168.3.1 255.255.255.0
ip helper-address 192.168.2.10
This feature has made the use of centralized DHCP servers possible in enteprise networks.
In preparing the packet to be sent to the server the gi address field is populated with 192.168.3.1 so that the DHCP server is able to pick the right DHCP pool and to choice a free address in that pool for the answer that is sent to 192.168.3.1.
Then the router sends as a broadcast or unicast to the client the DHCP offer and this allows hosts in vlan 3 to be able to get an IP address.
Hope to help
Giuseppe
03-08-2021 10:23 AM
PC ---Switch 2---Switch 1--Router
if this is the Config
Switch 2 should have access VLAN configured to port VLAN3 (if this acting as layer 2)
Switch2- Switch1 should have a trunk port that allowed VLAN 2 and 3 on your case.
Switch 1 to Router ( should be Trunk port) - if the switch 1 also acting as Layer 2 device
The router should have dot1q sub-interface which have vlan2 and Vlan 3 IP address
router config looks like below :
interface gigabitethernet0/1
no ip address
!
interface gigabitethernet0/1.2
encapsulation dot1q 2 native
ip address 192.168.2.1 255.255.255.0
!
interface gigabitethernet0/1.3
encapsulation dot1q 3
ip address 192.168.3.1 255.255.255.0
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide