IP 심화 º 각 P 의게이트웨이는해당네트워크의마지막주소를사용한다. - P1 (210.220.10.1/26) 의게이트웨이 (5의 Fa0/0) : 210.220.10.63 /26 = 255.255.255.192 호스트비트수 : 32-26 = 6 비트 => = 64 그러므로 P1의 IP 210.220.10.1 중서브넷마스크에의거 26비트는변함이없고, 나머지 6비트가호스트비트로변하므로 210.220.10.0 ~ 210.220.10.63 의 64개임. 그중 210.220.10.0과 210.220.10.63 은제외사용가능한 IP : 210.220.10.1 ~ 210.220.10.63 의 62개만사용가능 - P2 (192.168.1.1/24) 의게이트웨이 (4의 Fa0/0) : 192.168.1.254 위의설명과동일한방법으로 /24 이므로호스트비트는 8비트 -> = 256 192.168.1.0 ~ 192.168.1.255 => 네트워크주소 (192.168.1.0), 브로드케스트주소 (192.168.1.255) 사용가능한 IP : 192.168.1.1 ~ 192.168.1.254 - P3 (172.31.209.1/24) 의게이트웨이 (1의 Fa0/0) : 172.31.209.254 /24 이므로호스트비트는 8비트 -> = 256 172.31.209.0 ~ 172.31.209.255 => 네트워크주소 (172.31.209.0), 브로드케스트주소 (172.31.209.255) 사용가능한 IP : 172.31.209.1 ~ 172.31.209.254-1 -
IP 심화 라우팅프로토콜적용시 라우팅테이블에서 이니셜이있는네트워크를설정하는것 : onnected 직접연결된네트워크를의미한다. 그러므로라우팅은 나는이런네트워크와연결되어있다. 를직접연결된라우터들에게알려주는것 1>en 1#conf t 1(config)#router rip 1(config-router)#version 2 1(config-router)#do sh ip rou 12.12.12.0 is directly connected, 210.220.10.0 is directly connected, FastEthernet0/0 1(config-router)#network 13.13.13.0 1(config-router)#ne 12.0.0.0 1(config-router)#ne 210.220.10.0 1(config-router)#no auto-summary 1(config-router)#passive-interface fa0/0 네트워크를설정하는순서는없습니다. 직접연결된네트워크만광고하면됩니다. 1 1(config-router)#network 13.0.0.0 1(config-router)#ne 12.0.0.0 1(config-router)#ne 210.220.10.0 또는 2 1(config-router)#network 13.13.13.0 1(config-router)#ne 12.12.12.0 1(config-router)#ne 210.220.10.0 IP은버전에상관없이 1번처럼 lassfull 상태로광고해야한다. 그러나초보자는 IP 주소를보고쉽게클래스풀네트워크를찾기가어렵다. 그래서 2과같이실제서브넷된네트워크를광고해도된다. 라우터가저장할때는자동으로 1과같이라우팅설정을저장한다. 그러므로 network 13.13.13.0 을설정한다해도 A클래스이므로 network 13.0.0.0 으로설정된다. ne 12.0.0.0 설정은라우팅테이블과실제인터페이스에는 12.12.12.0/30 으로서브넷된것이지만 IP 특성상서브넷되기전의클래스풀네트워크로설정하는것 - 2 -
IP 심화 2 의설정 3 의설정 2>en 2#conf t 2(config)#router rip 2(config-router)#version 2 2(config-router)#do sh ip rou 12.12.12.0 is directly connected, Serial0/0/0 25.25.25.0 is directly connected, 2(config-router)#network 12.12.12.0 2(config-router)#ne 23.23.23.0 2(config-router)#ne 25.25.25.0 2(config-router)#no auto-summary 3>en 3#conf t 3(config)#rou rip 3(config-router)#ver 2 3(config-router)#do sh ip rou 34.34.34.0 is directly connected, 3(config-router)#ne 13.13.13.0 3(config-router)#ne 23.23.23.0 3(config-router)#ne 34.34.34.0 3(config-router)#no au 4>en 4#conf t 4(config)#rou rip 4(config-router)#ver 2 4 의설정 5>en 5#conf t 5(config)#rou rip 5(config-router)#ver 2 5(config-router)#do sh ip rou 5 의설정 34.34.34.0 is directly connected, 192.168.1.0/24 is directly connected, FastEthernet0/0 4(config-router)#ne 34.34.34.0 4(config-router)#ne 192.168.1.0 4(config-router)#no au 4(config-router)#passive-interface fa0/0 25.25.25.0 is directly connected, 172.31.209.0 is directly connected, FastEthernet0/0 5(config-router)#ne 25.25.25.0 5(config-router)#ne 172.31.209.0 5(config-router)#no au 5(config-router)#passive-interface fa0/0-3 -
IP 심화 1 5 개라우팅을설정한직후의 1 2 30 초경과후 1 1#sh ip rou 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 12.0.0.0/8 is possibly down, routing via 12.12.12.2, 12.12.12.0/30 is directly connected, 13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 13.0.0.0/8 is possibly down, routing via 12.12.12.2, 13.13.13.0/30 is directly connected, Serial0/0/0 23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 23.0.0.0/8 [120/1] via 12.12.12.2, 00:02:40, [120/1] via 13.13.13.2, 00:01:56, Serial0/0/0 23.23.23.0/30 [120/1] via 12.12.12.2, 00:00:20, [120/1] via 13.13.13.2, 00:00:25, Serial0/0/0 25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 25.0.0.0/8 is possibly down, routing via 13.13.13.2, Serial0/0/0 25.25.25.0/30 [120/1] via 12.12.12.2, 00:00:20, 34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 34.0.0.0/8 [120/1] via 13.13.13.2, 00:01:56, Serial0/0/0 34.34.34.0/30 [120/1] via 13.13.13.2, 00:00:25, Serial0/0/0 172.31.0.0/16 is variably subnetted, 2 subnets, 2 masks 172.31.0.0/16 [120/2] via 12.12.12.2, 00:00:20, 172.31.209.0/24 [120/2] via 12.12.12.2, 00:00:20, 192.168.1.0/24 [120/2] via 13.13.13.2, 00:00:25, Serial0/0/0 210.220.10.0/24 is variably subnetted, 2 subnets, 2 masks 210.220.10.0/24 is possibly down, routing via 12.12.12.2, 210.220.10.0/26 is directly connected, FastEthernet0/0 1#sh ip rou 12.12.12.0 is directly connected, 13.13.13.0 is directly connected, Serial0/0/0 23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 23.0.0.0/8 is possibly down, routing via 12.12.12.2, is possibly down, routing via 13.13.13.2, Serial0/0/0 23.23.23.0/30 [120/1] via 12.12.12.2, 00:00:14, [120/1] via 13.13.13.2, 00:00:17, Serial0/0/0 25.25.25.0 [120/1] via 12.12.12.2, 00:00:14, 34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks 34.0.0.0/8 is possibly down, routing via 13.13.13.2, Serial0/0/0 34.34.34.0/30 [120/1] via 13.13.13.2, 00:00:17, Serial0/0/0 172.31.0.0/16 is variably subnetted, 2 subnets, 2 masks 172.31.0.0/16 [120/2] via 12.12.12.2, 00:00:14, 172.31.209.0/24 [120/2] via 12.12.12.2, 00:00:14, 192.168.1.0/24 [120/2] via 13.13.13.2, 00:00:17, Serial0/0/0 210.220.10.0 is directly connected, FastEthernet0/0 3 수분후 1 1#sh ip rou 12.12.12.0 is directly connected, 23.23.23.0 [120/1] via 12.12.12.2, 00:00:03, [120/1] via 13.13.13.2, 00:00:04, Serial0/0/0 25.25.25.0 [120/1] via 12.12.12.2, 00:00:03, 34.34.34.0 [120/1] via 13.13.13.2, 00:00:04, Serial0/0/0 172.31.209.0 [120/2] via 12.12.12.2, 00:00:03, 192.168.1.0/24 [120/2] via 13.13.13.2, 00:00:04, Serial0/0/0 210.220.10.0 is directly connected, FastEthernet0/0 라우팅테이블을관찰하는것은흥미롭지만따분한일이다. 그래서간단히전체분위기만보고지나간다. 5개의라우팅을설정하면 1 처럼여러가지정보가 rip 알고리즘에의해 이니셜로업데이트된다. IP 광고는 30 초마다업데이트되는데여러가지정보를받다보면결국자신이보낸정보가돌고돌아서다시자신에게돌아오는것도있다. 이런것들은제거해나가는과정이 2,3 과정이다. - 4 -
IP 심화 모든라우터들이전체네트워크에대한경로들을라우팅테이블에업데이트하면더이상업데이트할정보들이없게 된다. 이렇게일관성있는라우팅테이블을가지게되는상태를수렴된다고한다. 아래 4 개의라우팅테이블에서 / 이니셜을제외하고보면모두같은네트워크에대한경로를갖고있는것을알수 있다. 수렴된 2 수렴된 3 2#sh ip rou 12.12.12.0 is directly connected, Serial0/0/0 13.13.13.0 [120/1] via 12.12.12.1, 00:00:17, Serial0/0/0 [120/1] via 23.23.23.2, 00:00:20, Serial0/1/0 25.25.25.0 is directly connected, 34.34.34.0 [120/1] via 23.23.23.2, 00:00:20, Serial0/1/0 172.31.209.0 [120/1] via 25.25.25.2, 00:00:17, 192.168.1.0/24 [120/2] via 23.23.23.2, 00:00:20, Serial0/1/0 210.220.10.0 [120/1] via 12.12.12.1, 00:00:17, Serial0/0/0 수렴된 4 4# sh ip rou 12.12.12.0 [120/2] via 34.34.34.1, 00:00:05, 13.13.13.0 [120/1] via 34.34.34.1, 00:00:05, 23.23.23.0 [120/1] via 34.34.34.1, 00:00:05, 25.25.25.0 [120/2] via 34.34.34.1, 00:00:05, 34.34.34.0 is directly connected, 172.31.209.0 [120/3] via 34.34.34.1, 00:00:05, 192.168.1.0/24 is directly connected, FastEthernet0/0 210.220.10.0 [120/2] via 34.34.34.1, 00:00:05, 3#sh ip rou 12.12.12.0 [120/1] via 13.13.13.1, 00:00:21, Serial0/0/0 [120/1] via 23.23.23.1, 00:00:22, Serial0/1/0 25.25.25.0 [120/1] via 23.23.23.1, 00:00:22, Serial0/1/0 34.34.34.0 is directly connected, 172.31.209.0 [120/2] via 23.23.23.1, 00:00:22, Serial0/1/0 192.168.1.0/24 [120/1] via 34.34.34.2, 00:00:08, 210.220.10.0 [120/1] via 13.13.13.1, 00:00:21, Serial0/0/0 수렴된 5 5#sh ip rou 12.12.12.0 [120/1] via 25.25.25.1, 00:00:17, 13.13.13.0 [120/2] via 25.25.25.1, 00:00:17, 23.23.23.0 [120/1] via 25.25.25.1, 00:00:17, 25.25.25.0 is directly connected, 34.34.34.0 [120/2] via 25.25.25.1, 00:00:17, 172.31.209.0 is directly connected, FastEthernet0/0 192.168.1.0/24 [120/3] via 25.25.25.1, 00:00:17, 210.220.10.0 [120/2] via 25.25.25.1, 00:00:17, opyight.leegeunsu - 5 -