Download presentation
Presentation is loading. Please wait.
1
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 Lab 1, Basic Linux and Networking Commands Shiv Kalyanaraman Yong Xia (TA) shivkuma@ecse.rpi.edu http://www.ecse.rpi.edu/Homepages/shivkuma Aug 29, 2002 Experimental Networking (ECSE 4963) 1
2
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 2 q Linux commands q Networking commands and tools q Socket programming q An introduction project q Preview of the next lab Basic Commands 2
3
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 3 Basic Linux Commands q man – manual page (help info) q pwd – present working directory q ls – list content in current directory q mv / cp / rm – move(rename) / copy / delete file q mkdir / rmdir – create / delete a new directory q chmod – change w/r/x modes of file q ps – check process status q kill – terminate process q pipe operator >, >>, | 3
4
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 4 Internet Protocols Stack 4 IP TCPUDP ATM Satellite Ethernet Packet-switched network IP is the glue Hour-glass architecture -all hosts and routers run IP -IP runs over everything Common Intermediate Representation ICMP Cable
5
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 5 TCP / UDP / IP q IP q Unreliable, best-effort service q Connectionless: no per-packet or per- session state information inside network, each IP packet is delivered independent of all other packets q Like post-office (USPS) mail 5
6
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 6 TCP / UDP / IP q UDP q Datagram service: explicit boundary between packets q What’s more than IP? q Port number: multiplexing for applications q Checksum: weak error detection (not correction!) 6
7
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 7 TCP / UDP / IP q TCP q Many versions: Tahoe, Reno, SACK, Vegas q Connection-oriented: per-session state variables maintained at end-hosts (but not in network, unlike circuit-switched and virtual- circuit approaches) q Aka end-to-end “connection” or “association” q Reliably setup and tear down the end-to- end association 7
8
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 8 TCP (contd) q Reliable: uses: q ACKs (“sender: receiver correctly got this packet”), q checksum (“receiver: is this packet is correct or wrong?”) and q window (multiple packets in flight: pipelined) q Byte-stream: no application-packet boundary like UDP q Congestion control: reduce demand during overload, to ensure stable statistical multiplexing of the network
9
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 9 Basic Networking Commands 9 M n q How to detect if another machine is alive, the path to it, and resolve its DNS name to ip address, etc. …?
10
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 10 q Input and output queues (buffers) q Switch fabric (forwarding / routing) 10 A Router Model Scheduler queue 1 queue 2 …… queue k Classifier buffer management I 1 I 2 I m O1O1 O2O2 OnOn router
11
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 11 Basic Networking Commands q ping – check if machine is alive q ifconfig – interface (ip addr / mask) configuration q arp – link / network layer address mapping q netstat – status info of network configuration q telnet – remote terminal q ftp – file transfer tool q route – set static route of a machine q traceroute – gather route information q tcpdump – dump packet header q nslookup – resolve DNS name of target hostname Key : What can you infer about the network or end-to- end properties with these commands? 11
12
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 12 q Packet is processed at a router: q Packet enters at IP input queue from an interface (ifconfig) q Calculate next hop router based on longest-prefix match of packet header destination IP address with routing table entry q Routing table is maintained dynamically by a daemon (e.g. gated), or statically by route command q View routing info etc. via netstat command q If it’s an ICMP packet, further processing q ICMP echo ping q Decrement Time_To_Live (TTL), dicard packet if it’s zero and send ICMP error back to source traceroute q Send packet to output queue (forwarding) q Nslookup: gives ip address of a host (or router I/f) name q Tcpdump can be used to view the whole packet! 12 Packet’s Life in a Router
13
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 13 Some Miscellaneous Hints q To check default gateway/static routes without being dependent on DNS: netstat -rn q If you get an error saying command not found, set the path: export PATH=$PATH: q Common directories where programs are found: /usr/sbin, /sbin, /usr/bin, /usr/local/bin q If you have root and want to start/stop/restart the networking modules : /etc/init.d/network start /etc/init.d/network stop /etc/init.d/network restart
14
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 14 Project: Measuring RTT q Write program to measure round-trip time between two end host on the Internet; q Refer to ping: write a simple wrapper program.. q Propose a model for RTT prediction, i.e., give a sequence of RTT measures, estimate the next RTT value. q Measure several values of RTT. What can you say about the samples? If they are variable, what can you do to reduce the variability of the RTT estimate? q Time series model 14
15
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 15 Advanced Ideas: For Fun! q Can you correlate info across measurements using different techniques? q “Rocketfuel”: ISP maps q http://www.cs.washington.edu/research/networking/rocketfuel/ http://www.cs.washington.edu/research/networking/rocketfuel/ q Skitter: Internet Maps q http://www.caida.org/tools/measurement/skitter/ http://www.caida.org/tools/measurement/skitter/ q Pathchar: bandwidth measurement q http://www.caida.org/tools/utilities/others/pathchar/ http://www.caida.org/tools/utilities/others/pathchar/ q Pathrate/Pathload: load/available bandwidth measurement q http://www.pathrate.org/ http://www.pathrate.org/ q Visualization tools & utilities: q http://www.caida.org/tools/visualization/ http://www.caida.org/tools/visualization/ q http://www.caida.org/tools/utilities/ http://www.caida.org/tools/utilities/ q King: end-to-end latency estimator q http://www.cs.washington.edu/homes/gummadi/king/ http://www.cs.washington.edu/homes/gummadi/king/ q Internet Traffic Archive: q http://ita.ee.lbl.gov/index.html http://ita.ee.lbl.gov/index.html
16
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 16 Internet AS Map: caida.org
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.