cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
556
Views
0
Helpful
9
Replies

ip address and switchport basic question

dan_track
Level 1
Level 1

Hi,

I'd like to configure an ip address on my 3750-E ethernet switchport but I'd like that traffic to be entered into vlan 12. I can think of two ways to do this, they are:

Method 1:

conf t

int vlan 12

Description P2P WAN link

ip adddress 10.0.0.1 255.255.255.252

exit

interface gi1/0/48

Description WAN link plugged here

switchport trunk encapsulation dot1q

switchport mode trunk

exit

Method 2:

conf t

int gi 1/0/48

ip address 10.0.0.1 255.255.255.252

switchport acces vlan 12

exit

Since I'm not an expert, could someone please tell me which way is better? and what is wrong in the above and how to improve it?

Thanks

Dan

2 Accepted Solutions

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

Dan

A switchport functions at layer 2 so your second config isn't right ie. it should be

conf t

int gi 1/0/48

ip address 10.0.0.1 255.255.255.252

no switchport

exit

this makes it a routed port but then this is not tying it to vlan 12. So option 1 is the one to go with.

Jon

View solution in original post

Sorry Dan, didn't mean to overload you :-)

SVI = Switch Virtual Interface

or more simply, when you configure a vlan interface on a L3 switch the vlan interface is an SVI eg.

int vlan 12

ip address x.x.x.x x.x.x.x

If both WAN links are L2 then connect them both into the switch, allocate both ports to vlan 12 eg.

int gi1/0

switchport access vlan 12

and then create L3 SVI for vlan 12 as above.

One thing though. You would be better connecting WAN links into separate switches if possible as the switch is now a single point of failure. If 3750 then a second switch in the stack would do as well.

Jon

View solution in original post

9 Replies 9

Jon Marshall
Hall of Fame
Hall of Fame

Dan

A switchport functions at layer 2 so your second config isn't right ie. it should be

conf t

int gi 1/0/48

ip address 10.0.0.1 255.255.255.252

no switchport

exit

this makes it a routed port but then this is not tying it to vlan 12. So option 1 is the one to go with.

Jon

Hi

Thanks for that information. One more question related to this. If I have another WAN link and I also want that in vlan 12 how would I configure that wan link then? The vlan 12 interface can only have one ip address.

Thanks for your help.

Dan

The vlan 12 L3 interface can only have one IP address but there is nothing stopping you connecting any number of ports on the switch into vlan 12.

But if you wanted to connect 2 WAN links and each WAN link has it's own IP address then you would better off using routed ports on the 3750 and then route into vlan 12 on the 3750.

Edit - this is assuming WAN links are L3 links rather than L2. If they are L2 then just connect them into the switch and configure both ports to be in vlan 12 and have a L3 SVI for vlan 12.

Jon

Wow, that was a wealth of information. Not sure what to say to that :).

Both my WAN lines are layer 2, how would I do this L3 SVI? and what is SVI?

Thanks

Dan

Sorry Dan, didn't mean to overload you :-)

SVI = Switch Virtual Interface

or more simply, when you configure a vlan interface on a L3 switch the vlan interface is an SVI eg.

int vlan 12

ip address x.x.x.x x.x.x.x

If both WAN links are L2 then connect them both into the switch, allocate both ports to vlan 12 eg.

int gi1/0

switchport access vlan 12

and then create L3 SVI for vlan 12 as above.

One thing though. You would be better connecting WAN links into separate switches if possible as the switch is now a single point of failure. If 3750 then a second switch in the stack would do as well.

Jon

Thanks for that, apppreciate your help. It all looks a lot clearer now!

One more step forward to becoming an expert, I hope!!!

:)

Thanks

Dan

Dan

No problem and appreciate the ratings. A couple of final things to add

1) If both links are allocated to vlan 12 then one link will block because of STP. So if you need both links and they are connected at either end to switches you could create an etherchannel out of the 2 links and then both would be used. If you did do this they would need to be terminated on the same switch or across a 3750 stack.

2) By extending vlan 12 across the WAN, even with etherchannel you are still extending STP. Just wanted to point that out.

Personally, wherever i can i route over the WAN/MAN rather than switch at L2 precisely because of this.

Apologies if that was too much information :-)

Jon

Jon,

Cheers for that, that's the exact problem I had when I plugged both lines in, it took me a while to understand it, but I didn't know there was a solution. Thanks for the ehtherchannel tip, I'll read up on this.

Thanks

Dan

You can configure a secondary IP Address on the interface vlan, but that may cause other problems.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card