Professional Documents
Culture Documents
Sau khi cấu hình xong phải áp dụng vào cổng in và cổng out, trong ví dụ dưới đây, cổng
Ethernet là công in, còn cổng Serial là cổng out
Router(config)#interface ethernet 0
Router(config-if)#ip nat inside
Router(config)#interface serial 0
Router(config-if)#ip nat outside
Ví dụ:
R(config)#ip nat pool nat-pool1 179.9.8.80 179.9.8.95 netmask 255.255.255.0
R(config)#ip nat inside source list 1 pool nat-pool1
R(config)#access-list 1 permit 10.1.0.0 0.0.0.255
Note: Giải địa chỉ inside local address và inside global address phải nằm trong giải cho
phép của ACL
Ví dụ:
R(config)#access-list 2 permit 10.0.0.0 0.0.0.255
R(config)#ip nat pool nat-pool2 179.9.8.20 255.255.255.240
R(config)#ip nat inside source list 2 nat-pool2 overload
Cấu hình overload dùng địa chỉ của cổng ra.(Thường xuyên được dung hơn là trường hợp
trên)
Router(config)#ip nat inside source list [tên số hiệu ACL] interface [cổng ra] overload
Router(config)#access-list [số hiệu] permit [địa chỉ] [windcard mask]
Ví dụ:
R(config)#ip nat inside source list 3 interface serial 0 overload
R(config)#access-list 3 permit 10.0.0.0 0.0.0.255
Trong trường hợp DHCP server không nằm cùng mạng với host
Note: khi DHCP server không cùng mạng với host thì ta phải dùng lệnh ip helper-
address giúp host đến DHCP server.
Note: Trong trường hợp muốn gói tin của host được broadcast ở mạng chứa DHCP thì ta
dùng thêm lệnh ip directed-broadcast ở cổng cùng mạng với DHCP server
Cấu hình PAP không yêu cầu hai Router giống nhau về password nhưng CHAP thì phải
có.
R(config)#host RB
RB(config)#username RA password 123
RB(config-if)encapsulation ppp
RB(config-if)ppp authentication chap
R(config-if)#encapsulation ppp
R(config-if)#ppp multilink
R(config-if)#encapsulation ppp
R(config-if)#compress [predictor/stac/mppc]
R(config-if)#encapsulation ppp
R(config-if)#ppp quality [phần trăm]
Khi lệnh này được thực thi, DLCI sẽ được Inverse ARP tự động map, người dùng không
cần phải làm gì cả.
* Nhưng Inverse ARP không làm việc với các kết nối Hub-and-Spoke
R(config-if)#encapsulation frame-relay
R(config-if)#frame-relay map ip remote–ip-address local-dlci [cisco| ietf]
(ip address trong dòng lệnh trên chỉ lấy làm minh họa bởi nó rất phổ biến, chính xác
phải là remote–protocol–address)
Broadcast trong câu lệnh trên có 2 chức năng:
§ Forward broadcast khi multicast không được khởi động.
§ Đơn giản hóa cấu hình OSPF cho mạng nonbroadcast sử dụng FRelay.
Ví dụ:
R(config-if)#encapsulation frame-relay
R(config-if)#frame-relay map ip 192.168.2.1 100 broadcast
- Trong mạng Broadcast khi 1 máy tính truyền frame tất cả các node lắng nghe frame
nhưng chỉ có node cần nhận mới nhận được.
- Trong mạng None Broadcast khi 1 máy tính truyền frame thì chỉ có node cần nhận
mới lắng nghe và nhận được frame đó, các node còn lại thì không. Frame được truyền
qua 1 virtual Circuit hoặc 1 thiết bị chuyển mạch.
- Star topology có thể được coi như là 1 mạng Hub and Spoke.
4. Giải quyết vấn đề với Routing Updates mà không disable Split Horizal
R(config)#interface s0/0
R(config-if)#encapsulation frame-relay
R(config-if)interface s0/0.1 [multipoint| point-to-point]
- point-to-point: Mỗi subinterface có subnet riêng của mình. Broadcast và Split horizol
không là vấn đề.
- Multi-point: Tất cả các subinterface liên quan phải cùng chung 1 subnet và như vậy
Broadcast và Split horizol sẽ có vấn đề.
Ví dụ:
(Point-to-point)
R(config)#interface s0/0
R(config-if)#encapsulation frame-relay
R(config-if)#interface s0/0.1 point-to-point
R(config-subif)#frame-relay interface-dlci 18
(Multipoint)
R(config)#interface s0/0
R(config-if)#encapsulation frame-relay
R(config-if)#interface s0/0.2 multipoint
R(config-subif)#frame-relay interface-dlci 19
R(config-subif)#frame-relay interface-dlci 20
R(config)#frame-relay switching
R(config)#interface s0/0
R(config-if)#encapsulation frame-relay
R(config-if)#frame-relay intf-type dce
R(config-if)#frame-relay route 103interface serial 0/1 301
--------------------------------------------------------------------------------
tranbinh48ca07-15-2007, 09:03 AM
Mình có thắc mắc 1 chút ở phần này
Switch(config)#line vty 0 4
Switch(config-line)#pass mật khẩu
Switch(config-line)#login
Switch(config)#line vty 0 15
(vì switch hỗ trợ đến 16 đường virtual, mấy lần mình gõ #line vty 0 4 gây ra lỗi)