Bài lab Vlan VTP intervlan ospf acl nat
Đề bài
Cấu hình S1
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#host
Switch(config)#hostname S1
S1(config)#ena
S1(config)#enable pa
S1(config)#enable password ccna
S1(config)#lin
S1(config)#line vt
S1(config)#line vty pas
S1(config)#line vty paass
S1(config)#line vty pass
S1(config)#line vty passw
S1(config)#line vty 0 15
S1(config-line)#pas
S1(config-line)#password ccna
S1(config-line)#exit
S1(config)#vtp mo
S1(config)#vtp mode se
S1(config)#vtp mode server
Device mode already VTP SERVER.
S1(config)#vtp
S1(config)#vtp do
S1(config)#vtp domain ccna
Changing VTP domain name from NULL to ccna
S1(config)#vtp pass
S1(config)#vtp password ccna1
Setting device VLAN database password to ccna1
S1(config)#vlan 10
S1(config-vlan)#nam
S1(config-vlan)#name gv
S1(config-vlan)#exit
S1(config)#vlan 20
S1(config-vlan)#name sv
S1(config-vlan)#exit
S1(config)#vlan 30
S1(config-vlan)#nam
S1(config-vlan)#name kt
S1(config-vlan)#exit
S1(config)#ip rou
S1(config)#ip rout
S1(config)#ip routing
S1(config)#int vlan 10
S1(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up
S1(config-if)#ip add 172.16.1.11 255.255.255.0
S1(config-if)#no shut
S1(config-if)#exit
S1(config)#int vlan 20
S1(config-if)#
%LINK-5-CHANGED: Interface Vlan20, changed state to up
S1(config-if)#ip add 172.16.2.12 255.255.255.0
S1(config-if)#no shut
S1(config-if)#exit
S1(config)#int vlan 30
S1(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up
S1(config-if)#ip add 172.16.3.13 255.255.255.0
S1(config-if)#no shut
S1(config-if)#exit
S1(config)#int f0/1
S1(config-if)#no switchport
S1(config-if)#ip add 192.168.2.2 255.255.255.0
S1(config-if)#no shut
S1(config-if)#exit
S1(config)#int range f0/2-3
S1(config-if-range)#switchport mode trunk
Command rejected: An interface whose trunk encapsulation is “Auto” can not be configured to “trunk” mode.
Command rejected: An interface whose trunk encapsulation is “Auto” can not be configured to “trunk” mode.
S1(config-if-range)#switchport trunk encapsulation dot1q
S1(config-if-range)#exit
S1(config)#router
S1(config)#router os
S1(config)#router ospf 1
S1(config-router)#network 192.168.2.0 0.0.0.255 area 0
S1(config-router)#network 172.16.1.0 0.0.0.255 area 0
S1(config-router)#network 172.16.2.0 0.0.0.255 area 0
S1(config-router)#network 172.16.3.0 0.0.0.255 area 0
S1(config-router)#exit
S1(config)#do wr
Building configuration…
[OK]
S1(config)#exit
S1#
%SYS-5-CONFIG_I: Configured from console by console
S1#show vlan
VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig0/1, Gig0/2
10 gv active
20 sv active
30 kt active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
1 enet 100001 1500 – – – – – 0 0
10 enet 100010 1500 – – – – – 0 0
20 enet 100020 1500 – – – – – 0 0
30 enet 100030 1500 – – – – – 0 0
1002 fddi 101002 1500 – – – – – 0 0
1003 tr 101003 1500 – – – – – 0 0
1004 fdnet 101004 1500 – – – ieee – 0 0
1005 trnet 101005 1500 – – – ibm – 0 0
Remote SPAN VLANs
——————————————————————————
Primary Secondary Type Ports
——- ——— —————– ——————————————
S1#
Cấu hình S2
Switch>
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hos
Switch(config)#hostname S2
S2(config)#ena
S2(config)#enable pas
S2(config)#enable password ccna
S2(config)#li
S2(config)#line vt
S2(config)#line vty 0 15
S2(config-line)#pas
S2(config-line)#password ccna
S2(config-line)#exit
S2(config)#vtp mo
S2(config)#vtp mode cl
S2(config)#vtp mode client
Setting device to VTP CLIENT mode.
S2(config)#vtp do
S2(config)#vtp domain ccna
Changing VTP domain name from NULL to ccna
S2(config)#vtp pass
S2(config)#vtp password ccna1
Setting device VLAN database password to ccna1
S2(config)#int f0/1
S2(config-if)#switchport mode trunk
S2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
S2(config-if)#do show vlan
VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24, Gig0/1
Gig0/2
10 gv active
20 sv active
30 kt active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
1 enet 100001 1500 – – – – – 0 0
10 enet 100010 1500 – – – – – 0 0
20 enet 100020 1500 – – – – – 0 0
30 enet 100030 1500 – – – – – 0 0
1002 fddi 101002 1500 – – – – – 0 0
1003 tr 101003 1500 – – – – – 0 0
1004 fdnet 101004 1500 – – – ieee – 0 0
1005 trnet 101005 1500 – – – ibm – 0 0
Remote SPAN VLANs
——————————————————————————
Primary Secondary Type Ports
——- ——— —————– ——————————————
S2(config-if)#exit
S2(config)#int f0/2
S2(config-if)#sw
S2(config-if)#switchport mos
S2(config-if)#switchport mo
S2(config-if)#switchport mode ac
S2(config-if)#switchport mode access
S2(config-if)#sw
S2(config-if)#switchport ac
S2(config-if)#switchport access vlan 10
S2(config-if)#exit
S2(config)#int f0/3
S2(config-if)#sw
S2(config-if)#switchport mo
S2(config-if)#switchport mode ac
S2(config-if)#switchport mode access
S2(config-if)#sw
S2(config-if)#switchport ac
S2(config-if)#switchport access vlan 20
S2(config-if)#exit
S2(config)#int vlan 30
S2(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up
S2(config-if)#no shut
S2(config-if)#ip add
S2(config-if)#ip address 172.16.3.14 255.255.255.0
S2(config-if)#exit
S2(config)#do wr
Building configuration…
[OK]
S2(config)#
S2(config)#ip default-gateway 172.16.3.13
S2(config)#do wr
Building configuration…
[OK]
S2(config)#
Cấu hình S3
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hos
Switch(config)#hostname S3
S3(config)#ena
S3(config)#enable pas
S3(config)#enable password ccna
S3(config)#line vty 0 15
S3(config-line)#password ccna
S3(config-line)#exit
S3(config)#vtp mode client
Setting device to VTP CLIENT mode.
S3(config)#vtp domain ccna
Changing VTP domain name from NULL to ccna
S3(config)#vtp password ccna1
Setting device VLAN database password to ccna1
S3(config)#int f0/1
S3(config-if)#switchport mode trunk
S3(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
S3(config-if)#int vlan 30
S3(config-if)#
%LINK-5-CHANGED: Interface Vlan30, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up
S3(config-if)#no shut
S3(config-if)#ip add
S3(config-if)#ip address 172.16.30.15 255.255.255.0
S3(config-if)#exit
S3(config)#int f0/2
S3(config-if)#switchport mode access
S3(config-if)#switchport access vlan 30
S3(config-if)#exit
S3(config)#int f0/3
S3(config-if)# switchport mode access
S3(config-if)#switchport access vlan 10
S3(config-if)#exit
S3(config)#do wr
Building configuration…
[OK]
S3(config)#do show vlan
VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7
Fa0/8, Fa0/9, Fa0/10, Fa0/11
Fa0/12, Fa0/13, Fa0/14, Fa0/15
Fa0/16, Fa0/17, Fa0/18, Fa0/19
Fa0/20, Fa0/21, Fa0/22, Fa0/23
Fa0/24, Gig0/1, Gig0/2
10 gv active Fa0/3
20 sv active
30 kt active Fa0/2
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
—- —– ———- —– —— —— ——– —- ——– —— ——
1 enet 100001 1500 – – – – – 0 0
10 enet 100010 1500 – – – – – 0 0
20 enet 100020 1500 – – – – – 0 0
30 enet 100030 1500 – – – – – 0 0
1002 fddi 101002 1500 – – – – – 0 0
1003 tr 101003 1500 – – – – – 0 0
1004 fdnet 101004 1500 – – – ieee – 0 0
1005 trnet 101005 1500 – – – ibm – 0 0
Remote SPAN VLANs
——————————————————————————
Primary Secondary Type Ports
——- ——— —————– ——————————————
S3(config)#
S3(config)#ip default-gateway 172.16.3.13
S3(config)#do wr
Building configuration…
[OK]
S3(config)#exit
S3#
Các Router còn lại cấu hình tương tự bài lab ospf acl nat