Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Management And Debugging

Similar presentations


Presentation on theme: "Network Management And Debugging"— Presentation transcript:

1 Network Management And Debugging
WeeSan Lee

2 Roadmap Interface Configuration Route Configuration Network Debugging

3 Network Topology The Internet 192.168.0.0/24 .2 Router VM Host VM .1
/24

4 Interface Configuration (Host VM)
We will need: IP Address Netmask Broadcast Gateway Usually network broadcast

5 Interface Configuration (Router VM)
Use ifconfig command $ ifconfig eth netmask $ ifconfig eth1 eth1 Link encap:Ethernet HWaddr 00:C0:F0:3C:43:82 inet addr: Bcast: Mask: UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets: errors:1 dropped:0 overruns:0 frame:0 TX packets: errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes: (70.0 Mb) TX bytes: ( Mb) Interrupt:10 Base address:0xd880 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 DEVICE=eth1 ONBOOT=yes #BOOTPROTO=dhcp IPADDR= NETMASK= BROADCAST= 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 eth1: netmask $ ifconfig eth1: netmask 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 To remove a default route $ route del default gw To make it persistent, edit /etc/sysconfig/network NETWORKING=yes HOSTNAME=host1 DOMAINNAME=weesan.com GATEWAY=

9 Route Configuration (Router VM)
$ netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface U eth0 U eth0 UG eth0

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

11 Route Configuration (Router VM)
$ netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface U eth1 U eth0 U eth0 UG eth0

12 Enable IP Forwarding (Router VM)
$ echo "1" > /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 ( ) 56(84) bytes of data. 64 bytes from : icmp_seq=1 ttl=64 time=1.18 ms 64 bytes from : icmp_seq=2 ttl=64 time=1.57 ms 64 bytes from : icmp_seq=3 ttl=64 time=1.03 ms 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, …
$ traceroute traceroute: Warning: has multiple addresses; using traceroute to ( ), 30 hops max, 38 byte packets ( ) ms ms ms 2 c6513telecom--te-9-4.ucr.edu ( ) ms ms ms 3 c6509telecom--te-3-3.ucr.edu ( ) ms ms ms 4 riv-dc1.riv-dc1--ucr.cenic.net ( ) ms ms ms 5 dc-lax-dc1--riv-dc1-pos.cenic.net ( ) ms ms ms 6 * * * 11 po-in-f99.google.com ( ) ms ms ms

17 tcpdump Originally written by Van Jacobson $ tcpdump $ tcpdump -i eth0
$ tcpdump host eon $ tcpdump src net /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


Download ppt "Network Management And Debugging"

Similar presentations


Ads by Google