Routed port between Switch and Router

Unanswered Question
Jul 9th, 2008
User Badges:

Hi,

Can I define VLAN on one port of Switch which is connected to Router. I mean, Switch is connected to Router & that Switch port is without IP address & I have assigned one VLAN for that.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
lee.reade Wed, 07/09/2008 - 05:21
User Badges:
  • Silver, 250 points or more

Hi,


Just create the vlan, assign the switchport as static access vlan to the vlan just created, and then add an ip address to the vlan interface on the switch.


For example:


Port 10 on switch connects to router;


vlan X - we will call X 100

interface fasteth 0/10

switchport access vlan 100


interface vlan 100

ip address x.x.x.x mask


then configure the router ip address,


thats all!


HTH


LR

Rupesh Kashyap Wed, 07/09/2008 - 05:28
User Badges:

Hi Lee,


So you mean, Without "No SwitchPort" command on Switch , it will work as Routed port. As per my knowledge, Switch port should be L3 enabled with IP address. But here I am only assigning IP to Vlan and adding Switch port to that VLAN. How routing can possible?

lee.reade Wed, 07/09/2008 - 05:32
User Badges:
  • Silver, 250 points or more

Hi,


Well no not really, you can do this two way;


1. enable no switchport on the switchport, but this means you will need to config the ip address on the switch, you will also not need a vlan.


2. leave port as switchport, which means its a layer 2 port, and make it a static access vlan of the new vlan, then put the ip address under the new vlan interface,


Both of these ways will work for you.


HTH


LR

Rupesh Kashyap Wed, 07/09/2008 - 05:59
User Badges:

Thanks Lee.

I know it will work. But it will not publish this network in any Routing Protocol Updates. I mean, this is perfect if switch is connected to one router and there is no any connection beyond Router. Please suggest if I am right.

lee.reade Wed, 07/09/2008 - 06:02
User Badges:
  • Silver, 250 points or more

Hi,


It is treated as a normal IP link, across that specific vlan, so yes if you were to run a routing protocol between the switch and router they would form an adjancency, if using ospf/isis/eigrp etc.


So you would have no problem with routing here.


HTH


LR

Actions

This Discussion