LAYER 2 or is it LAYER3?

Unanswered Question
Jun 8th, 2007

Folks, I need some clarification on this.

I have a question regarding architecture and a "simple" implementation.

here is the set up:

I have a router and its fa0/0 interface is connected to a catOS L3 switch's 9/1 port.

Here are the pertinent configs:

switch MSFC:

interface vlan 21

ip address 10.27.21.3 255.255.255.0

switch sup:

set vlan 21 9/1

SO, PORT 9/1 IS IN VLAN 21.

Router:

interface fa0/0

ip address 10.27.21.4 255.255.255.0

OK, so whats the big deal, right?

I want to know if this ethernet connection between the L3 switch and the router is considered a layer 2 or layer 3 connection.

My answer would be that it is a layer 3, routed connection because port 9/1 was placed in vlan 21 and vlan 21's layer 3 (SVI) interface was configured on the switch's MSFC. Right? So, its like creating a point-to-point link in which port 9/1 would have the host address of .3 (vlan inerface address on the MSFC) and the router would be .4 In fact, we could have used a /30 subnet mask instead of the /24.

Here is where I need clarification: Lets say I DID use a /24, instead of the /30, and then I added 3 more ports to vlan 21 and connected those 3 ports -- say, 9/2, 9/3 and 9/4 -- to 3 other routers. Now, in the previous example, we said that port 9/1 would take on the IP address of .3, but now I have added 3 more ports to that vlan and have connected them to 3 different routers. So, what IP addresses would those ports assume??? After all, I only have 1 vlan 21 interface configured on the MSFC (as well I should), so what about ports 9/2-3-and 4? What IP addresses do they assume??

Or could it be that I am looking at it the wrong way? I mean, yes, the links would be considered layer 3, ethernet links between the L3 switch and all the routers, but the switch ports (9/1-4) should not be viewed as having "adopted" any IP address. Does that make any sense? If so, how SHOULD I be looking at those port's IP characteristics?

Thank you for your help

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
mohammedmahmoud Fri, 06/08/2007 - 12:42

Hi,

Since the port is assigned a VLAN and configured with switchport access, then it is a Layer 2 port not a layer 3 port (to be a layer 3 port it should have an IP address and "no switchport"), despite routing is done via the SVI interface, and please do care that Ethernet is not a point-to-point technology rather it is a multiaccess technology.

HTH, please do rate all helpful replies,

Mohammed Mahmoud.

sundar.palaniappan Fri, 06/08/2007 - 12:42

Port 9/1 is a layer 2 port.

Interface vlan 21 on the switch is the layer 3 interface.

Interface fa0/0 on the router is layer 3 interface.

With that said you can assign ports 9/2, 9/3 etc. to vlan 21 and the host connected to them can use a valid IP from the vlan 21 IP range and use the switch's vlan 21 IP or the router's IP as their layer 3 gateway.

BTW, it's not a p-t-p link. It's a multiaccess segment. In other words multiple hosts can exist on this segment.

HTH

Sundar

lamav Fri, 06/08/2007 - 12:50

Sundar:

You said:

"With that said you can assign ports 9/2, 9/3 etc. to vlan 21 and they can use a valid IP from the vlan 21 IP range and use the switch's vlan 21 IP or the router's IP as their layer 3 gateway."

Clarification: Ports 9/2,3 and 4 are NOT user ports. They are ports, like 9/1, that are connected to other routers. So, you have 9/1 connected to router 1; 9/2 connected to router 3; etc. Thats what I meant by point-to-point-type links.

So, my question is, which IP address would 9/1-4 'adopt" when communicating on layer 3 with their respective routers. Lets say routing updates are going to go out ports 9/1-9/4 to their respective neighbor routers, those routing update datagrams must have a source IP address to place in the IP header. Which IP addresses would they use when you only have ONE SVI configured on the MSFC?

That havin gbeen said,

sundar.palaniappan Fri, 06/08/2007 - 13:31

Just because these ports are connected to router interfaces it doesn't become p-t-p links and it's still a multiaccess segment.

The ports themselves do not adopt any IP address and they simply facilitate layer 3 communication between all the devices on the subnet. Routing updates from the switch would use the int vlan 21's IP as the source address.

HTH

Sundar

lamav Fri, 06/08/2007 - 14:10

Thanks, Sundar. That last statement really answered my question. Now that makes sense.

As afr as the "point-to-point," I know ethernet is a multiaccess technology. Lets say I used 4 different /30 vlans to make those 4 router connections, although the technology is indeed ethernet, would they be considered point-to-point links?

sundar.palaniappan Fri, 06/08/2007 - 14:24

If you use a /30 bit mask then there can be only 2 hosts on the subnet and you can consider that as p-t-p link. But, remember a routing protocol like OSPF would still consider that as broadcast segment unless you manually configure the interface as a p-t-p network type.

HTH

Sundar

lamav Sat, 06/09/2007 - 06:50

Sundar, thank you!

I really appreciate the info. You clarified what I suspected already.

Thanks again, buddy.

Actions

This Discussion