Single Interface Routing

Unanswered Question
Jan 8th, 2012
User Badges:

Hi all,

     I am a recent student to Cisco products and I have purchased some (what I thought was good) lab equipment to learn with on a budget. What I have is a 2948G switch and a 2620 router. My issue is this: the router has only one fastEthernet port. Is it possible to use VLANs and VLAN Interfaces on the router and switch to somehow emulate a second interface to connect to a WAN or subnet?

Your response is very much appreciated.


Thanks!


Jake

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
viswamin Sun, 01/08/2012 - 01:41
User Badges:
  • Cisco Employee,

Did you try creating a sub-interface?


Not sure how much it would be helpful but you could def give it a try....


-Vijay

jahkeupvee Sun, 01/08/2012 - 01:44
User Badges:

I did though it threw an error when I ran fa0/0.2 and tried to set an ip:


% Configuring IP routing on a LAN subinterface is only allowed if that

subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,

or ISL vLAN.


Forgive me, I am still young into the profession. I know this has to do with encapsulation or something of that nature.

viswamin Sun, 01/08/2012 - 01:48
User Badges:
  • Cisco Employee,

you have to set up the encapsulation techinique first.


try configuring this command on the interface


encapsulation dot1q


-Vijay

jahkeupvee Sun, 01/08/2012 - 01:52
User Badges:

Thanks Vijay, that appears to have worked. Though on the side of a true connection, I would then add vlan 2 to the same port on the switch and another port only on vlan 2 for the external link correct?

viswamin Sun, 01/08/2012 - 01:55
User Badges:
  • Cisco Employee,

Are you trying to perform inter-vlan routing?


-Vijay

jahkeupvee Sun, 01/08/2012 - 01:59
User Badges:

Essentially, though I may be wrong as I still need to pick up on the terminology.


Bascially I have an internet connection and a connection to a switch from the router. I will have the physical internet ethernet connection to the switch on a port on VLAN2. VLAN2 would only contain that port (internet) and the port of the router (which would also be on VLAN1 for it's network and routing).

viswamin Sun, 01/08/2012 - 02:04
User Badges:
  • Cisco Employee,

sorry jacob can you send your netowrk diagram along with what you are trying to do? I could not much on your topology.


-Vijay

jahkeupvee Sun, 01/08/2012 - 02:21
User Badges:

I need to route internet provided over ethernet to a subnet through my router through my switch. The problem arises that I only have one physical fastEthernet port on the router. I hope this helps.

jahkeupvee Thu, 01/12/2012 - 08:44
User Badges:

Vijay I'm still having issues creating my vlans with intervlan operation. I would love to get some internet conenction going to test some security hardware. Thanks.

Ven Taylor Thu, 01/12/2012 - 08:57
User Badges:
  • Bronze, 100 points or more

What you're talking about is called a "router on a stick" and is quite common.

The router acts as the layer 3 point for multiple subnets, but uses a single physical connection.

The switch acts as the layer 2.


Some tips:

1. Ensure your switch port connecting to the router is a trunk port.

2. Create separate dot1q sub-interfaces for each subnet you want to use.

3. Create vlans on your switch to match your sub-interfaces.  (vlan2 = fa0/0.2 vlan 5 = fa0/0.5)

3. Put your WAN-connected switch port on its own vlan.

4. Put all your other switch ports on the appropriate vlan for its use.

5. The router should handle everything else since it sees all sub-interfaces as connected.


Ven

jahkeupvee Thu, 01/12/2012 - 09:07
User Badges:

Thanks Ven! This sounds exactly what I have been trying to do. I will try it when I get back to my lab.


Thanks for the pointer on the terminology too.


Jacob

Actions

This Discussion