configure routing inter vlans stp trunking vtp nat

17
Đây là bài lab ở cấp đô cao cấp dành cho nhưng ai học CCNP....Đã là pro thì không còn dùng Tiềng Việt nữa nhé ...English tí xíu cho oách nha.. ....la..la...lá...la..la..ta vô đề nào... Introduction Cable the network as shown in the diagram In this lab you will implement several switching technologies. Use 172.16.x.x/24 as the IP addressing scheme. Topology as below: The following tasks must be achieved: 1. Configure the DLSwitch as the VTP servers, VTP domain vnpro, and all other switches as VTP clients. 2. Spanning-Tree must be configured to designate the Distribution layer switch as the primary root bridge for all configured VLANs. 3. The network must utilize EIGRP as the routing protocol.

Upload: techworldjsc

Post on 29-Nov-2014

101 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Configure Routing Inter Vlans Stp Trunking Vtp Nat

Đây là bài lab ở cấp đô cao cấp dành cho nhưng ai học CCNP....Đã là pro thì không còn dùng

Tiềng Việt nữa nhé ...English tí xíu cho oách nha..

....la..la...lá...la..la..ta vô đề nào...

IntroductionCable the network as shown in the diagramIn this lab you will implement several switching technologies. Use 172.16.x.x/24 as the IP addressing scheme.

Topology as below:

The following tasks must be achieved:

1. Configure the DLSwitch as the VTP servers, VTP domain vnpro, and all other switches as VTP clients.2. Spanning-Tree must be configured to designate the Distribution layer switch as the primary root bridge for all configured VLANs. 3. The network must utilize EIGRP as the routing protocol.4. Enable Telnet with the password “cisco” on all devices for remote management. 5. Your organization is given the IP address range 200.200.200.18/24 to 200.200.200.30/24. Configure NAT on the border router to provide Internet access to all internal hosts.

Page 2: Configure Routing Inter Vlans Stp Trunking Vtp Nat

6. Use network 172.16.1.0/24 for VLAN 1.7. Configure FEC between the Access layer and Distribution layer switches.Các bước thực hiện :

1. Cấu hình DLSwitch là VTP mode server, VTP domain vnpro, các Switch khác là mode client. Tạo 3 VLAN 10, 20, 30 với tên tương ứng Accounting, Marketing, Engineering trên DLSwitch.

DLSWITCH(config)#vtp mode severDLSWITCH(config)#vtp domain vnpro

Cấu hình tương tự trên các Switch còn lại nhưng với vtp mode là Client.

DLSWITCH(config)#vlan 10DLSWITCH(config-vlan)#name AccountingDLSWITCH(config-vlan)#exitDLSWITCH(config)#vlan 20DLSWITCH(config-vlan)#name MarketingDLSWITCH(config-vlan)#exitDLSWITCH(config)#vlan 30DLSWITCH(config-vlan)#name EngineeringDLSWITCH(config-vlan)#exit

Page 3: Configure Routing Inter Vlans Stp Trunking Vtp Nat

Kiểm tra lại cấu hình VLAN :

Page 4: Configure Routing Inter Vlans Stp Trunking Vtp Nat
Page 5: Configure Routing Inter Vlans Stp Trunking Vtp Nat

2. Cấu hình DLSwitch là root cho tất cả VLAN

DLSWITCH(config)#spanning-tree vlan 1 root primarDLSWITCH(config)#spanning-tree vlan 10 root primarDLSWITCH(config)#spanning-tree vlan 20 root primarDLSWITCH(config)#spanning-tree vlan 30 root primar

3. Cấu hình địa chỉ IP cho các Switch để có thể Telne

ALSWITCH1(config)#interface vlan ALSWITCH1(config-if)#ip address 172.16.1.1 255.255.255.ALSWITCH1(config-if)#no shuALSWITCH1(config-if)#exiALSWITCH1(config)#ip default-gateway 172.16.1.

ALSWITCH2(config)#interface vlan ALSWITCH2(config-if)#ip address 172.16.1.2 255.255.255.ALSWITCH2(config-if)#no shuALSWITCH2(config-if)#exiALSWITCH2(config)#ip default-gateway 172.16.1.

ALSWITCH3(config)#interface vlan ALSWITCH3(config-if)#ip address 172.16.1.3 255.255.255.ALSWITCH3(config-if)#no shuALSWITCH3(config-if)#exiALSWITCH3(config)#ip default-gateway 172.16.1.

DLSWITCH(config)#interface vlan DLSWITCH(config-if)#ip address 172.16.1.4 255.255.255.DLSWITCH(config-if)#no shuDLSWITCH(config-if)#exiDLSWITCH(config)#ip default-gateway 172.16.1.

CLSWITCH(config)#interface vlan CLSWITCH(config-if)#ip address 172.16.1.5 255.255.255.CLSWITCH(config-if)#no shuCLSWITCH(config-if)#exiCLSWITCH(config)#ip default-gateway 172.16.1.

4. Cấu hình EtherChannel(FEC) giữa các Switch Access layer và Distribution laye

ALSWITCH1(config)#interface range FastEthernet0/1 – ALSWITCH1(config-if)#switchport mode trunALSWITCH1(config-if)#channel-group 1 mode autALSWITCH1(config-if)#channel-protocol pagALSWITCH1(config)#exi

ALSWITCH2(config)#interface range FastEthernet0/1 – ALSWITCH2(config-if)#switchport mode trunALSWITCH2(config-if)#channel-group 2 mode autALSWITCH2(config-if)#channel-protocol pagALSWITCH2(config)#exi

ALSWITCH3(config)#interface range FastEthernet0/1 –

Page 6: Configure Routing Inter Vlans Stp Trunking Vtp Nat

ALSWITCH3(config-if)#switchport mode trunkALSWITCH3(config-if)#channel-group 3 mode autoALSWITCH3(configif)#channel-protocol pagpALSWITCH3(config)#exit

DLSWITCH(config)#interface range FastEthernet0/1 - 2DLSWITCH(config-if)#switchport trunk encapsulation dot1qDLSWITCH(config-if)#switchport mode trunkDLSWITCH(config-if)#channel-group 1 mode desirableDLSWITCH(config-if)#channel-protocol pagpDLSWITCH(config-if)#exit

DLSWITCH(config)#interface range FastEthernet0/3 - 4DLSWITCH(config-if)#switchport trunk encapsulation dot1qDLSWITCH(config-if)#switchport mode trunk DLSWITCH(config-if)#channel-group 2 mode desirableDLSWITCH(config-if)#channel-protocol pagpDLSWITCH(config-if)#exit

DLSWITCH(config)#interface range FastEthernet0/5 - 6DLSWITCH(config-if)#switchport trunk encapsulation dot1qDLSWITCH(config-if)#switchport mode trunk DLSWITCH(config-if)#channel-group 3 mode desirableDLSWITCH(config-if)#channel-protocol pagpDLSWITCH(config-if)#exit

5. Cấu hình cho các cổng Etherchannel trunk trên native vlan

ALSWITCH1(config)#interface Port-channel 1ALSWITCH1(config-if)#switchport trunk native vlan 1ALSWITCH1(config-if)#exit

ALSWITCH2(config)#interface Port-channel 1ALSWITCH2(config-if)#switchport trunk native vlan 1ALSWITCH2(config-if)#exit

ALSWITCH3(config)#interface Port-channel 1ALSWITCH3(config-if)#switchport trunk native vlan 1ALSWITCH3(config-if)#exit

DLSWITCH(config)#interface Port-channel 1DLSWITCH(config-if)#switchport trunk native vlan 1DLSWITCH(config-if)#exitDLSWITCH(config)#interface Port-channel 2DLSWITCH(config-if)#switchport trunk native vlan 1DLSWITCH(config-if)#exitDLSWITCH(config)#interface Port-channel 3DLSWITCH(config-if)#switchport trunk native vlan 1DLSWITCH(config-if)#exit

Kiểm tra lại cấu hình của EtherChannel trên DLSWITCH :

Page 7: Configure Routing Inter Vlans Stp Trunking Vtp Nat
Page 9: Configure Routing Inter Vlans Stp Trunking Vtp Nat

6. Gán các port cho từng VLAN tương ứng trên các ALSWITCH1, ALSWITCH2, ALSWITC3 Mặc định các port trên Switch thuộc về VL AN 1 nên ta không cần gán port cho VLAN

ALSWITCH1(config)#interface range fas0/4 –6ALSWITCH1(config-if)#switchport access vlan 0ALSWITCH1(config)#extALSWITCH1(config)#interface range fas0/7 –9ALSWITCH1(config-if)#switchport access vlan 0ALSWITCH1(config)#extALSWITCH1(config)#interface range fas0/10 – 2ALSWITCH1(config-if)#switchport access vlan1ALSWITCH1(config)#ex

Làm tương tự trên 2 Switch còn lại (ALSWITCH2, ALSWITCH

Kiểm tra xem các port đã được gán đúng VLAN trên ALSWITCH1

Page 10: Configure Routing Inter Vlans Stp Trunking Vtp Nat
Page 11: Configure Routing Inter Vlans Stp Trunking Vtp Nat
Page 12: Configure Routing Inter Vlans Stp Trunking Vtp Nat

7. Cấu hình trunking trên port Fastethernet 0/24 của DLSWITCH và CLSWITC

DLSWITCH(config)#interface fas0/2DLSWITCH(config-if)#switchport trunk encapsulation dot1DLSWITCH(config-if)#switchport mode trunDLSWITCH(config-if)#switchport trunk native vlan DLSWITCH(config-if)#exi

CLSWITCH(config)#interface fas0/2CLSWITCH(config-if)#switchport trunk encapsulation dot1CLSWITCH(config-if)#switchport mode trunCLSWITCH(config-if)#switchport trunk native vlan CLSWITCH(config-if)#exi

8. Cấu hình port Fa0/13 trên CLSWITCH thành Layer 3 và routing giữa các VLA

CLSWITCH(config)#interface fas0/1CLSWITCH(config-if)#no switchporCLSWITCH(config-if)#ip address 172.16.2.2 255.255.255.CLSWITCH(config-if)#no shuCLSWITCH(config-if)#exi

CLSWITCH(config)#ip routinCLSWITCH(config)#interface vlan 1CLSWITCH(config-if)#ip address 172.16.10.1 255.255.255.CLSWITCH(config-if)#no shuCLSWITCH(config-if)#exi

CLSWITCH(config)#interface vlan 2CLSWITCH(config-if)#ip address 172.16.20.1 255.255.255.CLSWITCH(config-if)#no shuCLSWITCH(config-if)#exi

CLSWITCH(config)#interface vlan 3CLSWITCH(config-if)#ip address 172.16.30.1 255.255.255.CLSWITCH(config-if)#no shuCLSWITCH(config-if)#exi

Kiểm tra trạng thái của các interface VLAN(SVIs) trên CLSWITCH

Page 13: Configure Routing Inter Vlans Stp Trunking Vtp Nat

9. Cấu hình Routing protocol EIGRP trên CLSWITCH

CLSWITCH(config)#router eigrp 65CLSWITCH(config-router)#network 172.16.1.0 0.0.0.255CLSWITCH(config-router)#network 172.16.2.0 0.0.0.255CLSWITCH(config-router)#network 172.16.10.0 0.0.0.255CLSWITCH(config-router)#network 172.16.20.0 0.0.0.255CLSWITCH(config-router)#network 172.16.30.0 0.0.0.255CLSWITCH(config-router)#no auto-summary

10. Cấu hình Routing protocol EIGRP và NAT trên Router NAT

NAT_ROUTER(config)#ip nat pool internet 200.200.200.18 200.200.200.30 prefix-length 28

NAT_ROUTER(config)#access-list 101 permit ip any anyNAT_ROUTER(config)#ip nat inside source list 101 pool internet overload

NAT_ROUTER(config)#interface fas0/0NAT_ROUTER(config-if)#ip address 172.16.2.1 255.255.255.0NAT_ROUTER(config-if)#no shutNAT_ROUTER(config-if)#ip nat insideNAT_ROUTER(config-if)#exit

NAT_ROUTER(config)#interface Serial0/0NAT_ROUTER(config-if)#ip address 200.200.100.1 255.255.255.0NAT_ROUTER(config-if)#no shutNAT_ROUTER(config-if)#ip nat outsideNAT_ROUTER(config-if)#exit

NAT_ROUTER(config)#router eigrp 65NAT_ROUTER(config-router)#network 172.16.2.0 0.0.0.255NAT_ROUTER(config-router)#network 200.200.100.0 0.0.0.255NAT_ROUTER(config-router)#exit

Để các traffic đi ra Internet router chúng ta phải thực hiện route tĩnh, ngoài ra trong mode router eigrp ta cũng quảng bá route tĩnh này để các router cũng chạy eigrp khác thấy được

Page 14: Configure Routing Inter Vlans Stp Trunking Vtp Nat

route tĩnh bằng các câu lệnh sau :

NAT_ROUTER(config)#ip route 0.0.0.0 0.0.0.0 200.200.100.2 //200.200.100.2 là địa chỉ IP của interface S0/1 của router Internet.

NAT_ROUTER(config)#router eigrp 65NAT_ROUTER(config-router)#redistribute static metric 15 2 255 255 1500

Kiểm tra bảng định tuyến của NAT_ROUTER và CLSWITCH

Page 15: Configure Routing Inter Vlans Stp Trunking Vtp Nat

Cấu hình cho Router Internet

INTERNET_ROUTER(config)#ip nat inside source list 1 interface Fast0/0 overloadINTERNET_ROUTER(config)#access-list 1 permit any

Mục đích thiết lập NAT ở đây là để cho ra Internet

INTERNET_ROUTER(config)#interface Fas0/0INTERNET_ROUTER(config-if)#ip address dhcp //Xin địa chỉ IP từ DHCP ServerINTERNET_ROUTER(config-if)#ip nat outsideINTERNET_ROUTER(config-if)#no shut

INTERNET_ROUTER(config)#interface Serial0/1INTERNET_ROUTER(config-if)#ip add 200.200.100.2 255.255.255.0INTERNET_ROUTER(config-if)#ip nat insideINTERNET_ROUTER(config-if)#clock rate 64000INTERNET_ROUTER(config-if)#no shut

Tiếp theo phải cấu hình route tĩnh để ra Internet thông qua default gateway của internet la 192.168.1.1 và route tĩnh về địa chỉ NAT ra ngoài là 200.200.200.0(từ dãy địa chỉ 200.200.200.18-200.200.200.30)

INTERNET_ROUTER(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.1INTERNET_ROUTER(config)#ip route 200.200.200.0 255.255.255.0 200.200.100.1