[R1]
config t
hostname jjcom
interface fastethernet0/0
ip address 192.168.0.254 255.255.255.0
no shutdown
exit
interface fastethernet0/0.2
encapsulation dot1q 2
ip address 192.168.1.254 255.255.255.0
no shutdown
exit
interface serial1/0
ip address 1.1.1.37 255.255.255.252
no shutdown
exit
ip route 192.168.2.0 255.255.0 1.1.1.38
exit
show running-config
show ip interface brief
[R2]
config t
hostname ksj
interface fastethernet0/0
ip address 192.168.2.254 255.255.255.0
no shutdown
exit
interface serial1/0
ip address 1.1.1.38 255.255.255.252
no shutdown
exit
ip route 192.168.0.0 255.255.255.0 1.1.1.37
ip route 192.168.1.0 255.255.255.0 1.1.1.37
or
ip route 0.0.0.0 0.0.0.0 1.1.1.37
exit
show running-config
show ip interface brief
1111 1100/30 ->255.255.255.252
0000 0000/24 ->255.255.255.0
1000 0000/25
1100 0000/26
1110 0000/27
1111 0000/28
1111 1000/29
4의배수
0~3
4~7
8~11
12~15
"
"
라우팅테이블(표지판기능)
정적라우팅
[R1]
config t
hostname R1
interface fastethernet0/0
ip address 192.168.0.254 255.255.255.0
no shutdown
exit
interface serial1/0
ip address 1.1.1.1 255.255.255.252
no shutdown
exit
ip route 192.168.1.0 255.255.255.0 1.1.1.2
[R2]
config t
interface serial1/0
ip address 1.1.1.2 255.255.255.252
no shutdown
exit
interface serial1/1
ip address 2.2.2.1 255.255.255.252
no shutdown
exit
ip route 192.168.1.0 255.255.255.0 2.2.2.2
ip route 192.168.0.0 255.255.255.0 1.1.1.1
[R3]
config t
interface serial1/0
ip address 3.3.3.1 255.255.255.252
no shutdown
exit
interface serial1/1
ip address 2.2.2.2 255.255.255.252
no shutdown
exit
ip route 192.168.1.0 255.255.255.0 3.3.3.2
ip route 192.168.0.0 255.255.255.0 2.2.2.1
[R4]
interface fastethernet0/0
ip address 192.168.1.254 255.255.255.0
no shutdown
exit
config t
interface serial1/0
ip address 3.3.3.2 255.255.255.252
no shutdown
exit
interface serial1/1
ip address 4.4.4.1 255.255.255.252
no shutdown
exit
ip route 192.168.1.0 255.255.255.0 4.4.4.2
ip route 192.168.0.0 255.255.255.0 3.3.3.1
[R5]
config t
interface serial1/0
ip address 5.5.5.1 255.255.255.252
no shutdown
exit
interface serial1/1
ip address 4.4.4.2 255.255.255.252
no shutdown
exit
ip route 192.168.1.0 255.255.255.0 5.5.5.2
[동적라우팅 설정]
거리백터라우팅프로토콜(라우터-라우터)
RIP1
RIP2
링크상태라우팅프로토콜
OSPF
중대규모 네트워크에 가장 많이 사용됨
라우팅 정보 업데이트 224.0.0.5와 224.0.0.6의 멀티캐스트
프로토콜 번호 89번 사용
경로 상태에 변화가 생기면 변화된 부분만 업데이트 진행
업데이트할 내용이 없더라도 30분간격으로 링크 상태 재생 기능을 통해 주기적으로 라우팅 업데이트 정보를 교환함
[R1]
config t
hostname R1
interface fastethernet0/0
ip address 192.168.0.254 255.255.255.0
no shutdown
exit
interface serial1/0
ip address 1.1.1.1 255.255.255.252
no shutdown
exit
router rip
version 2
network 192.168.0.0
network 1.1.1.0
[R2]
config t
interface serial1/0
ip address 1.1.1.2 255.255.255.252
no shutdown
exit
interface serial1/1
ip address 2.2.2.1 255.255.255.252
no shutdown
router rip
version 2
network 1.1.1.0
network 2.2.2.0
[R3]
config t
interface serial1/0
ip address 1.1.1.2 255.255.255.252
no shutdown
exit
interface serial1/1
ip address 2.2.2.1 255.255.255.252
no shutdown
router rip
version 2
network 1.1.1.0
network 2.2.2.0
[R4]
config t
interface serial1/0
ip address 3.3.3.2 255.255.255.252
no shutdown
exit
interface serial1/1
ip address 4.4.4.1 255.255.255.252
no shutdown
router rip
version 2
network 3.3.3.0
network 4.4.4.0
[R5]
config t
hostname R1
interface fastethernet0/0
ip address 192.168.1.254 255.255.255.0
no shutdown
exit
interface serial1/1
ip address 4.4.4.2 255.255.255.252
no shutdown
exit
router rip
version 2
network 192.168.1.0
network 4.4.4.0