15-441 Computer Networking Project II question/answer session October 18, 2001.

Slides:



Advertisements
Similar presentations
CPSC Network Layer4-1 IP addresses: how to get one? Q: How does a host get IP address? r hard-coded by system admin in a file m Windows: control-panel->network->configuration-
Advertisements

Multicasting© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Internet Control Message Protocol (ICMP). Introduction The Internet Protocol (IP) is used for host-to-host datagram service in a system of interconnected.
Chapter 5 - TCP/IP Discussion Related to Essay Question on Final Dr. V.T. Raja Oregon State University.
11- IP Network Layer4-1. Network Layer4-2 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection.
TCP/IP Protocol Suite 1 Chapter 11 Upon completion you will be able to: User Datagram Protocol Be able to explain process-to-process communication Know.
TCP/IP Discussion Related to Essay Question on Final Dr. V.T. Raja Oregon State University.
1 Application Presentation Session Transport Network Datalink Physical OSI model Application IPv4, IPv6 Device Driver Hardware TCPUDP Internet.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
Socket option Getsockopt ou setsockopt fcntl ioctl.
Defining Network Protocols Application Protocols –Application Layer –Presentation Layer –Session Layer Transport Protocols –Transport Layer Network Protocols.
Spring 06 Project 2: Network Layer Mike Cui.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Gursharan Singh Tatla Transport Layer 16-May
IST 228\Ch3\IP Addressing1 TCP/IP and DoD Model (TCP/IP Model)
Process-to-Process Delivery:
CCNA Introduction to Networking 5.0 Rick Graziani Cabrillo College
Petrozavodsk State University, Alex Moschevikin, 2003NET TECHNOLOGIES Internet Control Message Protocol ICMP author -- J. Postel, September The purpose.
1 Introduction to Raw Sockets 2 IP address Port address MAC address TCP/IP Stack 67 Bootp DHCP OSPF protocol frame type UDP Port # TCP Port.
ECE 4110 – Internetwork Programming Client-Server Model.
13/09/2015 Michael Chai; Behrouz Forouzan Staffordshire University School of Computing Transport layer and Application Layer Slide 1.
PA3: Router Junxian (Jim) Huang EECS 489 W11 /
LWIP TCP/IP Stack 김백규.
LWIP TCP/IP Stack 김백규.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_a Transport Protocols - UDP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
Jordan Howell Frank Geiger. Table of Contents  Question  Overview of example  Packets  OSI Model  Network Layer  Data Link Layer  Physical Layer.
Network Protocols n ISO OSI 7-layer model n TCP/IP suite l TCP/UDP l IP l Ethernet/Token Ring l ICMP.
The Design and Implementation of Firewall, NAT, Traffic Shaper on FreeBSD.
CPSC 441 TUTORIAL – FEB 13, 2012 TA: RUITNG ZHOU UDP REVIEW.
Socket options: a summary –Tcp options, ip options and general socket options can be examined and sometimes modified. getsockopt, setsockopt routines Some.
Network Layer by peterl. forwarding table routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling.
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
1 Bus topology network. 2 Data is sent to all computers, but only the destination computer accepts 02608c
ICMPv6 Error Message Types Informational Message Types.
Linux Operations and Administration Chapter Eight Network Communications.
1 Socket Options getsockopt and setsockopt functions Check options and obtain default values Generic socket options IPv4 socket options IPv6 socket options.
Firewalls A brief introduction to firewalls. What does a Firewall do? Firewalls are essential tools in managing and controlling network traffic Firewalls.
Routing. Classless Inter-Domain Routing Classful addressing scheme wasteful – IP address space exhaustion – A class B net allocated enough for 65K hosts.
UDP : User Datagram Protocol 백 일 우
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)
1 Kyung Hee University Chapter 11 User Datagram Protocol.
UDP: User Datagram Protocol Brian Jorgage CSC /24/2004.
IP Internet Protocol. IP TCP UDP ICMPIGMP ARP PPP Ethernet.
Session 25: Netlink Sockets 문준혁. Index What are netlink sockets? Opening a netlink socket –Family Netlink messages –nlmsg_type –nlmsg_flags Lab.
SOCKET PROGRAMMING Presented By : Divya Sharma.
© 2003, Cisco Systems, Inc. All rights reserved.
Chapter 5 Network and Transport Layers
Chapter 11 User Datagram Protocol
UDP TCP.
Chapter 3 outline 3.1 Transport-layer services
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Socket Option.
LWIP TCP/IP Stack 김백규.
TCP Transport layer Er. Vikram Dhiman LPU.
Net431:advanced net services
Transport Layer Our goals:
Chapter 14 User Datagram Protocol (UDP)
Internet Protocol Version 6
Process-to-Process Delivery:
Transport Protocols An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
INFORMATION FLOW ACROSS THE INTERNET
Socket options: a summary
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Transport Layer 9/22/2019.
Advanced UNIX programming
Presentation transcript:

Computer Networking Project II question/answer session October 18, 2001

Project II Q/A session: Handin Send me listing group members. Exact format described in project handout. Execute ‘ cklog cs.cmu.edu ’. Wait for confirmation from me. Test read/write access. Hand in the following files: Source files Makefile Project report. Make sure handin is correct!!

Project II Q/A session: Progress Report Who has IP layer running? NAT/Firewall? DHCP?

Project II Q/A session: IP Header – ip_output() TCP and UDP layer already allocate space for the IP header in the pbuf. Breaks layering. Convenient. Makes TCP/UDP checksumming easier. p_data member of pbuf handed over to ip_output() points to allocated IP header. Do not modify p_len, p_data,…

Project II Q/A session: IP Header – ip_input() TCP and UDP need access to the IP header. Do not modify p_len, p_data,… when handing packet over to upper layer.

Project II Q/A session: Freeing pbufs() ip_input(): Always takes over responsibility for freeing a packet when called from link layer. TCP and UDP receive function will free packet unless port is unreachable. ICMP receive function always frees packets. ICMP send function takes over responsibility for freeing packet. Note: icmp_send() calls ip_output().

Project II Q/A session: Freeing pbufs() ip_output(): Always takes over responsibility for freeing a packet when called from transport layer. Needs to free packet if error condition is detected and packet is not handed over to link layer. Link layer takes over responsibility when calling if_start().

Project II Q/A session: Setsockopt() Need mechanism to set firewalling/NAT rules in kernel from user space. Setsockopt(int s, int level, int optname, const void *optval, int optlen); First argument is routing socket. Used for configuring routing table (and other). Socket(AF_ROUTE, SOCK_RAW, 0); Second and third argument determine kernel function to be called. IPPROTO_IP/IP_FW_SET → fw_setsockopt() IPPROTO_IP/IP_NAT_SET → nat_setsockopt()

Project II Q/A session: Setsockopt() Setsockopt(int s, int level, int optname, const void *optval, int optlen); Fourth argument is pointer to arbitrary data structure. Fifth argument denotes length of this data structure. Setsockopt() will copy data structure from user to kernel space, call requested function, and pass it pointer to copied data structure and its length.

Project II Q/A session: Setsockopt() How can we exploit Setsockopt() to configure NAT/firewalling rules in kernel? Define data structures containing mapping or filtering rule: struct nat_rule {…}; struct filter_rule {…}; Pass pointer to it (and its length) to Setsockopt(). Setsockopt() will copy data structure to kernel space. In fw_setsockopt()/nat_setsockopt(), cast const void pointer back to pointer to your data structure. Parse new rule and add it to set of rules kept in kernel.

Project II Q/A session: Miscellaneous Initialize routing table with a default gateway before looking up route. rttest utility. Keep robustness of your code in mind, e.g., byte ordering, checking for error/boundary conditions. You can ignore next packet in pbuf packet queue ( p_nextpkt ). Flag passed to ip_output() can be set to IP_FORWARDING (not to IP header flags!!). Should be set when calling ip_output() from ip_forwarding().

Project II Q/A session: Questions? Read FAQ and bboard before sending to TAs.