---
# System prepended metadata

title: NMP Lab 1
tags: [Network Management Practice, CSnote]

---

---
title: NMP Lab 1
---
# Setup Vlan, trunk, and VTP

    setup topology
    p1-s1-p2
        |
    p3-s2
    s: switch, p: pc

![](https://i.imgur.com/CkFhOw0.png)



##### *Options > Preferences > Port Labels Always Shown*
![](https://i.imgur.com/AozooeC.png)

## 1. setup vlans 40%
### setup p1-s1, p2-s1, p3-s2: vlan 2
Go into switch0 and open CLI

    switch>en
    Switch#conf t
    Switch(config)#vlan 2 
    Switch(config-vlan)#exit
    Switch(config)#int fa0/1
    Switch(config-if)#switchport access vlan 2
    Switch(config-vlan)#exit
    Switch(config)#int fa0/2
    Switch(config-if)#switchport access vlan 2
    Switch(config-if)#exit
    
Go into switch1 and open CLI

    Switch>en
    Switch#conf t
    Switch(config)#vlan 2
    Switch(config-vlan)#exit
    Switch(config)#int fa0/2
    Switch(config-if)#switchport access vlan 2
    Switch(config-if)#exit

### setup IPs for p1,p2,p3 
Go into PC0, PC1, PC2 and open Desktop>IP Configuration

    static
    IP Address = 192.168.1.101 / 102 / 103
    Subnet Mask = 255.255.255.0
    Default Gateway = 192.168.1.1
    
### setup IPs for vlan 2 at s1, s2; use vlan IPs, as gateway for p1,p2,p3 
Go into switch0 and switch1, open CLI

    Switch(config)#int vlan 2
    Switch(config-if)#ip addr 192.168.1.1 255.255.255.0

### show vlan. ping p1 to p2 ok, ping p1 to p3 fail
Go into switch0 and switch1, open CLI

    Switch(config-if)#do show vlan
Go into PC0 and open Desktop>Command Prompt
    
    PC>ping 192.168.1.102
    PC>ping 192.168.1.103
    
![](https://i.imgur.com/NhytJRu.png)

## 2. setup trunk 30%
### show trunk by interface 
Go into switch0 and open CLI

    Switch(config-if)#exit
    Switch(config)#int fa0/3
    Switch(config-if)#switchport mode trunk 
    Switch(config-if)#exit
    Switch(config)#exit
    Switch#show interfaces trunk 
    Switch#show interfaces fa0/3 switchport
    
### ping p1 to p3 ok. show trunk status by interface
Go into PC0 and open Desktop>Command Prompt
    
    PC>ping 192.168.1.103
    
![](https://i.imgur.com/Q1V7kVL.png)

## 3. setup vtp 30%
### s1: server, s2: client 
Go into switch0 and open CLI
    
    Switch#conf t
    Switch(config)#vtp domain ntpu
    
Go into switch1 and open CLI
    
    Switch(config-if)#exit
    Switch(config)#vtp mode client 
    

### add vlan4 
Go into switch0 and open CLI
    
    Switch(config)#vlan 4

### show vtp, show vlan
Go into switch0 and open CLI

    Switch(config-vlan)#end
    Switch#show vtp status
    Switch#show vlan

Go into switch0 and open CLI

    Switch(config)#end
    Switch#show vtp status
    Switch#show vlan
    
###### tags: `Network Management Practice` `CSnote`