Presentation is loading. Please wait.

Presentation is loading. Please wait.

A network primer (or refresher) Henning Schulzrinne (based on slides from Kurose/Ross)

Similar presentations


Presentation on theme: "A network primer (or refresher) Henning Schulzrinne (based on slides from Kurose/Ross)"— Presentation transcript:

1 A network primer (or refresher) Henning Schulzrinne (based on slides from Kurose/Ross)

2 Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2004. A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following:  If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!)  If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright 1996-2004 J.F Kurose and K.W. Ross, All Rights Reserved

3 The TCP/IP Protocol Layers sockets raw sockets wget, curl Java libraries

4 Internet packets L2 (Ethernet) L3 (IP) L4 (UDP/TCP) “pay load” (HTTP, ftp)

5 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time to live 32 bit source IP address IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to head. len type of service “type” of data flgs fragment offset upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit. how much overhead with TCP? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead

6 UDP: more often used for streaming multimedia apps –loss tolerant –rate sensitive other UDP uses –DNS –SNMP reliable transfer over UDP: add reliability at application layer –application-specific error recovery! source port #dest port # 32 bits Application data (message) UDP segment format length checksum Length, in bytes of UDP segment, including header

7 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 full duplex data: –bi-directional data flow in same connection –MSS: maximum segment size connection-oriented: –handshaking (exchange of control msgs) init’s sender, receiver state before data exchange flow controlled: –sender will not overwhelm receiver point-to-point: –one sender, one receiver reliable, in-order byte steam: –no “message boundaries” pipelined: –TCP congestion and flow control set window size send & receive buffers

8 TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number Receive window Urg data pnter checksum F SR PAU head len not used Options (variable length) URG: urgent data (generally not used) ACK: ACK # valid PSH: push data now (generally not used) RST, SYN, FIN: connection estab (setup, teardown commands) # bytes rcvr willing to accept counting by bytes of data (not segments!) Internet checksum (as in UDP)

9 Routers and hosts Routers forward packets –keep IP address (cf. NAT) –change MAC address to next hop –also contain end host functionality (e.g., ssh, web server) (End) hosts receive and send packets Linux can act as router –enabled by flag, interface configuration

10 IP tables (netfilter) Successor to ipfw (BSD), ipchains Reside in kernel, controlled by iptables –stored in kernel (does not survive reboot) –can save to file (iptables-save)

11 iptables operation Manipulate ruleset via /sbin/iptables –iptables -A adds rule –iptables -D deletes rule –iptables -L lists rules Simple predicates –-s, --source, --src host|1.2.3.4|1.2.3.0/24 –-d, --destination, --dst –-p protocol|port –-i interface Actions –-j DROP, QUEUE, ACCEPT, LOG, REJECT (ICMP),...

12 QUEUE # modprobe iptable_filter # modprobe ip_queue # iptables -A OUTPUT -p icmp -j QUEUE lipipq routines for handling packets See /proc/net/ip_queue: Peer PID : 0 Copy mode : 0 Copy range : 0 Queue length : 0 Queue max. length : 1024

13 Packet flow


Download ppt "A network primer (or refresher) Henning Schulzrinne (based on slides from Kurose/Ross)"

Similar presentations


Ads by Google