Victoria Manfredi September 13, 2016.

Slides:



Advertisements
Similar presentations
Overview The TCP/IP Stack. The Link Layer (L2). The Network Layer (L3). The Transport Layer (L4). Port scanning & OS/App detection techniques. Evasion.
Advertisements

© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
Computer Networks21-1 Chapter 21. Network Layer: Address Mapping, Error Reporting, and Multicasting 21.1 Address Mapping 21.2 ICMP 21.3 IGMP 21.4 ICMPv6.
21.1 Chapter 21 Network Layer: Address Mapping, Error Reporting, and Multicasting Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Internet Control Protocols Savera Tanwir. Internet Control Protocols ICMP ARP RARP DHCP.
Precept 3 Host Configuration 1 Peng Sun. What TCP conn. running? Commands netstat [-n] [-p] [-c] (Linux) lsof -i -P (Mac) ss (newer version of netstat)
CSCI 4550/8556 Computer Networks Comer, Chapter 23: An Error Reporting Mechanism (ICMP)
Week 5: Internet Protocol Continue to discuss Ethernet and ARP –MTU –Ethernet and ARP packet format IP: Internet Protocol –Datagram format –IPv4 addressing.
Linux Networking TCP/IP stack kernel controls the TCP/IP protocol Ethernet adapter is hooked to the kernel in with the ipconfig command ifconfig sets the.
The Network Layer Chapter 5. The IP Protocol The IPv4 (Internet Protocol) header.
Chapter 5 The Network Layer.
TCP/IP Tools Lesson 5. Objectives Skills/ConceptsObjective Domain Description Objective Domain Number Using basic TCP/IP commands Understanding TCP/IP3.6.
Click to edit Master subtitle style Chapter 17: Troubleshooting Tools Instructor:
Linux Networking Commands
IST 228\Ch3\IP Addressing1 TCP/IP and DoD Model (TCP/IP Model)
Connecting Networks © 2004 Cisco Systems, Inc. All rights reserved. Defining the IP Packet Delivery Process INTRO v2.0—4-1.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 7 Connect the SUSE Linux Enterprise Server to the Network.
Support Protocols and Technologies. Topics Filling in the gaps we need to make for IP forwarding work in practice – Getting IP addresses (DHCP) – Mapping.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
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.
Managing Network connections. Network Cabling Ethernet Topology Bus topology – Connects each node in a line – Has no central connection point Star topology.
1 IP: putting it all together Part 2 G53ACC Chris Greenhalgh.
TCOM 515 IP Routing. Syllabus Objectives IP header IP addresses, classes and subnetting Routing tables Routing decisions Directly connected routes Static.
1 Internet Control Message Protocol (ICMP) Used to send error and control messages. It is a necessary part of the TCP/IP suite. It is above the IP module.
1 CS 4396 Computer Networks Lab TCP/IP Networking An Example.
Internet Protocols. Address Resolution IP Addresses are not recognized by hardware. If we know the IP address of a host, how do we find out the hardware.
Chapter 23 Internet Control Message Protocol used to report information and errors IP uses ICMP when it sends an error message ICMP uses IP to transport.
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Presented by Rebecca Meinhold But How Does the Internet Work?
Networks Part 3: Packet Paths + Wireshark NYU-Poly: HSWP Instructor: Mandy Galante.
Monitoring Troubleshooting TCP/IP Chapter 3. Objectives for this Chapter Troubleshoot TCP/IP addressing Diagnose and resolve issues related to incorrect.
Advanced Packet Analysis and Troubleshooting Using Wireshark 23AF
Linux Operations and Administration Chapter Eight Network Communications.
ERICSON BRANDON M. BASCUG Alternate - REGIONAL NETWORK ADMINISTRATOR HOW TO TROUBLESHOOT TCP/IP CONNECTIVITY.
End-host IP: MAC: 11:11:11:11:11 gateway IP: MAC: 22:22:22:22:22 Google server IP: interne t interface DNS server IP:
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
Network Layer IP Address.
Cisco Routers Routers collectively provide the main feature of the network layer—the capability to forward packets end-to-end through a network. routers.
Understand IPv6 Part 2 LESSON 3.3_B Networking Fundamentals.
Lecture#6:Connectivity Verification
© 2003, Cisco Systems, Inc. All rights reserved.
LESSON Networking Fundamentals Understand TCP/IP.
Virtualization of networks
Click to edit Master subtitle style
Networks Problem Set 3 Due Nov 10 Bonus Date Nov 9
Chapter 4: Network Layer
Dr. Richard Spillman Fall 2006
Lab 2: Packet Capture & Traffic Analysis with Wireshark
Traceroute traceroute is a Unix utility designed by Van Jacobson in 1987 The Windows equivalent is called tracert The Linux equivalent is called tracepath.
Connectivity Verification
COMP2322 Lab 5 IP Steven Lee March 22, 2017.
Network Commands 2 Linux Ubuntu A.S.
Course Review 2015 Computer networks 赵振刚
Networks Problem Set 3 Due Oct 29 Bonus Date Oct 26
ICMP ICMP = Internet Control Message Protocol Layer 3
COMPUTER NETWORKS CS610 Lecture-33 Hammad Khalid Khan.
Introduction to Networking
Troubleshooting IP Communications
Lecture#7:Connectivity Verification
Introduction to Networking
CS 457 – Lecture 10 Internetworking and IP
Chapter 6 The Data Link layer
Advanced Computer Networks
Wide Area Networks and Internet CT1403
Lecture#6:Connectivity Verification
Troubleshooting ip Chapter 5e.
Review of Internet Protocols Network Layer
Virtual Private Network
Presentation transcript:

Victoria Manfredi September 13, 2016

1. IP addresses –What’s my IP address? –What’s host’s IP address? 2. Network topology –Is host up? –What is path to host? –What ports are open on host? 3. Looking at network connections – 4. Sending and receiving traffic over a network connection 5. Looking at network traffic 2

Our focus in these slides is Unix-based tools. If you are a Windows aficionado, please come talk to me about finding equivalent tools for Windows. 3

IPv4 addresses –4 byte addresses space of addresses: hostnames are human-readable, IP addresses are machine-readable –Loopback address: send traffic to yourself traffic sent here is “looped back” through network stack on machine on which sending process is running 127. *.*.* typically , also called localhost –Private subnet addresses 10.*.*.* *.* *.* –We’ll cover address masks later … IPv6 addresses –16 byte addresses: we’re running out of 4 byte addresses … 4 Subnet: shared prefix portion of addr

Your ISP or institution has a block of IP addresses –you are assigned one of those IP addresses –(it’s possible you will get a NAT’d address …) Manually configured (static IP address) –set the necessary network info in network settings Dynamically configured –using Dynamic Host Configuration Protocol (DHCP) in network-layer –Client (you) broadcasts request for an IP address –DHCP server on network assigns you address from pool of addresses typically you only get ip address for a fixed period of time a router can be configured to act as a DHCP server More on IP addresses when we get to network layer lectures 5

What happens if you run multiple network applications? –you will have many processes running on your computer a process is a program in execution How do messages received by your computer get to the right process? –messages are addressed to an (IP address, port #) pair –different processes on your computer will connect to the network using the same IP address but different port numbers 6

Via sockets: connection endpoint with associated IP addr, port # Well-known ports: –E.g., HTTP is port 80 Registered ports: Available ports: Client Process Server Process Socket TCP or UDP Socket TCP or UDP Application layer Transport layer Network layer Client Port # Server Port # Client IP address Server IP address Network

Many devices on Internet have multiple IP addresses How? –IP address is associated with network interface not machine –network interface card (NIC): connects computer to network A machine can have 1 or more network interfaces –my laptop has (at least) 2 NICs: 1 wireless and 1 wired (via USB) –router needs at least two interfaces otherwise can’t connect multiple networks together –Cisco core router: can have up to 10,000 interfaces! one interface per link: router has many IP addresses VirtualBox Virtual Machine (VM) –you need to set the number and type of network interfaces for VM 8

ifconfig –what network interfaces does my machine have? –what are my IP and MAC # addresses? –configure/enable/disable an interface 9 Ethernet 0 IPv4 address IPv6 address Loopback address Linux

Host What’s host name for IP address? 10

dig 11 DNS resolver used

Used by hosts to send error messages –operates at network layer (IP) –example messages host is unreachable echo request (for pinging a host) time-to-live on packet has been exceeded, packet will be dropped packet size exceeds path Maximum Transmission Unit (MTU), fragmentation needed 12

Ping –sends ICMP echo request to host –host sends ICMP echo reply back –If no reply within timeout period, packet deemed lost 13 What happened here? Did we get a true timeout? In this case, cs.stanford.edu isn’t actually down: only looks to be down because Wesleyan firewall blocks ICMP traffic

Some options –visit your favourite coffee shop and borrow some wifi –use your cell phone as an access point –use Amazon cloud –telnet to non-Wesleyan host that will let you do a traceroute E.g., –telnet route-server.west.allstream.com (traceroute will work, not ping) –telnet telehack.com (ping and traceroute will work for very limited # of hosts) 14

15

16 Traceroute –source sends UDP datagrams with increasing TTLs to destination can also be ICMP (IP datagram) or TCP packet –every host or router that packet traverses decrements TTL by 1 –hosts reply with ICMP packet when packet TTL has expired If you want to try traceroute, you need to be on non-Wesleyan network

17 Traceroute –source sends UDP datagrams with increasing TTLs to destination can also be ICMP (IP datagram) or TCP packet –every host or router that packet traverses decrements TTL by 1 –hosts reply with ICMP packet when packet TTL has expired

Nmap –Default: send a TCP (syn) packet, if port is open, will get a TCP (syn/ack) packet back 18

Nmap –Default: send a TCP (syn) packet, if port is open, will get a TCP (syn/ack) packet back 19

netstat | less 20 TCP connections UDP connections IP address Port/Protocol Protocol state Port IP address

ss (socket statistics, works in linux only) TCP connections UDP connections Unix connections 21

nc: netcat, a multi-purpose network tool Be a TCP server: listen for connections on port Be a TCP client: open connection to localhost:51234 Type a string at client and press enter Look at the connections you created 22

Open connection to google, type HTTP request then two enters 23 HTTP Request HTTP Response

Packet sniffer –passively observes messages transmitted and received on a particular network interface by processes running on your computer –often requires root privileges to run Popular packet sniffers –Wireshark (also command-line version, tshark) –tcpdump (Unix) and WinDump (Windows) –use command line sniffers to analyze packet traces with bash script 24

Install – Run –type Wireshark in terminal, or double-click icon –Wireshark display may look different for Linux vs. Mac vs. Windows 25 Choose an interface to capture traffic on

26 Display Filter Protocols Source IP Dest IP Protocol State Captured packets Packet details Packet contents in hex and ascii: can match bytes to header 2 hex digits = 1 byte= 1 ascii char If you click on pkt or header field, will highlight hex/ascii fields and vice versa

27 Layers Physical Link Network Transport Application

28 Only TCP traffic See only TCP TLS protocol runs over TCP

What should you remember from today’s lecture? –seeing abstract concepts discussed in class as used in practice –foreshadowing next few lectures on HTTP, DNS, and sockets Homework assignment (handed out today) –will have you play around with traceroute and Wireshark 29