Cisco Router Setting
--------------------------------------------------------------------------------
Chapter 1. CISCO ROUTER
1-1. First-Time Startup and Basic Configuration
1-1-1. Setup command facility
CISCO Router를 최초 사용시 시스템을 빠르게 Configuration 할 수 있도록
"setup" utility가 지원된다.
Setup 명령어는 호스트명, password, enabling routing of protocols등 시스템의
환경을 구성하는 파라메타의 입력을 요구함으로써 초기 시스템 환경을 자동으로
구성한다.
Router의 환경을 설정하기 위하여 먼저 다음을 준비하여야 한다.
1. Router 뒷면의 console port에 RS-232 ASCII terminal을 연결한다.
2. Terminal을 9600baud, 8 data bits, no parity, 1 stop bit로 조정.
Router를 최초 사용시에는 전원을 켜면 시스템 메세지가 나타난 후 바로 setup
명령어가 수행되며, 사용중 setup을 수행하고자 할 경우에는 privileged mode
에서 setup명령을 수행하여 자신의 Network에 맞도록 필요한 parameter들을 선택
하여 Configuration을 수행한다.
다음은 setup명령어의 수행과정을 보여준다.
--- System Configuration Dialog ---
At any point you may enter a question mark '?' for help.
Refer to the 'Getting Started' Guide for additional help.
Default settings are in square brackets '[]'.
Continue with configuration dialog? [yes]: yes
(Use Ctrl-c to abort configuration at any prompt)
Configuring global parameters:
Enter host name [Router]: GATEWAY ;Router name 지정
Enter enable password: ******** ;Privileged Password
Enter virtual terminal password: ******** ;Virtual line Password
Configure SNMP Network Management? [no]: no
Configure IP?[yes]: yes
Configure IGRP routing? [yes]: yes
Your IGRP autonomous system number? [1]: 1
Configure DECnet? [no]: no
Configure XNS? [no]: no
Configure Novell? [no]: no
Configure Apollo? [no]: no
Configure AppleTalk? [no]: no
Configure CLNS? [no]: no
Configure Vines? [no]: no
Configure bridging? [no]: no
Configuring interface parameters:
Configure interface Ethernet0:
Is this interface in use? [yes]: yes
Configure IP on this interface? [yes]: yes
IP address for this interface: 147.47.1.1
Number of bits in subnet field [0]: 8
Class B network is 147.47.0.0, 8 subnet bits; mask is 255.255.255.0
Configure interface Serial0:
Is this interface in use? [yes]: yes
Configure IP on this interface? [yes]: yes
IP address for this interface: 147.47.2.1
Number of bits in subnet field [0]: 8
Class B network is 147.47.0.0, 8 subnet bits; mask is 255.255.255.0
The following configuration command script was created:
hostname GATEWAY
enable-password ********
line vty 0 4
password ********
snmp-server community
!
ip routing
no decnet routing
no xns routing
no novell routing
no apollo routing
no appletalk routing
no clns routing
no vines routing
no bridge 1
!
!
interface Ethernet0
ip address 147.47.1.1 255.255.255.0
!
interface Serial0
ip address 147.47.2.1 255.255.255.0
!
!
router igrp 1
network 147.47.0.0
!
end
Use this configuration? [yes/no]: yes
[OK]
Use the enable mode 'configure' command to modify this configuration.
Press RETURN to get started!
1-1-2. EXEC Command Interpreter
Router는 명령어를 수행하는 EXEC와 환경을 Editting하는 Configuration의
두가지 mode로 동작한다.
EXEC는 command interpreter로서 EXEC는 타이핑한 명령어를 해석하고 그에 상당
하는 동작을 수행한다.
EXEC 명령어들은 시스템 프롬프트 상태(">" or "#")에서 입력한다.
EXEC COMMAND LEVELS
Security를 위하여 EXEC는 user와 privileged의 두가지 레벨을 갖는다.
User 레벨에서 가능한 명령어들은 privileged 레벨에서 가능한 명령어들의 일부
분이다.
Privileged 레벨은 프롬프트의 끝부분이 ">" 대신에 "#"로 변환된다.
Privileged 레벨에 접근하기 위해서는 EXEC 명령어인 "enable" 명령어와
enable secret *** enable password ***로 부여하나 우선 순위가 enable-
secret가 높기 때문에 enable secret의 password 입력해야합니다.
ex) GATEWAY> enable
password: ********
GATEWAY#
1-1-3. Entering Configuration Mode
Router를 configuration하기 위해서는 privileged level에서 "configure"를
사용하여 configuration mode로 변환하여야 한다.
ex) GATEWAY# configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.
Edit with DELETE, CTRL/W, and CTRL/U with CTRL/Z
입력된 명령어들은 리턴키를 칠때 수행된다.
Configuration 명령어는 한 line당 하나의 명령어를 수행하며, 시스템의
파라메타들을 정의하는 Global configuration command, 각각의 interface를
정의하는 interface subcommand, serial terminal을 정의하는 line subcmomand,
Routing 프로토콜을 정의하는 router command로 구분된다.
Configuration을 editting하기 위하여 사용되는 key들은 다음과 같다.
---------------------+----------------------------------------------
Key | Description
---------------------+----------------------------------------------
Delete or Backspace | Erase ont character.
Ctrl-W | Erases a word.
Ctrl-U | Erases a line.
Ctrl-R | Redisplays a line.
Return | Executes single-line commands.
Ctrl-Z | Ends configuration mode and returns to EXEC.
---------------------+----------------------------------------------
현재 Router에 설정되어 있는 환경을 보기 위해서는 EXEC 명령어인 "show"와
원하는 parameter를 입력하여 볼 수 있다.
SHOW parameter
ex) configuration을 보고자 하는 경우
show configuration
CREATING THE CONFIGURATION FILE
Setup을 사용하여 설정된 configuration들은 비휘발성메모리에 저장된다.
그러나 configuration mode에서 설정된 값들은 자동적으로 저장되지 않기
때문에 이를 nonvolatile memory에 저장하여야 한다.
WRITE MEMORY ;현재 설정된 값들을 nonvolatile memory에 저장.
WRITE TERMINAL ;현재 설정 값과 nonvolatile momery의 차이를 보여줌.
WRITE ERASE ;nonvolatile memory에 저장된 내용을 지움.
1-2. Terminal Connection 및 관리
MAKING TELNET CONNECTS
다른 시스템 연결을 위한 telnet connection을 위해서 EXEC 프롬프트에서
"telnet" or "connect"명령어와 연결하고자 하는 호스트의 IP address나 도메인
명(DNS 제공시)을 입력한다.
단지 EXEC프롬프트에서 연결하고자 하는 호스트의 IP address나 도메인명을 입력
해도 위와 같은 명령어의 동작을 수행한다.
GATEWAY> telnet 147.47.1.1 or gateway.kren.nm.kr
or
GATEWAY> 147.47.1.1 or gateway.kren.nm.kr
ESTABLISHING MULTIPLE CONNECTIONS
Network server는 기존의 telnet connection을 단절하지 않은 상태에서 다른
telnet connecttion의 수행을 가능하게 한다.
이를 위하여 default로 되어있는 Ctrl-^X를 입력한 후 시스템 명령어 prompt에서
새로운 connection을 시작한다.
1-3. Configuring the System
Network server에 대한 configuration을 위해서는 configuration mode로 들어
가야 한다. configuration mode로 들어가는 방법은 1-1-3에서 설명하였다.
1-3-1. Configuring the Global System Parameters
SETTING THE HOST NAME
Network server에 이름을 지정하지 않으면 "Router"라는 이름을 갖는다.
이 이름은 power를 켜면 프롬프트로 나타난다.
Network server에 대한 호스트명을 지정 또는 변경하기 위하여 "hostname"을
사용한다.
HOSTNAME name
ex) hostname RAMBO
이 후 Router는 "RAMBO>"를 프롬프트로 보여준다.
SETTING THE USERNAME
이 command는 Router에 접속시 접속 권한이 있는지 없는지 password를 확인하여
판단한다.
username *** password ***
line의 하위 commnad에 아래와 같이 해야 username을 물어봄
line ### number
login[default] ---->하위 command의 password 사용
loginlocal --->username과 password 사용
ex) username cisco password router
이 후 Router에 login시
User Access Verification
Username:cisco
Password:
RAMBO>로 login을 허용합니다.
DISPLAYING BANNER MESSAGES
Banner는 사용자가 line을 사용하거나 EXEC process를 시작할 때 보여주는
메세지이다.
BANNER {MOTD|EXEC|INCOMING} c text c
NO BANNER {MOTD|EXEC|INCOMING} c text c
motd, exec, incoming은 banner messages가 나타나는 때를 조작하는
키워드이다.
motd(message-of-the-day)는 network server에 connection이 발생하는
경우 언제라도 나타나는 메세지이다.
exec는 EXEC process가 생성될 때 나타나며, incoming은 특정한 terminal
line에 들어올 때 보여주는 메세지이다.
ex) banner motd #
Welcome to Korea Educational Network
#
다른 시스템에서 Router에 액세스할 때 위의 banner message가 나타난다.
1-3-2. Establishing Passwords and System Security
ESTABLISHING THE PRIVILEGED-LEVEL PASSWORD
Privileged command level에 password를 할당하기 위해서 "enable password"
명령어를 사용한다.
ENABLE PASSWORD password
NO ENABLE PASSWORD password
이때 입력된 password는 privileged level에 들어갈때 요구되어진다.
SPECIFYING A PASSWORD
일반적으로 line을 통하여 EXEC를 시작할 때 password를 요구한다.
passwod를 명시하기 위하여 line subcommand인 "password"를 사용한다.
PASSWORD password
NO PASSWORD password
위에서 기술한 password가 각 line에 적용하기 위해서는 "login" 명령어를 수행
하여야 한다.
LOGIN
NO LOGIN
다음은 virtual line 0부터 4에 password protection을 수행하는 예이다.
ex) line vty 0 4
password hodori
login
1-3-3. Redirecting System Error Messages
시스템에서 발생하는 모든 메세지들은 Default로 console에 나타난다.
이들 메세지들은 지정된 호스트나 buffer에 저장하여 볼 수 있다.
ENABLING MESSAGE LOGGING
메세지를 저장하기 위해 "logging" 명령어를 사용한다.
LOGGING ON
NO LOGGING ON
LOGGING MESSAGES TO AN INTERNAL BUFFER
특별하게 다른 device를 지정하지 않는한 모든 메세지는 Console에 나타난다.
메세지들을 시스템 내부의 버퍼에 log하기 위해서는 "logging buffered" command
를 사용한다.
LOGGING BUFFERED
NO LOGGING BUFFERED
Buffer에 저장된 메세지들을 보기 위하여 EXEC command인 "show logging"를
사용한다.
ex) RAMBO# show logging
LOGGING MESSAGES TO THE CONSOLE
Concosle에 log되는 메세지들을 제한하기 위하여 "logging console" command를
사용한다.
LOGGING CONSOLE level
NO LOGGING CONSOLE
level은 emergencies,alerts,critical,errors,warnings,notification,infor-
formation,debugging으로 구분된다.
1-3-4. Configuring Console and Virtual Terminal Lines
STARTING LINE CONFIGURATION
Terminal line을 configuring하기 위하여 "line" command를 사용한다.
LINE [type-keyword] first-line [last-line]
type-keyword: console = Console terminal line
aux = Auxiliary line
vty = Virtual terminal for remote console access
ex) 다음은 5개의 virtual terminal line configuration이다.
line vty 0 4
ESTABLISHING LINE PASSWORDS
각각의 line 또는 여러개의 line에 password를 설정하여 protection 할 수 있다.
다음은 line 4에 password를 설정하는 것을 보여준다.
ex) line 4
password welcome
login
ESTABLISHING CONNECTION RESTRICTIONS
지정된 Internet address에 대해 line에 대한 액세스를 제한할 수 있다.
ACCESS-CLASS list {IN|OUT}
NO ACCESS-CLASS list {IN|OUT}
list는 나중에 access-list에서 설명하겠다.
ex) line vty 0 4
access-class 5 in
SUPPRESSING BANNER MESSAGES
Default에 의하여 banner motd와 banner exec에 의해 정의된 메세지들은 항상
나타난다. 이것은 "exec-banner" 명령어에 의해 정의된다.
Banner 표현을 방지하고자 할 경우에는 다음과 같다.
ex) vty 0부터 4까지 banner 메세지 표현을 막음.
line vty 0 4
no exec-banner
TURNING ON AND OFF THE VACANT BANNER
Router는 EXEC가 동작하지 않을 때 console상에 메세지를 나타낸다.
이 메세지는 terminal이 idle 상태에 있을때 나타난다.
VACANT-MESSAGE [ c message c ]
NO VACANT-MESSAGE
ex) line 0
vacant-message #
Welcome to Router World
#
SETTING THE ESCAPE CHARACTER
각각의 LINE에 대하여 ESCAPE 문자를 지정한다.
ex) virtual line 5에 escape 문자로 esc를 지정
line 5
escape-character 27
SETTING THE EXEC TIMEOUT INTERVALS
각 terminal line이 idle 상태에 있을 때 지정된 시간이 경과하면 자동적으로
connection을 차단한다.
EXEC-TIMEOUT minutes [seconds]
NO EXEC-TIMEOUT minutes [seconds]
ex) 다음은 interval을 2분으로 지정하는 예이다.
exec-timeout 2
"no exec-timeout" 와 "exec-timeout 0"는 동일한 기능을 수행하며 idle
time이 길어져도 connnection을 계속적으로 유지한다.
1-5. Managing and Monitoring the System
Network server의 동작 상태 및 환경을 보기 위해서는 EXEC command인 "show"
명령어와 parameters를 사용한다.
각 레벨별로 show 명령어로 가능한 환경들은 "show ?"를 입력하면 볼 수 있다.
ex) sh ?
TESTING CONNECTIVITY, ROUTES AND SYSTEM
Router에서 지원되는 명령어를 사용하여 네트워크 연결상태, Routing 및 시스템
을 점검할 수 있다.
연결 점검:: PING ip-address
Routing 점검:: TRACE [destination]
시스템 점검:: TEST INTERFACE , TEST MEMORY
1-6. Configuring the Interface
1-6-1. SPECIFYING AN INTERFACE
각각의 interface를 정의하기 위해서는 interface subcommand인 "interface"
명령어를 사용한다.
INTERFACE type unit
type: interface type( Serial, Ethernet, FDDI etc)
unit: interface number
ex) interface serial 0
1-6-2. ADDING A DESCRIPTIVE NAME TO AN INTERFACE
Interface의 접속 구간 또는 기타 interface에 관련된 현황을 알기 쉽게하기
위하여 각 interface에 대하여 설명을 첨가할 수 있다.
이 명령어는 시스템의 수행에는 영향을 미치지 않는다.
DESCRIPTION name-string
NO DESCRIPTION name-string
ex) interface serial 0
description KOREA Educational Network Gateway
1-6-3. SHUTTING DOWN AND RESTARTING AN INTERFACE
shutdown 명령어를 사용하여 각 interface를 enable 또는 disable 시킬 수 있다.
SHUTDOWN
NO SHUTDOWN
ex) interface serial 0
shutdown
1-6-4. DISPLAYING INFORMATION ABOUT AN INTERFACE
각 interface의 상태를 show 명령어를 사용하여 알아볼 수 있다.
System version: SHOW VERSION
Interface statistics: SHOW INTERFACE [type unit]
1-6-5. Encapsulation Methods
각 interface를 encapsulation하기 위하여 다음의 명령어를 사용한다.
ENCAPSULATION encapsulation-type
SERIAL ENCAPSULATION METHODS
serial interface에 대한 encapsulation-type은 다음과 같다.
. bfex25 - Blacker Front End Encryption X.25 operation
. ddnx25 - DDN X.25 DTE operation
. ddnx25-dce - DDn X.25 DCE operation`
. frame-relay - Frame Relay
. hdh - HDH Protocol
. hdlc - Cisco Systems HDLC protocol
. ppp - Poing-to-Point Protocol(PPP)
etc.
ETHERNET ENCAPULATION METHODS
. arpa - Standard Ethernet Version 2.0 encapsulation
. iso1 - IEEE 802.3 encapsulation
. snap - IEEE 802.2 Ethernet media
1-7. Routing IP
1-7-1. Enabling IP Routing
Router가 IP routing을 가능하게 하기 위해서는 "ip routing" 명령어를 사용
하여 enable 해야 한다. default로 enable되어 있으며, router를 bridge로 사용
할 경우에는 disable시켜야 한다.
IP ROUTING[default]
NO IP ROUTING
1-7-2. Assigning IP Address
각 interface에 대한 ip address를 할당하기 위해 사용하는 명령어이다.
하나의 interface에 여러개의 ip address를 할당할 수 있다.
IP ADDRESS address mask [SECONDARY]
NO IP ADDRESS address mask [SECONDARY]
SECONDARY : primary 이외의 ip 할당시 사용
ex) interface ethernet 0
ip address 147.47.1.2 255.255.255.0
ip address 147.47.2.3 255.255.255.0 secondary
ip address 147.47.3.3 255.255.255.0 secondary
1-7-3. Configuring IP Access List
Router를 통하는 모든 Internet address에 대하여 interface에 대한 packet의
transmission의 control, virtual terminal line에 대한 access control등을
지정할 수 있다.
이를 위하여 1. access-list의 생성 2.이를 구현하기 위한 interface에 적용의
단계를 거친다.
access list는 source address만을 체크하는 standard와 source and destination
address 둘다를 체크하는 extended로 구분된다.
CONFIGURING STANDARD ACCESS LISTS
standard에 사용되는 명령어는 다음과 같다.
ACCESS-LIST list { PERMIT | DENY} source source-mask
NO ACCESS-LIST list { PERMIT | DENY} source source-mask
list: 1~99 integer
ex) access-list 1 permit 36.48.0.3 0.0.0.0
access-list 1 permit 131.108.0.0 0.0.255.255
access-list 1 deny 0.0.0.0 255.255.255.255
위의 예에서는 36.48.0.3 1개의 호스트와 131.108에 속하는
호스트외의 모든 시스템의 액세스를 제한한다.
CONFIGURING EXTENDED ACCESS LISTS
Standard access list가 source에 대해서만 control하는데 비해 extended access
list는 source와 destination address 그리고 protocol에 대해서도 control 할
수 있다.
Extended를 정의하기 위한 명령어는 다음과 같다.
ACCESS-LIST list {PERMIT|DENY} protocol source source-mask
destination destination-mask [operator oerand] [ESTABLISHED]
list: 100 ~ 199 integer
protocol: ip, tcp, udp, icmp
operator: lt - less than
gt - greater than
eq - equal
neq - not equal
operand: decimal destination port
ex) 다음은 source가 147.47.0.0 에 대하여 tcp의 telnet의 액세스를 제한한다.
access-list 101 deny tcp 147.47.0.0 0.0.255.255 0.0.0.0
255.255.255.255 eq 23
access-list 101 permit ip 0.0.0.0 255.255.255.255 0.0.0.0
255.255.255.255
CONTROLLING LINE ACCESS
특정한 virtual terminal line connection을 제한할 수 있다.
ACCESS-CLASS list {IN | [OUT]}
NO ACCESS-CLASS
ex) 다음은 virtual terminal 1에서 5번까지 192.79.55.1번을 제외한 모든 호스
트들의 접속을 차단하는 예이다.
access-list 1 permit 192.79.55.1 0.0.0.0
line vty 1 5
access-list 1 in
CONTROLLING INTERFACE ACCESS
특정한 interface에 대한 access를 조정할 수 있다.
IP ACCESS-GROUP list
NO ACCESS-GROUP list
ex) ethernet 0 에 대해 위에서 지정한 access-list 1번의 적용
interface ethernet 0
ip access-group 1
1-8. The IP Routing Protocols
1-8-1. Cisco Suppoeted Routing Protocols
Interior Gateway Protocol:
. RIP - Routing Information Protocol
. IGRP - Interior Gateway Routing Protocol
. OSPF - Open Shortest Path First
Exterior Protocol:
. EGP - Exterior GAteway Protocol
. BGP - Border Gateway Protocol
Routing Protocol Configuration 단계
step1. "router"명령어로 routing process 생성
step2. "network" 명령어로 프로토콜이 적용될 network 지정
step3. 기타 routing에 필요한 option 지정
1-8-2. Configuring the IGRP Protocol
CREATING THE IGRP ROUTING PROCESS
ROUTER IGRP autonomous-system
NO ROUTER IGRP autonomous-system
SPECIFY THE LIST OF NETWORKS
NETWORK network-number
NO NETWORK network-number
ex) router igrp 200
network 125.22.0.0
network 192.32.12.0
1-8-3. Configuring the OSPF Routing Protocol
STEPS IN CONFIGURING OSPF ROUTING
Router에 OSPF를 설치하기위해서 다음의 단계를 거친다. step1은 반드시
수행하여야 하며 나머지는 선택사항이다.
step1. router ospf 와 network를 사용하여 ospf를 enable
step2. redistribute route 지정
step3. OSPF area parameter set
step4. interface parameter set
ENABLING THE OSPF ROUTING PROCESS AND DEFINING AREAS
OSPF를 enable시키기 위하여 "router ospf"명령어를 사용한다.
ROUTER OSPF ospf-process-id
NO ROUTER OSPF ospf-process-id
OSPF가 수행될 interface에 대한 network와 area id를 할당한다.
NETWORK address wildcard-mask AREA area-id
NO NETWORK address wildcard-mask AREA area-id
ex) 다음은 각 interface와 OSPF프로토콜의 configuration예이다.
router ospf 109
network 131.108.20.0 0.0.0.255 area 10.9.50.0
network 131.108.0.0 0.0.255.255 area 2
network 131.109.10.0 0.0.0.2555 area 3
!
interface ethernet 0
ip address 131.108.20.5 255.255.255.0
!
interface ethernet 1
ip address 131.108.1.5 255.255.255.0
!
interface ethernet 2
ip address 131.108.2.5 255.255.255.0
!
interface ethernet 3
ip address 131.109.10.5 255.255.255.0
!
interface ethernet 4
ip address 131.109.1.1 255.255.255.0
!
interface ethernet 5
ip address 10.1.0.1 255.255.0.0
CONFIGURING OSPF AREA PARAMETERS
Setting Simple OSPF Area Authentication
동일한 area에 속하는 router들간에 OSPF를 사용하여 Routing 정보를 교환하기
위한 password를 지정을 가능하게 한다.
AREA area-id AUTHENTICATION
NO AREA area-id AUTHENTICATION
password의 지정은 다음에 설명하는 "ip ospf authenticatio-key" interface sub
command에서 설명한다.
Defining a Stub Area
AREA area-id STUB
NO AREA area-id STUB
AREA area-id DEFAULT-COST cost
NO AREA area-id DEFAULT-COST cost
Consolidating Advertised Addresses
AREA area-id RANGE address mask
NO AREA area-id RANGE address mask
CONFIGURING OSPF INTERFACE-SPECIFIC PARAMETERS
Specifying OSPF Path Cost
각 interface에 대한 sending packet에 대한 cost를 지정하기 위gkdu "ip ospf
cost"명령어를 사용한다.
IP OSPF COST cost
NO IP OSPF COST cost
각각의 interface별 default cost 값은 다음과 같다.
. 56Kbps Serial Link - 1785
. 64Kbps Serial Link - 1562
. T1 - 65
. E1 - 48
. 4Mbps Token Ring - 25
. 16Mbps Token Ring - 6
. FDDI - 1
Setting Router Priority
두개의 Router중 우선 순위 지정
IP OSPF PRIORITY 8-bit-number
NO IP OSPF PRIORITY 8-bit-number
Specifying the OSPF Authentication Key
동일한 area내에 있는 router들간에 정보를 교환하기 위해 사용하는 password를
지정한다
IP OSPF AUTHENTICATION-KEY 8-bits-of-password
NO IP OSPF AUTHENTICATION-KEY 8-bits-of-password
1-8-4. Configuring the RIP Protocol
ex) router rip
network 128.99.0.0
network 192.31.7.0
1-8-5. Configuring the BGP Protocol
BGP는 autonomous system을 기초로 하여 routing 정보를 교환하는 loop-free한
routing protocol이다.
CREATING THE BGP ROUTING PROCESS
ROUTER BGP autonomous-system
NO ROUTER BGP autonomous-system
ex) router bgp 120
SPECIFYING THE LIST OF BGP NETWORKS
network command를 사용하여 현재의 AS에서 routing 정보를 교환할 network들을
기술한다.
NETWORK network-number
NO NETWORK network-number
ex) network 123.34.0.0
SPECIFYING THE LIST OF NEIGHBORS
BGP는 상호정보를 교환할 router를 지정하는데 있어 동일한 AS를 갖는 internal
neighbor, 다른 AS를 갖는 external neighbor의 두 종류의 neighbor를 지원한다.
NEIGHBOR address REMOTE-AS number
NO NEIGHBOR address
ex1) neighbor의 주소가 131.108.1.2 이고 AS가 110
neighbor 131.108.1.2 remote-as 110
ex2) BGP의 AS가 109이고 두개의 네트워크와 세개의 neighbor router와
internal, external로 연결
router bgp 109
network 131.108.0.0
network 192.31.7.0
neighbor 131.108.200.1 remote-as 167
neighbor 131.108.234.2 remote-as 109
neighbor 150.136.64.19 remote-as 99
1-8-6. Filtering Routing Information
Router를 통하여 network상에 보내고 받아들이는 정보를 여러가지 방법에 의하여
filtering 할 수 있다.
FILTERING OUTGOING INFORMATION
Supressing Updates in an Interface
지정된 interface로 routing information을 보내는 것을 차단한다.
PASSIVE-INTERFACE interface
NO PASSIVE-INTERFACE interface
ex1) ethernet 1으로 routing updates를 차단
router igrp 109
network 131.108.0.0
passive-interface ethernet 1
ex2) ethernet 1으로 routing updates를 차단, 특정 neighbor는 허용
router igrp 109
network 131.108.0.0
passive-interface ethernet 1
neighbor 131.108.20.2
Filtering Outbound Updates
특정한 IP address나 routing-process에 대한 filtering을 적용한다.
DISTRIBUTE-LIST access-list OUT [interface-name|routing-process]
NO DISTRIBUTE-LIST access-list OUT [interface-name|routing-process]
ex1) RIP프로토콜을 통해 나가는 것을 0.0.0.0 과 131.108.0.0만 허가
access-list 1 permit 0.0.0.0
access-list 1 permit 131.108.0.0
access-list 1 deny 0.0.0.0 255.255.255.255
router rip
network 131.108.0.0
distribute-list 1 out
ex2) 특정한 interface에 대한 filtering
distribute-list 1 out ethernet 0
+--------------+
| RIP Router E1|----------
| E0 | Network 131.108.0.0 only
+--------------+
|
|
All Network advertised
ex3) routing protocol에 의한 filtering
router egp 164
network 131.108.0.0
redistribute igrp 109
distribute-list 1 out igrp 109
Point-to-Point Updates
Routing information을 교환할 router를 지정
NEIGHBOR address
NO NEIGHBOR address
FILTERING INCOMING INFORMATION
Filtering Received Updates
Router를 통해 들어오는 정보를 filtering.
DISTRIBUTE-LIST access-list-number IN [interface-name]
NO DISTRIBUTE-LIST access-list-number IN [interface-name]
ex) RIP 프로토콜을 통해 들어오는 것을 0.0.0.0 과 131.108.0.0만 허가
access-list 1 permit 0.0.0.0
access-list 1 permit 131.108.0.0
access-list 1 deny 0.0.0.0 255.255.255.255
router rip
network 131.108.0.0
distribute-list 1 in
DEFAULT ROUTES
Router는 모든 networks에 대하여 route를 결정할 수 없다.
그러므로 이를 위하여 "smart router"를 사용하고 다른 router들은 이 smart
router로 default routing.
Generating Default Routes
IP DEFAULT-NETWORK network-number
NO IP DEFAULT-NETWORK network-number
Default route
RIP and Hello : 0.0.0.0
IGRP : own
ex) 10.0.0.0에 대한 static route를 static default route로 지정
ip route 10.0.0.0 131.108.3.4
ip default-network 10.0.0.0
REDISTRIBUTING ROUTING INFORMATION
여러개의 Routing Protocol을 수행중인 router에서 각 프로토콜 간에 Routing
정보를 상호 교환하여 routing database를 유지한다.
예를 들어 RIP를 사용하면서 IGRP나 기타 다른 프로토콜과 routing정보를 교환
하거나, static routing과 정보를 교환하는 것 등이다.
Passing Routing Information Among Protocols
Default로 router는 다른 routing protocol과 정보를 교환하지 않는다.
다른 프로토콜과 정보를 교환하기 위해서는 "redistribute" command를 사용한다.
REDISTRIBUTE process-name [AS-number]
NO REDISTRIBUTE process-name [AS-number]
process-name: static, rip, bgp, egp, hello, ospf, igrp
ex) hello protocol을 사용하면서 rip protocol 정보를 redistributing
router hello
redistribute rip
Setting Default Metrics
RIP, EGP, BGP, hello:
DEFAULT-METRIC number
IGRP: DEFAULT-METRIC bandwidth delay reliability loading mtu
Redistributing Routes into OSPF
OSPF 또는 기타 프로토콜에서 OSPF로 redistribute하기 위해서는 다음과 같은
명령어를 사용하여 redistributing하여야 한다.
REDISTRIBUTE protocol [source-id]
[METRIC metric-value]
[METRIC-TYPE type-value]
[TAG tag-value]
[SUBNETS}
ex) IGRP process가 ospf domain으로 redistribute되는 예이다.
router ospf 109
redistribute igrp 108 metric 100 subnets
redistribute rip metric 200 subnets
Generating Default AS Boundary Router Routes for OSPF
OSPF routing domain으로 route를 redistribute 할 때는 언제나 router는 AS
boundary router가 된다.
그러나 AS boundary router는 default로 OSPF에 대한 default route를 생성하지
않는다. 이를 위해서는 "default-information" command를 정의하여야 한다.
DEFAULT-INFORMATION ORIGINATE METRIC metric-value
METRIC-TYPE type-value
NO DEFAULT-INFORMATION ORIGINATE METRIC metric-value
METRIC-TYPE type-value
ex) 다음은 OSPF routing domain으로 redistribute되는 metric이 100 이고,
external type이 1.
router ospf 109
redistribute igrp 108 metric 100 subnets
default-information originate metric 100 metric-type 1
Redistributing OSPF Routes into Other Domains
OSPF routes를 다른 routing protocol로 redistributing할 때는 다음과 같은
명령어를 사용한다.
REDISTRIBUTE OSPF ospf-process-id
[METRIC metric-value]
[MATCH INTERNAL|EXTERNAL type-value EXTERNAL type-value]
CONFIGURING STATIC ROUTE
Dynamic routing을 통하여 destination에 대한 routing을 구축할 수 없는 경우
static route를 사용한다.
IP ROUTE destnation-address gateway-address
NO IP ROUTE destnation-address gateway-address
ex) network 10.0.0.0에 대한 packet들을 131.108.3.4 router로 routing.
ip route 10.0.0.0 131.108.3.4
1-8-7. Monitoring IP Routing Operations
IP routing 상태를 monitering하기 위한 EXEC 명령어들을 보여준다.
. Displaying the BGP Routing Table: SHOW IP BGP [network]
. Displaying BGP Neighbors: SHOW IP BGP NEIGHBORS
. Displaying EGP Statics: SHOW IP EGP
. Displaying Routing Protocol Parameters and Status:
SHOW IP PROTOCOLS
. Displaying OSPF Routing Process:
SHOW IP OSPF [ospf-process-id]
. Displaying the OSPF Database:
SHOW IP OSPF DATABASE
SHOW IP OSPF DATABASE ROUTER
SHOW IP OSPF DATABASE NETWORK
SHOW IP OSPF DATABASE SUMMARY
SHOW IP OSPF DATABASE ASB-SUMMARY
SHOW IP OSPF DATABASE EXTERNAL
. Displaying OSPF Interface Parameters:
SHOW IP OSPF INTERFACE [interface-name]
. Displaying OSPF Neighbors Information:
SHOW IP OSPF NEIGHBORS [interface-name]
. Displaying the Routing Table
SHOW IP ROUTE [address]
--------------------------------------------------------------------------------
(C) 1998 SICC&Network.
[ Site Map ] ◎ E-mail to Mail