Sunday, June 19, 2016

Cau hinh IPv6

- 128 bit
- quy tac rut gon dia chi ipv6

Saturday, June 18, 2016

1. ACL

2. DHCP

Mot Router co the tao nhieu Pool tuong ung voi nhieu dai dia chi cap IP

R(Config)#ip dhcp excluded-address 192.168.10.1 192.168.10.9
R(Config)#ip dhcp excluded-address 192.168.10.254
R(Config)#ip dhcp pool LAN-POOL-1
R(Config)#network 192.168.10.0 255.255.255.0

R(Config)#default-router 192.168.10.1

3. NAT

Cho phep cac di chi IP private ra ngoai duoc internet

NAT tĩnh:
Thuong dung cho cac server public

R2(config)#ip nat inside source static 192.168.10.10 209.165.200.226
R2(config)#ip nat outside source static 209.165.200.254 10.1.1.1
R2(config)#ip nat outside source static 209.165.200.254 10.2.2.1

R2(config)#interface f0/0
R2(config-if)#ip nat inside
R2(config-if)#exit

R2(config)#interface f0/1
R2(config-if)#ip nat outside
R2(config-if)#exit

Nat dong:
- Interface
Chuc nang cua cac modem o nha, nhieu dia chi private voi nhieu interface



- Pool
Dung can bang tai cho cac server



Thursday, June 16, 2016

1. HDLC encapsulation

Router(config-if)#encapsulation HDLC

2. PPP encapsulation

HDLC is default encapsulation on cisco router, PPP using to connect non-cisco router

Authentication: PAP or CHAP
Pap - send password
Chap - same password

PAP 

Router#username r3 password 0 ccna123

interface Serial0/1/0
ip address 10.0.1.2 255.255.255.0
encapsulation ppp
ppp authentication pap
ppp pap sent-username r1 password 0 ccna123


CHAP

Router#username pnh1 password 0 cisco

interface Serial0/1/0
ip address 10.0.1.2 255.255.255.0
encapsulation ppp

ppp authentication chap

3. Frame relay/ATM

Cấu hình Poit To Point

======= Trên R biên================
interface Serial0/0/0
no ip address
encapsulation frame-relay
!
interface Serial0/0/0.201 point-to-point
ip address 192.168.4.1 255.255.255.0
frame-relay interface-dlci 201

Tương tự cho R với dlci 301
========Trên R nối================
interface Serial0/0/0
no ip address

encapsulation frame-relay
!
interface Serial0/0/0.102 point-to-point
ip address 192.168.4.2 255.255.255.0
frame-relay interface-dlci 102
clock rate 2000000
!
interface Serial0/0/0.103 point-to-point
ip address 192.168.5.2 255.255.255.0

frame-relay interface-dlci 103

Sunday, June 12, 2016

Liên quan đến firewall, NAT...

Access list bản chất như câu lệnh IF THEN: thực hiện tuần tự từ trên xuống dưới

Access list được đặt tại các cổng vào hoặc ra của Router

Có 2 kiểu ACL:
1. ACL chuẩn: đặt gần đích nhất
dùng kiểu số 1-99
dùng bởi tên

2. ACL extended: có thêm cả hỗ trợ giao thức với port, nên đặt gần nguồn nhất

Mặc định access list thêm vào câu lệnh deny all


standard
access-list 101 permit ip 192.168.0.0 0.0.0.255 192.168.30.0 0.0.0.255

any
access-list 1 permit any
acees-list 1 permit 0.0.0.0 255.255.255.255

1 host
access-list permit host 192.168.10.10
access-list permit 192.168.10.10 0.0.0.0


hai
cuong
cuong
duc
quan
lam

DHCP

neu trong mang co ca server DHCP va router, chi chon 1 con cap DHCP. Neu su dung ca 2 thi phai co backup va co che active-standby

Tuesday, June 7, 2016

1. Vlan

interface FastEthernet0/11
switchport access vlan 10

switchport mode access

2. DTP

3. Inter Vlan

switchport mode trunk

interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 172.17.10.1 255.255.255.0

inter fa0/0 no shut

4. VTP

Switch(config)# vtp domain name

Switch(config)# vtp mode mode

Switch(config)# vtp password password

show vtp status
show vtp counters

5. Port security

wg_sw_2950(config)#interface fa0/1
wg_sw_2950(config-if)#switchport mode access
wg_sw_2950(config-if)#switchport port-security
wg_sw_2950(config-if)#switchport port-security maximum 1
wg_sw_2950(config-if)#switchport port-security mac-address 0008.eeee.eeee
wg_sw_2950(config-if)#switchport port-security violation shutdown

6. STP

SW(config)#spanning-tree vlan 5 root
SW(config)#spanning-tree vlan 5 secondary

7. Etherchannel

SW(config-if)#channel-group 1 mode active

show interfaces etherchannel

8. HRPS, VRRP

Default Gateway Redundancy

HSRP:

RouterA(config)# interface GigabitEthernet0/0
RouterA(config-if)# ip address 10.1.10.2 255.255.255.0
RouterA(config-if)# standby 1 ip 10.1.10.1
RouterA(config-if)# standby 1 priority 110
RouterA(config-if)# standby 1 preempt

Router A chạy ở chế độ Active có lệnh preempt, router B chạy chế độ standby không cần lệnh này.

Monday, June 6, 2016

0. Dinh Tuyen Tinh

Cau hinh defaut route: de mac dinh chuyen tiep goi tin ra ngoai
ip route 0.0.0.0 0.0.0.0 200.1.1.2 

1. RIP

router rip
version 2
network 172.16.0.0
network 192.168.1.0
network 192.168.10.0

2. EIGRP

router eigrp 1 -- Giá trị AS, các router có cùng giá trị này
network 192.168.1.0

network 192.168.10.0

3. OSPF

router ospf 3
network 172.16.1.0 0.0.0.7 area 0
network 192.168.10.4 0.0.0.3 area 0
network 192.168.10.8 0.0.0.3 area 0

DR/BDR: interface - ip ospf priority 50 (càng cao thì càng dễ thành DR)
RouterA(config)#interface fastEthernet0/0
RouterA(config-if)#ip ospf priority 255

Kiểm tra bảng định tuyến:

show ip route
show ip ospf interface

Saturday, June 4, 2016

Cơ chế dự phòng - backup mạng Lan

1. Spaning tree
2. Ethernet channel

Cơ chế dự phòng cho đường Internet

1. HSRP

- Định nghĩa 1 nhóm router, trong đó 1 con active, còn lại là standby
- Có 1 địa chỉ IP, Mac ảo giữa các router
- Xác định trạng thái HSRP, dùng câu lệnh show standby
- HSRP là giao thức cisco
2. VRRP

-VRRP là giao thức các hãng

3. GLBP


Ví dụ:

RouterA(config)# interface GigabitEthernet0/0
RouterA(config-if)# ip address 10.1.10.2 255.255.255.0
RouterA(config-if)# standby 1 ip 10.1.10.1
RouterA(config-if)# standby 1 priority 110

RouterA(config-if)# standby 1 preempt


RouterA# show standby


Chuyên mục

Bài viết theo tháng

Bài đăng gần nhất