11-07-2008 10:35 AM - edited 03-06-2019 02:22 AM
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
Solved! Go to Solution.
11-07-2008 10:38 AM
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
11-07-2008 11:13 AM
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
11-07-2008 10:38 AM
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
11-07-2008 10:49 AM
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
11-07-2008 10:52 AM
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
11-07-2008 11:07 AM
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
11-07-2008 11:13 AM
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
11-07-2008 11:19 AM
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
11-07-2008 11:24 AM
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
11-07-2008 12:00 PM
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
11-07-2008 11:59 AM
You can configure a secondary IP Address on the interface vlan, but that may cause other problems.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide