You are on page 1of 5

CCNP Switch Lab Guild - 4

 公司建築物 VLAN 規劃資訊(x 為建築物的編號)

VLAN ID VLAN Name


x1 RD_VL
x2 IT_VL
x3 Acc_VL
x4 Sales_VL
Switch > enable
Switch # configure terminal
Switch(config) # hostname “DSW1, DSW2, ASW1, ASW2”
Switch name(config) # line vty 0 15
Switch name(config) # priviledge level 15
Switch name(config) # no login
Switch name(config) # interface vlan 1
Switch name(config-if) # ip address “10 . x . x . 201, 202, 251, 252”/24
Switch name(config-if) # no shutdown
Switch name(config) # vlan “x1, x2, x3, x4”
Switch name(config) # name “RD_VL , IT_VL, Acc_VL, Sales VL”

1. VTP Domain Name 設定為 SSGSS_Rex,且 VTP Transparent mode


Switch name(config) # vtp mode transparent
Switch name(config) # vtp domain SSGSS_Rex

2. DSW1  ASW1 & DSW2  ASW2 設定 EtherChannel 相關資訊如下:


 802.1Q Trunk Link
 Channel Protocol is LACP
 DSW is active, ASW is passive
 Only allow Vlan 1, X1, X2, X3, X4
 DSWx(config) # interface range fastEthernet 1/0/21 – 22
 DSWx(config-if-range) # channel-group * mode active
 DSWx(config-if-range) # switchport trunk encapsulation dot1q
 DSWx(config-if-range) # switchport mode trunk
 DSWx(config-if-range) # switchport trunk allowed vlan 1, x1 – x4
 ASWx(config) #interface range fastEthernet 0/21 – 22
 ASWx(config-if-range) #switchport mode trunk
 ASWx(config-if-range) # switchport trunk allowed vlan 1, x1 – x4
 ASWx(config-if-range) # channel-group * mode passive
3. DSW1  ASW2 & DSW2  ASW1 設定 EtherChannel 相關資訊如下:
 802.1Q Trunk Link
 Channel Protocol is LACP
 DSW is active, ASW is passive
 Only allow Vlan 1, X1, X2, X3, X4
 DSWx(config) # interface range fastEthernet 1/0/19 – 20
 DSWx(config-if-range) # switchport trunk encapsulation dot1q
 DSWx(config-if-range) # switchport mode trunk
 DSWx(config-if-range) # channel-group * mode active
 DSWx(config-if-range) # switchport trunk allowed vlan 1, x1 – x4

 ASWx(config) #interface range fastEthernet 0/19 – 20


 ASWx(config-if-range) # switchport mode trunk
 ASWx(config-if-range) # channel-group * mode passive
 ASWx(config-if-range) # switchport trunk allowed vlan 1, x1 – x4

4. DSW1  DSW2 設定 EtherChannel 相關資訊如下:


 ISL Trunk Link
 Channel Protocol is PAgP
 Only allow Vlan 1, X1, X2, X3, X4
 DSWx(config) # interface range fastEthernet 1/0/23 – 24
 DSWx(config-if-range) # switchport trunk encapsulation isl
 DSWx(config-if-range) # switchport mode trunk
 DSWx(config-if-range) # channel-group * mode desirable
 DSWx(config-if-range) # switchport trunk allowed vlan 1, x1 – x4

DSWx(config) # interface range fastEthernet 1/0/19 – 24


DSWx(config-if-range) # no shutdown
ASWx(config) # interface range fastEthernet 0/19 – 22
ASWx(config-if-range) # no shutdown

5. Access Port(DSW1, DSW2, ASW1, ASW2)


 FastEthernet 0/1 – 3, Data VLAN x1
 FastEthernet 0/4 – 6, Data VLAN x2
 FastEthernet 0/7 – 9, Data VLAN x3
 兩台電腦在不同 VLAN 之間可 Ping 通
 Switch(config) # interface range fastEthernet “0/1 – 3, 4 – 6, 7 – 9”
 Switch(config-if-range) # switchport mode access
 Switch(config-if-range) # switchport access vlan “x1, x2, x3”

6. Spanning – Tree(DSW1, DSW2, ASW1, ASW2)

 將 PC 端用的介面改為 Portfast
 Switch(config) # interface range fastEthernet 0/1 – 9
 Switch(config-if-range) # spanning-tree portfast

7. DSW1 設定 Layer3 IPv4 Routing

 啟用 Layer3 Switch IPv4 Routing

 建立 SVI x1 – x4
IPv4 interface vlan x1 10 . x . x1 . 254 /24
IPv4 interface vlan x2 10 . x . x2 . 254 /24
IPv4 interface vlan x3 10 . x . x3 . 254 /24
IPv4 interface vlan x4 10 . x . x4 . 254 /24

 DSW1(config) # ip routing
 DSW1(config) # interface vlan “x1 – x4”
 DSW1(config-if) # ip address “10 . x . x1 – x4” /24

8. DSW2 設定 Layer3 Switch IPv6 Routing

 啟用 Layer3 Switch IPv6 Rputing

 建立 SVI x1 – x4
IPv6 interface vlan x1 2020 : x : x1 :: 254 /64
IPv6 interface vlan x2 2020 : x : x2 :: 254 /64
IPv6 interface vlan x3 2020 : x : x3 :: 254 /64
IPv6 interface vlan x4 2020 : x : x4 :: 254 /64
 DSW2(config) # sdm prefer dual-ipv4-and-ipv6 default
 DSW2(config) # ipv6 unicast-routung
 DSW2 # copy running-config startup-config
 DSW2 # reload
 DSW2(config) # interface vlan “x1 – x4”
 DSW2(config-if) # ipv6 address “2020 : x : x1 :: 254”/64
9. DHCP Service for IPv4 on DSW1
 建立 4 個 DHCP Pool(?= 1, 2, 3, 4)

Pool Name VLANx?_POOL


IP Scope 10 . x . x? . 1 – 99 / 24
DNS Server 168.95.1.1, 8.8.8.8
Gateway 10 . x . x? . 254

 DSW1(config) # ip dhcp excluded-address 10 . x . x? . 100 10 . x . x? . 254


 DSW1(config) # ip dhcp pool VLANx?_POOL
 DSW1(dhcp-config) # dns-server 168 . 95 . 1 . 1 8 . 8 . 8 . 8
 DSW1(dhcp-config) # network “10 . x . x? . 0” /24
 DSW1(dhcp-config) # default-router “10 . x . x? . 254”

10. DHCP Service for IPv6 on DSW2


 建立 4 個 DHCP Pool(?= 1, 2, 3, 4)

Pool Name VLANx?_POOL


IP Scope 2020:x:x?::/64
DNS Server 2001:4860:4860::8888
Domain Name Gjunx.com.tw

 DSW2(config) # ipv6 dhcp pool “VLANx?_POOL”


 DSW2(config-dhcpv6) # address prefix “2020 : x : x? ::”/64
 DSW2(config-dhcpv6) # dns-server 2001 : 4860 : 4860 :: 8888
 DSW2(config-dhcpv6) # domain-name “Gjunx.com.tw”

11. DSW1 Layer3 Static EtherChannel(IPv4)


Pod1 Fas 1/0/15 – 16 .1  172.16.12.0/24  .2 Fas 1/0/17 – 18 Pod2
Pod2 Fas 1/0/15 – 16 .1  172.16.23.0/24  .2 Fas 1/0/17 – 18 Pod3
Pod3 Fas 1/0/15 – 16 .1  172.16.34.0/24  .2 Fas 1/0/17 – 18 Pod4
Pod4 Fas 1/0/15 – 16 .1  172.16.45.0/24  .2 Fas 1/0/17 – 18 Pod5
Pod5 Fas 1/0/15 – 16 .1  172.16.15.0/24  .2 Fas 1/0/17 – 18 Pod1
DSW1(config) # interface range fastEthernet “1/0/15 – 16”  “1/0/17 – 18”
DSW1(config-if-range) # no switchport
DSW1(config-if-range) # channel-group xx mode on
DSW1(config-if-range) # no shutdown
DSW1(config-if) # interface port-channel yy
DSW1(config-if) # ip address “172 . 16 . xx . 1”  “172. 16 . xx . 2” /24
12. IPv4 OSPF Routing Protocol
 DSW1 SVI x1 – x4 in OSPF Area x
 Layer3 EtherChannel in OSPF Area 0
 DSW1(config) # router ospf x*10
 DSW1(config-router) # network 10 . x . x? . 254 0 . 0 . 0 . 0 area x
 DSW1(config-router) # network 10 . 100 . x . 1 0 . 0 . 0 . 0 area 0
 DSW1(config-router) # network 172 . 16 . xx . 1 0 . 0 . 0 . 0 area 0
 DSW1(config-router) # network 172 . 16 . xx . 2 0 . 0 . 0 . 0 area 0

13. 設定 SiteX_RO OSPF Routing Protocol

 允許 10.x.x1-x4.0 利用 Serial 0/0/0 存取 Internet


SiteX_RO Serial 0/0/0 100.140.x.2/24  Internet Router 100.140.x.1/24
SiteX_RO Fas 0/1 10.100.x.2/24  DSW1 Fas 1/0/12 10.100.x.1/24 in OSPF Area 0
SiteX_RO(config) # interface Serial 0/0/0
SiteX_RO(config-if) # ip address “100 . 140 . x . 2” /24
SiteX_RO(config-if) # ip nat outside
SiteX_RO(config-if) # no shutdown
SiteX_RO(config) # interface fastEthernet 0/1
SiteX_RO(config-if) # ip address “10 . 100 . x . 2” /24
SiteX_RO(config-if) # ip nat inside
SiteX_RO(config-if) # no shutdown
SiteX_RO(config) # router ospf x*10
SiteX_RO(config-router) # network “10 . 100 . x . 2” 0 . 0 . 0 . 0 area 0
SiteX_RO(config) # ip route 0 . 0 . 0 . 0 0 . 0 . 0 . 0 “100 . 140 . x . 1”
SiteX_RO(config) # access-list x permit “10 . x . x1-4 . 0” 0 . 0 . 0 . 255
SiteX_RO(config) # ip nat inside source list 1 interface Serial 0/0/0 overload

14. DSW2 Layer3 EtherChannel(IPv6)


Pod1 Fas 1/0/15 – 16 .1 2020:A:12::254/64 .2 Fas 1/0/17 – 18 Pod2
Pod2 Fas 1/0/15 – 16 .1 2020:B:23::254/64 .2 Fas 1/0/17 – 18 Pod3
Pod3 Fas 1/0/15 – 16 .1 2020:C:34::254/64 .2 Fas 1/0/17 – 18 Pod4
Pod4 Fas 1/0/15 – 16 .1 2020:D:45::254/64 .2 Fas 1/0/17 – 18 Pod5
Pod5 Fas 1/0/15 – 16 .1 2020:E:15::254/64 .2 Fas 1/0/17 – 18 Pod1
DSW1(config) # interface range fastEthernet “1/0/15 – 16”  “1/0/17 – 18”
DSW1(config-if-range) # no switchport
DSW1(config-if-range) # channel-group yy mode on
DSW1(config-if-range) # no shutdown
DSW1(config-if-range) # interface port-channel yy
DSW1(config-if-range) # ipv6 address “2020 : A : xx :: 1”  “2020 : A : xx :: 2” /64