lab 24 - static nat

8
CCNA Lab Lab 24 Static NAT Instructor: Tran Dang Minh Khoa CCIE wr ( R&S) [email protected] Page 1 STATIC NETWORK ADDRESS TRANSLATION 1. Kết ni thiết bnhư hình. 2. Cu hình các thông tin cơ bn cho thiết bbao gm tên, pasword console, password telnet và enable secret đều là cisco. Cu hình banner cho các thiết bvi thông tin Day la thiet bi <ten thiet bi>3. Cu hình các cng vi địa chIP tương ng. 4. Cu hình tt ccác router chy OSPF vi sProccess ID khác nhau, các cổng đều nm trong AREA BACKBONE là AREA 0. 5. Thc hin Ping kim tra mng đã thông. 6. Thc hin cu hình NAT tĩnh trên Router 0 vi PC1 được NAT thành địa ch203.162.1.3/24, PC2 được NAT thành địa ch203.162.1.4/24. 7. Kim tra bng NAT. Đọc hiu bng NAT. 8. Bt lnh debug ip nat, sau đó thc hin ping tPC1 và PC2 đến Server 0 để kim tra quá trình NAT ca Router 0. 9. Lưu cu hình.

Upload: nhat-long

Post on 20-Apr-2015

180 views

Category:

Documents


10 download

TRANSCRIPT

Page 1: Lab 24 - Static NAT

CCNA Lab Lab 24 – Static NAT

Instructor: Tran Dang Minh Khoa CCIE wr ( R&S) – [email protected] Page 1

STATIC NETWORK ADDRESS TRANSLATION

1. Kết nối thiết bị như hình.

2. Cấu hình các thông tin cơ bản cho thiết bị bao gồm tên, pasword console, password telnet và

enable secret đều là cisco. Cấu hình banner cho các thiết bị với thông tin “ Day la thiet bi <ten

thiet bi>”

3. Cấu hình các cổng với địa chỉ IP tương ứng.

4. Cấu hình tất cả các router chạy OSPF với số Proccess ID khác nhau, các cổng đều nằm trong

AREA BACKBONE là AREA 0.

5. Thực hiện Ping kiểm tra mạng đã thông.

6. Thực hiện cấu hình NAT tĩnh trên Router 0 với PC1 được NAT thành địa chỉ 203.162.1.3/24,

PC2 được NAT thành địa chỉ 203.162.1.4/24.

7. Kiểm tra bảng NAT. Đọc hiểu bảng NAT.

8. Bật lệnh debug ip nat, sau đó thực hiện ping từ PC1 và PC2 đến Server 0 để kiểm tra quá trình

NAT của Router 0.

9. Lưu cấu hình.

Page 2: Lab 24 - Static NAT

CCNA Lab Lab 24 – Static NAT

Instructor: Tran Dang Minh Khoa CCIE wr ( R&S) – [email protected] Page 2

HƯỚNG DẪN:

1. Kết nối thiết bị như hình.

2. Cấu hình các thông tin cơ bản cho thiết bị bao gồm tên, pasword console, password telnet và

enable secret đều là cisco. Cấu hình banner cho các thiết bị với thông tin “ Day la thiet bi <ten

thiet bi>”

Router(config)#hostname Router0

Router0(config)#line console 0

Router0(config-line)#password cisco

Router0(config-line)#login

Router0(config-line)#exit

Router0(config)#line vty 0 4

Router0(config-line)#password cisco

Router0(config-line)#login

Router0(config-line)#exit

Router0(config)#service password-encryption

Router0(config)#enable secret cisco

Router0(config)#banner motd ^ *** Day la Router 0, khong phan su mien thao tac

***^

Router(config)#hostname Router1

Router1(config)#line console 0

Router1(config-line)#password cisco

Router1(config-line)#login

Router1(config-line)#exit

Router1(config)#line vty 0 4

Router1(config-line)#password cisco

Router1(config-line)#login

Router1(config-line)#exit

Router1(config)#service password-encryption

Router1(config)#enable secret cisco

Page 3: Lab 24 - Static NAT

CCNA Lab Lab 24 – Static NAT

Instructor: Tran Dang Minh Khoa CCIE wr ( R&S) – [email protected] Page 3

Router1(config)#banner motd ^ *** Day la Router 1, khong phan su mien thao tac

***^

3. Cấu hình các cổng với địa chỉ IP tương ứng.

Router0(config)#interface fastEthernet 0/0

Router0(config-if)#ip address 192.168.2.1 255.255.255.0

Router0(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

Router0(config-if)#exit

Router0(config)#interface serial 0/1/0

Router0(config-if)#ip address 203.162.1.1 255.255.255.0

Router0(config-if)#clock rate 64000

Router0(config-if)#no shut

Router1(config)#interface fastEthernet 0/0

Router1(config-if)#ip address 15.1.1.1 255.255.255.0

Router1(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

Router1(config-if)#exit

Router1(config)#interface serial 0/1/0

Router1(config-if)#ip address 203.162.1.2 255.255.255.0

Router1(config-if)#no shut

%LINK-5-CHANGED: Interface Serial0/1/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to

up

4. Cấu hình tất cả các router chạy OSPF với số Proccess ID khác nhau, các cổng đều nằm trong

AREA BACKBONE là AREA 0.

Page 4: Lab 24 - Static NAT

CCNA Lab Lab 24 – Static NAT

Instructor: Tran Dang Minh Khoa CCIE wr ( R&S) – [email protected] Page 4

Router0(config)#router ospf 1

Router0(config-router)#network 192.168.2.0 0.0.0.255 area 0

Router0(config-router)#network 203.162.1.0 0.0.0.255 area 0

Router1(config)#router ospf 10

Router1(config-router)#network 15.1.1.0 0.0.0.255 area 0

Router1(config-router)#network 203.162.1.0 0.0.0.255 area 0

00:20:43: %OSPF-5-ADJCHG: Process 10, Nbr 203.162.1.1 on Serial0/1/0 from

LOADING to FULL, Loading Done

5. Thực hiện Ping kiểm tra mạng đã thông.

PC0>ping 203.162.1.1

Pinging 203.162.1.1 with 32 bytes of data:

Reply from 203.162.1.1: bytes=32 time=63ms TTL=255

Reply from 203.162.1.1: bytes=32 time=47ms TTL=255

Reply from 203.162.1.1: bytes=32 time=63ms TTL=255

Reply from 203.162.1.1: bytes=32 time=63ms TTL=255

Ping statistics for 203.162.1.1:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 47ms, Maximum = 63ms, Average = 59ms

PC0>ping 203.162.1.2

Pinging 203.162.1.2 with 32 bytes of data:

Reply from 203.162.1.2: bytes=32 time=93ms TTL=254

Reply from 203.162.1.2: bytes=32 time=78ms TTL=254

Reply from 203.162.1.2: bytes=32 time=78ms TTL=254

Reply from 203.162.1.2: bytes=32 time=94ms TTL=254

Ping statistics for 203.162.1.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Page 5: Lab 24 - Static NAT

CCNA Lab Lab 24 – Static NAT

Instructor: Tran Dang Minh Khoa CCIE wr ( R&S) – [email protected] Page 5

Approximate round trip times in milli-seconds:

Minimum = 78ms, Maximum = 94ms, Average = 85ms

PC0>ping 15.1.1.1

Pinging 15.1.1.1 with 32 bytes of data:

Reply from 15.1.1.1: bytes=32 time=78ms TTL=254

Reply from 15.1.1.1: bytes=32 time=94ms TTL=254

Reply from 15.1.1.1: bytes=32 time=93ms TTL=254

Reply from 15.1.1.1: bytes=32 time=108ms TTL=254

Ping statistics for 15.1.1.1:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 78ms, Maximum = 108ms, Average = 93ms

PC0>ping 15.1.1.10

Pinging 15.1.1.10 with 32 bytes of data:

Reply from 15.1.1.10: bytes=32 time=156ms TTL=126

Reply from 15.1.1.10: bytes=32 time=156ms TTL=126

Reply from 15.1.1.10: bytes=32 time=156ms TTL=126

Reply from 15.1.1.10: bytes=32 time=141ms TTL=126

Ping statistics for 15.1.1.10:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 141ms, Maximum = 156ms, Average = 152ms

6. Thực hiện cấu hình NAT tĩnh trên Router 0 với PC1 được NAT thành địa chỉ 203.162.1.3/24,

PC2 được NAT thành địa chỉ 203.162.1.4/24.

Router0(config)#ip nat inside source static 192.168.2.3 203.162.1.3

Router0(config)#ip nat inside source static 192.168.2.4 203.162.1.4

Router0(config)#interface fastEthernet 0/0

Page 6: Lab 24 - Static NAT

CCNA Lab Lab 24 – Static NAT

Instructor: Tran Dang Minh Khoa CCIE wr ( R&S) – [email protected] Page 6

Router0(config-if)#ip nat inside

Router0(config-if)#exit

Router0(config)#interface serial 0/1/0

Router0(config-if)#ip nat outside

7. Kiểm tra bảng NAT. Đọc hiểu bảng NAT.

Router0#show ip nat translations

Pro Inside global Inside local Outside local Outside global

--- 203.162.1.3 192.168.2.3 --- ---

--- 203.162.1.4 192.168.2.4 --- ---

Router0#show ip nat statistics

Total translations: 2 (2 static, 0 dynamic, 0 extended)

Outside Interfaces: Serial0/1/0

Inside Interfaces: FastEthernet0/0

Hits: 0 Misses: 0

Expired translations: 0

Dynamic mappings:

8. Bật lệnh debug ip nat, sau đó thực hiện ping từ PC1 và PC2 đến Server 0 để kiểm tra quá trình

NAT của Router 0.

PC1>ping 15.1.1.10

Pinging 15.1.1.10 with 32 bytes of data:

Reply from 15.1.1.10: bytes=32 time=156ms TTL=126

Reply from 15.1.1.10: bytes=32 time=141ms TTL=126

Reply from 15.1.1.10: bytes=32 time=157ms TTL=126

Reply from 15.1.1.10: bytes=32 time=156ms TTL=126

Ping statistics for 15.1.1.10:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Page 7: Lab 24 - Static NAT

CCNA Lab Lab 24 – Static NAT

Instructor: Tran Dang Minh Khoa CCIE wr ( R&S) – [email protected] Page 7

Minimum = 141ms, Maximum = 157ms, Average = 152ms

Router0# debug ip nat

NAT: s=192.168.2.3->203.162.1.3, d=15.1.1.10 [5]

NAT*: s=15.1.1.10, d=203.162.1.3->192.168.2.3 [16]

NAT: s=192.168.2.3->203.162.1.3, d=15.1.1.10 [6]

NAT*: s=15.1.1.10, d=203.162.1.3->192.168.2.3 [17]

NAT: s=192.168.2.3->203.162.1.3, d=15.1.1.10 [7]

NAT*: s=15.1.1.10, d=203.162.1.3->192.168.2.3 [18]

NAT: s=192.168.2.3->203.162.1.3, d=15.1.1.10 [8]

NAT*: s=15.1.1.10, d=203.162.1.3->192.168.2.3 [19]

PC>ping 15.1.1.10

Pinging 15.1.1.10 with 32 bytes of data:

Reply from 15.1.1.10: bytes=32 time=157ms TTL=126

Reply from 15.1.1.10: bytes=32 time=141ms TTL=126

Reply from 15.1.1.10: bytes=32 time=157ms TTL=126

Reply from 15.1.1.10: bytes=32 time=109ms TTL=126

Ping statistics for 15.1.1.10:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 109ms, Maximum = 157ms, Average = 141ms

Router0#

NAT: s=192.168.2.4->203.162.1.4, d=15.1.1.10 [5]

NAT*: s=15.1.1.10, d=203.162.1.4->192.168.2.4 [24]

NAT: s=192.168.2.4->203.162.1.4, d=15.1.1.10 [6]

NAT*: s=15.1.1.10, d=203.162.1.4->192.168.2.4 [25]

NAT: s=192.168.2.4->203.162.1.4, d=15.1.1.10 [7]

NAT*: s=15.1.1.10, d=203.162.1.4->192.168.2.4 [26]

Page 8: Lab 24 - Static NAT

CCNA Lab Lab 24 – Static NAT

Instructor: Tran Dang Minh Khoa CCIE wr ( R&S) – [email protected] Page 8

NAT: s=192.168.2.4->203.162.1.4, d=15.1.1.10 [8]

NAT*: s=15.1.1.10, d=203.162.1.4->192.168.2.4 [27]

9. Lưu cấu hình.

Router0#wr

Building configuration...

[OK]

Router1#wr

Building configuration...

[OK]