320
edits
(Added subsection on setting up IP) |
(trunk setup) |
||
Line 100: | Line 100: | ||
switch#conf t | switch#conf t | ||
Enter configuration commands, one per line. End with CNTL/Z. | Enter configuration commands, one per line. End with CNTL/Z. | ||
switch(config)#vlan | switch(config)#vlan 30 | ||
switch(config-vlan)#name | switch(config-vlan)#name servers | ||
switch(config-vlan)#exit | switch(config-vlan)#exit | ||
switch(config)#exit | switch(config)#exit | ||
switch#</nowiki> | switch#</nowiki> | ||
=== Setup trunk to Switch 2 === | |||
<nowiki> | |||
switch#conf t | |||
Enter configuration commands, one per line. End with CNTL/Z. | |||
switch(config)#int gi1/0/4 | |||
switch(config-if)#switchport trunk encapsulation dot1q | |||
switch(config-if)#switchport mode trunk | |||
switch(config-if)#switchport trunk allowed vlan remove 1-4094 | |||
switch(config-if)#switchport trunk allowed vlan add 30,40 | |||
switch(config-if)#exit | |||
switch(config)#exit | |||
switch#</nowiki> | |||
=== Setup trunk to Switch 1 === | |||
<nowiki> | |||
switch2#conf t | |||
Enter configuration commands, one per line. End with CNTL/Z. | |||
switch2(config)#int gi1/0/6 | |||
switch2(config-if)#switchport trunk encapsulation dot1q | |||
switch2(config-if)#switchport mode trunk | |||
switch2(config-if)#switchport trunk allowed vlan remove 1-4094 | |||
switch2(config-if)#switchport trunk allowed vlan add 30,40 | |||
switch2(config-if)#exit | |||
switch2(config)#exit</nowiki> | |||
This config can now be seen with sh run (only pasting the relevant section) | |||
<nowiki> | |||
switch2#sh run | |||
! | |||
interface GigabitEthernet1/0/1 | |||
switchport trunk encapsulation dot1q | |||
switchport trunk allowed vlan 30,40 | |||
switchport mode trunk | |||
!</nowiki> |