Configuring Trunking on Routers

Configuring Trunking on Routers

VLAN trunking can be acclimated on routers and hosts as able-bodied as on switches. However, routers do not

support DTP, so you charge manually configure them to abutment trunking. Additionally, you must

manually configure a about-face on the added end of the articulation to trunk, because the router does not

participate in DTP.

The majority of router trunking configurations use subinterfaces, with anniversary subinterface being

associated with one VLAN. The subinterface cardinal does not accept to bout the VLAN ID; rather,

the encapsulation command sits beneath anniversary subinterface, with the associated VLAN ID being

part of the encapsulation command. Also, because acceptable architecture calls for one IP subnet per VLAN,

if the router wants to advanced IP packets amid the VLANs, the router needs to accept an IP

address associated with anniversary trunking subinterface.

You can configure 802.1Q built-in VLANs beneath a subinterface or beneath the concrete interface

on a router. If configured beneath a subinterface, you use the encapsulation dot1q vlan-id native

subcommand, with the admittance of the built-in keyword acceptation that frames departure this

subinterface should not be tagged. As with added router trunking configurations, the associated

IP abode would be configured on that aforementioned subinterface. Alternately, if not configured on a

subinterface, the router assumes that the built-in VLAN is associated with the physical

interface. In this case, the encapsulation command is not bare beneath the concrete interface;

the associated IP address, however, would charge to be configured beneath the concrete interface.

Example 2-6 shows an archetype agreement for Router1 in Figure 2-1, both for ISL and 802.1Q. In

this case, Router1 needs to advanced packets amid the subnets on VLANs 21 and 22. The aboriginal part

of the archetype shows ISL configuration, with no built-in VLANs, and accordingly alone a subinterface

being acclimated for anniversary VLAN. The additional allotment of the archetype shows an another 802.1Q configuration,

using the advantage of agreement the built-in VLAN (VLAN 21) agreement on the concrete interface.

Example 2-6 Trunking Agreement on Router1

! Agenda the subinterface on the fa 0/0 interface, with the encapsulation

! command acquainted the blazon of trunking, as able-bodied as the VLAN number. The

! subinterface does not accept to be the VLAN ID. Additionally agenda the IP addresses for

! anniversary interface, acceptance Router1 to avenue amid VLANs.

interface fastethernet 0/0.1

ip abode 10.1.21.1 255.255.255.0

encapsulation isl 21

!

interface fastethernet 0/0.2

ip abode 10.1.22.1 255.255.255.0

encapsulation isl 22

! Next, an another 802.1Q agreement is shown. Agenda that this 802.1Q configuration

! places the IP address

! for VLAN 21 on the concrete interface; the router artlessly assembly the

! concrete interface with the built-in VLAN. Alternatively, a subinterface could be

! used, with the encapsulation dot1q 21 built-in command allegorical that the router

! should amusement this VLAN as the built-in VLAN.

interface fastethernet 0/0

ip abode 10.1.21.1 255.255.255.0

!

interface fastethernet 0/0.2

ip abode 10.1.22.1 255.255.255.0

encapsulation dot1q 22

Note additionally that the router does not accept an absolutely authentic accustomed VLAN list. However, the

allowed VLAN account is adumbrated based on the configured VLANs. For instance, in this example,

Router1 allows VLAN 1 (because it cannot be deleted), VLAN 21, and VLAN 22. A show

interface block command on Switch1 would appearance alone 1, 21, and 22 as the accustomed VLANs

on FA0/1.