Presentation is loading. Please wait.

Presentation is loading. Please wait.

TCP/IP Illustracted Vol1. 제목 : IP Routing 2005. 3. 16( 수 ) 한 민 규

Similar presentations


Presentation on theme: "TCP/IP Illustracted Vol1. 제목 : IP Routing 2005. 3. 16( 수 ) 한 민 규"— Presentation transcript:

1 TCP/IP Illustracted Vol1. 제목 : IP Routing 2005. 3. 16( 수 ) 한 민 규 icemk@mclab.hufs.ac.kr

2 Content  Introduction  Routing Principle  Initializing a Routing Table  ICMP  APPENDIX. A IP Routing

3 Introduction  Routing is one of the most important functions of IP  The topics of which routing protocol to use on a given host, how to exchange routing information with adjacent routers

4 Processing done at the IP layer

5 Routing Principles  The place to start our discussion of IP routing is to understand what is maintained by the kernel in its routing table.  IP performs when it searches its routing table  Search for a matching host address  Search for a matching network address  Search for a default entry  The routing done by IP, when it searches the routing table and decides which interface to send a packet out, is a routing mechanism

6 Simple Routing Table  netstat command  U : The route is up.  G : The route is to a gateway(router)  H : The route is to a host, that is, the destination is a complete host address.  D : The route was created by a redirect  M : The route was modified by a redirect

7 Initializing a Routing Table  Whenever an interface is initialized (normally when the interface’s address is set by the ‘ifconfig’ command) a direct route is automatically created for that interface  Ex) route del default gw IP route add default gw IP

8 ICMP Host and Network Unreachable Errors  The ICMP “host unreachable” error message is sent by a router when it receives an IP datagram that it cannot deliver or forward. 0Network Unreachable 1Host Unreachable 2Protocol Unreachable 3Port Unreachable 4Fragmentation Needed and Don’t Fragment (DF) was set 5Source Route Failed 6Destination network Unknown 7Destination Host Unknown 8Source Host Isolated

9 ICMP Redirect Errors  The ICMP redirect error is sent by a router to the sender of an IP datagram when the datagram should have been sent to a different router host R2 R1 (1) IP datagram (3) ICMP redirect (2) IP datagram

10 ICMP redirect message type (5) code (0-3)checksum router IP address that should be used 8 bytes 0 7 8 15 16 31 IP header (including options) + first 8 bytes of original IP datagram data code Description 01230123 redirect for network redirect for host redirect for type of service and network redirect for type of service and host unused

11 ICMP Router Discovery Message  Router Solicitation(=Selection) Message  The general concept is that after bootstrapping, a host broadcasts or multicasts a router solicitation message  Router Advertisement Message  One or more router respond with a router advertisement message. Additionally, the routers periodically broadcast or multicast their router advertisements, allowing any hosts that are listening to update their routing table accordingly

12 Format of ICMP router Adv Message type (10)code (0) checksum Unused(sent as 0) 8 bytes 0 7 8 15 16 31 07 815 1631 type(9)code (0) checksum router address [1] preference level [1] router address [2] preference level [2]... number of address life time address entry size

13 APPEND A. IP ROUTING OPERATION Host A 172.16.10.2 Host B 172.16.20.2 Ethernet0 172.16.10.1 Ethernet1 172.16.20.1 0 : req0 :Code Check Sum : 0xA152 ID = 1024Seq num = 3328 Optional Data ICMP 가 echo request payload 를 만든다. IP PayloadIP Hdr ICMP 는 IP 에 Payload 를 넘기가 IP 는 패킷을 생성한다. ICMP Request ARP Cache Discovery Or ARP Request Default gateway 로 보내진다. Routing Table 에서 IP Dest Address 를 검색한다. Routing Table


Download ppt "TCP/IP Illustracted Vol1. 제목 : IP Routing 2005. 3. 16( 수 ) 한 민 규"

Similar presentations


Ads by Google