Thereare 2 different ways you can go here. I'll give the best solution #1 and the other non-preferred solution #2: 1.) Inter-VLAN routing - the router does not perform the routing of the VLANs, the switches actually perform the routing. 2.) Router on a stick method - using sub-interfaces configured on the router to route the VLANs.
L2switch vlans without router support. Solved. I have 3 routers in the closet and 1 cord going from there to the living room. Internet facing one is and 2 downstream with 10.2.0.1 and 10.3.0.1. I have a switch in living room with tv, printer, and a cord going to roommates room. He will have his own router.
Routerg0/0 is and switch 1 VLAN 1 IP is 192.168.10.17 . I cannot ping between the two. I can even do a sh cdp neighbor detail on both devices and it will show the other device and IP address. Router g0/1 connects via ethernet to NIC 172.16.1.2 /29 . VLAN 1 on all three switches is native and all three switches are trunked into
Vay Tiền Trả Góp 24 Tháng. Asked 5 years, 9 months ago Viewed 6k times I'm trying to understand the specifics of trunking a VLAN on two switches. Say I have two switches, both hosting half of VLAN 3. Switch 1 Ports 0-5 on VLAN 3, Port 6 is Trunk Switch 2 Ports 0-5 on VLAN 3, Port 6 is Trunk Do the two switches know what the MAC addresses are of the devices connected to the other switch which are in the same VLAN, or do the switches just know that Port 6 is a VLAN 3 trunk and when they receive a broadcast frame, they just flood the frame to the trunk port with the VLAN tag and expect the switch on the other end to deal with it? Ron Maupin♦ gold badges113 silver badges190 bronze badges asked Sep 11, 2017 at 1511 When a frame enters a switch, the switch will take the source MAC address and update its MAC address table with the interface where the frame entered the switch. That interface can be an access or trunk interface. Broadcast or unknown unicast frames will be sent to all interfaces except the one where the frame entered the switch, including access and trunk interfaces. Known unicast frames will be sent to the switch interface indicated in the switch MAC address table, whether an access or trunk interface. answered Sep 11, 2017 at 1516 Ron Maupin♦Ron gold badges113 silver badges190 bronze badges 6 VLAN3 is just a subnet or another network. Say you have vlan 1 and vlan 3 is Each device in vlan 3 will get the IP. That IP is assigned to the MAC address of the end device This is held in the arp table on a layer 3 device. Only the switch, as it is a layer 2 device, only knows the MAC address of the devices directly attached to it. A Trunk port allows for multiple networks or VLANS to communicate over the same port, But without a layer 3 they cannot talk to one another. A broadcast will be sent to any device on that VLAN or network. It doens't care if it's on switch one or two. answered Sep 11, 2017 at 1518 3 There's 2 thing in your question. First if you consider a single vlan, the port 6 being a trunk is not mandatory, setting the port 6 of both switch as VLAN3 will work. A trunk port has interest when you have multiples vlan on a switch, this mean you have made partitions on your switch, port 1 to 5 on VLAN3, port 7 to 12 on VLAN 4 for example, and you configure your port 6 as trunk to transport vlan 3 and 4. You may achieve the same thing without a trunk port if you keep port 6 in vlan 3 and use port 12 in VLAN 4 to link the two switches for example. A switch records incoming mac address on a port, such that when a packet is directed to a mac address it know where to send it, when it don't know or if it's a broadcast it send it on all ports within the same vlan, trunk included and the switch receiving the packet will scan it's own table before forwarding the packet to the correct port if already know or on all port within the vlan if the mac address is unknown or broadcast. Mainly a vlan is a virtual switch within the switch and the trunk is an aggregation of "virtual ports" to transport multiple vlans on a single link trunk on multiple links are trunks made on port aggregation LACP and are another subject. answered Sep 11, 2017 at 1541 "Switch 2 Ports 0-5 on VLAN 3, Port 6 is Trunk" .. Switch 2 knows that Vlan 3 information on sw1 from switch 1 Port6 mac -address . Through this mac-address frame is forwarded to switch2 from switch 1 After frames is in switch 2 . Traffic will further checks for mac -address table in switch 2, with the reference to this mac -address table frame is forwarded on required interfàce where destination host is connected. answered Dec 10, 2020 at 1150 Sagar UragondaSagar Uragonda8371 gold badge15 silver badges73 bronze badges
Since you have not included the router model, I will assume it is a Cisco router, something like an ISR with a built-in switch module. Some Cisco routers can have a built-in or optional, add-on switch modules. The interfaces for this module are switch interfaces, not router interfaces. You need to create VLAN interfaces to link the layer-2 switch to the layer-3 router. You configure the switch interfaces the same way that you do for a layer-2 switch. They are switch interfaces, not router interfaces, so you cannot configure layer-3 on those interfaces. That is where the SVIs come in. You assign a VLAN to each switch interface, and create an SVI for each VLAN. The SVIs get configured with the layer-3 information for the VLAN. The layer-3 addresses configured on the SVIs will be the gateways for the VLANs. The router will also have some router interfaces that get configured for layer-3. Routers will, by default, route everything between its layer-3 interfaces, including SVIs configured for layer-3. Let's assume you have eight switch interfaces GigabitEthernet0 - 7, and two router interfaces GigabitEthernet8 - 9, like a Cisco 892 router. There are two connections to other routers, and there are four VLANs two switch interfaces on each VLAN. The first eight interfaces are switch interfaces, and they are configured like a layer-2 switch. The last two interfaces are router interfaces, and they are configured with layer-3. The four VLAN interfaces are configured as layer-3 interfaces. Routing between the VLANs and the router interfaces will happen, as long as they are configured for layer-3, and there are no other configurations to block, ACLs. The gateways for the VLANs will be the addresses configured on the VLAN interfaces. You could have something like this interface GigbitEthernet0 description VLAN 1 switchport access vlan 1 switchport mode access no shutdown ! interface GigbitEthernet1 description VLAN 1 switchport access vlan 1 switchport mode access no shutdown ! interface GigbitEthernet2 description VLAN 2 switchport access vlan 2 switchport mode access no shutdown ! interface GigbitEthernet3 description VLAN 2 switchport access vlan 2 switchport mode access no shutdown ! interface GigbitEthernet4 description VLAN 3 switchport access vlan 3 switchport mode access no shutdown ! interface GigbitEthernet5 description VLAN 3 switchport access vlan 3 switchport mode access no shutdown ! interface GigbitEthernet6 description VLAN 4 switchport access vlan 4 switchport mode access no shutdown ! interface GigbitEthernet7 description VLAN 4 switchport access vlan 4 switchport mode access no shutdown ! interface GigbitEthernet8 description Link to Router 2 ip address no ip redirects no ip unreachables no ip proxy-arp no shutdown ! interface GigbitEthernet9 description Link to Router 3 ip address no ip redirects no ip unreachables no ip proxy-arp no shutdown ! interface Vlan1 description VLAN1 ip address no ip redirects no ip unreachables no ip proxy-arp no shutdown ! interface Vlan2 description VLAN2 ip address no ip redirects no ip unreachables no ip proxy-arp no shutdown ! interface Vlan3 description VLAN3 ip address no ip redirects no ip unreachables no ip proxy-arp no shutdown ! interface Vlan4 description VLAN4 ip address no ip redirects no ip unreachables no ip proxy-arp no shutdown !
Hi there. Im trying to set up 2 VLANS on a topology, that consists of 4 PCs, 2 Switches and 1 Router. Task is , that 2 PCs that go to 1 switch run on separate Vlans, VLAN 10 and VLAN 20, and than on another Switch situation is the same. I have configured encapsulation on router for desired subinterfaces, ports from switch to router are set to trunk. Ports on switch are assigned to relevant VLAN. Still nothing is working. Could anyone advice the right way to go?
vlan 2 switch 1 router