You are on page 1of 4

Cisco·���������ֲ� (��ȫ)2007-05-20 12:34Cisco·���������ֲ� (��ȫ)

���� ‫״״‬
1. router>
���� ‫״״‬
2. router#
��Ȩ ‫״״‬
3. router(config)#
ȫ ������ ‫״״‬
4. router(config-if)#; router(config-line)#; router(config-router)#;��
�ֲ����� ‫����״״‬ʱ��������·����ij��ֲ�� IJ���
5. >
‫ڰ‬
·������RXBOOT‫���ڰ‬60����‫�״״���ڿ‬ctrl-break�ɽ����‫����״״‬ʱ·�����������Ĺ��
‫ֹ����������ֻ�ܣ‬ ����ܽ
� � � � � � � � � �� ��
6. ���öԻ�‫״״‬
��·�����ʱ�Զ������‫������״״‬Ȩ����‫��ʹ״״‬SETUP����Ҳ�ɽ����‫��״״‬
�����öԻ����
1. ��ʾ��ʾ��Ϣ
2. ȫ�ֲ��������
3. �ӿ ‫��������ڲ‬
4. ��ʾ���
�������öԻ���� ��Ա����ֹ���������ķ����������ȫ�����ֹ����ã�һЩ��������û������� ��
���ֹ���
��ķ�ʽ��ɡ�
�������öԻ���� �·�������Ȼ���ʾһЩ��ʾ��Ϣ��
--- System Configuration Dialog ---
At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[]'.
���Ǹ����������öԻ�����е��κε ‫������ط‬Լ��롰�����õ�ϵͳ�İ���ctrl-
c�����˳����ù�� �ȱʡ���ý���ʾ�‫���][�ڡ‬С�Ȼ��·��������Ƿ�������öԻ���
Would you like to enter the initial configuration dialog? [yes]:
���y��‫�������ͻ����·���س‬öԻ���� ���������Կ�����˿‫�ڵ‬ǰ��‫��״‬
First, would you like to see the current interface summary? [yes]:
Any interface listed with OK? value "NO" does not have a valid configuration
Interface IP-Address OK? Method Status
Protocol
Ethernet0 unassigned NO unset up up
Serial0 unassigned NO unset up up
������ ������ �� ���� �� ��
Ȼ��·����Ϳʼȫ � �ֲ�������ã�
Configuring global parameters:
1������·������
Enter host name [Router]:
2�����ý�����Ȩ‫(������״״‬secret)���������������Ժ � ��
������
ķ ʽ��ʾ��
The enable secret is a one-way cryptographic secret used
instead of the enable password when it exists.
Enter enable secret: cisco
3�����ý�����Ȩ‫(������״״‬password)�������� ֻ ��û������ʱ�����ã������������Ժ�������ķ�ʽ��ʾ�

The enable password is used when there is no enable secret
and when using older software and some boot images.
Enter enable password: pass
4�����������ն˷���ʱ�����룺
Enter virtual terminal password: cisco
5��ѯ���Ƿ�Ҫ����·����֧� � ĸ�������Э�飺
Configure SNMP Network Management? [yes]:
Configure DECnet? [no]:
Configure AppleTalk? [no]:
Configure IPX? [no]:
Configure IP? [yes]:
Configure IGRP routing? [yes]:
Configure RIP routing? [no]:
������
6��������õ��Dz��ŷ��ʷ�����ϵͳ���������첽�‫ڵ‬IJ���
Configure Async lines? [yes]:
1) ������·������‫ٶ‬ȣ�
Async line speed [9600]:
2) �Ƿ�ʹ��Ӳ����‫�أ‬
Configure for HW flow control? [yes]:
3) �Ƿ�����modem��
Configure for modems? [yes/no]: yes
4) �Ƿ �ʹ��Ĭ�ϵ�modem���
Configure for default chat script? [yes]:
5) �Ƿ������첽�‫�ڵ‬PPP����
Configure for Dial-in IP SLIP/PPP access? [no]: yes
6) �Ƿ�ʹ�ö��IP��ַ��
Configure for Dynamic IP addresses? [yes]:
7) �Ƿ�ʹ��ȱʡIP��ַ��
Configure Default IP addresses? [no]: yes
8) �Ƿ�ʹ��TCPͷѹ��
Configure for TCP Header Compression? [yes]:
9) �Ƿ����첽����ʹ��·�ɱ���£�
Configure for routing updates on async links? [no]: y
10) �Ƿ������첽���ϵ�����Э�顣
����4��ϵͳ���ÿ��ӿ ‫��ڽڽ‬в�������á�
1��Configuring interface Ethernet0:
1) �Ƿ�ʹ�ô˽ӿ ‫�ڣ‬
Is this interface in use? [yes]:
2) �Ƿ����ô˽ӿ ‫�ڵ‬IP����
Configure IP on this interface? [yes]:
3) ���ýӿ ‫�ڵ‬IP��ַ��
IP address for this interface: 192.168.162.2
4) ���ýӿ ‫�ڵ‬IP�������룺
Number of bits in subnet field [0]:
Class C network is 192.168.162.0, 0 subnet bits; mask is /24
�����������нӿ ‫ڵ‬IJ����ϵͳ���������öԻ��������ʾ��
Ľ 4��
The following configuration command script was created:
hostname Router
enable secret 5 $1$W5Oh$p6J7tIgRMBOIKVXVG53Uh1
enable password pass
��������
��‫����ע‬enable secret������ʾ�������룬��enable password������ʾ�������õ����‫�ݡ‬
��ʾ�����ϵ �ʹ��������
�����ͳ�ã� Ƿ
Use this configuration? [yes/no]: yes
���‫�ش‬yes��ϵͳ�ͻ�����õĽ�����·�����NVRAM�У�Ȼ��������öԻ���� �ʹ·����ʼ��Ĺ���
�ġ���������
1. ����
��IOS�����У������κ�‫��״״‬λ�ã������Լ��롰�����õ�ϵͳ�İ���
2. �ı�����‫״״‬ ��������
������Ȩ����‫״״‬ enable
�˳���Ȩ����‫״״‬ disable
�������öԻ�‫״״‬ setup
����ȫ������‫״״‬ config terminal
�˳�ȫ������‫״״‬ end
����˿�����‫״״‬ interface type slot/number
�����Ӷ ˿�����‫״״‬ interface type number.subinterface [point-to-point |
multipoint]
������·����‫״״‬ line type slot/number
����·������‫״״‬ router protocol
�˳�ֲ �����‫״״‬ exit
3. ��ʾ���� ��������
�鿴�汾������Ϣ show version
�鿴�������� show running-config
�鿴�������� show startup-config
��ʾ�˿���Ϣ show interface type slot/number
��ʾ·����Ϣ show ip router
4. ��������
����IOS��CONFIG�ı��‫���ݺ‬

5. �������� ��������
��¼Զ����� telnet hostname|IP address
������� ping hostname|IP address
·�ɸ��� trace hostname|IP address
6. ���������� ��������
ȫ������ config terminal
���÷����û������� username username password password
������Ȩ���� enable secret password
����·������ hostname name
���þ����
· ip route destination subnet-mask next-hop
��IP·�� ip routing
��IPX·�� ipx routing
�˿����� interface type slot/number
����IP��ַ ip address address subnet-mask
����IPX���� ipx network network
����˿� no shutdown
������·���� line type number
���¼��� login [local|tacacs server]
���õ�¼���� password password
�塢� ��� IPѰַ
1. ����ӿ�IP��ַ
���� ����
�ӿ����� interface type slot/number
����IP��ַ ip address ip-address mask
2. ʹ�ÿɱ 塢� ���������
��ʹ�ÿɱ 塢� ��������������
ͨ� λ�‫���ڲ‬ӿ ‫��ڵ‬
� � 룬�����
һ�����ŵ�����ʹ�ò�������
�Խ�ʡIP��ַ�����������Ч��IP��ַ�ռ 䡣

3. ʹ�������ַ ���루 NAT��


NAT��Network Address Translation��� ��
� � �
‫�˽�ڲ‬е�ַ�������� Ϸ� � ��ַȫ ��Ĺ��‫�ʹ���ܣ‬ò����кϷ�IP��ַ���û
��������
�NAT
� ��ʵ��� Internet.
����b�‫����ڲ‬ʱ��,����ʹ�����µ�ַ���������,��Щ��ַ����Network Working
Group(RFC 1918)��������˽�������ַ�����.
l Class A:10.1.1.1 to 10.254.254.254
l Class B:172.16.1.1 to 172.31.254.254
l Class C:192.168.1.1 to 192.168.254.254
�����������£�

���� ����
����һ���������б� access-list access-list-number permit source [source-wildcard]

����һ��ȫ�ַ ��� ip Nat pool name start-ip end-ip {netmask netmask | prefix-
lengthprefix-length}[type rotary]
��b�����ַ���� ip nat inside source {list {access-list-number | name} pool name
[overload]|static local-ip global-ip}
ָ
ָ ���‫ �˿������ڲ‬ip nat {inside | outside}

·�����Ethernet 0�˿�Ϊinside�˿‫�˿˶����ڣ‬l���‫����ڲ‬磬���Ҵ˶˿���l�ӵ�����Ӧ�ñ����룬 Serial


0�˿�Ϊoutside�˿‫���ڣ‬ӵ�кϷ�IP��ַ����NIC�����ṩ�������ĺϷ���IP��ַ��,4������10.1.1.0/24
������IP��ַ��c2501��ѡ��һ���ַ��Ϊ�Լ��ĺϷ���ַ������Serial 0�‫���ڷ‬Internet������ip
nat inside source list 2 pool c2501 overload�еIJ���overload�����������
‫������ʹַ���ڲ‬ȫ �ͬ
� �ַ ���һ��Ϸ�IP��ַ��������NIC�����ṩ�������ĵ�ַ��������ip nat
pool c2501 202.96.38.1 202.96.38.62 netmask 255.255.255.192������ȫ�ַ ��ķ�Χ��
�������£�
ip nat pool c2501 202.96.38.1 202.96.38.62 netmask 255.255.255.192
interface Ethernet 0
ip address 10.1.1.1 255.255.255.0
ip nat inside
!
interface Serial 0
ip address 202.200.10.5 255.255.255.252
ip nat outside
!
ip route 0.0.0.0 0.0.0.0 Serial 0
access-list 2 permit 10.0.0.0 0.0.0.255
! Dynamic NAT
!
ip nat inside source list 2 pool c2501 overload
line console 0
exec-timeout 0 0
!
line vty 0 4
end
�����þ����
·
ͨ� �����þ��� �ָ����ij
· ���û������� Ϊ�һ�������
ɣ ʱ��Ҫ�����·��,������ṹ�Ƚϼϼ ���

һ
��ϼ 塢�
�ijһ��������·��Ψһ ������²��þ���
· �� ɡ
���� ����
��b�����
· ip route prefix mask {address | interface} [distance] [tag tag]
[permanent]
Prefix :��Ҫ�����Ŀ������
mask :��������
address :��һ�����IP��ַ��������·����Ķ˿‫��ַ�ڵ‬
Interface :��������ӿ�
distance :������루��ѡ��
tag tag :tagֵ����ѡ��
permanent :ָ����·�ɼ�ʹ�ö ˿‫�ڹص‬Ҳ�����Ƶ�

������Router1�������˷���192.1.0.64/26�������һ���ַΪ192.200.10.6,������Ŀ�ĵ�ַ����192.
1.0.64/26�����緶 Χ����
‫���ݱ‬Ӧ����·�ɵ���ַΪ192.200.10.6������·������Router3�������˷���192.1.0.128/26��192.20
0.10.4/30��������һ���ַΪ192.1.0.65��������Router1�϶ ˿� Serial
0��ַΪ192.200.10.5��192.200.10.4/30���������ֱl�����Ѿ����192.200.10.4/30���‫�����·��ڷ‬
��Բ���Ҫ��Router1����Ӿ���ɡ�
·
Router1:
ip route 192.1.0.64 255.255.255.192 192.200.10.6
Router3:
ip route 192.1.0.128 255.255.255.192 192.1.0.65
ip route 192.200.10.4 255.255.255.252 192.1.0.65
ʱ����·����Router3������·����Router2��l�⣬����������·�����
ͨ�
�l������Ҳ����Ϊ����һ��Ĭ��·���Դ������ϵĶ�����ɣ�
·
ip route 0.0.0.0 0.0.0.0 192.1.0.65
��ֻҪû����·�ɱ����ҵ�ȥ�‫�ض‬Ŀ�ĵ�ַ��·��,����‫�·�ݾ‬ɵ���ַΪ192.1.0.65������·����

You might also like