You are on page 1of 2

Breviar Lab5 RL

Vlan configuration
* Explicit vlan configuration Switch(config)#vlan 100 Switch(config-vlan)#name Marketing Switch(config-vlan)#end * Add a port to a vlan Switch(config)#interface FastEthernet 0/11 Switch(config-if)#switchport mode access Switch(config-if)#switchport access vlan 10 % Access VLAN does not exist. Creating vlan 10 * Configure trunking / native vlan / allowed vlans Switch(config-if)#switchport mode trunk Switch(config-if)#switchport trunk native vlan 42 Switch(config-if)#switchport trunk allowed vlan except 30 Switch(config-if)#switchport trunk allowed vlan ? WORD VLAN IDs of the allowed VLANs when this port is in trunking mode add add VLANs to the current list all all VLANs except all VLANs except the following none no VLANs remove remove VLANs from the current list * Management vlan Switch(config)#interface vlan 100 Switch(config-if)#ip address 192.0.2.101 255.255.255.0

Verification
* Show commands Switch#show vlan brief VLAN Name Status Ports ---- ---------- --------- -------------------------1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, Fa0/9 10 VLAN0010 active Fa0/11 100 Marketing active Fa0/12 ... Switch#show interfaces trunk Port Mode Encapsulation Status Native vlan Fa0/1 on 802.1q trunking 42 Port Fa0/1 Vlans allowed on trunk 1-29,31-1005

Configuration
* Create and configure subinterfaces Router(config)#int FastEthernet 0/0 Router(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up Router(config-if)#interface Fa 0/0.50 %LINK-5-CHANGED: Interface FastEthernet0/0.50, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.50, changed state to up Router(config-subif)#encapsulation dot1Q 50 Router(config-subif)#ip address 192.0.2.1 255.255.255.0 Router(config-if)#interface Fa 0/0.75 %LINK-5-CHANGED: Interface FastEthernet0/0.75, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.75, changed state to up Router(config-subif)#encapsulation dot1Q 75 Router(config-subif)#ip address 192.0.3.1 255.255.255.0

Verification
* Show commands Router#show ip interface brief Interface IP-Address OK? FastEthernet0/0 unassigned YES FastEthernet0/0.50 192.0.2.1 YES FastEthernet0/0.75 192.0.3.1 YES FastEthernet0/1 unassigned YES Method unset manual manual unset Status Protocol up up up up up up administratively down

Router#show ip route C 192.0.2.0/24 is directly connected, FastEthernet0/0.50 C 192.0.3.0/24 is directly connected, FastEthernet0/0.75 * Debugging Router#debug ip packet IP: tableid=0, s=192.0.2.2 (FastEthernet0/0.50), d=192.0.2.18 (FastEthernet0/0.50), routed via RIB IP: s=192.0.2.2 (FastEthernet0/0.50), d=192.0.2.18 (FastEthernet0/0.50), len 128, rcvd 3 IP: tableid=0, s=192.0.2.18 (local), d=192.0.2.2 (FastEthernet0/0.50), routed via RIB IP: s=192.0.2.18 (local), d=192.0.2.2 (FastEthernet0/0.50), len 128, sending

You might also like