CISCO ¼¼Êõ´ó¼¯ºÏ(ת)¡¾Ç¿ÁÒÍÆ¼ö¡¿
ÃüÁî״̬
1. router>
·ÓÉÆ÷´¦ÓÚÓû§ÃüÁî״̬£¬ÕâʱÓû§¿ÉÒÔ¿´Â·ÓÉÆ÷µÄÁ¬½Ó״̬£¬·ÃÎÊÆäËüÍøÂçºÍÖ÷»ú£¬µ«²»ÄÜ¿´µ½ºÍ¸ü¸Ä·ÓÉÆ÷µÄÉèÖÃÄÚÈÝ¡£
2. router#
ÔÚrouter>Ìáʾ·ûϼüÈëenable,·ÓÉÆ÷½øÈëÌØÈ¨ÃüÁî״̬router#£¬Õâʱ²»µ«¿ÉÒÔÖ´ÐÐËùÓеÄÓû§ÃüÁ»¹¿ÉÒÔ¿´µ½ºÍ¸ü¸Ä·ÓÉÆ÷µÄÉèÖÃÄÚÈÝ¡£
3. router(config)#
ÔÚrouter#Ìáʾ·ûϼüÈëconfigure terminal,³öÏÖÌáʾ·ûrouter(config)#£¬´Ëʱ·ÓÉÆ÷´¦ÓÚÈ«¾ÖÉèÖÃ״̬£¬Õâʱ¿ÉÒÔÉèÖ÷ÓÉÆ÷µÄÈ«¾Ö²ÎÊý¡£
4. router(config-if)#; router(config-line)#; router(config-router)#;¡
·ÓÉÆ÷´¦ÓÚ¾Ö²¿ÉèÖÃ״̬£¬Õâʱ¿ÉÒÔÉèÖ÷ÓÉÆ÷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¦ºÅ·ÃÎÊ·þÎñÆ÷£¬ÏµÍ³»¹»áÉèÖÃÒì²½¿ÚµÄ²ÎÊý£º
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) ÊÇ·ñÉèÖÃÒì²½¿ÚÉÏµÄÆäËüÐÒé¡£
½ÓÏÂÀ´£¬ÏµÍ³»á¶Ôÿ¸ö½Ó¿Ú½øÐвÎÊýµÄÉèÖá£
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ÎÊýºó£¬ÏµÍ³»á°ÑÕû¸öÉèÖöԻ°¹ý³ÌµÄ½á¹ûÏÔʾ³öÀ´£º
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µØÖ··ÖÀà
IPµØÖ··ÖÎªÍøÂçµØÖ·ºÍÖ÷»úµØÖ·¶þ¸ö²¿·Ö£¬AÀàµØÖ·Ç°8Î»ÎªÍøÂçµØÖ·£¬ºó24λΪÖ÷»úµØÖ·£¬BÀàµØÖ·16Î»ÎªÍøÂçµØÖ·£¬ºó16λΪÖ÷»úµØÖ·£¬CÀàµØÖ·Ç°24Î»ÎªÍøÂçµØÖ·£¬ºó8λΪÖ÷»úµØÖ·£¬ÍøÂçµØÖ··¶Î§ÈçϱíËùʾ£º
ÖÖÀà ÍøÂçµØÖ··¶Î§
A¡¡ 1.0.0.0 µ½126.0.0.0ÓÐЧ 0.0.0.0 ºÍ127.0.0.0±£Áô
B 128.1.0.0µ½191.254.0.0ÓÐЧ 128.0.0.0ºÍ191.255.0.0±£Áô
C 192.0.1.0 µ½223.255.254.0ÓÐЧ 192.0.0.0ºÍ223.255.255.0±£Áô
D 224.0.0.0µ½239.255.255.255ÓÃÓÚ¶àµã¹ã²¥
E 240.0.0.0µ½255.255.255.254±£Áô 255.255.255.255ÓÃÓڹ㲥
2. ·ÖÅä½Ó¿ÚIPµØÖ·
ÈÎÎñ ÃüÁî
½Ó¿ÚÉèÖÃ interface type slot/number
Ϊ½Ó¿ÚÉèÖÃIPµØÖ· ip address ip-address mask
ÑÚÂ꣨mask£©ÓÃÓÚʶ±ðIPµØÖ·ÖеÄÍøÂçµØÖ·Î»Êý£¬IPµØÖ·£¨ip-address£©ºÍÑÚÂ루mask£©ÏàÓë¼´µÃµ½ÍøÂçµØÖ·¡£
3. ʹÓÿɱ䳤µÄ×ÓÍøÑÚÂë
ͨ¹ýʹÓÿɱ䳤µÄ×ÓÍøÑÚÂë¿ÉÒÔÈÃλÓÚ²»Í¬½Ó¿ÚµÄÍ¬Ò»ÍøÂç±àºÅµÄÍøÂçʹÓò»Í¬µÄÑÚÂ룬ÕâÑù¿ÉÒÔ½ÚÊ¡IPµØÖ·£¬³ä·ÖÀûÓÃÓÐЧµÄIPµØÖ·¿Õ¼ä¡£
ÈçÏÂͼËùʾ£º
Router1ºÍRouter2µÄE0¶Ë¿Ú¾ùʹÓÃÁËCÀàµØÖ·192.1.0.0×÷ÎªÍøÂçµØÖ·£¬Router1µÄE0µÄÍøÂçµØÖ·Îª192.1.0.128,ÑÚÂëΪ255.255.255.192, Router2µÄE0µÄÍøÂçµØÖ·Îª192.1.0.64,ÑÚÂëΪ255.255.255.192£¬ÕâÑù¾Í½«Ò»¸öCÀàÍøÂçµØÖ··ÖÅ䏸Á˶þ¸öÍø£¬¼È»®·ÖÁ˶þ¸ö×ÓÍø£¬Æðµ½Á˽ÚÔ¼µØÖ·µÄ×÷Óá£
4. ʹÓÃÍøÂçµØÖ··Ò루NAT£©
NAT£¨Network Address Translation£©Æðµ½½«ÄÚ²¿Ë½ÓеØÖ··Òë³ÉÍⲿºÏ·¨µÄÈ«¾ÖµØÖ·µÄ¹¦ÄÜ£¬ËüʹµÃ²»¾ßÓкϷ¨IPµØÖ·µÄÓû§¿ÉÒÔͨ¹ýNAT·ÃÎʵ½ÍⲿInternet.
µ±½¨Á¢ÄÚ²¿ÍøµÄʱºò,½¨ÒéʹÓÃÒÔϵØÖ·×éÓÃÓÚÖ÷»ú,ÕâЩµØÖ·ÊÇÓÉ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-length prefix-length} [type rotary]
½¨Á¢¶¯Ì¬µØÖ··Òë ip nat inside source {list {access-list-number | name} pool name [overload] | static local-ip global-ip}
Ö¸¶¨ÄÚ²¿ºÍÍⲿ¶Ë¿Ú ip nat {inside | outside}
ÈçÏÂͼËùʾ£¬
·ÓÉÆ÷µÄEthernet 0¶Ë¿ÚΪinside¶Ë¿Ú£¬¼´´Ë¶Ë¿ÚÁ¬½ÓÄÚ²¿ÍøÂ磬²¢ÇҴ˶˿ÚËùÁ¬½ÓµÄÍøÂçÓ¦¸Ã±»·Ò룬Serial 0¶Ë¿ÚΪoutside¶Ë¿Ú£¬ÆäÓµÓкϷ¨IPµØÖ·£¨ÓÉNIC»ò·þÎñÌṩÉÌËù·ÖÅäµÄºÏ·¨µÄIPµØÖ·£©,À´×ÔÍøÂç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
¡¡
Áù¡¢ÅäÖþ²Ì¬Â·ÓÉ
ͨ¹ýÅäÖþ²Ì¬Â·ÓÉ£¬Óû§¿ÉÒÔÈËΪµØÖ¸¶¨¶ÔÄ³Ò»ÍøÂç·ÃÎÊʱËùÒª¾¹ýµÄ·¾¶,ÔÚÍøÂç½á¹¹±È½Ï¼òµ¥£¬ÇÒÒ»°ãµ½´ïÄ³Ò»ÍøÂçËù¾¹ýµÄ·¾¶Î¨Ò»µÄÇé¿öϲÉÓþ²Ì¬Â·ÓÉ¡£
ÈÎÎñ ÃüÁî
½¨Á¢¾²Ì¬Â·ÓÉ 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.200.10.4/30Õâ¶þ¸öÍøÏÂÒ»ÌøµØÖ·Îª192.1.0.65¡£ÓÉÓÚÔÚRouter1É϶˿ÚSerial 0µØÖ·Îª192.200.10.5£¬192.200.10.4/30Õâ¸öÍøÊôÓÚÖ±Á¬µÄÍø£¬ÒѾ´æÔÚ·ÃÎÊ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ÏàÁ¬Í⣬²»ÔÙÓëÆäËû·ÓÉÆ÷ÏàÁ¬£¬ËùÒÔÒ²¿ÉÒÔΪËü¸³ÓèÒ»ÌõĬÈÏ·ÓÉÒÔ´úÌæÒÔÉϵĶþÌõ¾²Ì¬Â·ÓÉ£¬
ip route 0.0.0.0 0.0.0.0 192.1.0.65
¼´Ö»ÒªÃ»ÓÐÔÚ·ÓɱíÀïÕÒµ½È¥Ìض¨Ä¿µÄµØÖ·µÄ·¾¶,ÔòÊý¾Ý¾ù±»Â·Óɵ½µØÖ·Îª192.1.0.65µÄÏàÁÚ·ÓÉÆ÷¡£
·µ»ØÄ¿Â¼
¡¡
Ò»¡¢HDLC
¡¡
HDLCÊÇCISCO·ÓÉÆ÷ʹÓõÄȱʡÐÒ飬һ̨зÓÉÆ÷ÔÚδָ¶¨·â×°ÐÒéʱĬÈÏʹÓÃHDLC·â×°¡£
1. ÓйØÃüÁî
¶Ë¿ÚÉèÖÃ
ÈÎÎñ ÃüÁî
ÉèÖÃHDLC·â×° encapsulation hdlc
ÉèÖÃDCE¶ËÏß·ËÙ¶È clockrate speed
¸´Î»Ò»¸öÓ²¼þ½Ó¿Ú clear interface serial unit
ÏÔʾ½Ó¿Ú״̬ show interfaces serial [unit] 1
×¢:1.ÒÔϸø³öÒ»¸öÏÔʾCiscoͬ²½´®¿Ú״̬µÄÀý×Ó.
Router#show interface serial 0
Serial 0 is up, line protocol is up
Hardware is MCI Serial
Internet address is 150.136.190.203, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:07, output 0:00:00, output hang never
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 0 bits/sec, 0 packets/sec
Five minute output rate 0 bits/sec, 0 packets/sec
16263 packets input, 1347238 bytes, 0 no buffer
Received 13983 broadcasts, 0 runts, 0 giants
2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 2 abort
22146 packets output, 2383680 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets, 0 restarts
1 carrier transitions
2. ¾ÙÀý
¡¡
¡¡
ÉèÖÃÈçÏ£º
Router1:
interface Serial0
ip address 192.200.10.1 255.255.255.0
clockrate 1000000
Router2:
interface Serial0
ip address 192.200.10.2 255.255.255.0
!
3. ¾ÙÀýʹÓÃE1Ïß·ʵÏÖ¶à¸ö64KרÏßÁ¬½Ó.
Ïà¹ØÃüÁî:
ÈÎÎñ ÃüÁî
½øÈëcontrollerÅäÖÃģʽ controller {t1 | e1} number
Ñ¡ÔñÖ¡ÀàÐÍ framing {crc4 | no-crc4}
Ñ¡Ôñline-codeÀàÐÍ linecode {ami | b8zs | hdb3}
½¨Á¢Â߼ͨµÀ×éÓëʱ϶µÄÓ³Éä channel-group number timeslots range1
ÏÔʾcontrollers½Ó¿Ú״̬ show controllers e1 [slot/port]2
×¢: 1. µ±Á´Â·ÎªT1ʱ,channel-group±àºÅΪ0-23, Timeslot·¶Î§1-24; µ±Á´Â·ÎªE1ʱ, channel-group±àºÅΪ0-30, Timeslot·¶Î§1-31.
2.ʹÓÃshow controllers e1¹Û²ìcontroller״̬,ÒÔÏÂΪ֡ÀàÐÍΪcrc4ʱcontrollersÕý³£µÄ״̬.
Router# show controllers e1
e1 0/0 is up.
Applique type is Channelized E1 - unbalanced
Framing is CRC4, Line Code is HDB3 No alarms detected.
Data in current interval (725 seconds elapsed):
0 Line Code Violations, 0 Path Code Violations
0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
Total Data (last 24 hours) 0 Line Code Violations, 0 Path Code Violations,
0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
ÒÔÏÂÀý×ÓΪE1Á¬½Ó3Ìõ64KרÏß, Ö¡ÀàÐÍΪNO-CRC4,·ÇƽºâÁ´Â·,·ÓÉÆ÷¾ßÌåÉèÖÃÈçÏÂ:
shanxi#wri t
Building configuration...
Current configuration:
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname shanxi
!
enable secret 5 $1$XN08$Ttr8nfLoP9.2RgZhcBzkk/
enable password shanxi
!
!
ip subnet-zero
!
controller E1 0
framing NO-CRC4
channel-group 0 timeslots 1
channel-group 1 timeslots 2
channel-group 2 timeslots 3
!
interface Ethernet0
ip address 133.118.40.1 255.255.0.0
media-type 10BaseT
!
interface Ethernet1
no ip address
shutdown
!
interface Serial0:0
ip address 202.119.96.1 255.255.255.252
no ip mroute-cache
!
interface Serial0:1
ip address 202.119.96.5 255.255.255.252
no ip mroute-cache
!
interface Serial0:2
ip address 202.119.96.9 255.255.255.252
no ip mroute-cache
!
no ip classless
ip route 133.210.40.0 255.255.255.0 Serial0:0
ip route 133.210.41.0 255.255.255.0 Serial0:1
ip route 133.210.42.0 255.255.255.0 Serial0:2
!
line con 0
line aux 0
line vty 0 4
password shanxi
login
!
end
¹ãÓòÍøÉèÖãº
¡¡
Ò»¡¢HDLC
¡¡
HDLCÊÇCISCO·ÓÉÆ÷ʹÓõÄȱʡÐÒ飬һ̨зÓÉÆ÷ÔÚδָ¶¨·â×°ÐÒéʱĬÈÏʹÓÃHDLC·â×°¡£
1. ÓйØÃüÁî
¶Ë¿ÚÉèÖÃ
ÈÎÎñ ÃüÁî
ÉèÖÃHDLC·â×° encapsulation hdlc
ÉèÖÃDCE¶ËÏß·ËÙ¶È clockrate speed
¸´Î»Ò»¸öÓ²¼þ½Ó¿Ú clear interface serial unit
ÏÔʾ½Ó¿Ú״̬ show interfaces serial [unit] 1
×¢:1.ÒÔϸø³öÒ»¸öÏÔʾCiscoͬ²½´®¿Ú״̬µÄÀý×Ó.
Router#show interface serial 0
Serial 0 is up, line protocol is up
Hardware is MCI Serial
Internet address is 150.136.190.203, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:07, output 0:00:00, output hang never
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 0 bits/sec, 0 packets/sec
Five minute output rate 0 bits/sec, 0 packets/sec
16263 packets input, 1347238 bytes, 0 no buffer
Received 13983 broadcasts, 0 runts, 0 giants
2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 2 abort
22146 packets output, 2383680 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets, 0 restarts
1 carrier transitions
2. ¾ÙÀý
¡¡
¡¡
ÉèÖÃÈçÏ£º
Router1:
interface Serial0
ip address 192.200.10.1 255.255.255.0
clockrate 1000000
Router2:
interface Serial0
ip address 192.200.10.2 255.255.255.0
!
3. ¾ÙÀýʹÓÃE1Ïß·ʵÏÖ¶à¸ö64KרÏßÁ¬½Ó.
Ïà¹ØÃüÁî:
ÈÎÎñ ÃüÁî
½øÈëcontrollerÅäÖÃģʽ controller {t1 | e1} number
Ñ¡ÔñÖ¡ÀàÐÍ framing {crc4 | no-crc4}
Ñ¡Ôñline-codeÀàÐÍ linecode {ami | b8zs | hdb3}
½¨Á¢Â߼ͨµÀ×éÓëʱ϶µÄÓ³Éä channel-group number timeslots range1
ÏÔʾcontrollers½Ó¿Ú״̬ show controllers e1 [slot/port]2
×¢: 1. µ±Á´Â·ÎªT1ʱ,channel-group±àºÅΪ0-23, Timeslot·¶Î§1-24; µ±Á´Â·ÎªE1ʱ, channel-group±àºÅΪ0-30, Timeslot·¶Î§1-31.
2.ʹÓÃshow controllers e1¹Û²ìcontroller״̬,ÒÔÏÂΪ֡ÀàÐÍΪcrc4ʱcontrollersÕý³£µÄ״̬.
Router# show controllers e1
e1 0/0 is up.
Applique type is Channelized E1 - unbalanced
Framing is CRC4, Line Code is HDB3 No alarms detected.
Data in current interval (725 seconds elapsed):
0 Line Code Violations, 0 Path Code Violations
0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
Total Data (last 24 hours) 0 Line Code Violations, 0 Path Code Violations,
0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
ÒÔÏÂÀý×ÓΪE1Á¬½Ó3Ìõ64KרÏß, Ö¡ÀàÐÍΪNO-CRC4,·ÇƽºâÁ´Â·,·ÓÉÆ÷¾ßÌåÉèÖÃÈçÏÂ:
shanxi#wri t
Building configuration...
Current configuration:
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname shanxi
!
enable secret 5 $1$XN08$Ttr8nfLoP9.2RgZhcBzkk/
enable password shanxi
!
!
ip subnet-zero
!
controller E1 0
framing NO-CRC4
channel-group 0 timeslots 1
channel-group 1 timeslots 2
channel-group 2 timeslots 3
!
interface Ethernet0
ip address 133.118.40.1 255.255.0.0
media-type 10BaseT
!
interface Ethernet1
no ip address
shutdown
!
interface Serial0:0
ip address 202.119.96.1 255.255.255.252
no ip mroute-cache
!
interface Serial0:1
ip address 202.119.96.5 255.255.255.252
no ip mroute-cache
!
interface Serial0:2
ip address 202.119.96.9 255.255.255.252
no ip mroute-cache
!
no ip classless
ip route 133.210.40.0 255.255.255.0 Serial0:0
ip route 133.210.41.0 255.255.255.0 Serial0:1
ip route 133.210.42.0 255.255.255.0 Serial0:2
!
line con 0
line aux 0
line vty 0 4
password shanxi
login
!
end
·µ»ØÄ¿Â¼
¡¡
¶þ¡¢PPP
¡¡
PPP(Point-to-Point Protocol)ÊÇSLIP(Serial Line IP protocol)µÄ¼Ì³ÐÕߣ¬ËüÌṩÁË¿ç¹ýͬ²½ºÍÒì²½µç·ʵÏÖ·ÓÉÆ÷µ½Â·ÓÉÆ÷(router-to-router)ºÍÖ÷»úµ½ÍøÂç(host-to-network)µÄÁ¬½Ó¡£
CHAP(Challenge Handshake Authentication Protocol)ºÍPAP(Password Authentication Protocol) (PAP)ͨ³£±»ÓÃÓÚÔÚPPP·â×°µÄ´®ÐÐÏß·ÉÏÌṩ°²È«ÐÔÈÏÖ¤¡£Ê¹ÓÃCHAPºÍPAPÈÏÖ¤,ÿ¸ö·ÓÉÆ÷ͨ¹ýÃû×ÖÀ´Ê¶±ð£¬¿ÉÒÔ·Àֹδ¾ÊÚȨµÄ·ÃÎÊ¡£
CHAPºÍPAPÔÚRFC 1334ÉÏÓÐÏêϸµÄ˵Ã÷¡£
1. ÓйØÃüÁî
¶Ë¿ÚÉèÖÃ
ÈÎÎñ ÃüÁî
ÉèÖÃPPP·â×° encapsulation ppp1
ÉèÖÃÈÏÖ¤·½·¨ ppp authentication {chap | chap pap | pap chap | pap} [if-needed] [list-name | default] [callin]
Ö¸¶¨¿ÚÁî username name password secret
ÉèÖÃDCE¶ËÏß·ËÙ¶È clockrate speed
×¢£º1¡¢ÒªÊ¹ÓÃCHAP/PAP±ØÐëʹÓÃPPP·â×°¡£ÔÚÓë·ÇCisco·ÓÉÆ÷Á¬½Óʱ£¬Ò»°ã²ÉÓÃPPP·â×°£¬ÆäËü³§¼Ò·ÓÉÆ÷Ò»°ã²»Ö§³ÖCiscoµÄHDLC·â×°ÐÒé¡£
2. ¾ÙÀý
·ÓÉÆ÷Router1ºÍRouter2µÄS0¿Ú¾ù·â×°PPPÐÒ飬²ÉÓÃCHAP×öÈÏÖ¤£¬ÔÚRouter1ÖÐÓ¦½¨Á¢Ò»¸öÓû§£¬ÒÔ¶Ô¶Ë·ÓÉÆ÷Ö÷»úÃû×÷ΪÓû§Ãû£¬¼´Óû§ÃûӦΪrouter2¡£Í¬Ê±ÔÚRouter2ÖÐÓ¦½¨Á¢Ò»¸öÓû§£¬ÒÔ¶Ô¶Ë·ÓÉÆ÷Ö÷»úÃû×÷ΪÓû§Ãû£¬¼´Óû§ÃûӦΪrouter1¡£Ëù½¨µÄÕâÁ½Óû§µÄpassword±ØÐëÏàͬ¡£
ÉèÖÃÈçÏ£º
Router1:
hostname router1
username router2 password xxx
interface Serial0
ip address 192.200.10.1 255.255.255.0
clockrate 1000000
ppp authentication chap
!
Router2:
hostname router2
username router1 password xxx
interface Serial0
ip address 192.200.10.2 255.255.255.0
ppp authentication chap
!
¡¡
·µ»ØÄ¿Â¼
¡¡
Èý¡¢x.25
1. X25¼¼Êõ
X.25¹æ·¶¶ÔÓ¦OSIÈý²ã£¬X.25µÄµÚÈý²ãÃèÊöÁË·Ö×éµÄ¸ñʽ¼°·Ö×é½»»»µÄ¹ý³Ì¡£X.25µÄµÚ¶þ²ãÓÉLAPB£¨Link Access Procedure, Balanced£©ÊµÏÖ£¬Ëü¶¨ÒåÁËÓÃÓÚDTE/DCEÁ¬½ÓµÄÖ¡¸ñʽ¡£X.25µÄµÚÒ»²ã¶¨ÒåÁËµçÆøºÍÎïÀí¶Ë¿ÚÌØÐÔ¡£
X.25ÍøÂçÉ豸·ÖΪÊý¾ÝÖÕ¶ËÉ豸£¨DTE£©¡¢Êý¾Ýµç·ÖÕ¶ËÉ豸£¨DCE£©¼°·Ö×é½»»»É豸£¨PSE£©¡£DTEÊÇX.25µÄÄ©¶Ëϵͳ£¬ÈçÖÕ¶Ë¡¢¼ÆËã»ú»òÍøÂçÖ÷»ú£¬Ò»°ãλÓÚÓû§¶Ë£¬Cisco·ÓÉÆ÷¾ÍÊÇDTEÉ豸¡£DCEÉ豸ÊÇרÓÃͨÐÅÉ豸£¬Èçµ÷ÖÆ½âµ÷Æ÷ºÍ·Ö×é½»»»»ú¡£PSEÊǹ«¹²ÍøÂçµÄÖ÷¸É½»»»»ú¡£
X.25¶¨ÒåÁËÊý¾ÝͨѶµÄµç»°ÍøÂ磬ÿ¸ö·ÖÅ䏸Óû§µÄx.25 ¶Ë¿Ú¶¼¾ßÓÐÒ»¸öx.121µØÖ·£¬µ±Óû§ÉêÇëµ½µÄÊÇSVC£¨½»»»Ðéµç·£©Ê±£¬x.25Ò»¶ËµÄÓû§ÔÚ·ÃÎÊÁíÒ»¶ËµÄÓû§Ê±£¬Ê×ÏȽ«ºô½Ð¶Ô·½x.121µØÖ·£¬È»ºó½ÓÊÕµ½ºô½ÐµÄÒ»¶Ë¿ÉÒÔ½ÓÊÜ»ò¾Ü¾ø£¬Èç¹û½ÓÊÜÇëÇó£¬ÓÚÊÇÁ¬½Ó½¨Á¢ÊµÏÖÊý¾Ý´«Ê䣬µ±Ã»ÓÐÊý¾Ý´«Êäʱ¹Ò¶ÏÁ¬½Ó£¬Õû¸öºô½Ð¹ý³Ì¾ÍÀàËÆÎÒÃDz¦´òÆÕͨµç»°Ò»Ñù£¬Æä²»Í¬µÄÊÇx.25¿ÉÒÔʵÏÖÒ»µã¶Ô¶àµãµÄÁ¬½Ó¡£ÆäÖÐx.121µØÖ·¡¢htc¾ù±ØÐëÓëx.25·þÎñÌṩÉÌ·ÖÅäµÄ²ÎÊýÏàͬ¡£X.25 PVC£¨ÓÀ¾ÃÐéµç·£©£¬Ã»Óкô½ÐµÄ¹ý³Ì£¬ÀàËÆDDNרÏß¡£
2. ÓйØÃüÁî:
ÈÎÎñ ÃüÁî
ÉèÖÃX.25·â×° encapsulation x25 [dce]
ÉèÖÃX.121µØÖ· x25 address x.121-address
ÉèÖÃÔ¶·½Õ¾µãµÄµØÖ·Ó³Éä x25 map protocol address [protocol2 address2[...[protocol9 address9]]] x121-address [option]
ÉèÖÃ×î´óµÄË«ÏòÐéµç·Êý x25 htc citcuit-number1
ÉèÖÃÒ»´ÎÁ¬½Ó¿Éͬʱ½¨Á¢µÄÐéµç·Êý x25 nvc count2
ÉèÖÃx25ÔÚÇå³ý¿ÕÏÐÐéµç·ǰµÄµÈ´ýÖÜÆÚ x25 idle minutes
ÖØÐÂÆô¶¯x25£¬»òÇåÒ»¸ösvc£¬Æô¶¯Ò»¸öpvcÏà¹Ø²ÎÊý clear x25 {serial number | cmns-interface mac-address} [vc-number] 3
Çåx25Ðéµç· clear x25-vc
ÏÔʾ½Ó¿Ú¼°x25Ïà¹ØÐÅÏ¢ show interfaces serial show x25 interface show x25 map show x25 vc
×¢£º1¡¢Ðéµç·ºÅ´Ó1µ½4095£¬Cisco·ÓÉÆ÷ĬÈÏΪ1024£¬¹úÄÚÒ»°ã·ÖÅäΪ16¡£
2¡¢Ðéµç·¼ÆÊý´Ó1µ½8£¬È±Ê¡Îª1¡£
3¡¢ÔڸıäÁËx.25¸÷²ãµÄÏà¹Ø²ÎÊýºó£¬Ó¦ÖØÐÂÆô¶¯x25(ʹÓÃclear x25 {serial number | cmns-interface mac-address} [vc-number]»òclear x25-vcÃüÁî)£¬·ñÔòÐÂÉèÖõIJÎÊý¿ÉÄܲ»ÄÜÉúЧ¡£Í¬Ê±Ó¦¶ÔÕÕ·þÎñÌṩÉ̶ÔÓÚx.25½»»»»ú¶Ë¿ÚµÄÉèÖÃÀ´ÅäÖ÷ÓÉÆ÷µÄÏà¹Ø²ÎÊý£¬Èô³öÏÖ²ÎÊý²»Æ¥ÅäÔò¿ÉÄܻᵼÖÂÁ¬½Óʧ°Ü»òÆäËüÒâÍâÇé¿ö¡£
3. ʵÀý£º
3.1. ÔÚÒÔÏÂʵÀýÖÐÿ¶þ¸ö·ÓÉÆ÷¼ä¾ùͨ¹ýsvcʵÏÖÁ¬½Ó¡£
·ÓÉÆ÷ÉèÖÃÈçÏ£º
Router1:
interface Serial0
encapsulation x25
ip address 192.200.10.1 255.255.255.0
x25 address 110101
x25 htc 16
x25 nvc 2
x25 map ip 192.200.10.2 110102 broadcast
x25 map ip 192.200.10.3 110103 broadcast
!
Router2:
interface Serial0
encapsulation x25
ip address 192.200.10.2 255.255.255.0
x25 address 110102
x25 htc 16
x25 nvc 2
x25 map ip 192.200.10.1 110101 broadcast
x25 map ip 192.200.10.3 110103 broadcast
!
Router:
interface Serial0
encapsulation x25
ip address 192.200.10.3 255.255.255.0
x25 address 110103
x25 htc 16
x25 nvc 2
x25 map ip 192.200.10.1 110101 broadcast
x25 map ip 192.200.10.2 110102 broadcast
!
Ïà¹Øµ÷ÊÔÃüÁ
clear x25-vc
show interfaces serial
show x25 map
show x25 route
show x25 vc
3.2. ÔÚÒÔÏÂʵÀýÖзÓÉÆ÷router1ºÍrouter2¾ùͨ¹ýsvcÓërouterÁ¬½Ó£¬µ«router1ºÍrouter2²»Í¨¹ýsvcÖ±½ÓÁ¬½Ó£¬´ËÈý¸ö·ÓÉÆ÷µÄ´®¿ÚÔËÐÐRIP·ÓÉÐÒ飬ʹÓÃÁË×ӽӿڵĸÅÄî¡£ÓÉÓÚʹÓÃ×Ó½Ó¿Ú£¬router1ºÍrouter2¾ùѧϰµ½ÁË·ÃÎʶԷ½¾ÖÓòÍøµÄ·¾¶£¬Èô²»Ê¹ÓÃ×Ó½Ó¿Ú£¬router1ºÍrouter2½«Ñ§²»µ½µ½¶Ô·½¾ÖÓòÍøµÄ·ÓÉ¡£
×Ó½Ó¿Ú£¨Subinterface£©ÊÇÒ»¸öÎïÀí½Ó¿ÚÉϵĶà¸öÐé½Ó¿Ú£¬¿ÉÒÔÓÃÓÚÔÚͬһ¸öÎïÀí½Ó¿ÚÉÏÁ¬½Ó¶à¸öÍø¡£ÎÒÃÇÖªµÀΪÁ˱ÜÃâ·ÓÉÑ»·£¬Â·ÓÉÆ÷Ö§³Ösplit horizon·¨Ôò£¬ËüÖ»ÔÊÐí·Óɸüб»·ÖÅ䵽·ÓÉÆ÷µÄÆäËü½Ó¿Ú£¬¶ø²»»áÔÙ·ÖÅä·Óɸüлص½´Ë·Óɱ»½ÓÊյĽӿڡ£
ÎÞÂÛÈçºÎ£¬ÔÚ¹ãÓòÍø»·¾³Ê¹ÓûùÓÚÁ¬½ÓµÄ½Ó¿Ú(Ïó X.25ºÍFrame Relay)£¬Í¬Ò»½Ó¿Úͨ¹ýÐéµç·(vc)Á¬½Ó¶ą̀Զ¶Ë·ÓÉÆ÷ʱ£¬´Óͬһ½Ó¿ÚÀ´µÄ·ÓɸüÐÂÐÅÏ¢²»¿ÉÒÔÔÙ±»·¢»Øµ½ÏàͬµÄ½Ó¿Ú£¬³ý·ÇÇ¿ÖÆÊ¹Ó÷ֿªµÄÎïÀí½Ó¿ÚÁ¬½Ó²»Í¬µÄ·ÓÉÆ÷¡£CiscoÌṩ×Ó½Ó¿Ú£¨subinterface£©×÷Ϊ·Ö¿ªµÄ½Ó¿Ú¶Ô´ý¡£Äã¿ÉÒÔ½«Â·ÓÉÆ÷Âß¼µØÁ¬½Óµ½ÏàͬÎïÀí½Ó¿ÚµÄ²»Í¬×Ó½Ó¿Ú, ÕâÑùÀ´×Ô²»Í¬×ӽӿڵķÓɸüоͿÉÒÔ±»·ÖÅäµ½ÆäËû×Ó½Ó¿Ú£¬Í¬Ê±ÓÖÂú×ãsplit horizon·¨Ôò¡£
Router1:
interface Serial0
encapsulation x25
ip address 192.200.10.1 255.255.255.0
x25 address 110101
x25 htc 16
x25 nvc 2
x25 map ip 192.200.10.3 110103 broadcast
!
router rip
network 192.200.10.0
!
Router2:
interface Serial0
encapsulation x25
ip address 192.200.11.2 255.255.255.0
x25 address 110102
x25 htc 16
x25 nvc 2
x25 map ip 192.200.11.3 110103 broadcast
!
router rip
network 192.200.11.0
!
Router:
interface Serial0
encapsulation x25
x25 address 110103
x25 htc 16
x25 nvc 2
!
interface Serial0.1 point-to-point
ip address 192.200.10.3 255.255.255.0
x25 map ip 192.200.10.1 110101 broadcast
!
interface Serial0.2 point-to-point
ip address 192.200.11.3 255.255.255.0
x25 map ip 192.200.11.2 110102 broadcast
!
router rip
network 192.200.10.0
network 192.200.11.0
!
·µ»ØÄ¿Â¼
¡¡
Ö¡ÖмÌÊÇÒ»ÖÖ¸ßÐÔÄܵÄWANÐÒ飬ËüÔËÐÐÔÚOSI²Î¿¼Ä£Ð͵ÄÎïÀí²ãºÍÊý¾ÝÁ´Â·²ã¡£ËüÊÇÒ»ÖÖÊý¾Ý°ü½»»»¼¼Êõ£¬ÊÇX.25µÄ¼ò»¯°æ±¾¡£ËüÊ¡ÂÔÁËX.25µÄһЩǿ½¡¹¦ÄÜ£¬ÈçÌṩ´°¿Ú¼¼ÊõºÍÊý¾ÝÖØ·¢¼¼Êõ£¬¶øÊÇÒÀ¿¿¸ß²ãÐÒéÌṩ¾À´í¹¦ÄÜ£¬ÕâÊÇÒòΪ֡Öм̹¤×÷ÔÚ¸üºÃµÄWANÉ豸ÉÏ£¬ÕâЩÉ豸½ÏÖ®X.25µÄWANÉ豸¾ßÓиü¿É¿¿µÄÁ¬½Ó·þÎñºÍ¸ü¸ßµÄ¿É¿¿ÐÔ£¬ËüÑϸñµØ¶ÔÓ¦ÓÚOSI²Î¿¼Ä£Ð͵Ä×îµÍ¶þ²ã£¬¶øX.25»¹ÌṩµÚÈý²ãµÄ·þÎñ£¬ËùÒÔ£¬Ö¡Öм̱ÈX.25¾ßÓиü¸ßµÄÐÔÄܺ͸üÓÐЧµÄ´«ÊäЧÂÊ¡£
Ö¡Öм̹ãÓòÍøµÄÉ豸·ÖΪÊý¾ÝÖÕ¶ËÉ豸£¨DTE£©ºÍÊý¾Ýµç·ÖÕ¶ËÉ豸£¨DCE£©£¬Cisco·ÓÉÆ÷×÷Ϊ DTEÉ豸¡£
Ö¡Öм̼¼ÊõÌá¹©ÃæÏòÁ¬½ÓµÄÊý¾ÝÁ´Â·²ãµÄͨÐÅ£¬ÔÚÿ¶ÔÉ豸֮¼ä¶¼´æÔÚÒ»Ìõ¶¨ÒåºÃµÄͨÐÅÁ´Â·£¬ÇÒ¸ÃÁ´Â·ÓÐÒ»¸öÁ´Â·Ê¶±ðÂë¡£ÕâÖÖ·þÎñͨ¹ýÖ¡ÖмÌÐéµç·ʵÏÖ£¬Ã¿¸öÖ¡ÖмÌÐéµç·¶¼ÒÔÊý¾ÝÁ´Â·Ê¶±ðÂ루DLCI£©±êʶ×Ô¼º¡£DLCIµÄÖµÒ»°ãÓÉÖ¡Öм̷þÎñÌṩÉÌÖ¸¶¨¡£Ö¡Öм̼´Ö§³ÖPVCÒ²Ö§³ÖSVC¡£
Ö¡Öм̱¾µØ¹ÜÀí½Ó¿Ú£¨LMI£©ÊǶԻù±¾µÄÖ¡Öм̱ê×¼µÄÀ©Õ¹¡£ËüÊÇ·ÓÉÆ÷ºÍÖ¡Öм̽»»»»úÖ®¼äÐÅÁî±ê×¼£¬Ìṩ֡Öм̹ÜÀí»úÖÆ¡£ËüÌṩÁËÐí¶à¹ÜÀí¸´ÔÓ»¥ÁªÍøÂçµÄÌØÐÔ£¬ÆäÖаüÀ¨È«¾ÖѰַ¡¢Ðéµç·״̬ÏûÏ¢ºÍ¶àÄ¿·¢Ë͵ȹ¦ÄÜ¡£
2. ÓйØÃüÁî:
¶Ë¿ÚÉèÖÃ
ÈÎÎñ ÃüÁî
ÉèÖÃFrame Relay·â×° encapsulation frame-relay[ietf] 1
ÉèÖÃFrame Relay LMIÀàÐÍ frame-relay lmi-type {ansi | cisco | q933a}2
ÉèÖÃ×Ó½Ó¿Ú interface interface-type interface-number.subinterface-number [multipoint|point-to-point]
Ó³ÉäÐÒ鵨ַÓëDLCI frame-relay map protocol protocol-address dlci [broadcast]3
ÉèÖÃFR DLCI±àºÅ frame-relay interface-dlci dlci [broadcast]
×¢£º1.ÈôʹCisco·ÓÉÆ÷ÓëÆäËü³§¼Ò·ÓÉÉ豸ÏàÁ¬£¬ÔòʹÓÃInternet¹¤³ÌÈÎÎñ×飨IETF£©¹æ¶¨µÄÖ¡Öм̷â×°¸ñʽ¡£
2.´ÓCisco IOS°æ±¾11.2¿ªÊ¼£¬Èí¼þÖ§³Ö±¾µØ¹ÜÀí½Ó¿Ú£¨LMI£©¡°×Ô¶¯¸Ð¾õ¡±£¬ ¡°×Ô¶¯¸Ð¾õ¡±Ê¹½Ó¿ÚÄÜÈ·¶¨½»»»»úÖ§³ÖµÄLMIÀàÐÍ£¬Óû§¿ÉÒÔ²»Ã÷È·ÅäÖÃLMI½Ó¿ÚÀàÐÍ¡£
3.broadcastÑ¡ÏîÔÊÐíÔÚÖ¡ÖмÌÍøÂçÉÏ´«Êä·Óɹ㲥ÐÅÏ¢¡£
3. Ö¡ÖмÌpoint to pointÅäÖÃʵÀý£º
Router1:
interface serial 0
encapsulation frame-relay
!
interface serial 0.1 point-to-point
ip address 172.16.1.1 255.255.255.0
frame-reply interface-dlci 105
!
interface serial 0.2 point-to-point
ip address 172.16.2.1 255.255.255.0
frame-reply interface-dlci 102
!
interface serial 0.3 point-to-point
ip address 172.16.4.1 255.255.255.0
frame-reply interface-dlci 104
!
Router2:
interface serial 0
encapsulation frame-relay
!
interface serial 0.1 point-to-point
ip address 172.16.2.2 255.255.255.0
frame-reply interface-dlci 201
!
interface serial 0.2 point-to-point
ip address 172.16.3.1 255.255.255.0
frame-reply interface-dlci 203
!
Ïà¹Øµ÷ÊÔÃüÁ
show frame-relay lmi
show frame-relay map
show frame-relay pvc
show frame-relay route
show interfaces serial
go top
4. Ö¡ÖÐ¼Ì Multipoint ÅäÖÃʵÀý:
Router1:
interface serial 0
encapsulation frame-reply
!
interface serial 0.1 multipoint
ip address 172.16.1.2 255.255.255.0
frame-reply map ip 172.16.1.1 201 broadcast
frame-reply map ip 172.16.1.3 301 broadcast
frame-reply map ip 172.16.1.4 401 broadcast
!
Router2:
interface serial 0
encapsulation frame-reply
!
interface serial 0.1 multipoint
ip address 172.16.1.1 255.255.255.0
frame-reply map ip 172.16.1.2 102 broadcast
frame-reply map ip 172.16.1.3 102 broadcast
frame-reply map ip 172.16.1.4 102 broadcast
!
Îå¡¢ISDN
¡¡
1. ×ÛºÏÊý×ÖÒµÎñÍø£¨ISDN£©
×ÛºÏÊý×ÖÒµÎñÍø£¨ISDN£©ÓÉÊý×ֵ绰ºÍÊý¾Ý´«Êä·þÎñÁ½²¿·Ö×é³É£¬Ò»°ãÓɵ绰¾ÖÌṩÕâÖÖ·þÎñ¡£ISDNµÄ»ù±¾ËÙÂʽӿڣ¨BRI£©·þÎñÌṩ2¸öBÐŵÀºÍ1¸öDÐŵÀ£¨2B+D£©¡£BRIµÄBÐŵÀËÙÂÊΪ64Kbps,ÓÃÓÚ´«ÊäÓû§Êý¾Ý¡£DÐŵÀµÄËÙÂÊΪ16Kbps£¬Ö÷Òª´«Êä¿ØÖÆÐźš£ÔÚ±±ÃÀºÍÈÕ±¾£¬ISDNµÄÖ÷ËÙÂʽӿڣ¨PRI£©Ìṩ23¸öBÐŵÀºÍ1¸öDÐŵÀ£¬×ÜËÙÂʿɴï1.544Mbps£¬ÆäÖÐDÐŵÀËÙÂÊΪ64Kbps¡£¶øÔÚÅ·ÖÞ¡¢°Ä´óÀûÑǵȹú¼Ò£¬ISDNµÄPRIÌṩ30¸öBÐŵÀºÍ1¸ö64Kbps DÐŵÀ£¬×ÜËÙÂʿɴï2.048Mbps¡£ÎÒ¹úµç»°¾ÖËùÌṩISDN PRIΪ30B+D¡£
2. »ù±¾ÃüÁî
ÈÎÎñ ÃüÁî
ÉèÖÃISDN½»»»ÀàÐÍ isdn switch-type switch-type1
½Ó¿ÚÉèÖÃ interface bri 0
ÉèÖÃPPP·â×° encapsulation ppp
ÉèÖÃÐÒ鵨ַÓëµç»°ºÅÂëµÄÓ³Éä dialer map protocol next-hop-address [name hostname] [broadcast] [dial-string]
Æô¶¯PPP¶àÁ¬½Ó ppp multilink
ÉèÖÃÆô¶¯ÁíÒ»¸öBͨµÀµÄãÐÖµ dialer load-threshold load
ÏÔʾISDNÓйØÐÅÏ¢ show isdn {active | history | memory | services | status [dsl | interface-type number] | timers}
×¢£º1.½»»»»úÀàÐÍÈçϱí,¹úÄÚ½»»»»úÒ»°ãΪbasic-net3¡£
°´ÇøÓò·Ö¹Ø¼ü×Ö ½»»»»úÀàÐÍ
Australia
basic-ts013 Australian TS013 switches
Europe
basic-1tr6 German 1TR6 ISDN switches
basic-nwnet3 Norway NET3 switches (phase 1)
basic-net3 NET3 ISDN switches (UK, Denmark, and other nations); covers the Euro-ISDN E-DSS1 signalling system
primary-net5 NET5 switches (UK and Europe)
vn2 French VN2 ISDN switches
vn3 French VN3 ISDN switches
Japan
ntt Japanese NTT ISDN switches
primary-ntt Japanese ISDN PRI switches
North America
basic-5ess AT&T basic rate switches
basic-dms100 NT DMS-100 basic rate switches
basic-ni1 National ISDN-1 switches
primary-4ess AT&T 4ESS switch type for the U.S. (ISDN PRI only)
primary-5ess AT&T 5ESS switch type for the U.S. (ISDN PRI only)
primary-dms100 NT DMS-100 switch type for the U.S. (ISDN PRI only)
New Zealand
basic-nznet3 New Zealand Net3 switches
3. ISDNʵÏÖDDR£¨dial-on-demand routing£©ÊµÀý:
ÉèÖÃÈçÏ£º
Router1:
hostname router1
user router2 password cisco
!
isdn switch-type basic-net3
!
interface bri 0
ip address 192.200.10.1 255.255.255.0
encapsulation ppp
dialer map ip 192.200.10.2 name router2 572
dialer load-threshold 80
ppp multilink
dialer-group 1
ppp authentication chap
£¡
dialer-list 1 protocol ip permit
!
Router2:
hostname router2
user router1 password cisco
!
isdn switch-type basic-net3
!
interface bri 0
ip address 192.200.10.2 255.255.255.0
encapsulation ppp
dialer map ip 192.200.10.1 name router1 571
dialer load-threshold 80
ppp multilink
dialer-group 1
ppp authentication chap
£¡
dialer-list 1 protocol ip permit
!
Cisco·ÓÉÆ÷ͬʱ֧³Ö»Ø²¦¹¦ÄÜ£¬ÎÒÃǽ«Â·ÓÉÆ÷Router1×÷ΪCallback Server,Router2×÷ΪCallback Client¡£
Óë»Ø²¦Ïà¹ØÃüÁî:
ÈÎÎñ ÃüÁî
Ó³ÉäÐÒ鵨ַºÍµç»°ºÅÂ룬²¢ÔÚ½Ó¿ÚÉÏʹÓÃÔÚÈ«¾Öģʽ϶¨ÒåµÄPPP»Ø²¦µÄÓ³ÉäÀà±ð¡£ dialer map protocol address name hostname class classname dial-string
ÉèÖýӿÚÖ§³ÖPPP»Ø²¦ ppp callback accept
ÔÚÈ«¾ÖģʽÏÂΪPPP»Ø²¦ÉèÖÃÓ³ÉäÀà±ð map-class dialer classname
ͨ¹ý²éÕÒ×¢²áÔÚdialer mapÀïµÄÖ÷»úÃûÀ´¾ö¶¨»Ø²¦. dialer callback-server [username]
ÉèÖýӿÚÒªÇóPPP»Ø²¦ ppp callback request
ÉèÖÃÈçÏ£º
Router1:
hostname router1
user router2 password cisco
!
isdn switch-type basic-net3
!
interface bri 0
ip address 192.200.10.1 255.255.255.0
encapsulation ppp
dialer map ip 192.200.10.2 name router2 class s3 572
dialer load-threshold 80
ppp callback accept
ppp multilink
dialer-group 1
ppp authentication chap
£¡
map-class dialer s3
dialer callback-server username
dialer-list 1 protocol ip permit
!
Router2:
hostname router2
user router1 password cisco
!
isdn switch-type basic-net3
!
interface bri 0
ip address 192.200.10.2 255.255.255.0
encapsulation ppp
dialer map ip 192.200.10.1 name router1 571
dialer load-threshold 80
ppp callback request
ppp multilink
dialer-group 1
ppp authentication chap
£¡
dialer-list 1 protocol ip permit
!
Ïà¹Øµ÷ÊÔÃüÁ
debug dialer
debug isdn event
debug isdn q921
debug isdn q931
debug ppp authentication
debug ppp error
debug ppp negotiation
debug ppp packet
show dialer
show isdn status
¾ÙÀý:Ö´ÐÐdebug dialerÃüÁî¹Û²ìrouter2ºô½Ðrouter1,router1»Ø²¦router2µÄ¹ý³Ì.
router1#debug dialer
router2#ping 192.200.10.1
router1#
00:03:50: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up
00:03:50: BRI0:1PP callback Callback server starting to router2 572
00:03:50: BRI0:1: disconnecting call
00:03:50: %LINK-3-UPDOWN: Interface BRI0:1, changed state to down
00:03:50: BRI0:1: disconnecting call
00:03:50: BRI0:1: disconnecting call
00:03:51: %LINK-3-UPDOWN: Interface BRI0:2, changed state to up
00:03:52: callback to router2 already started
00:03:52: BRI0:2: disconnecting call
00:03:52: %LINK-3-UPDOWN: Interface BRI0:2, changed state to down
00:03:52: BRI0:2: disconnecting call
00:03:52: BRI0:2: disconnecting call
00:04:05: : Callback timer expired
00:04:05: BRI0:beginning callback to router2 572
00:04:05: BRI0: Attempting to dial 572
00:04:05: Freeing callback to router2 572
00:04:05: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up
00:04:05: BRI0:1: No callback negotiated
00:04:05: %LINK-3-UPDOWN: Interface Virtual-Access1, changed state to up
00:04:05: dialer Protocol up for Vi1
00:04:06: %LINEPROTO-5-UPDOWN: Line protocol on Interface BRI0:1, changed state
to up
00:04:06: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access1, chang
ed state to up
00:04:11: %ISDN-6-CONNECT: Interface BRI0:1 is now connected to 572
#router1
4. ISDN·ÃÎÊÊ×¶¼ÔÚÏß263ÍøÊµÀý:
±¾µØ¾Ö²¿ÍøµØÖ·Îª10.0.0.0/24,ÊôÓÚ±£ÁôµØÖ·£¬Í¨¹ýNATµØÖ··Ò빦ÄÜ£¬¾ÖÓòÍøÓû§¿ÉÒÔͨ¹ýISDNÉÏ263Íø·ÃÎÊInternet¡£263µÄISDNµç»°ºÅÂëΪ2633£¬Óû§Îª263£¬¿ÚÁîΪ263£¬ËùÉæ¼°µÄÃüÁîÈçÏÂ±í£º
ÈÎÎñ ÃüÁî
Ö¸¶¨½Ó¿Úͨ¹ýPPP/IPCPµØÖ·ÐÉÌ»ñµÃIPµØÖ· ip address negotiated
Ö¸¶¨ÄÚ²¿ºÍÍⲿ¶Ë¿Ú ip nat {inside | outside}
ʹÓÃppp/pap×÷ÈÏÖ¤ ppp authentication pap callin
Ö¸¶¨½Ó¿ÚÊôÓÚ²¦ºÅ×é1 dialer-group 1
¶¨Ò岦ºÅ×é1ÔÊÐíËùÓÐIPÐÒé dialer-list 1 protocol ip permit
É趨²¦ºÅ£¬ºÅÂëΪ2633 dialer string 2633
É趨µÇ¼263µÄÓû§ÃûºÍ¿ÚÁî ppp pap sent-username 263 password 263
É趨ĬÈÏ·ÓÉ ip route 0.0.0.0 0.0.0.0 bri 0
É趨·ûºÏ·ÃÎÊÁбí2µÄËùÓÐÔ´µØÖ·±»·ÒëΪbri 0ËùÓµÓеĵØÖ· ip nat inside source list 2 interface bri 0 overload
É趨·ÃÎÊÁбí2£¬ÔÊÐíËùÓÐÐÒé access-list 2 permit any
¾ßÌåÅäÖÃÈçÏ£º
hostname Cisco2503
!
isdn switch-type basic-net3
!
ip subnet-zero
no ip domain-lookup
ip routing
!
interface Ethernet 0
ip address 10.0.0.1 255.255.255.0
ip nat inside
no shutdown
!
interface Serial 0
shutdown
no description
no ip address
!
interface Serial 1
shutdown
no description
no ip address
!
interface bri 0
ip address negotiated
ip nat outside
encapsulation ppp
ppp authentication pap callin
ppp multilink
dialer-group 1
dialer hold-queue 10
dialer string 2633
dialer idle-timeout 120
ppp pap sent-username 263 password 263
no cdp enable
no ip split-horizon
no shutdown
!
ip classless
!
! Static Routes
!
ip route 0.0.0.0 0.0.0.0 bri 0
!
! Access Control List 2
!
access-list 2 permit any
!
dialer-list 1 protocol ip permit
!
! Dynamic NAT
!
ip nat inside source list 2 interface bri 0 overload
snmp-server community public ro
!
line console 0
exec-timeout 0 0
!
line vty 0 4
!
end
5. Cisco765Mͨ¹ýISDN²¦ºÅÉÏ263
ÓÉÓÚCisco765µÄÉèÖÃÃüÁîÓëÎÒÃdz£ÓõÄCisco·ÓÉÆ÷µÄÃüÁͬ£¬ËùÒÔÒÔÏÂÁоÙÁËͨ¹ýCisco765ÉÏ263·ÃÎÊInternetµÄ¾ßÌåÃüÁîÐÐÉèÖò½Öè¡£
>set system c765
c765> set multidestination on
c765> set switch net3
c765> set ppp multilink on
c765> cd lan
c765:LAN> set ip routing on
c765:LAN> set ip address 10.0.0.1
c765:LAN> set ip netmask 255.0.0.0
c765:LAN> set briding off
c765:LAN>cd
c765> set user remotenet
New user remotenet being created
c765:remotenet> set ip routing on
c765:remotenet> set bridging off
c765:remotenet> set ip framing none
c765:remotenet> set ppp clientname 263
c765:remotenet> set ppp password client
Enter new Password: 263
Re-Type new Password: 263
c765:remotenet> set ppp authentication out none
c765:remotenet> set ip address 0.0.0.0
c765:remotenet> set ip netmask 0.0.0.0
c765:remotenet> set ppp address negotiation local on
c765:remotenet> set ip pat on
c765:remotenet> set ip route destination 0.0.0.0/0 gateway 0.0.0.0
c765:remotenet> set number 2633
c765:remotenet> set active
ÃüÁîÃèÊöÈçÏ£º
ÈÎÎñ ÃüÁî
ÉèÖ÷ÓÉÆ÷ϵͳÃû³Æ set system c765
ÔÊÐí·ÓÉÆ÷ºô½Ð¶à¸öÄ¿µÄµØ set multidestination on
ÉèÖÃISDN½»»»»úÀàÐÍΪNET3 set switch net3
ÔÊÐíµãµ½µã¼ä¶àÌõͨµÀÁ¬½ÓʵÏÖ¸ºÔؾùºâ set ppp multilink on
¹ØµôÇÅ½Ó set briding off
½¨Á¢Óû§Ô¤ÖÆÎļþÓÃÓÚÉèÖò¦ºÅÁ¬½Ó²ÎÊý- ¿ÉÒÔÉèÖöà¸öÓû§Ô¤ÖÆÎļþÓÃÓÚÏàͬµÄÎïÀí¶Ë¿Ú¶ÔÓ¦ÓÚ²»Í¬µÄÁ¬½Ó¡£ set user remotenet
ʹÓÃPPP/IPCP set ip framing none
ÉèÖÃÉÏÍøÓû§ÕʺŠset ppp clientname 263
ÉèÖÃÉÏÍø¿ÚÁî set ppp password client Enter new Password: 263 Re-Type new Password: 263
²»ÓÃPPP/CHAP»òPAP×öÈÏÖ¤ set ppp authentication out none
ÔÊÐíµØÖ·´èÉÌ set ppp address negotiation local on
ÉèÖõØÖ··Òë set ip pat on
ÉèÖÃĬÈÏ·ÓÉ set ip route destination 0.0.0.0/0 gateway 0.0.0.0
ÉèÖÃISPµÄµç»°ºÅÂë set number 2633
¼¤»îÓû§Ô¤ÖÆÎļþ set active
¡¡
·µ»ØÄ¿Â¼
¡¡
Áù¡¢PSTN
¡¡¡¡µç»°ÍøÂç(PSTN)ÊÇĿǰÆÕ¼°³Ì¶È×î¸ß¡¢³É±¾×îµÍµÄ¹«ÓÃÍ¨Ñ¶ÍøÂ磬ËüÔÚÍøÂ绥Á¬ÖÐÒ²Óй㷺µÄÓ¦Óá£µç»°ÍøÂçµÄÓ¦ÓÃÒ»°ã¿É·ÖΪÁ½ÖÖÀàÐÍ£¬Ò»ÖÖÊÇͬµÈ¼¶±ð»ú¹¹Ö®¼äÒÔ°´Ð貦ºÅ(DDR)µÄ·½Ê½ÊµÏÖ»¥Á¬£¬Ò»ÖÖÊÇISPΪ²¦ºÅÉÏÍøÎªÓû§ÌṩµÄÔ¶³Ì·ÃÎÊ·þÎñµÄ¹¦ÄÜ¡£
1. Ô¶³Ì·ÃÎÊ
1.1.Access Server»ù±¾ÉèÖãº
Ñ¡ÓÃCisco2511×÷Ϊ·ÃÎÊ·þÎñÆ÷,²ÉÓÃIPµØÖ·³Ø¶¯Ì¬·ÖÅ䵨ַ.Ô¶³Ì¹¤×÷վʹÓÃWIN95²¦ºÅÍøÂçʵÏÖÁ¬½Ó¡£
È«¾ÖÉèÖãº
ÈÎÎñ ÃüÁî
ÉèÖÃÓû§ÃûºÍÃÜÂë username username password password
ÉèÖÃÓû§µÄIPµØÖ·³Ø ip local pool {default | pool-name low-ip-address [high-ip-address]}
Ö¸¶¨µØÖ·³ØµÄ¹¤×÷·½Ê½ ip address-pool [dhcp-proxy-client | local]
»ù±¾½Ó¿ÚÉèÖÃÃüÁ
ÈÎÎñ ÃüÁî
ÉèÖ÷â×°ÐÎʽΪPPP encapsulation ppp
Æô¶¯Òì²½¿ÚµÄ·Óɹ¦ÄÜ async default routing
ÉèÖÃÒì²½¿ÚµÄPPP¹¤×÷·½Ê½ async mode {dedicated | interactive}
ÉèÖÃÓû§µÄIPµØÖ· peer default ip address {ip-address | dhcp | pool [pool-name]}
ÉèÖÃIPµØÖ·ÓëEthernet0Ïàͬ ip unnumbered ethernet0
line²¦ºÅÏßÉèÖãº
ÈÎÎñ ÃüÁî
ÉèÖÃmodemµÄ¹¤×÷·½Ê½ modem {inout|dialin}
×Ô¶¯ÅäÖÃmodemÀàÐÍ modem autoconfig discovery
ÉèÖò¦ºÅÏßµÄͨѶËÙÂÊ speed speed
ÉèÖÃͨѶÏß·µÄÁ÷¿Ø·½Ê½ flowcontrol {none | software [lock] [in | out] | hardware [in | out]}
Á¬Í¨ºó×Ô¶¯Ö´ÐÐÃüÁî autocommand command
·ÃÎÊ·þÎñÆ÷ÉèÖÃÈçÏ£º
Router:
hostname Router
enable secret 5 $1$EFqU$tYLJLrynNUKzE4bx6fmH//
!
interface Ethernet0
ip address 10.111.4.20 255.255.255.0
!
interface Async1
ip unnumbered Ethernet0
encapsulation ppp
keepalive 10
async mode interactive
peer default ip address pool Cisco2511-Group-142
!
ip local pool Cisco2511-Group-142 10.111.4.21 10.111.4.36
!
line con 0
exec-timeout 0 0
password cisco
!
line 1 16
modem InOut
modem autoconfigure discovery
flowcontrol hardware
!
line aux 0
transport input all
line vty 0 4
password cisco
!
end
Ïà¹Øµ÷ÊÔÃüÁ
show interface
show line
1.2. Access Serverͨ¹ýTacacs·þÎñÆ÷ʵÏÖ°²È«ÈÏÖ¤£º
ʹÓÃһ̨WINDOWS NT·þÎñÆ÷×÷ΪTacacs·þÎñÆ÷£¬µØÖ·Îª10.111.4.2,ÔËÐÐCisco2511Ëæ»ú´øµÄEasy ACS 1.0Èí¼þʵÏÖÓû§ÈÏÖ¤¹¦ÄÜ.
Ïà¹ØÉèÖãº
ÈÎÎñ ÃüÁî
¼¤»îAAA·ÃÎÊ¿ØÖÆ aaa new-model
Óû§µÇ¼ʱĬÈÏÆðÓÃTacacs+×öAAAÈÏÖ¤ aaa authentication login default tacacs+
ÁбíÃûΪno_tacacsʹÓÃENABLE¿ÚÁî×öÈÏÖ¤ aaa authentication login no_tacacs enable
ÔÚÔËÐÐPPPµÄ´®ÐÐÏßÉϲÉÓÃTacacs+×öÈÏÖ¤ aaa authentication ppp default tacacs+
ÓÉTACACS+·þÎñÆ÷ÊÚȨÔËÐÐEXEC aaa authorization exec tacacs+
ÓÉTACACS+·þÎñÆ÷ÊÚȨÓëÍøÂçÏà¹ØµÄ·þÎñÇëÇó¡£ aaa authorization network tacacs+
ΪEXEC»á»°ÔËÐмÇÕÊ.½ø³Ì¿ªÊ¼ºÍ½áÊøÊ±·¢Í¨¸æ¸øTACACS+·þÎñÆ÷¡£ aaa accounting exec start-stop tacacs+
ΪÓëÍøÂçÏà¹ØµÄ·þÎñÐèÇóÔËÐмÇÕʰüÀ¨SLIP,PPP,PPP NCPs,ARAPµÈ.ÔÚ½ø³Ì¿ªÊ¼ºÍ½áÊøÊ±·¢Í¨¸æ¸øTACACS+·þÎñÆ÷¡£ aaa accounting network start-stop tacacs+
Ö¸¶¨Tacacs·þÎñÆ÷µØÖ· tacacs-server host 10.111.4.2
ÔÚTacacs+·þÎñÆ÷ºÍ·ÃÎÊ·þÎñÆ÷É趨¹²ÏíµÄ¹Ø¼ü×Ö£¬·ÃÎÊ·þÎñÆ÷ºÍTacacs+·þÎñÆ÷ʹÓÃÕâ¸ö¹Ø¼ü×ÖÈ¥¼ÓÃÜ¿ÚÁîºÍÏìÓ¦ÐÅÏ¢¡£ÕâÀïʹÓÃtac×÷Ϊ¹Ø¼ü×Ö¡£ tacacs-server key tac
·ÃÎÊ·þÎñÆ÷ÉèÖÃÈçÏ£º
hostname router
!
aaa new-model
aaa authentication login default tacacs+
aaa authentication login no_tacacs enable
aaa authentication ppp default tacacs+
aaa authorization exec tacacs+
aaa authorization network tacacs+
aaa accounting exec start-stop tacacs+
aaa accounting network start-stop tacacs+
enable secret 5 $1$kN4g$CvS4d2.rJzWntCnn/0hvE0
!
interface Ethernet0
ip address 10.111.4.20 255.255.255.0
!
interface Serial0
no ip address
shutdown
interface Serial1
no ip address
shutdown
!
interface Group-Async1
ip unnumbered Ethernet0
encapsulation ppp
async mode interactive
peer default ip address pool Cisco2511-Group-142
no cdp enable
group-range 1 16
!
ip local pool Cisco2511-Group-142 10.111.4.21 10.111.4.36
tacacs-server host 10.111.4.2
tacacs-server key tac
!
line con 0
exec-timeout 0 0
password cisco
login authentication no_tacacs
line 1 16
login authentication tacacs
modem InOut
modem autoconfigure type usr_courier
autocommand ppp
transport input all
stopbits 1
rxspeed 115200
txspeed 115200
flowcontrol hardware
line aux 0
transport input all
line vty 0 4
password cisco
!
end
2. DDR£¨dial-on-demand routing£©ÊµÀý
´ËÀýͨ¹ýCisco 2500ϵÁзÓÉÆ÷µÄaux¶Ë¿ÚʵÏÖÒì²½²¦ºÅDDRÁ¬½Ó¡£Router1²¦ºÅÁ¬½Óµ½Router2¡£ÆäÖвÉÓÃPPP/CHAP×ö°²È«ÈÏÖ¤£¬ÔÚRouter1ÖÐÓ¦½¨Á¢Ò»¸öÓû§£¬ÒÔ¶Ô¶Ë·ÓÉÆ÷Ö÷»úÃû×÷ΪÓû§Ãû£¬¼´Óû§ÃûӦΪRouter2¡£Í¬Ê±ÔÚRouter2ÖÐÓ¦½¨Á¢Ò»¸öÓû§£¬ÒÔ¶Ô¶Ë·ÓÉÆ÷Ö÷»úÃû×÷ΪÓû§Ãû£¬¼´Óû§ÃûӦΪRouter1¡£Ëù½¨µÄÕâÁ½Óû§µÄpassword±ØÐëÏàͬ¡£
Ïà¹ØÃüÁîÈçÏ£º
ÈÎÎñ ÃüÁî
ÉèÖ÷ÓÉÆ÷ÓëmodemµÄ½Ó¿ÚÖ¸Áî chat-script script-name EXPECT SEND EXPECT SEND (etc.)
ÉèÖö˿ÚÔÚ¹Ò¶ÏǰµÄµÈ´ýʱ¼ä dialer idle-timeout seconds
ÉèÖÃÐÒ鵨ַÓëµç»°ºÅÂëµÄÓ³Éä dialer map protocol next-hop-address [name hostname] [broadcast] [modem-script modem-regexp] [system-script system-regexp] [dial-string]
ÉèÖõ绰ºÅÂë dialer string dial-string
Ö¸¶¨ÔÚÌØ¶¨Ïß·Ï·ÓÉÆ÷ĬÈÏ Ê¹ÓõÄchat-script script {dialer|reset} script-name
Router1:
hostname Router1
!
enable secret 5 $1$QKI7$wXjpFqC74vDAyKBUMallw/
!
username Router2 password cisco
chat-script cisco-default "" "AT" TIMEOUT 30 OK "ATDT \T" TIMEOUT 30 CONNECT \c
!
interface Ethernet0
ip address 10.0.0.1 255.255.255.0
!
interface Async1
ip address 192.200.10.1 255.255.255.0
encapsulation ppp
async default routing
async mode dedicated
dialer in-band
dialer idle-timeout 60
dialer map ip 192.200.10.2 name Router2 modem-script cisco-default 573
dialer-group 1
ppp authentication chap
!
ip route 10.0.1.0 255.255.255.0 192.200.10.2
dialer-list 1 protocol ip permit
!
line con 0
line aux 0
modem InOut
modem autoconfigure discovery
flowcontrol hardware
Router2:
hostname Router2
!
enable secret 5 $1$F6EV$5U8puzNt2/o9g.t56PXHo.
!
username Router1 password cisco
!
interface Ethernet0
ip address 10.0.1.1 255.255.255.0
!
interface Async1
ip address 192.200.10.2 255.255.255.0
encapsulation ppp
async default routing
async mode dedicated
dialer in-band
dialer idle-timeout 60
dialer map ip 192.200.10.1 name Router1
dialer-group 1
ppp authentication chap
!
ip route 10.0.0.0 255.255.255.0 192.200.10.1
dialer-list 1 protocol ip permit
!
line con 0
line aux 0
modem InOut
modem autoconfigure discovery
flowcontrol hardware
!
Ïà¹Øµ÷ÊÔÃüÁ
debug dialer
debug ppp authentication
debug ppp error
debug ppp negotiation
debug ppp packet
show dialer
3. Òì²½²¦ºÅ±¸·ÝDDNרÏߣº
´ËÀýÖ÷Á¬½Ó²ÉÓÃDDNרÏߣ¬±¸·ÝÏß·Ϊµç»°²¦ºÅ¡£µ±DDNרÏßÁ¬½ÓÕý³£Ê±£¬Ö÷¶Ë¿ÚS0״̬Ϊup£¬line protocolÒàΪup,Ôò±¸·ÝÏß·״̬Ϊstandby£¬line protocolΪdown£¬´ËʱËùÓÐͨОùͨ¹ýÖ÷½Ó¿Ú½øÐС£µ±Ö÷½Ó¿ÚÁ¬½Ó·¢Éú¹ÊÕÏʱ£¬¶Ë¿Ú״̬Ϊdown£¬Ôò¼¤»î±¸·Ý½Ó¿Ú£¬Íê³ÉÊý¾ÝͨÐÅ¡£´Ë·½·¨²»ÊʺÏΪX.25×ö±¸·Ý¡£ÒòΪ£¬ÅäÖ÷âװΪX.25µÄ½Ó¿ÚÖ»ÒªºÍX.25½»»»»úÖ®¼äµÄÁ¬½ÓÕý³£Æä½Ó¿Ú¼°line protocolµÄ״̬ÒàΪ up,Ëü²¢²»¿¼ÂÇÆäËüµØ·½ÐèÓë֮ͨÐŵÄ·ÓÉÆ÷µÄ״̬ÈçºÎ£¬ËùÒÔÈô±¾µØÂ·ÓÉÆ÷״̬Õý³££¬¶ø¶Ô·½Â·ÓÉÆ÷Á¬½Ó¼´Ê¹·¢Éú¹ÊÕÏ£¬±¾µØÒ²²»»á¼¤»î±¸·ÝÏß·¡£Àý4½«»áÃèÊöÈçºÎΪX.25×ö²¦ºÅ±¸·Ý¡£
ÒÔÏÂÊÇÏà¹ØÃüÁ
ÈÎÎñ ÃüÁî
Ö¸¶¨Ö÷Ïß·¸Ä±äºó£¬´ÎÏß·״̬·¢Éú¸Ä±äµÄÑÓ³Ùʱ¼ä backup delay {enable-delay | never} {disable-delay | never}
Ö¸¶¨Ò»¸ö½Ó¿Ú×÷Ϊ±¸·Ý½Ó¿Ú backup interface type number
hostname c2522rb
!
enable secret 5 $1$J5vn$ceYDe2FwPhrZi6qsIIz6g0
enable password cisco
!
username c4700 password 0 cisco
ip subnet-zero
chat-script cisco-default "" "AT" TIMEOUT 30 OK "ATDT \T" TIMEOUT 30 CONNECT \c
chat-script reset atz
!
interface Ethernet0
ip address 16.122.51.254 255.255.255.0
no ip mroute-cache
!
interface Serial0
backup delay 10 10
backup interface Serial2
ip address 16.250.123.18 255.255.255.252
no ip mroute-cache
no fair-queue
!
interface Serial1
no ip address
no ip mroute-cache
shutdown
!
interface Serial2
physical-layer async
ip address 16.249.123.18 255.255.255.252
encapsulation ppp
async mode dedicated
dialer in-band
dialer idle-timeout 60
dialer map ip 16.249.123.17 name c4700 6825179
dialer-group 1
ppp authentication chap
!
interface Serial3
no ip address
shutdown
no cdp enable
!
interface Serial4
no ip address
shutdown
no cdp enable
!
interface Serial5
no ip address
no ip mroute-cache
shutdown
!
interface Serial6
no ip address
no ip mroute-cache
shutdown
!
interface Serial7
no ip address
no ip mroute-cache
shutdown
!
interface Serial8
no ip address
no ip mroute-cache
shutdown
!
interface Serial9
no ip address
no ip mroute-cache
shutdown
!
interface BRI0
no ip address
no ip mroute-cache
shutdown
!
router eigrp 200
network 16.0.0.0
!
ip classless
!
dialer-list 1 protocol ip permit
!
line con 0
line 2
script dialer cisco-default
script reset reset
modem InOut
modem autoconfigure discovery
rxspeed 38400
txspeed 38400
flowcontrol hardware
line aux 0
line vty 0 4
password cisco
login
!
end
c2522rb#
4. Òì²½²¦ºÅ±¸·ÝX.25:
ÉèÖÃX.25µÄ²¦ºÅ±¸·Ý,Ê×ÏÈX.25Á¬½ÓµÄ¶Ë¿Ú±ØÐëÔËÐж¯Ì¬Â·ÓÉÐÒé,Òì²½²¦ºÅ¿Ú±ØÐëʹÓþ²Ì¬Â·ÓÉ.±¾ÀýÑ¡ÔñEIGRP×÷Ϊ·ÓÉÑ¡ÔñÐÒé,½«¾²Ì¬Â·ÓɵÄMetricµÄÖµÉèÖÃΪ200,ÓÉÓÚEIGRPµÄĬÈÏMetricΪ90,ËùÒÔµ±Í¬Ê±ÓÐÁ½Ìõ·¾¶Í¨ÍùÍ¬Ò»Íø¶Îʱ,ÆäÖÐMetricֵСµÄ·¾¶ÉúЧ,¶øµ±X.25Á¬½Ó³öÏÖÎÊÌâʱ,·ÓÉÆ÷ÎÞ·¨Í¨¹ý·ÓÉÐÒéѧϰµ½Â·ÓÉ±í£¬Ôò´Ëʱ¾²Ì¬Â·ÓÉÉúЧ£¬·ÃÎÊͨ¹ý²¦ºÅ¶Ë¿ÚʵÏÖ¡£µ±X.25Á¬½Ó»Ö¸´Õý³£Ê±£¬Â·ÓÉÆ÷ÓÖ¿ÉÒÔѧϰµ½Â·ÓÉ±í£¬ÔòÓÉÓÚ MetricÖµµÄ²»Í¬£¬¾²Ì¬Â·ÓÉ×Ô¶¯±»¶¯Ì¬Â·ÓÉËù´úÌæ£¬ÕâÑù¾ÍʵÏÖÁ˱¸·ÝµÄ¹¦ÄÜ¡£
·ÓÉÆ÷Router1ÅäÖÃÈçÏÂ:
hostname router1
!
enable secret 5 $1$UTvD$99YiY2XsRMxHudcYeHn.Y.
enable password cisco
!
username router2 password cisco
ip subnet-zero
chat-script cisco-default "" "AT" TIMEOUT 30 OK "ATDT \T" TIMEOUT 30 CONNECT \c
chat-script reset atz
interface Ethernet0
ip address 202.96.38.100 255.255.255.0
!
interface Serial0
ip address 202.96.0.1 255.255.255.0
encapsulation x25
x25 address 10112227
x25 htc 16
x25 map ip 202.96.0.2 10112225 broadcast
!
interface Serial1
no ip address
shutdown
!
!
interface Async 1
ip address 202.96.1.1 255.255.255.252
encapsulation ppp
dialer in-band
dialer idle-timeout 60
dialer map ip 202.96.1.2 name router2 modem-script cisco-default 2113470
dialer-group 1
ppp authentication chap
!
router eigrp 200
redistribute connected
network 202.96.0.0
!
ip route 202.96.37.0 255.255.255.0 202.96.1.2 200
dialer-list 1 protocol ip permit
line con 0
line aux 0
script dialer cisco-default
script reset reset
modem InOut
modem autoconfigure discovery
transport input all
rxspeed 38400
txspeed 38400
flowcontrol hardware
line vty 0 4
password cisco
login
!
end
·ÓÉÆ÷Router2ÅäÖÃÈçÏÂ:
hostname router2
!
enable secret 5 $1$T4IU$2cIqak8f/E4Ug6dLT0k.J0
enable password cisco
!
username router1 password cisco
ip subnet-zero
chat-script cisco-default "" "AT" TIMEOUT 30 OK "ATDT \T" TIMEOUT 30 CONNECT \c
chat-script reset atz
!
interface Ethernet0
ip address 202.96.37.100 255.255.255.0
!
interface Serial0
ip address 202.96.0.2 255.255.255.0
no ip mroute-cache
encapsulation x25
x25 address 10112225
x25 htc 16
x25 map ip 202.96.0.1 10112227 broadcast
!
interface Serial1
no ip address
shutdown
!
interface Async1
ip address 202.96.1.2 255.255.255.252
encapsulation ppp
keepalive 30
async default routing
async mode dedicated
dialer in-band
dialer idle-timeout 60
dialer wait-for-carrier-time 120
dialer map ip 202.96.1.1 name router1 modem-script cisco-default 2113469
dialer-group 1
ppp authentication chap
!
router eigrp 200
redistribute static
network 202.96.0.0
!
no ip classless
ip route 202.96.38.0 255.255.255.0 202.96.1.1 200
dialer-list 1 protocol ip permit
!
line con 0
exec-timeout 0 0
line aux 0
script reset reset
modem InOut
modem autoconfigure discovery
transport input all
rxspeed 38400
txspeed 38400
flowcontrol hardware
line vty 0 4
password cisco
login
!
end
¡¡
·ÓÉÐÒ飺
Ò»¡¢RIPÐÒé
¡¡
RIP(Routing information Protocol)ÊÇÓ¦ÓýÏÔ硢ʹÓÃ½ÏÆÕ±éµÄÄÚ²¿Íø¹ØÐÒé(Interior Gateway Protocol,¼ò³ÆIGP)£¬ÊÊÓÃÓÚСÐÍͬÀàÍøÂ磬ÊǵäÐ͵ľàÀëÏòÁ¿(distance-vector)ÐÒé¡£Îĵµ¼ûRFC1058¡¢RFC1723¡£
RIPͨ¹ý¹ã²¥UDP±¨ÎÄÀ´½»»»Â·ÓÉÐÅÏ¢£¬Ã¿30Ãë·¢ËÍÒ»´Î·ÓÉÐÅÏ¢¸üС£RIPÌá¹©ÌøÔ¾¼ÆÊý(hop count)×÷Ϊ³ß¶ÈÀ´ºâÁ¿Â·ÓɾàÀë£¬ÌøÔ¾¼ÆÊýÊÇÒ»¸ö°üµ½´ïÄ¿±êËù±ØÐë¾¹ýµÄ·ÓÉÆ÷µÄÊýÄ¿¡£Èç¹ûµ½ÏàͬĿ±êÓжþ¸ö²»µÈËÙ»ò²»Í¬´ø¿íµÄ·ÓÉÆ÷£¬µ«ÌøÔ¾¼ÆÊýÏàͬ£¬ÔòRIPÈÏΪÁ½¸ö·ÓÉÊǵȾàÀëµÄ¡£RIP×î¶àÖ§³ÖµÄÌøÊýΪ15£¬¼´ÔÚÔ´ºÍÄ¿µÄÍø¼äËùÒª¾¹ýµÄ×î¶à·ÓÉÆ÷µÄÊýĿΪ15£¬ÌøÊý16±íʾ²»¿É´ï¡£
1. ÓйØÃüÁî
ÈÎÎñ ÃüÁî
Ö¸¶¨Ê¹ÓÃRIPÐÒé router rip
Ö¸¶¨RIP°æ±¾ version {1|2}1
Ö¸¶¨Óë¸Ã·ÓÉÆ÷ÏàÁ¬µÄÍøÂç network network
×¢£º1.CiscoµÄRIP°æ±¾2Ö§³ÖÑéÖ¤¡¢ÃÜÔ¿¹ÜÀí¡¢Â·ÓÉ»ã×Ü¡¢ÎÞÀàÓò¼ä·ÓÉ(CIDR)ºÍ±ä³¤×ÓÍøÑÚÂë(VLSMs)
2. ¾ÙÀý
Router1:
router rip
version 2
network 192.200.10.0
network 192.20.10.0
£¡
Ïà¹Øµ÷ÊÔÃüÁ
show ip protocol
show ip route
¡¡
·µ»ØÄ¿Â¼
¡¡
¶þ¡¢IGRPÐÒé
¡¡
IGRP (Interior Gateway Routing Protocol)ÊÇÒ»ÖÖ¶¯Ì¬¾àÀëÏòÁ¿Â·ÓÉÐÒ飬ËüÓÉCisco¹«Ë¾°ËÊ®Äê´úÖÐÆÚÉè¼Æ¡£Ê¹ÓÃ×éºÏÓû§ÅäÖó߶ȣ¬°üÀ¨ÑÓ³Ù¡¢´ø¿í¡¢¿É¿¿ÐԺ͸ºÔØ¡£
ȱʡÇé¿öÏ£¬IGRPÿ90Ãë·¢ËÍÒ»´Î·Óɸüй㲥£¬ÔÚ3¸ö¸üÐ*ÜÆÚÄÚ(¼´270Ãë)£¬Ã»ÓдÓ·ÓÉÖеĵÚÒ»¸ö·ÓÉÆ÷½ÓÊÕµ½¸üУ¬ÔòÐû²¼Â·Óɲ»¿É·ÃÎÊ¡£ÔÚ7¸ö¸üÐ*ÜÆÚ¼´630Ãëºó£¬Cisco IOS Èí¼þ´Ó·ÓɱíÖÐÇå³ý·ÓÉ¡£
1. ÓйØÃüÁî
ÈÎÎñ ÃüÁî
Ö¸¶¨Ê¹ÓÃRIPÐÒé router igrp autonomous-system1
Ö¸¶¨Óë¸Ã·ÓÉÆ÷ÏàÁ¬µÄÍøÂç network network
Ö¸¶¨Óë¸Ã·ÓÉÆ÷ÏàÁÚµÄ½ÚµãµØÖ· neighbor ip-address
×¢£º1¡¢autonomous-system¿ÉÒÔËæÒ⽨Á¢£¬²¢·Çʵ¼ÊÒâÒåÉϵÄautonomous-system,µ«ÔËÐÐIGRPµÄ·ÓÉÆ÷ÒªÏë½»»»Â·ÓɸüÐÂÐÅÏ¢Æäautonomous-systemÐèÏàͬ¡£
2£®¾ÙÀý
Router1:
router igrp 200
network 192.200.10.0
network 192.20.10.0
!