Presentation is loading. Please wait.

Presentation is loading. Please wait.

FSU CIS 5930 Internet Protocols

Similar presentations


Presentation on theme: "FSU CIS 5930 Internet Protocols"— Presentation transcript:

1 FSU CIS 5930 Internet Protocols
Internet Protocol V4 Reading: Chapter 14 Fall 2004 FSU CIS 5930 Internet Protocols

2 A summary of IPV4 functions
Providing unreliable connectionless datagram service Defining IP packet format Defining IP addressing scheme Routing/forwarding IP packets across interconnected networks Preventing looping of IP packets Fragmenting/reassembling IP packets Targets: adaptive, reaching the destination even if there is some failure along a path. Operating on different network technology (IP addressing). Some basic concepts in IP first: IP header Fall 2004 FSU CIS 5930 Internet Protocols

3 FSU CIS 5930 Internet Protocols
IP packet header Version IHL TOSt/Codepoint 3 7 15 31 IP packet format Total length Identification F D M Fragment Offset Time to Live Protocol Checksum Source address Destination address Optionen and payload Fall 2004 FSU CIS 5930 Internet Protocols

4 FSU CIS 5930 Internet Protocols
Some fields IHL: Internet Header Length Multiple of 32 bits Identification Unique for each packet (generated at source) Increased by 1 for each packet, normally Checksum Only covers the header part Fall 2004 FSU CIS 5930 Internet Protocols

5 IP addresses Classes in the original definition A, B, C, D, E
Host Network 1 0 1 1 0 Multicast group addresses Reserved A B C D E Class 8 16 24 31 IP address classes Host address range Fall 2004 FSU CIS 5930 Internet Protocols

6 FSU CIS 5930 Internet Protocols
Private addresses Class A Class B Class C Fall 2004 FSU CIS 5930 Internet Protocols

7 FSU CIS 5930 Internet Protocols
Special addresses 127.x.y.z Loopback address Host part == 0 The network itself Host part == 1 All hosts in the network Fall 2004 FSU CIS 5930 Internet Protocols

8 neigh_resolve_ output
Implementation of IP ARP ip_input.c MULTICAST ip_rcv ip_forward.c Higher layers dev.c net_rx_action ip_rcv_finish IP_PRE_ROUTING ip_forward ip_forward_finish ip_local_deliver IP_LOCAL_INPUT ip_mr_input IP_FORWARD ip_output.c ip_finish_output2 ip_output IP_POST_ROUTING ip_queue_xmit2 IP_LOCAL_OUTPUT ip_queue_xmit ip_finish_output . . . dev_queue_xmit neigh_resolve_ output ROUTING Forwarding Information Base ip_route_input ip_fragment Fall 2004 FSU CIS 5930 Internet Protocols

9 Handling incoming packet
ip_rcv() Drop packets that should not be processed Correctness checking NF_IP_PRE_ROUTING ip_rcv_finish() Determining the route (ip_route_input()) Processing options Passing to the element that should further processes the packet, skb->dst->input() ip_local_deliver() ip_forward() ip_mr_input() Fall 2004 FSU CIS 5930 Internet Protocols

10 FSU CIS 5930 Internet Protocols
Forwarding packets ip_forward() Some sanity checking (e.g., TTL) ICMP to source if dropping pkts because of TTL Making sure having enough space Fragmentation related processing NF_IP_FORWARD ip_forward_finish() Processing IP options ip_send() Ip_send() Fragmenting if necessary Ip_finish_output() Fall 2004 FSU CIS 5930 Internet Protocols

11 FSU CIS 5930 Internet Protocols
Forwarding IP packets ip_finish_output() Preparing something for layer 2 Pointing the network device Indicating the packet type (IP) NF_IP_POST_ROUTING ip_finish_output2() Passing to the lower layer (e.g., dev_queue_xmit()) Fall 2004 FSU CIS 5930 Internet Protocols

12 Delivering packets locally
ip_local_deliver() Reassembling fragmented IP packets NF_IP_LOCAL_IN ip_local_deliver_finish() Demultiplexing to other (upper) layers Tcp_v4_rcv() Udp_rcv() Icmp_rcv() Igmp_rcv() ICMP packets generated if dropping packet Fall 2004 FSU CIS 5930 Internet Protocols

13 Demultiplexing IP packets
handler err_handler next protocol: IPPROTO_UDP inet_protocol copy data name: "UDP" protocol:IPPROTO_IGMP name: "IGMP" udp_rcv() udp_err() igmp_rcv() Null inet_protos[MAX_INET_PROTOS] 1 MAX_INET_ PROTOS Fall 2004 FSU CIS 5930 Internet Protocols

14 Some management functions
inet_add_protocol() inet_del_protocol() Some useful functions in_ntoa() IP address to dotted decimal format in_aton() Dotted decimal format to IP address Fall 2004 FSU CIS 5930 Internet Protocols

15 Transport-layer packets
ip_queue_xmit() Determining route Ip_route_output() if no route yet Filling fields of header Adding option field if there is NF_IP_LOCAL_OUT ip_queue_xmit2() Some sanity check Enough buffer space to hold packet Setting output network device, dst Dst->output(), ip_output() Fall 2004 FSU CIS 5930 Internet Protocols

16 FSU CIS 5930 Internet Protocols
Data of IP instance dev refcnt lock dead in_device ifa_list mc_list mr_v1_seen in_ifaddr dev_base name: eth0 state next net_device ... Hardware MAC layer Network layer . . . name: eth1 ip_ptr Network Layer arp_parms cnf ipv4_devconf ip_mc_list neigh_parms Fall 2004 FSU CIS 5930 Internet Protocols


Download ppt "FSU CIS 5930 Internet Protocols"

Similar presentations


Ads by Google