Bài tập thực hành quản trị mạng

64 176 0
Bài tập thực hành quản trị mạng

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Bài tập thực hành Quản trị mạng I MỤC TIÊU THỰC HÀNH ♦ Giới thiệu cho sinh viên kiến thức kỹ thuật sử dụng trình quản trị mạng II HỌC LIỆU ♦ Học liệu : - Phần mềm (Packet Tracer 5.0 GNS3) - Bài tập thực hành giảng viên cung cấp Dụng cụ : - Projector, chiếu - Máy tính - Bảng, phấn - Hệ thống máy tính kết nối mạng ♦ III NỘI DUNG Gồm thực hành (lab) với nội dung sau: Lab 1: 3h - Giới thiệu chương trình giả lập thiết bị mạng Cisco (Packet Tracert, Dynamip GNS3) - Cách cài đặt chương trình giả lập sử dụng - Cấu hình thiết bị chuyển mạch Switch Lab 2: 3h - Cách chia VLAN - Gán port vào VLAN - Kiểm tra VLAN - Cấu hình đường trung kế - Thiết lập hệ thống mạng đồng thông tin VLAN - Kiểm tra đồng Lab 3: 3h - Kiểm tra hoạt động STP - Thiết lập thông số STP để hệ thống mạng hoạt động theo kế hoạch lập sẵn Trang Bài tập thực hành Quản trị mạng Lab 4: 3h - Cấu hình cho thiết bị định tuyến Cisco - Thực kiểm tra kết nối thiết bị định tuyến - Cơ định tuyến tĩnh - Kiểm tra bảng định tuyến Lab 5: 3h - Định tuyến RIP - Kiểm tra bảng định tuyến Lab 6: 3h - Định tuyến OSPF - Kiểm tra bảng định tuyến Lab 7: 3h - Cấu hình DHCP thiết bị Cisco - Cấu hình DHCP Microsoft Lab 8: 3h - Cấu hình ACL chuẩn để lọc gói tin theo yêu cầu - Kiểm tra việc lọc gói tin Lab 9: 3h - Cấu hình NAT tĩnh - Kiểm tra cấu hình Trang Bài tập thực hành Quản trị mạng VI.TÀI LIỆU THAM KHẢO ♦ Tài liệu [1] ♦ Tập giảng Quản trị mạng,Võ Nhân Văn Tài liệu tham khảo [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] Tài liệu tiếng Việt Nguyễn Thúc Hải, Mạng máy tính hệ thống mở, NXB GD, 1997 MK.PUB, Giáo trình hệ máy tính CCNA2, Nhà sách Minh Khai, 2008 Nguyễn Gia Như, Bài giảng mạng máy tính, 2010 Trần Bàn Thạch, Quản trị mạng Window Server 2003, 2009 Tài liệu tiếng Anh CiscoPress CCNA ICND1 Official Exam Certification Guide Cisco Press CCNA ICND2 Official Exam Certification Guide Cisco Academy CCNA Explorer CCNP BCMSN Student Guide Version 4.0(2007) CCNP ROUTE 642-902 Official Certification Guide CCIE Network Design, Cisco Press Design a Microsoft Windows Server 2003 Active Directory and Nework Infractructure, Microsoft Press, 2004 Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infractructure, Microsoft Press, 2004 Website http://www.networkdictionary.com/networking/NetworkManagement.php http://sins.com.au/netman/osi_nms_model.html http://www.vnpro.org/forum http://www.tiemnangviet.com.vn Trang Bài tập thực hành Quản trị mạng TRƯỜNG ĐẠI HỌC DUY TÂN KHOA CÔNG NGHỆ THÔNG TIN BỘ MÔN KỸ THUẬT MẠNG QUẢN TRỊ MẠNG BÀI THỰC HÀNH Bài số : 01 Số : 03giờ GVHD : Võ Nhân Văn Chương LAB 01 CẤU HÌNH CĂN BẢN SWITCH I MƠ TẢ - Cấu hình thiết bị chuyển mạch Switch Cisco - Thiết lập thông số bản, bao gồm đặt tên, địa chỉ IP, mật II NỘI DUNG 10.1.1.251/24 10.1.1.10/24 Thực : Cấu hình thiết bị: Nối cởng COM máy tính với cổng console Catalyst 2960 (ở mặt sau switch) dùng cáp Rolled-over Các thông số truy cập: data bit , no parity, stop bit, no flow control Khởi động switch: sau bật switch trình khởi động diễn (cần khoảng phút để 2960 khởi động xong) C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(25r)FX, RELEASE SOFTWARE (fc4) Cisco WS-C2960-24TT (RC32300) processor (revision C0) with 21039K bytes of memory 2960-24TT starting Base ethernet MAC Address: 0001.9695.DA3D Xmodem file system is available Initializing Flash flashfs[0]: files, directories flashfs[0]: orphaned files, orphaned directories Trang Bài tập thực hành Quản trị mạng flashfs[0]: Total bytes: 64016384 flashfs[0]: Bytes used: 4414921 flashfs[0]: Bytes available: 59601463 flashfs[0]: flashfs fsck took seconds .done Initializing Flash Boot Sector Filesystem (bs:) installed, fsid: Parameter Block Filesystem (pb:) installed, fsid: Loading "flash:/c2960-lanbase-mz.122-25.FX.bin" ############################################################# ############# [OK] Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c) of the Commercial Computer Software - Restricted Rights clause at FAR sec 52.227-19 and subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS sec 252.227-7013 cisco Systems, Inc 170 West Tasman Drive San Jose, California 95134-1706 Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2005 by Cisco Systems, Inc Compiled Wed 12-Oct-05 22:05 by pt_team Image text-base: 0x80008098, data-base: 0x814129C4 Cisco WS-C2960-24TT (RC32300) processor (revision C0) with 21039K bytes of memory 24 FastEthernet/IEEE 802.3 interface(s) Gigabit Ethernet/IEEE 802.3 interface(s) 63488K bytes of flash-simulated non-volatile configuration memory Trang Bài tập thực hành Quản trị mạng Base ethernet MAC Address Motherboard assembly number Power supply part number Motherboard serial number Power supply serial number Model revision number Motherboard revision number Model number System serial number Top Assembly Part Number Top Assembly Revision Number Version ID CLEI Code Number Hardware Board Revision Number Switch Ports Model Image -* 26 WS-C2960-24TT C2960-LANBASE-M : : : : : : : : : : : : : : 0001.9695.DA3D 73-9832-06 341-0097-02 FOC103248MJ DCA102133JA B0 C0 WS-C2960-24TT FOC1033Z1EY 800-26671-02 B0 V02 COM3K00BRA 0x01 SW Version SW -12.2 Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2005 by Cisco Systems, Inc Compiled Wed 12-Oct-05 22:05 by pt_team - System Configuration Dialog At any point you may enter a question mark '?' for help Use ctrl-c to abort configuration dialog at any prompt Default settings are in square brackets '[]' Continue with configuration dialog? [yes/no]: Nhấn no để không vào Setup mode chuyển trực tiếp sang user exec mode: Switch> Chế độ privileged: Switch>enable Switch# Trang Bài tập thực hành Quản trị mạng Đặt tên mật truy cập cho Switch Đặt tên: Switch#config terminal Switch(config)#host DuyTan DuyTan(config)# Đặt mật cho cổng Console (hay mật cho mode User) DuyTan(config)#line DuyTan(config-line)#password cisco DuyTan(config-line)#login Đặt mật cho mode Privilege DuyTan(config)#enable password class Đặt địa chỉ IP cho switch: mục đích để switch liên lạc với thiết bị khác mạng Switch thiết bị lớp nên việc đặt IP address cho switch chỉ nhằm mục đích quản trị Tất port mặt định VLAN 1, phải cấu hình cho quản lý switch dùng VLAN DuyTan#config terminal DuyTan(config)#interface vlan DuyTan(config-if)#ip address 10.1.1.251 255.255.255.0 DuyTan(config-if)#no shutdown Vì switch khơng thể cấu hình giao thức định tuyến, nên để tới tất mạng, ta phải cấu hình địa chỉ gateway mặc định để gởi tất lưu lượng ta cần liên lạc VLAN DuyTan(config)#ip default-gateway 10.1.1.10 Telnet vào switch: Để thực việc telnet từ PC vào thiết bị phải đáp ứng điều kiện: - PC ping thành công thiết bị: Cấu hình cho PC thành phần mạng 10.1.1.0/24 (giả sử đặt địa chỉ IP cho PC 10.1.1.10/24), sau cắm PC cáp thẳng vào port bất kỳ switch - Thiết bị phải cấu hình hỗ trợ telnet: DuyTan(config-line)#line vty 15 DuyTan(config-line)#password cisco Trang Bài tập thực hành Quản trị mạng DuyTan(config-line)#login Từ PC Telnet vào switch dùng địa chỉ cấu hình 10.1.1.251 cách: vào Start/Run/Telnet 10.1.1.251 Kiểm tra lưu cấu hình Kiểm tra trạng thái cổng switch Duytan#show interface FastEthernet0/1 is down, line protocol is down (disabled) Hardware is Lance, address is 000a.415c.8301 (bia 000a.415c.8301) BW 100000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Half-duplex, 100Mb/s input flow-control is off, output flow-control is off ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:08, output 00:00:05, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: Queueing strategy: fifo Output queue :0/40 (size/max) minute input rate bits/sec, packets/sec minute output rate bits/sec, packets/sec 956 packets input, 193351 bytes, no buffer Received 956 broadcasts, runts, giants, throttles input errors, CRC, frame, overrun, ignored, abort watchdog, multicast, pause input input packets with dribble condition detected 2357 packets output, 263570 bytes, underruns More— Kiểm tra thông tin phần cứng phần mềm DuyTan#show version Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2005 by Cisco Systems, Inc Trang Bài tập thực hành Quản trị mạng Compiled Wed 12-Oct-05 22:05 by pt_team ROM: C2960 Boot Loader (C2960-HBOOT-M) Version 12.2(25r)FX, RELEASE SOFTWARE (fc4) System returned to ROM by power-on Cisco WS-C2960-24TT (RC32300) processor (revision C0) with 21039K bytes of memory 24 FastEthernet/IEEE 802.3 interface(s) Gigabit Ethernet/IEEE 802.3 interface(s) 63488K bytes of flash-simulated memory Base ethernet MAC Address Motherboard assembly number Power supply part number Motherboard serial number Power supply serial number Model revision number Motherboard revision number Model number System serial number Configuration register is 0xF DuyTan# non-volatile configuration : : : : : : : : : 0001.9695.DA3D 73-9832-06 341-0097-02 FOC103248MJ DCA102133JA B0 C0 WS-C2960-24TT FOC1033Z1EY Lưu cấu hình: DuyTan#copy running-config startup-config Trang Bài tập thực hành Quản trị mạng TRƯỜNG ĐẠI HỌC DUY TÂN KHOA CÔNG NGHỆ THÔNG TIN QUẢN TRỊ MẠNG BỘ MÔN KỸ THUẬT MẠNG BÀI THỰC HÀNH LAB số : Số : 02 03 GVHD :Võ Nhân Văn LAB 02 VIRTUAL LAN I Mơ tả - Cấu hình switch Catalyst hỗ trợ VLAN theo bảng sau: + VLAN 1: default, gồm Fa0/1 – Fa0/3 + VLAN 2: Phòng kế tốn gồm Fa0/4 – Fa0/7 + VLAN 3: Phòng bán hàng gồm Fa0/8 – Fa0/15 + VLAN 4: Phòng kỹ thuật gồm Fa0/16 – Fa0/23 II NỘI DUNG 10.1.1.251/24 10.1.1.10/24 B Thực 1.Trước tiên phải tạo sở dữ liệu VLAN Mỗi VLAN có số phân biệt vlan-id, từ đến 1001 Để tạo sở liệu VLAN (VLAN database) thực bước sau: Cách 1: Vào mode config cấu hình cho VLAN database: DuyTan#Config ter Tạo VLAN câu lệnh vlan vlan-id [name name] Nếu khơng đặt tên cho VLAN tên lấy mặc định Trang 10 Bài tập thực hành Quản trị mạng WINS Proxy Enabled : No Ethernet adapter Local Area Connection 3: Connection-specific DNS Suffix : xyz.net Description : Realtek RTL8139 Family PCI Fast Ethernet NIC #2 Physical Address : 00-E0-4D-01-29-78 Dhcp Enabled : Yes Autoconfiguration Enabled : Yes IP Address : 192.168.1.11 Subnet Mask : 255.0.0.0 Default Gateway : 192.168.1.1 DHCP Server : 192.168.1.1 DNS Servers : 10.0.0.3 Primary WINS Server : 10.0.0.4 Lease Obtained : Thursday, February 05, 2012 9:08:24 AM Lease Expires : Friday, February 06, 2012 9:08:24 AM Cấu hình DHCP Relay Vì PC2 nằm ở phân đoạn mạng khác cũng cấu hình IP động, ta cần tạo DHCP pool thứ hai với địa chỉ gateway tương ứng cho mạng 192.168.3.0/24: DuyTan1(config)#ip dhcp pool network-3.0 DuyTan1(dhcp-config)#network 192.168.3.0 255.255.255.0 DuyTan1(dhcp-config)#default-router 192.168.3.1 DuyTan1(dhcp-config)#dns-server 10.0.0.3 DuyTan1(dhcp-config)#netbios-name-server 10.0.0.4 DuyTan1(dhcp-config)#domain-name xyz.net Cấu hình cho DHCP hồn thành, nhiên PC2 dùng UDP broadcast để tìm địa chỉ IP DuyTan2 lại chưa cấu hình để chuyển tiếp broadcast Để DHCP hoạt động cho phân đoạn mạng DuyTan2, phải cấu hình cởng giao tiếp FastEthernet DuyTan2 chuyển tiếp UDP broadcast tới DuyTan1 DuyTan2(config)#interface fastethernet 0/0 DuyTan2(config-if)#ip helper-address 192.168.1.2 Lệnh ip helper-address chuyển tiếp nhiều giao thức khác dựa UDP DNS, BOOTP request Ta chỉ định xác giao thức chuyển tiếp lệnh ip forward-protocol udp [port] Tại Host B thực release renew cấu hình IP Kiểm tra lại địa chỉ IP bằng lệnh winipcfg hay ipconfig /all Trang 50 Bài tập thực hành Quản trị mạng Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp C:\Documents and Settings\TiemNangViet>ipconfig /release Windows IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix : Autoconfiguration IP Address : 169.254.173.207 Subnet Mask : 255.255.0.0 Default Gateway : C:\Documents and Settings\TiemNangViet>ipconfig /renew Windows IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix : xyz.net IP Address : 192.168.3.2 Subnet Mask : 255.255.255.0 Default Gateway : 192.168.3.1 C:\Documents and Settings\TiemNangViet>ipconfig /all Windows IP Configuration Host Name : Primary Dns Suffix : Node Type : IP Routing Enabled : WINS Proxy Enabled : VoNhanVan Hybrid No No Ethernet adapter Local Area Connection: Connection-specific DNS Suffix : xyz.net Description : SiS 900-Based PCI Fast Ethernet Adapter Physical Address : 00-0A-E6-5E-84-77 Dhcp Enabled : Yes Autoconfiguration Enabled : Yes IP Address : 192.168.3.2 Subnet Mask : 255.255.255.0 Default Gateway : 192.168.3.1 DHCP Server : 192.168.2.1 Trang 51 Bài tập thực hành Quản trị mạng DNS Servers : 10.0.0.3 Primary WINS Server : 10.0.0.4 Lease Obtained : Friday, February 06, 2012 9:22:16 AM Lease Expires : Saturday, February 07, 2012 9:22:16AM Chú ý, lúc địa chỉ IP PC2 192.168.3.2 địa chỉ 192.168.3.1 đặt ở câu lệnh default-router gán địa chỉ cổng giao tiếp FastEthernet DuyTan2 DHCP server thực ping địa chỉ 192.168.3.1 để biết có tồn hay khơng Để xem địa chỉ IP cấp tương ứng với địa chỉ MAC, thực lệnh DuyTan1#sh ip dhcp binding IP address Hardware address Lease expiration Type 192.168.1.11 0100.e04d.0129.78 Mar 02 2012 12:15 AM Automatic 192.168.3.2 0100.0ae6.5e84.77 Mar 02 2012 12:22 AM Automatic DuyTan1 biết cách gán địa chỉ cho PC2 từ pool network-3.0 mà từ pool network-1.0 bởi DHCP request PC2 chuyển tiếp dùng lệnh ip helperaddress yêu cầu bắt nguồn từ cởng giao tiếp FastEthernet DuyTan2 có địa chỉ 192.168.3.1; địa chỉ nằm pool network-3.0, DHCP server đáp ứng với địa chỉ từ pool Trang 52 Bài tập thực hành Quản trị mạng TRƯỜNG ĐẠI HỌC DUY TÂN KHOA CÔNG NGHỆ THÔNG TIN BỘ MÔN KỸ THUẬT MẠNG QUẢN TRỊ MẠNG LAB số : Số : BÀI THỰC HÀNH 03 03 GVHD : Võ Nhân Văn LAB 08 LAB STANDARD ACCESS-LIST I Mô tả Access–list dùng để giám sát lưu lượng vào cổng Các điều kiện so sánh dựa vào access-list định nghĩa trước, đơn giản (standard access list) hay phức tạp (extended access list) Lab mơ tả lọc gói liệu sử dụng standard access-list thực cấm PC1 nằm dãy địa chỉ 192.168.1.0 - 192.168.1.15 ping tới PC2 Inbound outbound: Khi áp dụng access–list cổng, phải xác định access–list phải dùng cho luồng liệu vào (inbound) hay (outbound) Mặc định access–list áp dụng với luồng liệu outbound Chiều luồng liệu xác định cởng router Chẳng hạn, lấy ví dụ hình bên dưới: DuyTan2 muốn loại bỏ (deny) tất luồng liệu từ host 192.168.1.2 tới PC2 (192.168.3.10) Có hai nơi áp dụng access–list DuyTan2: inbound access–list áp dụng cổng serial hay outbound access–list áp dụng cổng FastEthernet Trang 53 Bài tập thực hành Quản trị mạng 192.168.2.0/24 DuyTan1 PC1 192.168.1.0/24 DuyTan2 10 PC2 10 192.168.3.0/24 Cấu hình tên địa chỉ IP cho router DuyTan1 Router(config)#hostname DuyTan1 DuyTan1(config)#interface fa0/0 DuyTan1(config-if)#ip address 192.168.1.1 255.255.255.0 DuyTan1(config-if)#no shut %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up DuyTan1(config-if)#interface serial 0/1/0 DuyTan1(config-if)#ip address 192.168.2.1 255.255.255.0 DuyTan1(config-if)#clock rate 64000 DuyTan1(config-if)#no shutdown %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to u Cấu hình tên địa chỉ IP cho router DuyTan2 Router(config)#hostname DuyTan2 DuyTan2(config)#interface fastEthernet 0/0 DuyTan2(config-if)#ip address 192.168.3.2 255.255.255.0 DuyTan2(config-if)#no shut Trang 54 Bài tập thực hành Quản trị mạng %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up DuyTan2(config-if)#exit DuyTan2(config)#interface serial 0/1/0 DuyTan2(config-if)#ip address 192.168.2.2 255.255.255.0 DuyTan2(config-if)#no shut %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to up DuyTan2(config-if)#exit DuyTan2(config)#interface serial 0/1/1 DuyTan2(config-if)#ip address 192.168.4.2 255.255.255.0 DuyTan2(config-if)#no shutdown DuyTan2(config-if)#clock rate 64000 %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/1, changed state to up Kiểm tra kết nối giữa router DuyTan1 DuyTan2 DuyTan1#ping 192.168.2.2 Type escape sequence to abort Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms DuyTan2#ping 192.168.2.1 Type escape sequence to abort Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms Nếu không ping được, kiểm tra lại cấu hình lệnh show running-config, show interface để đảm bảo cấu hình đúng, giải cố cần DuyTan1#ping 192.168.3.2 Type escape sequence to abort Sending 5, 100-byte ICMP Echos to 192.168.4.2, timeout is seconds: Success rate is percent (0/5) Trang 55 Bài tập thực hành Quản trị mạng Xem bảng định tuyến bằng lệnh show ip route DuyTan1#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set C C 192.168.1.0/24 is directly connected, FastEthernet0/0 192.168.2.0/24 is directly connected, Serial0/1/0 DuyTan2#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set C C 192.168.2.0/24 is directly connected, Serial0/1/0 192.168.3.0/24 is directly connected, FastEthernet0/0 Cấu hình giao thức định tuyến OSPF với process number router R1 DuyTan1(config)#router ospf DuyTan1(config-router)#network 192.168.1.0 0.0.0.255 area DuyTan1(config-router)#network 192.168.2.0 0.0.0.255 ar DuyTan1(config-router)#network 192.168.2.0 0.0.0.255 area DuyTan1(config-router)# DuyTan2(config)#router ospf DuyTan2(config-router)#network 192.168.2.0 0.0.0.255 area DuyTan2(config-router)#network 192.168.3.0 0.0.0.255 area DuyTan2(config-router)#network 192.168.4.0 0.0.0.255 area Trang 56 Bài tập thực hành Quản trị mạng 01:48:45: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.2.1 on Serial0/1/0 from LOADING to FULL, Loading Done DuyTan2(config-router)# 01:48:52: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.5.3 on Serial0/1/1 from LOADING to FULL, Loading Done Kiểm tra bảng định tuyến DuyTan1#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set C 192.168.1.0/24 is directly connected, FastEthernet0/0 C 192.168.2.0/24 is directly connected, Serial0/1/0 O 192.168.3.0/24 [110/65] via 192.168.2.2, 01:54:48, Serial0/1/0 DuyTan2#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set O 192.168.1.0/24 [110/65] via 192.168.2.1, 01:55:54, Serial0/1/0 C 192.168.2.0/24 is directly connected, Serial0/1/0 C 192.168.3.0/24 is directly connected, FastEthernet0/0 Kiểm tra ping từ PC1 có địa chỉ 192.168.1.10 đến PC2 Cấu hình ACL chuẩn : cấm PC1 nằm dãy địa chỉ 192.168.1.0 - 192.168.1.15 ping tới PC2 Hai bước để cấu hình access list router: Tạo access list global config mode: Trang 57 Bài tập thực hành Quản trị mạng R2(config)# access-list deny 192.168.1.0 0.0.0.15 R2(config)# access-list permit any Áp access-list vào cổng Áp access-list vào chiều cổng F0/0 R2 Khi áp access-list vào cổng, xem router Vì muốn cấm liệu khỏi cởng, ta dùng từ khóa out; muốn cấm liệu vào cổng, ta dùng từ khóa in Vì standard access-list chỉ kiểm tra địa chỉ nguồn nên phải áp access-list vào cổng gần đích DuyTan2(config)# cổng f0/0 DuyTan2(config-if)# ip access-group out Kiểm tra: Đặt địa chỉ IP cho PC1 192.168.1.10, default gateway 192.168.1.1 kiểm tra ping tới PC2 PC>ping 192.168.3.10 Pinging 192.168.3.10 with 32 bytes of data: Reply from 192.168.2.2: Destination host unreachable Reply from 192.168.2.2: Destination host unreachable Reply from 192.168.2.2: Destination host unreachable Reply from 192.168.2.2: Destination host unreachable Ping statistics for 192.168.3.10: Packets: Sent = 4, Received = 0, Lost = (100% loss), Lệnh ping không thành công access-list đã hoạt động R2, kiểm tra gói vào R2 bằng lệnh debug ip packet Lưu ý rằng gói bị loại bỏ tin ICMP host unreachable gởi ngược trở lại R1: R2#debug ip packet IP packet debugging is on R2# IP: s=s=192.168.1.10 (Serial0/1/0), d=192.168.3.10 (FastEthernet0/0), len 100, access denied IP: s=192.168.2.2 (local), d=192.168.1.10 (Serial0/1/0), len 56, sending ping 192.168.3.10 Pinging 192.168.3.10 with 32 bytes of data: Request timed out Reply from 192.168.3.10: bytes=32 time=93ms TTL=126 Reply from 192.168.3.10: bytes=32 time=59ms TTL=126 Reply from 192.168.3.10: bytes=32 time=93ms TTL=126 Ping statistics for 192.168.3.10: Packets: Sent = 4, Received = 3, Lost = (25% loss), Approximate round trip times in milli-seconds: Minimum = 59ms, Maximum = 93ms, Average = 81ms Trang 59 Bài tập thực hành Quản trị mạng TRƯỜNG ĐẠI HỌC DUY TÂN KHOA CÔNG NGHỆ THÔNG TIN BỘ MÔN KỸ THUẬT MẠNG QUẢN TRỊ MẠNG LAB số : Số : BÀI THỰC HÀNH 03 03 GVHD : Võ Nhân Văn LAB 09 NAT OVERLOAD I Mơ tả - Cấu hình địa chỉ IP hình vẽ - Giả sử DuyTan2 nhà cung cấp dịch vụ PC2 địa chỉ Internet - DuyTan1 thực NAT overload cho chỉ máy có địa chỉ từ 192.168.1.0 - 192.168.1.63 Internet II Nội dung 200.0.0.0/24 DuyTan1 PC1 192.168.1.0/24 DuyTan2 10 PC2 10 203.0.0.0/24 Cấu hình tên địa chỉ IP cho router DuyTan1 Router(config)#hostname DuyTan1 DuyTan1(config)#int fa0/0 DuyTan1(config-if)#ip address 192.168.1.1 255.255.255.0 DuyTan1(config-if)#no shut Trang 60 Bài tập thực hành Quản trị mạng %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up DuyTan1(config-if)#exit DuyTan1(config)#interface fastEthernet 0/1 DuyTan1(config-if)#ip address 200.0.0.1 255.255.255.0 DuyTan1(config-if)#no shut %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up Cấu hình tên địa chỉ IP cho router DuyTan2 Router(config)#hostname DuyTan2 DuyTan2(config)#interface fastEthernet 0/0 DuyTan2(config-if)#ip address 203.0.0.1 255.255.255.0 DuyTan2(config-if)#no shut %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up DuyTan2(config-if)#interface fastEthernet 0/1 DuyTan2(config-if)#ip address 200.0.0.2 255.255.255.0 DuyTan2(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up Kiểm tra ping từ DuyTan1 PC1 tới địa chỉ 203.0.0.1 (địa chỉ giả lập internet) DuyTan1#ping 203.0.0.1 Type escape sequence to abort Sending 5, 100-byte ICMP Echos to 203.0.0.1, timeout is seconds: Success rate is percent (0/5) Trang 61 Bài tập thực hành Quản trị mạng PC>ping 203.0.0.1 Pinging 203.0.0.1 with 32 bytes of data: Reply from 192.168.1.1: Destination host unreachable Reply from 192.168.1.1: Destination host unreachable Reply from 192.168.1.1: Destination host unreachable Reply from 192.168.1.1: Destination host unreachable Ping statistics for 203.0.0.1: Packets: Sent = 4, Received = 0, Lost = (100% loss), Thực NAT DuyTan1 Tạo ACL cho phép địa chỉ IP từ 192.168.1.0 tới 192.168.1.63 NAT DuyTan1(config)#access-list permit 192.168.1.0 0.0.0.63 Định nghĩa NAT overload DuyTan1(config)#ip nat inside source list interface fastEthernet 0/1 ov DuyTan1(config)#ip nat inside source list interface fastEthernet 0/1 overload DuyTan1(config)# Áp lên cổng: DuyTan1(config)#interface fastEthernet 0/0 DuyTan1(config-if)#ip nat inside DuyTan1(config-if)#interface fastEthernet 0/1 DuyTan1(config-if)#ip nat outside Định tuyến mặc định: DuyTan1(config)#ip route 0.0.0.0 0.0.0.0 200.0.0.2 Kiểm tra Đặt địa chỉ IP cho PC 192.168.1.10, default gateway 192.168.1.1 thực ping tới địa chỉ 203.0.0.1 PC>ping 203.0.0.1 Pinging 203.0.0.1 with 32 bytes of data: Request timed out Reply from 203.0.0.1: bytes=32 time=63ms TTL=254 Reply from 203.0.0.1: bytes=32 time=63ms TTL=254 Trang 62 Bài tập thực hành Quản trị mạng Reply from 203.0.0.1: bytes=32 time=63ms TTL=254 Ping statistics for 203.0.0.1: Packets: Sent = 4, Received = 3, Lost = (25% loss), Approximate round trip times in milli-seconds: Minimum = 63ms, Maximum = 63ms, Average = 63ms Thực debug router DuyTan1 để xem trình chuyển đổi địa chỉ IP DuyTan1#debug ip nat IP NAT debugging is on DuyTan1# NAT: s=192.168.1.10->200.0.0.1, d=203.0.0.1 [9] NAT*: s=203.0.0.1, d=200.0.0.1->192.168.1.10 [4] NAT: s=192.168.1.10->200.0.0.1, d=203.0.0.1 [10] NAT*: s=203.0.0.1, d=200.0.0.1->192.168.1.10 [5] NAT: s=192.168.1.10->200.0.0.1, d=203.0.0.1 [11] NAT*: s=203.0.0.1, d=200.0.0.1->192.168.1.10 [6] NAT: s=192.168.1.10->200.0.0.1, d=203.0.0.1 [12] NAT*: s=203.0.0.1, d=200.0.0.1->192.168.1.10 [7] NAT: expiring 200.0.0.1 (192.168.1.10) icmp (5) Để xem bảng chuyển đổi NAT DuyTan1 dùng lệnh show ip nat tranlation Lưu ý port number sau địa chỉ IP Số thứ tự port “chìa khóa” để chuyển gói địa chỉ IP inside local DuyTan1#show ip nat translations Pro Inside global Inside local Outside local Outside global icmp 200.0.0.1:10 192.168.1.10:10 203.0.0.1:10 203.0.0.1:10 icmp 200.0.0.1:11 192.168.1.10:11 203.0.0.1:11 203.0.0.1:11 icmp 200.0.0.1:12 192.168.1.10:12 203.0.0.1:12 203.0.0.1:12 icmp 200.0.0.1:9 192.168.1.10:9 203.0.0.1:9 203.0.0.1:9 Trang 63 Bài tập thực hành Quản trị mạng ->Một số lệnh kiểm tra khác Show ip nat statistics : Hiển thị số phiên chuyển dịch chuyển dịch thực NAT Show ip nat translations: Các phiên NAT diễn ra; Protocol of the packet translated; inside global address , outside local address, outside global address inside local address Show ip nat translations verbose : giống lệnh chi tiết clear ip nat translation : Xóa tất phiên NAT clear ip nat statistics : xóa tất counters thống kê NAT debug ip nat : Xem tiến trình phiên NAT Trưởng môn Giảng viên Nguyễn Minh Nhật Võ Nhân Văn Trang 64 ... http://www.tiemnangviet.com.vn Trang Bài tập thực hành Quản trị mạng TRƯỜNG ĐẠI HỌC DUY TÂN KHOA CÔNG NGHỆ THÔNG TIN BỘ MÔN KỸ THUẬT MẠNG QUẢN TRỊ MẠNG BÀI THỰC HÀNH Bài số : 01 Số : 03giờ GVHD : Võ... running-config startup-config Trang Bài tập thực hành Quản trị mạng TRƯỜNG ĐẠI HỌC DUY TÂN KHOA CÔNG NGHỆ THÔNG TIN QUẢN TRỊ MẠNG BỘ MÔN KỸ THUẬT MẠNG BÀI THỰC HÀNH LAB số : Số : 02 03 GVHD :Võ... - - - - - - - - - - - Trang 12 Bài tập thực hành Quản trị mạng enet 0 1002 fddi 0 100004 1500 - - - - - 101002 1500 - - - - - Trang 13 Bài tập thực hành Quản trị mạng TRƯỜNG ĐẠI HỌC DUY TÂN KHOA

Ngày đăng: 07/05/2018, 22:26

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan