You are on page 1of 10

LAB 9.

1: KT NI ROUTER CA CISCO VI NG ADSL


( Thc hin trn thit b ).

Hnh 9.4.1
I. t vn :
Kt ni Router ca Cisco vi ng ADSL l mt trong nhng k nng c bn rt thng gp
trong thc t. Bi thc hnh sau s m t cch kt ni ca Router 2811 vi ng ADSL ca
VNPT trong Router s va ng vai tr l DHCP cp a ch IP cho cc my tnh trong
mng LAN v thc hin chc nng NAT cc my tnh truy cp vo Internet.
II. Yu cu :
1. Cu hnh hostname ca Router v Switch nh hnh v.
2. Cu hnh Router2811 kt ni vi ng ADSL. Thc hin lnh kim tra li kt qu.
3. Cu hnh DHCP cho Router2811 v thc hin lnh kim tra li cu hnh DHCP trn
Router2811 v trn PC.
4. Cu hnh NAT cho Router2811. Thc hin lnh kim tra hot ng ca NAT v kim
tra kt ni Internet t PC.

III. Thc hin :


1. Cu hnh hostname trn cc thit b.
Kt ni console vo cc thit b v thc hin cu hnh :
Router#configure terminal
Router(config)#hostname Router2811
Router2811(config)#end

Switch#configure terminal
Switch(config)#hostname Sw1
Sw1(config)#end

2. Cu hnh ADSL cho Router2811.


Trong m hnh kt ni Router2811 vi Modem. Bn lu chuyn hot ng ca Modem
sang Bridge Mode. Thc t cc Modem ADSL u tch hp cc chc nng ging nh Router
nn cn cu hnh n qua Bridge Mode n thc hin chc nng Modem thun ty.
Router2811 s thc hin tt c cc chc nng kt ni PPP vi ISP , DHCP v NAT.
Trc khi thc hin cu hnh ADSL vi Router ca Cisco, bn cn lu kim tra Version ca
IOS. Nu Version ca IOS nh hn 12.2(13)T th cn cu hnh nhng lnh sau Global
Configuration Mode trc khi thc hin cu hnh:
Router2811#configure terminal
Router2811(config)#vpdn enable
Router2811(config)#no vpdn logging
Router2811(config)#vpdn-group pppoe
Router2811(config-vpdn)#request-dialin
Router2811(config-vpdn-req-in)#protocol pppoe
Lu ta khng cu hnh trc tip Interface Fa0/1 m cu hnh Interface Dialer thit lp
cc thng s cho kt ni PPP.
Router2811#configure terminal
Router2811(config)#interface dialer 1
Router2811(config-if)#ip address negotiated
Router2811(config-if)#mtu 1492
Router2811(config-if)#ip tcp adjust-mss 1452
Router2811(config-if)#encapsulation ppp
Router2811(config-if)#ppp authentication pap sent-username truongtan password
cisco
Router2811(config-if)#dialer pool 1
Router2811(config-if)#no shutdown
Router2811(config-if)#exit
Trong cu hnh trn ta s dng kiu chng thc dng c PAP v CHAP. Router s t ng
nhn ra kiu chng thc ca ISP v s dng PAP hoc CHAP cho ph hp.
Cu hnh Interface Fast Ethernet 0/1 kt ni vi modem ADSL :
Router2811#configure terminal
Router2811(config)#interface fastethernet 0/1
Router2811(config-if)#no ip address
Router2811(config-if)#pppoe enable
Router2811(config-if)#pppoe-client dial-pool-number 1
Router2811(config-if)#no shutdown
Router2811(config-if)#end

Cu hnh Interface Fast Ethernet 0/0 kt ni vi Sw1 :


Router2811#configure terminal
Router2811(config)#interface fastethernet 0/0
Router2811(config-if)#ip address 192.168.1.1 255.255.255.0
Router2811(config-if)#no shutdown
Router2811(config-if)#exit
Cu hnh default-route cho Router2811 kt ni vi Internet. Lu y ta t defaultroute thng qua Interface Dialer 1 ch khng phi Interface Fa0/1 nh thng thng :
Router2811#configure terminal
Router2811(config)#ip route 0.0.0.0 0.0.0.0 interface dialer1
Thc hin lnh show ip int brief kim tra li a ch IP ca cc Interface. Nu cu hnh
ng, Interface dialer 1 s c cp a ch IP t ISP.
Router2811#show ip int brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES manual up up
FastEthernet0/1 unassigned YES manual up up
Serial0/2/0 unassigned YES unset administratively down down
Serial0/2/1 unassigned YES unset administratively down down
Serial0/3/0 unassigned YES unset administratively down down
NVI0 unassigned YES unset up up
Virtual-Access1 unassigned YES unset up up
Dialer1 123.26.78.101 YES IPCP up up
Thc hin lnh show ip route xem bng nh tuyn:
Router2811#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
113.0.0.0/32 is subnetted, 1 subnets
C 113.165.0.1 is directly connected, Dialer1
123.0.0.0/32 is subnetted, 1 subnets
C 123.26.78.101 is directly connected, Dialer1

C 192.168.1.0/24 is directly connected, FastEthernet0/0


S* 0.0.0.0/0 is directly connected, Dialer1

3. Cu hnh DCHP cho Router2811 cp a ch IP ng cho cc PC trong LAN.


Lu y a ch 192.168.1.1 c s dng cho Interface Fa0/0 nn ta phi loi b a
ch ny ra khi DHCP Pool.
Router2811#configure terminal
Router2811(config)#ip dhcp excluded-address 192.168.1.1
Router2811(config)#ip dhcp pool Homepool
Router2811(dhcp-config)#network 192.168.1.0 255.255.255.0
Router2811(dhcp-config)#default-router 192.168.1.1
Router2811(dhcp-config)#dns-server 8.8.8.8
Router2811(dhcp-config)#end
Thc hin lnh show ip dhcp pool kim tra hot ng ca DHCP:
Router2811#show ip dhcp pool
Pool Homepool :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 1
Pending event : none
1 subnet is currently in the pool :
Current index IP address range Leased addresses
192.168.1.1 192.168.1.1 - 192.168.1.254 1
Thc hin lnh show ip dhcp binding xem chnh xc cc a ch IP cp:
Router2811#show ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
192.168.1.2 0100.26b9.0dfb.e6 Jun 15 2013 03:35 AM Automatic

4. Cu hnh NAT Overload trn Router2811.


cu hnh NAT, ta s dng Interface Dialer 1 l NAT Outside v Interface Fa0/0 l NAT
Inside.
Router2811#configure terminal

Router2811(config)#interface dialer 1
Router2811(config-if)#ip nat outside
Router2811(config-if)#exit
Router2811(config)#interface fa0/0
Router2811(config-if)#ip nat inside
Router2811(config-if)#exit
Router2811(config)#access-lists 1 permit 192.168.1.0 0.0.0.255
Router2811(config)#ip nat inside source list 1 interface dialer 1 overload
Thc hin lnh show ip nat statistics , show ip nat translations kim tra hot ng
NAT:
Router2811#show ip nat statistics
Total active translations: 78 (0 static, 78 dynamic; 78 extended)
Outside interfaces:
Virtual-Access1, Dialer1
Inside interfaces:
FastEthernet0/0
Hits: 3150 Misses: 53
CEF Translated packets: 3121, CEF Punted packets: 89
Expired translations: 2
Dynamic mappings:
-- Inside Source
[Id: 1] access-list 1 interface Dialer1 refcount 78
Queued Packets: 0
Thc hin lnh Ping cc host trn Internet kim tra kt ni t PC:
C:\>ping cisco.com
Pinging cisco.com [222.255.167.131] with 32 bytes of data:
Reply from 222.255.167.131: bytes=32 time=4ms TTL=55
Reply from 222.255.167.131: bytes=32 time=4ms TTL=55
Reply from 222.255.167.131: bytes=32 time=3ms TTL=55
Reply from 222.255.167.131: bytes=32 time=3ms TTL=55
Ping statistics for 222.255.167.131:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 3ms, Maximum = 4ms, Average = 3ms

LAB 9.3: KT NI ROUTER CA CISCO VI NG FTTX

I. t vn :
Kt ni Router ca Cisco vi ng FTTX l mt trong nhng k nng c bn rt thng gp
trong thc t. Bi thc hnh sau s m t cch kt ni ca Router Cisco vi ng FTTX ca
VNPT s dng Cisco Router 811. Bi Lab ny s tp trung gii quyt phn cu hnh FTTX ca
m hnh mng nh trn. Trong m hnh ny, Router 811 m nhn vai tr kt ni vi ng
FTTX v thc hin NAT.
III. Yu cu :
1. Cu hnh hostname cho Router
2. Cu hnh Router811 kt ni vi ng FTTX s dng username: truongtan, password:
cisco. a ch IP ca Interface Vlan1 ca Router 811 l 192.168.1.1/24. Cc subnet trong
LAN bao gm: 172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24, 172.16.4.0/24,
172.16.5.0/24, 172.16.6.0/24. Cu hnh nh tuyn cho Router881. Thc hin lnh kim
tra li cu hnh.
3. Cu hnh NAT Overload cho Router 811 cc thit b trong mng LAN c th truy cp
Internet. Thc hin lnh kim tra li cu hnh NAT.
IV. Thc hin :

1. Cu hnh hostname cho cc thit b.

Kt ni console vo cc thit b v thc hin cu hnh :


Router 811
Router#configure terminal
Router(config)#hostname Router881
Router881(config)#end
2. Router 881 c 4 cng FE LAN, trc ht ta cu hnh a ch IP cho Interface Vlan
1 i din cho 4 cng ny.
Router881#configure terminal
Router881(config)#Interface Vlan 1
Router881(config-if)#ip address 192.168.1.1 255.255.255.0
Router881(config-if)#no shutdown
Router881(config-if)#end
Router 881 c WAN Interface l FE4, ta s cu hnh Interface FE4 kt ni vi
ng FTTH.
Router881#configure terminal
Router881(config)#Interface FastEthernet4
Router881(config-if)#no ip address
Router881(config-if)#pppoe enable group global
Router881(config-if)#pppoe-client dial-pool-number 1
Router881(config-if)#end
Tip theo thc hin cu hnh cho Interface Dialer 1 .
Router881(config)#interface dialer 1
Router881(config-if)#ip address negotiated
Router881(config-if)#ip mtu 1438
Router881(config-if)#encapsulation ppp
Router881(config-if)#ip tcp adjust-mss 1452
Router881(config-if)#dialer pool 1
Router881(config-if)#dialer-group 1
Router881(config-if)#ppp authentication pap callin
Router881(config-if)#ppp authentication pap sent-username truongtan password
cisco
Router881(config-if)#ppp ipcp dns request accept
Router881(config-if)#ppp ipcp address accept
Router881(config-if)#no shutdown
Router881(config-if)#exit

Thc hin lnh show ip interface brief kim tra a ch IP trn Router. Ta s thy a
ch IP c cp bi ISP thng qua Interface Dialer 1.
Router#show ip interface brief
Interface IP-Address OK? Method Status Pro
ocol
Dialer1 113.162.117.179 YES IPCP up up
FastEthernet0 unassigned YES unset up dow
FastEthernet1 unassigned YES unset up dow
FastEthernet2 unassigned YES unset up dow
FastEthernet3 unassigned YES unset up up
FastEthernet4 unassigned YES manual up up
NVI0 192.168.1.1 YES unset up up
Virtual-Access1 unassigned YES unset up up
Vlan1 192.168.1.1 YES manual up up
Cu hnh nh tuyn cho Router 881. y Router881 khng thc hin chc nng InterVlan Routing nn ta cn cu hnh nh tuyn tnh Router881 c th lin lc cc Network
trong LAN. Ngoi ra, cn c mt defaul-route i Internet thng qua Interface Dialer1.
Router881#configure terminal
Router881(config)#ip route 0.0.0.0 0.0.0.0 dialer1
Router881(config)#ip route 172.16.1.0 255.255.255.0
Router881(config)#ip route 172.16.2.0 255.255.255.0
Router881(config)#ip route 172.16.3.0 255.255.255.0
Router881(config)#ip route 172.16.4.0 255.255.255.0
Router881(config)#ip route 172.16.5.0 255.255.255.0
Router881(config)#ip route 172.16.6.0 255.255.255.0

interface
interface
interface
interface
interface
interface

Thc hin lnh "show ip route" kim tra li cu hnh nh tuyn


Router#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2

Vlan1
Vlan1
Vlan1
Vlan1
Vlan1
Vlan1

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2


ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
113.0.0.0/32 is subnetted, 2 subnets
C 113.162.117.179 is directly connected, Dialer1
C 113.165.0.1 is directly connected, Dialer1
172.16.0.0/24 is subnetted, 6 subnets
S 172.16.4.0 is directly connected, Vlan1
S 172.16.5.0 is directly connected, Vlan1
S 172.16.6.0 is directly connected, Vlan1
S 172.16.1.0 is directly connected, Vlan1
S 172.16.2.0 is directly connected, Vlan1
S 172.16.3.0 is directly connected, Vlan1
C 192.168.1.0/24 is directly connected, Vlan1
S* 0.0.0.0/0 is directly connected, Dialer1
3. Cu hnh NAT Overload cho Router 881 thc hin chuyn i t cc a ch IP
trong Private sang a ch IP Public c cung cp bi ISP truy cp Internet.
Router881#configure terminal
Router881(config)#access-list 1
Router881(config)#access-list 1
Router881(config)#access-list 1
Router881(config)#access-list 1
Router881(config)#access-list 1
Router881(config)#access-list 1
Router881(config)#access-list 1

permit
permit
permit
permit
permit
permit
permit

192.168.1.0 0.0.0.255
172.16.1.0 0.0.0.255
172.16.2.0 0.0.0.255
172.16.3.0 0.0.0.255
172.16.4.0 0.0.0.255
172.16.5.0 0.0.0.255
172.16.6.0 0.0.0.255

Router881(config)#interface vlan 1
Router881(config-if)#ip nat inside
Router881(config-if)#exit
Router881(config)#interface dialer 1
Router881(config-if)#ip nat outside
Router881(config-if)#exit
Router881(config)#ip nat inside source list 1 interface dialer1 overload.

Router#show ip nat statistics


Total active translations: 838 (0 static, 838 dynamic; 838 extended)
Peak translations: 15665, occurred 2w1d ago
Outside interfaces:
Dialer1, Virtual-Access1

Inside interfaces:
Vlan1
Hits: 481855491 Misses: 0
CEF Translated packets: 461578199, CEF Punted packets: 5626278
Expired translations: 8008026
Dynamic mappings:
-- Inside Source
[Id: 1] access-list 1 interface Dialer1 refcount 838
Appl doors: 0
Normal doors: 0
Queued Packets: 0
Router#
Router#show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 113.162.117.179:1716 172.16.1.218:1716 74.125.239.4:443 74.125.239.4:443
tcp 113.162.117.179:1798 172.16.1.218:1798 113.171.252.54:443 113.171.252.54:443
tcp 113.162.117.179:1033 172.16.1.223:1033 173.252.110.27:80 173.252.110.27:80
tcp 113.162.117.179:1037 172.16.1.223:1035 31.13.68.16:443 31.13.68.16:443
tcp 113.162.117.179:1038 172.16.1.223:1036 199.7.59.72:80 199.7.59.72:80
tcp 113.162.117.179:1028 172.16.1.223:1040 72.246.190.114:443 72.246.190.114:443
tcp 113.162.117.179:1041 172.16.1.223:1041 72.246.190.114:443 72.246.190.114:443
tcp 113.162.117.179:1042 172.16.1.223:1042 125.56.218.8:443 125.56.218.8:443
tcp 113.162.117.179:1048 172.16.1.223:1045 72.246.190.114:443 72.246.190.114:443
tcp 113.162.117.179:1049 172.16.1.223:1046 72.246.190.114:443 72.246.190.114:443
tcp 113.162.117.179:1050 172.16.1.223:1047 72.246.190.114:443 72.246.190.114:443
tcp 113.162.117.179:1052 172.16.1.223:1050 125.56.218.19:443 125.56.218.19:443
tcp 113.162.117.179:1063 172.16.1.223:1063 72.246.190.114:443 72.246.190.114:443
tcp 113.162.117.179:1064 172.16.1.223:1064 125.56.218.19:443 125.56.218.19:443
tcp 113.162.117.179:1065 172.16.1.223:1065 173.252.110.27:80 173.252.110.27:80
tcp 113.162.117.179:1067 172.16.1.223:1067 31.13.68.8:443 31.13.68.8:443
tcp 113.162.117.179:1072 172.16.1.223:1072 125.56.218.8:443 125.56.218.8:443
tcp 113.162.117.179:1073 172.16.1.223:1073 125.56.218.8:443 125.56.218.8:443
tcp 113.162.117.179:1074 172.16.1.223:1074 72.246.190.155:443 72.246.190.155:443
tcp 113.162.117.179:1075 172.16.1.223:1075 23.59.190.25:443 23.59.190.25:443
tcp 113.162.117.179:1075 172.16.1.223:1075 125.56.218.26:443 125.56.218.26:443
tcp 113.162.117.179:1076 172.16.1.223:1076 165.254.156.187:443 165.254.156.187:443

You might also like