The router-on-a-stick term is used to describe a network device that routes traffic between two networks, by using one physical network interface. It has also been called a Stub router and One-armed router.
The Router on a stick configuration can be used, if we want to route traffic across multiple VLANs. Since the router routes traffic across different VLANs, we need to add VLAN tagging.
Router JSRX-1 is directly connected to a VLAN capable switch .Our aim is to talk to SITE-1 on one subnet and SITE-2 on another, over the same Fast Ethernet port. The first step, in configuring VLANs, is to enable VLAN tagging on the physical interface. For example, we are using fe-0/0/1 as the physical interface; we can also use the ge interface.
[edit interfaces fe-0/0/1] testname@SRX-1# set vlan-tagging [edit interfaces fe-0/0/1] testname@JSRX-1# show vlan-tagging; speed 100m; link-mode full-duplex; [edit interfaces fe-0/0/1] testname@JSRX-1#
[edit interfaces fe-0/0/1] testname@JSRX-1# set unit 20 vlan-id 20 [edit interfaces fe-0/0/1] testname@JSRX-1# set unit 20 family inet address 1.1.1.1/24 [edit interfaces fe-0/0/1] testname@JSRX-1# set unit 30 vlan-id 30 family inet address 2.2.2.2/24 [edit interfaces fe-0/0/1] testname@JSRX-1# show vlan-tagging; speed 100m; link-mode full-duplex; unit 20 { vlan-id 20; family inet { address 1.1.1.1/24; } } unit 30 { vlan-id 30; family inet { address 2.2.2.2/24; } } [edit interfaces fe-0/0/1] testname@JSRX-1#