Chapter 13 - TCP/IP Networking

900 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
900
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Chapter 13 - TCP/IP Networking

  1. 1. TCP/IP Networking Yue Cui 06/13/02
  2. 2. Presentation Outline <ul><li>Introduction </li></ul><ul><li>Packets and Encapsulation </li></ul><ul><li>IP Addresses, Routing </li></ul><ul><li>ARP, DHCP and PPP </li></ul><ul><li>Security Issue </li></ul><ul><li>Addition of Machines </li></ul>
  3. 3. Introduction <ul><li>TCP/IP and the Internet </li></ul><ul><ul><li>A brief history </li></ul></ul><ul><ul><ul><li>ARPARNET(1969 by DARPA) </li></ul></ul></ul><ul><ul><li>Internet Management </li></ul></ul><ul><ul><ul><li>ICANN </li></ul></ul></ul><ul><ul><ul><li>IETF </li></ul></ul></ul><ul><ul><ul><li>ISOC </li></ul></ul></ul><ul><ul><li>Standards and Documentation </li></ul></ul><ul><ul><ul><li>RFCs, FYIs, STDs and BCPs </li></ul></ul></ul>
  4. 4. Introduction <ul><li>TCP/IP protocol suite </li></ul><ul><ul><li>IP – routes data packets from one machine to another </li></ul></ul><ul><ul><li>ICMP – provides lower-level support for IP, including error messages, routing assistance and debugging help </li></ul></ul><ul><ul><li>ARP – translates IP address to hardware address (a.k.a. MAC address) </li></ul></ul><ul><ul><li>UDP and TCP – deliver data to specific applications on the destination machine </li></ul></ul>
  5. 5. Introduction <ul><li>TCP/IP family </li></ul>
  6. 6. Presentation Outline <ul><li>Introduction </li></ul><ul><li>Packets and Encapsulation </li></ul><ul><li>IP Addresses, Routing </li></ul><ul><li>ARP, DHCP and PPP </li></ul><ul><li>Security Issue </li></ul><ul><li>Addition of Machines </li></ul>
  7. 7. Packets and Encapsulation <ul><li>Packet </li></ul><ul><ul><li>Header—tells where the packet came from and where it’s going </li></ul></ul><ul><ul><li>Payload—actual data to be transferred </li></ul></ul>
  8. 8. Encapsulation Layer 5 4 3 2 1 M H 4 M H 4 H 4 H 3 H 3 H 2 M M M H 4 M H 4 H 4 H 3 H 3 H 2 M M source machine destination machine
  9. 9. Presentation Outline <ul><li>Introduction </li></ul><ul><li>Packets and Encapsulation </li></ul><ul><li>IP Addresses, Routing </li></ul><ul><li>ARP, DHCP and PPP </li></ul><ul><li>Security Issue </li></ul><ul><li>Addition of Machines </li></ul>
  10. 10. IP Addresses <ul><li>Historical Internet address classes </li></ul><ul><ul><li>IP addresses were grouped into “classes” </li></ul></ul><ul><ul><li>Class A,B and C denote regular IP addresses. Class D and E are used for multicasting and research purpose. </li></ul></ul><ul><li>Subnet masks </li></ul><ul><ul><li>Part of the host portion of an address is “borrowed” to extend the network portion. </li></ul></ul><ul><li>Use ifconfig command to configure IP address and subnet masks </li></ul>
  11. 11. IP Addresses <ul><li>IP address crisis </li></ul><ul><ul><li>We were going to run out of class B addresses by mid-1995 </li></ul></ul><ul><ul><li>The routing tables of Internet backbone sites were growing so large that they would not fit in the memory of available routers </li></ul></ul><ul><ul><li>IP addresses were being allocated with no locality of reference </li></ul></ul>
  12. 12. IP Addresses <ul><li>Solution to the IP address crisis </li></ul><ul><ul><li>CIDR (Classless Inter-Domain Routing) </li></ul></ul><ul><ul><ul><li>A short-term solution </li></ul></ul></ul><ul><ul><ul><li>Manage the existing 4-byte address space that uses the available addresses more efficiently and allows routing tables to be simplified by taking numerical adjacencies into account </li></ul></ul></ul><ul><ul><li>IPv6 </li></ul></ul><ul><ul><ul><li>A long-term solution </li></ul></ul></ul><ul><ul><ul><li>A revision of the IP protocol that expands the address space to 16 bytes </li></ul></ul></ul>
  13. 13. Routing <ul><li>Meaning </li></ul><ul><ul><li>Looking up a network address in the routing table to forward a packet toward its destination </li></ul></ul><ul><ul><li>Building the routing table in the first place </li></ul></ul><ul><li>Configure </li></ul><ul><ul><li>netstat </li></ul></ul><ul><ul><li>route get (on BSD-based system) </li></ul></ul>
  14. 14. Presentation Outline <ul><li>Introduction </li></ul><ul><li>Packets and Encapsulation </li></ul><ul><li>IP Addresses, Routing </li></ul><ul><li>ARP, DHCP and PPP </li></ul><ul><li>Security Issue </li></ul><ul><li>Addition of Machines </li></ul>
  15. 15. ARP, DHCP and PPP <ul><li>ARP: Address Resolution Protocol </li></ul><ul><ul><li>Discovers the hardware address(MAC address) associated with a IP address </li></ul></ul><ul><li>Usage: </li></ul><ul><ul><li>Redhat% /sbin/arp –a </li></ul></ul><ul><ul><li>xor.com(192.108.21.1) at 08:00:20:77:5E:A0[ether] on eth0 </li></ul></ul><ul><ul><li>earth.xor.com(192.108.21.180) at 00:50:DA:12:4E:E5[ether] on eth0 </li></ul></ul>
  16. 16. ARP, DHCP and PPP <ul><li>DHCP: Dynamic Host Configuration Protocol </li></ul><ul><ul><li>Dynamically assigns network parameters to hosts </li></ul></ul><ul><ul><li>Leasable parameters include: </li></ul></ul><ul><ul><ul><li>IP addresses and netmasks </li></ul></ul></ul><ul><ul><ul><li>Gateways(default routes) </li></ul></ul></ul><ul><ul><ul><li>DNS name servers </li></ul></ul></ul><ul><ul><ul><li>Syslog hosts </li></ul></ul></ul><ul><ul><ul><li>WINS servers, proxy servers </li></ul></ul></ul><ul><ul><ul><li>TFTP servers(for loading a boot image) </li></ul></ul></ul>
  17. 17. ARP, DHCP and PPP <ul><li>PPP: Point-to-Point Protocol </li></ul><ul><ul><li>Serial line encapsulation protocol that specifies how IP packets must be encoded for transmission on a slow serial line </li></ul></ul><ul><li>Sometimes used with home technologies such as Dial-up, DSL and cable modem </li></ul>
  18. 18. ARP, DHCP and PPP PPP-related commands and configuration files example Free BSD /usr/sbin/pppd /etc/ppp/options /usr/sbin/chat /etc/ppp/options.ttyserver /etc/ppp/chat.ttyserver Red Hat /usr/sbin/pppd /etc/ppp/options /usr/sbin/chat /etc/ppp/ppp.conf /etc/ppp/allow System Commands Config files
  19. 19. Presentation Outline <ul><li>Introduction </li></ul><ul><li>Packets and Encapsulation </li></ul><ul><li>IP Addresses, Routing </li></ul><ul><li>ARP, DHCP and PPP </li></ul><ul><li>Security Issue </li></ul><ul><li>Addition of Machines </li></ul>
  20. 20. Security Issues <ul><li>IP forwarding </li></ul><ul><li>ICMP redirects </li></ul><ul><li>Source routing </li></ul><ul><li>Broadcast pings and other forms of directed broadcast </li></ul><ul><li>UNIX-based firewalls </li></ul><ul><li>Virtual private networks(VPN) </li></ul><ul><li>IPSEC: secure IP </li></ul><ul><li>( Refer to Chapter 21 for details) </li></ul>
  21. 21. Presentation Outline <ul><li>Introduction </li></ul><ul><li>Packets and Encapsulation </li></ul><ul><li>IP Addresses, Routing </li></ul><ul><li>ARP, DHCP and PPP </li></ul><ul><li>Security Issue </li></ul><ul><li>Addition of Machines </li></ul>
  22. 22. Addition of machines <ul><li>Basic steps </li></ul><ul><ul><li>Assign an IP address and hostname </li></ul></ul><ul><ul><li>Set up the new host to configure its network interfaces at boot time </li></ul></ul><ul><ul><li>Set up a default route </li></ul></ul><ul><ul><li>Point to a DNS name server, to allow access to the rest of the Internet </li></ul></ul>
  23. 23. Assign an IP address and hostname <ul><li>/etc/hosts file </li></ul><ul><ul><li>Example from text book </li></ul></ul><ul><ul><li>127.0.0.1 localhost </li></ul></ul><ul><ul><li>192.108.21.48 lollipop.xor.com lollipop loghost </li></ul></ul><ul><ul><li>192.108.21.254 chimchim-gw.xor.com chimchim-gw </li></ul></ul><ul><ul><li>192.168.21.1 ns.xor.com ns </li></ul></ul><ul><ul><li>192.225.33.5 licenses.xor.com license-server </li></ul></ul><ul><li>hostname command </li></ul><ul><ul><li>Assigns a hostname to a machine </li></ul></ul><ul><ul><li>Typically runs at boot time </li></ul></ul>
  24. 24. Configure network interface <ul><li>ifconfig command </li></ul><ul><ul><li>Common form: </li></ul></ul><ul><ul><ul><li>ifconfig interface address options… up/down </li></ul></ul></ul><ul><ul><ul><li>For example: </li></ul></ul></ul><ul><ul><ul><ul><li>Ifconfig en0 128.138.240.1 netmask 255.255.255.0 up </li></ul></ul></ul></ul><ul><ul><li>Options </li></ul></ul><ul><ul><ul><li>Netmask </li></ul></ul></ul><ul><ul><ul><ul><li>Sets the subnet mask for the interface </li></ul></ul></ul></ul><ul><ul><ul><li>Broadcast </li></ul></ul></ul><ul><ul><ul><ul><li>Specifies the IP broadcast address for the interface </li></ul></ul></ul></ul>
  25. 25. Configure static routes <ul><li>route command </li></ul><ul><ul><li>Format: </li></ul></ul><ul><ul><li>route [- f ] op [type] destination gateway [hop-count] </li></ul></ul><ul><ul><li>Options </li></ul></ul><ul><ul><ul><li>Add, delete, (get, change, flush, monitor) </li></ul></ul></ul><ul><li>Default routes </li></ul><ul><ul><li>route add default gateway-IP-address </li></ul></ul>
  26. 26. Configure DNS <ul><li>/etc/resolv.conf file </li></ul><ul><ul><li>All systems require to modify it </li></ul></ul><ul><ul><li>Sample: </li></ul></ul><ul><ul><ul><li>Search cs.colorado.edu colorado.edu </li></ul></ul></ul><ul><ul><ul><li>Nameserver 128.138.242.1 </li></ul></ul></ul><ul><ul><ul><li>Nameserver 128.138.243.151 </li></ul></ul></ul><ul><ul><ul><li>Nameserver 192.108.21.1 </li></ul></ul></ul>
  27. 27. Configure DNS <ul><li>“ service switch” file </li></ul><ul><ul><li>Some systems do not use DNS by default, these systems use “service switch” file to resolve hostname-to IP- address mapping </li></ul></ul><ul><ul><li>Service switch files by system </li></ul></ul>host,bind /etc/host.conf FreeBSD db files nisplus dns hosts, bind /etc/nsswitch.conf /etc/host.conf Red Hat dns [NOTFOUND=return] nis [NOTFOUND=return] files /etc/nsswitch.conf HP-UX nis [NOTFOUND=return] files /etc/nsswitch.conf Solaris Default for hostname lookups Switch files System
  28. 28. Thank you! <ul><li>Questions? </li></ul>

×