Professional Documents
Culture Documents
Cau Hinh Ccna-Ccnp
Cau Hinh Ccna-Ccnp
8.To Vlan
Cch 1.
Switch#vlan database
Switch(vlan)#vlan number
Cch 2. Khi gn cc cng vo vlan, d vlan cha tn ti
nhng Switch vn t to.
Switch(config)#interface fastethernet 0/0
Switch(config-int)#switchport access vlan vlan-id
Mun xo vlan ta lm nh sau:
Switch(config-if)#no switchport access vlan vlan-id
Switch#clear vlan vlan_number (xo ton b vlan )
9.Gn nhiu cng vo trong vlan cng mt lc, cu hnh
Range
i vi dy cng khng lin tc.
Switch(config)#interface range cng 1 , cng 2 , cng 3
i vi mt dy lin tc.
Switch(config)#interface range cng 1-n
Switch(config-range)#switchport access vlan vlan-id
V d:
Switch(config)#interface range f0/0 , f0/2 , f0/4
Cu hnh overload vi 1 a ch IP c th.
Router(config)#ip nat pool [tn pool] [ip global inside]
[subnet mask]
Router(config)#ip nat inside source list [tn s hiu ACL]
pool [tn pool] overload
Router(config)#access-list [s hiu] permit [a ch]
[windcard mask]
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
- local ip]
Lnh xa cc extended nat trn tng interface
Router#clear ip nat translation protocol [inside/outside]
[global ip - global port local ip local port]
Kim tra v Debug cc NAT v PAT
Router#show ip nat translation
Router#show ip nat statics
Router#debug ip nat
Cu hnh DHCP
Router(config)#ip dhcp excluded-address ip-address
(end-ip-address)
Router(config)#ip dhcp pool [tn pool]
Router(dhcp-config)#network addess subnetmask
Router(dhcp-config)#default-router address
Router(dhcp-config)#dns-server address
Router(dhcp-config)#netbios-name-server address
Router(dhcp-config)#domain-name tn domain
Router(dhcp-config)#lease ngy/gi/pht
Kim tra v troubleshoot cu hnh DHCP
Router#show ip dhcp binding
Router#debug ip dhcp server events
Trong trng hp DHCP server khng nm cng mng
vi host
Note: khi DHCP server khng cng mng vi host th ta
phi dng lnh ip helper-address gip host n DHCP
server.
Router(config)#interface [cng nm cng mng vi host]
Router(config-if)#ip helper-address [a ch ca DHCP
server]
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