Network Design and Operations

A router is to be connected with a single link to an L2 switch that has VLAN 10 (192.168.10.0/24) and VLAN 20 (192.168.20.0/24), so that the two VLANs can communicate with each other. Which configuration is appropriate for this setup?

  1. AMake the switch port an access port in VLAN 10 and give the router interface a single IP address, 192.168.10.1
  2. BGive the hosts in VLAN 10 and VLAN 20 addresses from the same subnet so that they can communicate without going through the router
  3. CMake the switch port a trunk port, create a subinterface for each VLAN on the router, and configure each with its VLAN ID and the IP address that serves as that VLAN's default gateway (such as 192.168.10.1 and 192.168.20.1)
Show answer and explanation

Answer: C. Make the switch port a trunk port, create a subinterface for each VLAN on the router, and configure each with its VLAN ID and the IP address that serves as that VLAN's default gateway (such as 192.168.10.1 and 192.168.20.1)

Traffic between VLANs is relayed at the network layer by a router or L3 switch. To carry several VLANs over one link, the switch side is made a trunk port, and on the router one physical interface is split into a subinterface per VLAN, each configured with an 802.1Q VLAN ID and an IP address. The hosts in each VLAN use the address of their VLAN's subinterface as the default gateway. A packet from VLAN 10 to VLAN 20 goes up the link to the router and comes back down the same link with a different tag. This setup is called router on a stick; in networks with many devices, an L3 switch that routes inside the switch is generally used instead.

  • A. Only VLAN 10 frames would reach the router, so hosts in VLAN 20 could not use it.
  • B. Different VLANs are separate broadcast domains, so even with the same subnet, ARP would not reach across and the hosts could not communicate.
  • C. Correct. With a trunk and subinterfaces, one link routes both VLANs.
Practice this topic Back to topic

Related calculators

Books on Network Design and Operations Ad

As an Amazon Associate I earn from qualifying purchases.

More Network Design and Operations questions

  1. Two routers, R1 (192.168.1.2) and R2 (192.168.1.3), are configured with VRRP using the virtual IP address 192.168.1.254. Normally R1 forwards traffic as the master. Which address should be set as the default gateway on the LAN hosts?
  2. 192.168.10.0/24 is to be split into subnets for site A (100 hosts), site B (50 hosts) and site C (25 hosts). Starting with the site that needs the most hosts, each site is given the smallest subnet that holds its hosts, packed in from the lowest addresses. Which subnet is assigned to site C?
  3. Each of the following three sets consists of four consecutive /24 networks. For which set can the four routes be summarized into exactly one /22 route without including any addresses outside the set?
  4. A router's routing table has four routes: 172.16.0.0/12 (next hop router B), 172.16.32.0/19 (router A), 172.16.48.0/20 (router C) and 0.0.0.0/0 (router D). To which router is a packet for 172.16.45.10 sent?
  5. Branch router R2 is connected to head-office router R1 over a 10.255.0.0/30 link, with R1's end at 10.255.0.1 and R2's at 10.255.0.2. When a static route to the head-office network 192.168.1.0/24 is configured on R2, which address is appropriate as the next hop?

Comparisons in this topic