First, a VLAN is created and named tester.

Router# configure terminal

Router(config)# vlan 2

Router(config-vlan)# name tester

Router(config-vlan)# exit

Router(config)# exit

Router# show vlan

From the show vlan command, the new VLAN will be listed, but will not yet be active. Next, a switchport is chosen to belong to VLAN 2.

Router# configure terminal

Router(config)# interface eth9

Router(config-if-eth9)# switchport access vlan 2

Router(config-if-eth9)# exit

Router(config)# exit

Router# show vlan

From the show vlan command, VLAN 2 will be listed as active, with eth9 listed as a member port. Repeat the previous step to add additional switchports to VLAN 2.

Finally, create a virtual interface by binding VLAN 2 to veth2. Use the interface veth2 vlan 2 command from the global configuration mode.

Router(config)# interface veth2 vlan 2

Router(config-if-veth2)#

Now this virtual interface is ready to have an IP address assigned to it.

Router(config-if-veth2)# ip address 192.168.123.254/24

Router(config-if-veth2)# exit

Router(config)# exit

Router# write file

Deleting a VLAN

Beginning in global configuration mode, use the following example to delete a VLAN on the switch (VLAN 2 in this example):

Router(config)# no vlan 2

Router(config)# exit

Router# show vlan

Note: Remember, you cannot delete the default VLAN 1.

68

Page 68
Image 68
Asante Technologies 35516 user manual Routerconfig# interface veth2 vlan Routerconfig-if-veth2#, Deleting a Vlan