A. Mô hình 1
27 thg 7, 2012
21 thg 7, 2012
LAB STATIC ROUTE
I . Mô hình bài LAB
II .Mục tiêu bài LAB
a.
Đặt IP cho các cổng
b.
Cấu hình DHCP và giới hạn IP
c.
Kiểm tra cấp IP
d.
Định tuyến Route Static
e.
Test
III.Cấu hình theo thứ tự
SAIGON(config)#in f0/0
SAIGON(config-if)#no sh
SAIGON(config-if)#ip
address 192.168.1.254 255.255.255.0
SAIGON(config)#ip dhcp
pool LAN
SAIGON(dhcp-config)#network
192.168.1.0 255.255.255.0
SAIGON(dhcp-config)#default-router
192.168.1.254
SAIGON(dhcp-config)#dns-server
8.8.8.8
SAIGON#show ip dhcp binding
IP address Client-ID/ Lease expiration Type
Hardware address
192.168.1.1 0060.7027.C764 -- Automatic
192.168.1.2 0003.E496.7A39 -- Automatic
SAIGON(config)#in s0/0/0
SAIGON(config-if)#no sh
SAIGON(config-if)#ip add 200.200.200.2 255.255.255.252
SAIGON(config-if)#clock
rate 64000
DANANG(config)#in f0/0
DANANG(config-if)#no sh
DANANG(config-if)#ip
address 192.168.3.254 255.255.255.0
DANANG(config)#ip dhcp
pool lan
DANANG(dhcp-config)#network
192.168.3.0 255.255.255.0
DANANG(dhcp-config)#default-router
192.168.3.254
DANANG(dhcp-config)#dns-server
8.8.8.8
DANANG(config)#ip dhcp
excluded-address 192.168.3.1 192.168.3.9
DANANG#show ip dhcp binding
IP address Client-ID/ Lease expiration Type
Hardware address
192.168.3.10 000A.415C.7683 -- Automatic
192.168.3.11 0060.2F87.03AC -- Automatic
DANANG(config)#in s0/0/0
DANANG(config-if)#no sh
DANANG(config-if)#ip
address 210.210.210.2 255.255.255.0
HANOI(config)#in f0/0
HANOI(config-if)#no sh
HANOI(config-if)#ip
address 192.168.2.254 255.255.255.0
HANOI(config)#ip dhcp
pool LAN_HANOI
HANOI(dhcp-config)#network
192.168.2.0 255.255.255.0
HANOI(dhcp-config)#default-router
192.168.2.254
HANOI(dhcp-config)#dns-server
210.245.31.130
HANOI(config)#ip dhcp
excluded-address 192.168.2.1 192.168.2.99
HANOI#show ip dhcp binding
IP address Client-ID/ Lease expiration Type
Hardware address
192.168.2.100 0002.4A21.EE61 -- Automatic
192.168.2.101 0009.7CE5.BE02 --
Automatic
HANOI(config)#in s0/0/1
HANOI(config-if)#no sh
HANOI(config-if)#clock
rate 64000
HANOI(config-if)#ip
address 210.210.210.1 255.255.255.252
HANOI(config)#in s0/0/0
HANOI(config-if)#no sh
HANOI(config-if)#ip
address 200.200.200.1 255.255.255.252
Ruote
HANOI(config)#ip route 192.168.3.0 255.255.255.0 210.210.210.2
HANOI(config)#ip route
192.168.1.0 255.255.255.0 200.200.200.2
DANANG(config)#ip route
192.168.1.0 255.255.255.0 210.210.210.1
DANANG(config)#ip route
192.168.2.0 255.255.255.0 210.210.210.1
DANANG(config)#ip route
200.200.200.0 255.255.255.0 210.210.210.1
SAIGON(config)#ip route
192.168.2.0 255.255.255.0 200.200.200.1
SAIGON(config)#ip route
192.168.3.0 255.255.255.0 200.200.200.1
SAIGON(config)#ip route
210.210.210.0 255.255.255.0 200.200.200.1
Hoặc
Router default
HANOI(config)#ip route 0.0.0.0 0.0.0.0 210.210.210.2
HANOI(config)#ip route 0.0.0.0
0.0.0.0 200.200.200.2
DANANG(config)#ip route 0.0.0.0
0.0.0.0 210.210.210.1
SAIGON(config)#ip route 0.0.0.0
0.0.0.0 200.200.200.1
Test
DANANG#ping 192.168.1.254
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.254, timeout
is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max
= 4/7/11 ms
DANANG#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is
2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max
= 13/15/17 ms
SAIGON#copy running-config startup-config
SAIGON#show ip interface brief
SAIGON#show ip route
20 thg 7, 2012
LAB EIGRP
Tinh1(config)#in
f0/0
Tinh1(config-if)#no
sh
Tinh1(config-if)#ip
address 172.16.255.254 255.255.0.0
Tinh1(config)#ip
dhcp pool lan172
Tinh1(dhcp-config)#network
172.16.0.0 255.255.0.0
Tinh1(dhcp-config)#def
172.16.255.254
Tinh1(dhcp-config)#dns
8.8.8.8
Tinh1(config)#in
s0/1
Tinh1(config-if)#no
sh
Tinh1(config-if)#ip
address 210.210.210.1 255.255.255.252
Tinh1(config-if)#clock
rate 64000
Tinh1(config)#in
s0/0
Tinh1(config-if)#no
sh
Tinh1(config-if)#ip
address 200.200.200.9 255.255.255.252
Tinh1(config-if)#clock
rate 64000
Tinh2(config)#in
f0/0
Tinh2(config-if)#no
sh
Tinh2(config-if)#ip
address 192.168.10.126 255.255.255.192
Tinh2(config)#ip
dhcp pool LAN192
Tinh2(dhcp-config)#network
192.168.10.64 255.255.255.192
Tinh2(dhcp-config)#def
192.168.10.126
Tinh2
(config)#in s0/0
Tinh2
(config-if)#no sh
Tinh2
(config-if)#ip address 210.210.210.2 255.255.255.252
Tinh2(config)#in
s0/1
Tinh2(config-if)#no
sh
Tinh2(config-if)#ip
address 200.200.200.13 255.255.255.252
Tinh4(config)#in
f0/0
Tinh4(config-if)#no
sh
Tinh4(config-if)#ip
add 10.255.255.254 255.0.0.0
Tinh4(config)#ip
dhcp pool LAN10
Tinh4(dhcp-config)#network
10.0.0.0 255.0.0.0
Tinh4(dhcp-config)#def
10.255.255.254
Tinh4
(config)#in s0/0
Tinh4
(config-if)#no sh
Tinh4
(config-if)#ip address 200.200.200.10 255.255.255.252
Tinh4(config)#in
s0/1
Tinh4(config-if)#no
sh
Tinh4(config-if)#ip
address 200.200.200.5 255.255.255.252
Tinh3(config)#in
f0/0
Tinh3(config-if)#no
sh
Tinh3(config-if)#ip
address 192.168.20.126 255.255.255.224
Tinh3(config)#ip
dhcp pool LAN192
Tinh3(dhcp-config)#network
192.168.20.96 255.255.255.224
Tinh3(dhcp-config)#def
192.168.20.126
Tinh3(config)#in
s0/1
Tinh3(config-if)#no
sh
Tinh3(config-if)#ip
address 200.200.200.6 255.255.255.252
Tinh3(config-if)#clock
rate 64000
Tinh3(config)#in
s0/0
Tinh3(config-if)#no
sh
Tinh3(config-if)#ip
address 200.200.200.14 255.255.255.252
Route
Tinh1(config)#router
eigrp 100
Tinh1(config-router)#network
172.16.0.0
Tinh1(config-router)#network
210.210.210.0
Tinh1(config-router)#network
200.200.200.8
Tinh1(config-router)#no
auto-summary
Tinh2(config)#router
eigrp 100
Tinh2(config-router)#network
210.210.210.0
Tinh2(config-router)#network
200.200.200.12
Tinh2(config-router)#network
192.168.10.64
Tinh2(config-router)#no
auto-summary
Tinh3(config)#router
eigrp 100
Tinh3(config-router)#network
192.168.20.96
Tinh3(config-router)#network
200.200.200.12
Tinh3(config-router)#network
200.200.200.4
Tinh3(config-router)#no
auto-summary
Tinh4(config)#router
eigrp 100
Tinh4(config-router)#network
10.0.0.0
Tinh4(config-router)#network
200.200.200.8
Tinh4(config-router)#network
200.200.200.4
Tinh4(config-router)#no
auto-summary
KIểm
tra
Tinh2#sho
ip eigrp topology
Tinh2#sho
ip route eigrp
Tinh2#sho
ip eigrp neighbors
Tinh1#ping 192.168.10.126
Tinh1#ping
10.255.255.254
Tinh1#ping 192.168.20.126
Vào PC1
ipconfig /all //kiểm tra việc cấp IP động
ping tới PC2,PC3,PC4 và ngược lại
LƯU
Ý :
Có 1
số trường hợp khi cấu hình EIGRP trên
GNS3 sẻ hiện liên tục các dòng này:
*Mar 1 00 27.403:
IP-EIGRP(Default-IP-Routing-Table:100): Neighbor 192.168.2.1 not on common
subnet for FastEthernet0/0
Có thể khắc phục bằng lệnh
sau:
R(config)#no logging
console //chỉ làm trên lab
LAB OSPF
R1(config)#in loopback 1
R1(config-if)#ip address 2.2.2.2 255.255.255.0
R1(config-if)#exit
R1(config)#in f0/0
R1(config-if)#ip address 192.168.10.65 255.255.255.192
R1(config-if)#no sh
R1(config)#router
ospf 1
R1(config-router)#network
2.2.2.2 0.0.0.255 area 0
R1(config-router)#network
192.168.10.64 0.0.0.63 area 0
R2(config)#in loopback 2
R2(config-if)#ip address 5.5.5.5 255.255.255.0
R2(config)#in f0/0
R2(config-if)#ip address 192.168.10.66 255.255.255.192
R2(config-if)#no sh
R2(config)#router
ospf 1
R2(config-router)#network
5.5.5.5 0.0.0.255 area 0
R2(config-router)#network
192.168.10.64 0.0.0.63 area 0
R3(config)#in loopback 3
R3(config-if)#ip address
9.9.9.9 255.255.255.0
R3(config)#in f0/0
R3(config-if)#ip address 192.168.10.67 255.255.255.192
R3(config-if)#no sh
R3(config)#router
ospf 1
R3(config-router)#network
9.9.9.9 0.0.0.255 area 0
R3(config-router)#net
192.168.10.64 0.0.0.63 area 0
Các lệnh kiểm tra
R1#show ip route
R1#show ip ospf
database
R1#show ip ospf
interface fastEthernet 0/0
R1#ping 5.5.5.5
R1#ping 9.9.9.9
16 thg 7, 2012
Lab Hạ tầng mạng _cuối môn
Mô hình trên GNS3 (Các Ruoter giả lập SW, các SW này không lưu được cấu hình)
Mô hình trên Packet
Mô hình trên Packet
Cấu hình
Phân hoạch IP cho các phòng ban.
Phòng
Kinh Doanh 50 máy :
Ø Net 192.168.10.0 /26
Ø Subnetmask 255.255.255.192
Ø DefaultGetway 192.168.1.62 //(Range
192.168.10.1 – 62 )
Phòng
Kế toán có 30 máy :
Ø Net 192.168.10.64
/27
Ø Subnetmask 255.255.255.224
Ø DefaultGetway 192.168.1.94 // (Range 192.168.10.65 – 94 )
Phòng
nhân sự có 20 máy :
Ø Net 192.168.10.96 /27
Ø Subnetmask 255.255.255.224
Ø DefaultGetway 192.168.1.126 // (Range 192.168.10.97 – 126 )
Khu vực
dành cho SERVER :
Ø Net 192.168.10.128/29
Ø Subnetmask 255.255.255.248
Ø DefaultGetway 192.168.1.134 // (Range 192.168.10.129 – 134 )
Ip SERVER : 192.168.10.130
Khu vực dành cho ROUTER :
Ø Net 192.168.10.136/29
Ø Subnetmask 255.255.255.248
Ø DefaultGetway 192.168.1.142 //(Range
192.168.10.137 – 142 )
R1 :192.168.10.137
R2 :192.168.10.138
R3 :192.168.10.139
v Cấu hình VLAN.
SW5(config)#vtp mode server
SW5(config)#vtp domain chanhtinh
SW5(config)#vtp password 123
SW5(config)#interface range fastEthernet 0/1
-5
SW5(config-if-range)#switchport mode trunk
SW5#vlan database
SW5(vlan)#vlan 100 name KINHDOANH
SW5(vlan)#vlan 200 name NHANSU
SW5(vlan)#vlan 300 name KETOAN
SW4(config)#vtp mode transparent
SW4(config)#vtp domain chanhtinh
SW4(config)#vtp password 123
SW4(config)#interface range fastEthernet 0/1
-7
SW4(config-if-range)#switchport mode trunk
SW1(config)#vtp mode client
SW1(config)#vtp domain chanhtinh
SW1(config)#vtp password 123
SW1(config)#in fastEthernet 0/1 //cổng nối với SW4 //
SW1(config-if)#switchport mode trunk
SW1(config)#interface range f0/2 -5
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan
100
SW1(config-if-range)#exit
SW1(config)#interface range fastEthernet 0/6
-10
SW1(config-if-range)#sw mo acc
SW1(config-if-range)#sw acc vlan 200
SW1(config-if-range)#exit
SW1(config)#in ra f 0/11 -15
SW1(config-if-range)#sw mo acc
SW1(config-if-range)#sw acc vlan 300
SW1(config-if-range)#exit
Kiểm
tra & lưu (SW2_SW3 tương tự)
SW1#copy run start
SW1#show vlan
SW1#show vlan-sw
SW1#sho run ,sho
vtp st ,sho int tr ,sho vtp pa …
v Cấu hình Ether Channel trên
SW4, SW5.
SW5(config-if-range)#interface range
fastEthernet 0/1 -4 //cổng nối với SW4
//
SW5(config-if-range)#channel-group 1 mode on
SW4(config)#interface range fastEthernet 0/1
-4 //cổng nối với SW5 //
SW4(config-if-range)#channel-group 1 mode on
v Cấu hình Routing inter VLAN
trên R1.
R1(config)#in f0/0
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#in f0/0.100
R1(config-subif)#encapsulation dot1Q
100
R1(config-subif)#ip address
192.168.10.62 255.255.255.192
R1(config-subif)#exit
R1(config)#in f0/0.200
R1(config-subif)#encapsulation dot1Q
200
R1(config-subif)#ip address 192.168.10.94
255.255.255.224
R1(config-subif)#exit
R1(config)#in f0/0.300
R1(config-subif)#encapsulation dot1Q
300
R1(config-subif)#ip address
192.168.10.126 255.255.255.224
R1(config-subif)#exit
v Cấu hình DHCP Server trên R1.
SW4 #show vlan \\ Xác định tên vlan
R1(config)#ip dhcp pool 100
R1(dhcp-config)#network 192.168.10.0 255.255.255.192
R1(dhcp-config)#default-router 192.168.10.62
R1(dhcp-config)#dns-server 8.8.8.8
R1(dhcp-config)#exit
R1(config)#ip dhcp pool 200
R1(dhcp-config)#network 192.168.10.64 255.255.255.224
R1(dhcp-config)#default-router 192.168.10.94
R1(dhcp-config)#dns-server 8.8.8.8
R1(dhcp-config)#exit
R1(config)#ip dhcp pool 300
R1(dhcp-config)#network 192.168.10.96 255.255.255.224
R1(dhcp-config)#default-router 192.168.10.126
R1(dhcp-config)#dns-server 8.8.8.8
R1(dhcp-config)#exit
v Cấu hình NAT overload trên R2
và R3.
R2(config)#access-list 1 permit any
R2(config)#ip nat inside source list 1 interface f0/0
overload
R2(config)#in f0/0 \\ Cổng nối với SW6\\
R2(config-if)#ip nat in
R2(config-if)#exit
R2(config)#in f 1/0 \\ Cổng ra bên ngoài WAN \\
R2(config-if)#ip nat outside
R2(config-if)#exit
R3 tt
v Cấu hình RIPv2 trên R1, R2 và
R3.
R1(config)#interface fastEthernet 0/1
R1(config-if)#ip address 192.168.10.137
255.255.255.248
R1(config-if)#no sh
R1(config-if)#exit
R1(config)# in f 1/0
R1(config-if)#no sh
R1(config-if)#ip address 192.168.10.129
255.255.255.248
R1(config-if)#exit
R1(config)#router
rip
R1(config-router)#version
2
R1(config-router)#network
192.168.10.0
R1(config-router)#network
192.168.10.64
R1(config-router)#network
192.168.10.96
R1(config-router)#network
192.168.10.128
R1(config-router)#network
192.168.10.136
R1(config-router)#no
auto-summary
R2(config)#in
f0/0
R2(config-if)#ip
address 192.168.10.138 255.255.255.248
R2(config-if)#no
sh
R2(config)#in
f0/1
R2(config-if)#no sh
R2(config-if)#ip
address dhcp
R2(config)#router
rip
R2(config-router)#version
2
R2(config-router)#network
192.168.10.136
R2(config-router)#no
auto-summary
R2(config-router)#default-information
originate
R3(config)#in
f0/0
R3(config-if)#ip
address 192.168.10.139 255.255.255.248
R3(config-if)#no
sh
R3(config)#in
f0/1
R3r(config-if)#no
sh
R3(config-if)#ip
address dhcp
R3(config)#router
rip
R3(config-router)#version
2
R3(config-router)#network
192.168.10.136
R3(config-router)#no
auto-summary
R3(config-router)#default-information
originate
v Cấu hình HSRP trên R2, R3
R2(config)#interface
f0/0
R2(config-if)#standby
1 ip 192.168.10.140
R2(config-if)#standby
1 priority 150
R2(config-if)#standby
1 preempt
Test ( chưa có HA tren Packet)
R1#sho run
Building configuration...
Current configuration : 1361 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
ip dhcp pool vlan100
network 192.168.1.0 255.255.255.192
default-router 192.168.1.62
ip dhcp pool vlan200
network 192.168.1.64 255.255.255.224
default-router 192.168.1.94
ip dhcp pool vlan300
network 192.168.1.96 255.255.255.224
default-router 192.168.1.126
ip dhcp pool vlan192
network 192.168.1.128 255.255.255.248
default-router 192.168.1.129
!
spanning-tree mode pvst
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.100
encapsulation dot1Q 100
ip address 192.168.1.62 255.255.255.192
!
interface FastEthernet0/0.200
encapsulation dot1Q 200
ip address 192.168.1.94 255.255.255.224
!
interface FastEthernet0/0.300
encapsulation dot1Q 300
ip address 192.168.1.126 255.255.255.224
!
interface FastEthernet0/1
ip address 192.168.1.137 255.255.255.248
duplex auto
speed auto
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet1/1
ip address 192.168.1.129 255.255.255.248
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 192.168.1.0
no auto-summary
!
ip classless
R2#sho run
Building configuration...
Current configuration : 691 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
spanning-tree mode pvst
!
interface FastEthernet0/0
ip address 192.168.1.138 255.255.255.248
ip nat inside
duplex auto
speed auto
!
interface FastEthernet0/1
ip address dhcp
ip nat outside
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 192.168.1.0
default-information originate
no auto-summary
!
ip nat inside source list 1 interface FastEthernet0/1 overload
ip classless
!
!
access-list 1 permit any
R3#sho run
Building configuration...
Current configuration : 691 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R3
!
spanning-tree mode pvst
!
interface FastEthernet0/0
ip address 192.168.1.139 255.255.255.248
ip nat inside
duplex auto
speed auto
!
interface FastEthernet0/1
ip address dhcp
ip nat outside
duplex auto
speed auto
!
interface Vlan1
no ip address
shutdown
!
router rip
version 2
network 192.168.1.0
default-information originate
no auto-summary
!
ip nat inside source list 1 interface FastEthernet0/1 overload
ip classless
!
!
access-list 1 permit any
!
trên GNS3
Đăng ký:
Bài đăng (Atom)