"Switchport Mode Trunk" and VLANs
-
Hey guys, great videos once again! I have a question about commands related to Trunking and VLANs. First, does the command "switchport mode trunk" have to be implemented in both switch's trunk ports for the trunking to take place? If I have one switch on fast Ethernet 0/1 have "switchport mode trunk" enabled, does the connecting switch on its fa0/2 need to have "switchport mode trunk" typed in as well? Also, when I set up an IP address for a VLAN interface, are VLANs separated by network or subnet? For instance, if I have a vlan 1 interface set up for 192.168.50.1 255.255.255.128 and another vlan 2 interface set up for 192.168.50.130 255.255.255.128(assuming these are not layer 3 switches), can devices connected with those vlans communicate with each other?
Thanks again for these videos! I'm also watching CBTNuggets for information.
-
"First, does the command "switchport mode trunk" have to be implemented in both switch's trunk ports for the trunking to take place?"
That depends on the switches themselves. Most of the modern switches try to trunk automatically. So that means if one of your switches has trunk port configured and you connect to that port. The connecting switch will try to become a trunk. This is because of DTP (Dynamic Trunking Protocol). Below is a table that will help you to determine what happens if a port on one side of a trunk is set one way and what happens if a port on the other side is set. The result will be in the intersection.
DTP | Dynamic Auto | Dynamic Desirable | Trunk | Access Dyn Auto | Access |Trunk |Trunk | Access | Dyn Desirable | Trunk |Trunk |Trunk | Access | Trunk | trunk |Trunk |Trunk | Access | Access | Access |Access |Limited | Access | "If I have one switch on fast Ethernet 0/1 have "switchport mode trunk" enabled, does the connecting switch on its fa0/2 need to have "switchport mode trunk" typed in as well?"
Not necessarily. You can see from DTP, which is default what will happen. But if you happen to disable DTP (recommended), then yes you would and you would also want to setswitchport nonegotiate
command with it."Also, when I set up an IP address for a VLAN interface, are VLANs separated by network or subnet? For instance, if I have a vlan 1 interface set up for 192.168.50.1 255.255.255.128 and another vlan 2 interface set up for 192.168.50.130 255.255.255.128(assuming these are not layer 3 switches), can devices connected with those vlans communicate with each other?"
First, When you setup a vlan interface on a single switch, it is assumed you are putting them into different subnets. In your example with /25 networks, you're fine. Because they are on different subnets are equal to different networks.
Second, If the interfaces on are on a layer 3 switch. Yes, they will able to communicate this is because it has layer 3 technology built int the switch to handle the routing. If you're setting this up on a layer 2 switch. You will have to do inter-vlan routing and it will require a router to do so.
Cordially,
Ronnie Wong
Host, ITProTV -
Second, If the interfaces on are on a layer 3 switch. Yes, they will able to communicate this is because it has layer 3 technology built int the switch to handle the routing. If you're setting this up on a layer 2 switch. You will have to do inter-vlan routing and it will require a router to do so.
And layer 3 switches don't require subinterfaces and "router on a stick" correct?
-
Very good. There is no Router on a Stick configuration on the layer 3 switch.
Cordially,
Ronnie Wong
Host, ITProTV