Skip to content

InterVLAN Routing

1
2
3
4
5
6
7
8
9
   [Router]
      ||
      ||
  {Trunk Link}
       |
       |
    [Switch]
 10 / \ / \ 20
    "nodes"

Router on a stick

One Cable from our router to a switch

1
2
3
4
   [Router]
      ||
      ||
  {Trunk Link}

Configure

Things are getting complicated so no ascii art :(

  • Switch 1

    1
    2
    3
    4
    5
    en
    conf t
    int f0/1 
    switchport mode trunk
    switchport mode trunk allowed vlan 10,20
    

  • RouterA

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    en
    conf t
    int f0/0
    no shut
    int f0/0.10
    
    encapsulation dot1Q 10
    # to enable IEEE 802.1Q encapsulation of traffic on a specified subinterface
    
    ip address 10.0.0.1 255.255.255.0
    no shut
    
    int f0/0.20
    encapsulation dot1Q 20
    ip address 172.16.0.1 255.255.255.0
    no shut
    exit
    exit
    
    show ip route
    show ip int bri