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