Network Management And Debugging - PowerPoint PPT Presentation

About This Presentation
Title:

Network Management And Debugging

Description:

Network Management And Debugging WeeSan Lee http://www.cs.ucr.edu/~weesan/cs183/ Roadmap Interface Configuration Route Configuration Network ... – PowerPoint PPT presentation

Number of Views:290
Avg rating:3.0/5.0
Slides: 19
Provided by: wee65
Learn more at: http://alumni.cs.ucr.edu
Category:

less

Transcript and Presenter's Notes

Title: Network Management And Debugging


1
Network Management And Debugging
  • WeeSan Lee ltweesan_at_cs.ucr.edugt
  • http//www.cs.ucr.edu/weesan/cs183/

2
Roadmap
  • Interface Configuration
  • Route Configuration
  • Network Debugging

3
Network Topology
The Internet
192.168.0.0/24
.2
Router VM
Host VM
.1
.2
10.0.0.0/24
4
Interface Configuration (Host VM)
  • We will need
  • IP Address
  • 10.0.0.2
  • Netmask
  • 255.255.255.0
  • Broadcast
  • 10.0.0.255
  • Gateway
  • 10.0.0.1
  • Usually
  • 10.0.0.0 - network
  • 10.0.0.255 - broadcast

5
Interface Configuration (Router VM)
  • Use ifconfig command
  • ifconfig eth1 10.0.0.1 netmask 255.255.255.0
  • ifconfig eth1
  • eth1 Link encapEthernet HWaddr
    00C0F03C4382
  • inet addr10.0.0.1 Bcast10.0.0.255
    Mask255.255.255.0
  • UP BROADCAST RUNNING MULTICAST
    MTU1500 Metric1
  • RX packets659988 errors1 dropped0
    overruns0 frame0
  • TX packets1016790 errors0 dropped0
    overruns0 carrier0
  • collisions0 txqueuelen1000
  • RX bytes73459942 (70.0 Mb) TX
    bytes1201693614 (1146.0 Mb)
  • Interrupt10 Base address0xd880
  • To bring the interface eth1 down or up via
    ifconfig command
  • ifconfig eth1 down
  • ifconfig eth1 up

6
Interface Configuration (Router VM)
  • Edit /etc/sysconfig/network-scripts/ifcfg-eth1
  • DEVICEeth1
  • ONBOOTyes
  • BOOTPROTOdhcp
  • IPADDR10.0.0.1
  • NETMASK255.255.255.0
  • BROADCAST10.0.0.255
  • To bring up the interface eth1 via ifup script
  • ifup eth1
  • To bring down the interface eth1 via ifdown
    script
  • ifdown eth1

7
IP Aliasing
  • A way to assign multiple IP addresses on the same
    interface
  • ifconfig eth10 10.0.0.3 netmask 255.255.255.0
  • ifconfig eth11 10.0.0.4 netmask 255.255.255.0
  • Why?
  • We could experiment new services w/out new HW
  • We could replace problematic HW with IP aliasing
    on a healthy machine temporary

8
Route Configuration (Router VM)
  • Default routes
  • Usually added by route command
  • route add default gw 192.168.0.1
  • To remove a default route
  • route del default gw 192.168.0.1
  • To make it persistent, edit /etc/sysconfig/network
  • NETWORKINGyes
  • HOSTNAMEhost1
  • DOMAINNAMEweesan.com
  • GATEWAY192.168.0.1

9
Route Configuration (Router VM)
  • netstat -rn
  • Kernel IP routing table
  • Destination Gateway Genmask
    Flags MSS Window irtt Iface
  • 192.168.0.0 0.0.0.0
    255.255.255.0 U 0 0 0
    eth0
  • 169.254.0.0 0.0.0.0 255.255.0.0
    U 0 0 0 eth0
  • 0.0.0.0 192.168.0.1 0.0.0.0
    UG 0 0 0 eth0

10
Route Configuration (Router VM)
  • Static routes
  • Usually added by ifconfig command
  • route add -net 10.0.0.0 netmask 255.255.255.0
    eth1
  • route del -net 10.0.0.0 netmask 255.255.255.0
    eth1
  • Edit /etc/sysconfig/static-routes
  • eth1 net 10.0.0.0 netmask 255.255.255.0

11
Route Configuration (Router VM)
  • netstat -rn
  • Kernel IP routing table
  • Destination Gateway Genmask
    Flags MSS Window irtt Iface
  • 10.0.0.0 0.0.0.0
    255.255.255.0 U 0 0 0
    eth1
  • 192.168.0.0 0.0.0.0
    255.255.255.0 U 0 0 0
    eth0
  • 169.254.0.0 0.0.0.0 255.255.0.0
    U 0 0 0 eth0
  • 0.0.0.0 192.168.0.1 0.0.0.0
    UG 0 0 0 eth0

12
Enable IP Forwarding (Router VM)
  • echo "1" gt /proc/sys/net/ipv4/ip_forward
  • To make it persistent, edit /etc/sysctl.conf
  • Change net.ipv4.ip_forward to 1

13
Network Debugging
  • Can be tricky
  • Start from one component and work your way
    through
  • Recommend procedures (bottom-up)
  • Always check power first ?
  • Check the LED on the devices
  • Check connectivity, use tools like ping,
    traceroute, tcpdump, etc
  • Verify application protocol, use telnet

14
ping
  • Send ICMP-REQUEST and expect ICMP-REPLY
  • ping 10.0.0.1
  • PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
  • 64 bytes from 10.0.0.1 icmp_seq1 ttl64
    time1.18 ms
  • 64 bytes from 10.0.0.1 icmp_seq2 ttl64
    time1.57 ms
  • 64 bytes from 10.0.0.1 icmp_seq3 ttl64
    time1.03 ms
  • --- 10.0.0.1 ping statistics ---
  • 3 packets transmitted, 3 received, 0 packet
    loss, time 2002ms
  • rtt min/avg/max/mdev 1.036/1.263/1.572/0.228 ms

15
ping
  • Start from known next hop
  • Not always works for remote hosts
  • For example, eon.cs.ucr.edu drops ICMP packets

16
traceroute
  • Send UDP packets to remote host with TTL 1, 2, 3,
  • weesan_at_delta-1gt traceroute www.google.com
  • traceroute Warning www.google.com has multiple
    addresses using 72.14.253.99
  • traceroute to www.l.google.com (72.14.253.99), 30
    hops max, 38 byte packets
  • 1 138.23.211.1 (138.23.211.1) 0.286 ms 0.278
    ms 0.353 ms
  • 2 c6513telecom--te-9-4.ucr.edu (138.23.3.105)
    25.070 ms 20.486 ms 1.064 ms
  • 3 c6509telecom--te-3-3.ucr.edu (138.23.3.26)
    0.384 ms 0.381 ms 0.361 ms
  • 4 riv-dc1.riv-dc1--ucr.cenic.net
    (137.164.24.121) 0.311 ms 0.235 ms 0.225 ms
  • 5 dc-lax-dc1--riv-dc1-pos.cenic.net
    (137.164.22.228) 1.457 ms 1.459 ms 1.446 ms
  • 6
  • 11 po-in-f99.google.com (72.14.253.99) 31.902
    ms 30.762 ms 30.745 ms

17
tcpdump
  • Originally written by Van Jacobson
  • tcpdump
  • tcpdump -i eth0
  • tcpdump host eon
  • tcpdump src net 10.0.0.0/24 and dst port 80
  • tcpdump -vvv
  • man tcpdump

18
Reference
  • LAH
  • Ch 12 TCP/IP Networking
  • Ch 13 Routing
  • Ch 19 Network Management And Debugging
Write a Comment
User Comments (0)
About PowerShow.com