140 likes | 223 Views
TCP/IP Networking sections 13.2,3,4,5. Road map: TCP, provide connection-oriented service IP , route data packets from one machine to another (RFC 791) ICMP, provide low level support for IP including error message, routing assistance, debugging ARP, translate IP address to hardware address.
E N D
TCP/IP Networkingsections 13.2,3,4,5 Road map: • TCP, provide connection-oriented service • IP , route data packets from one machine to another (RFC 791) • ICMP, provide low level support for IP including error message, routing assistance, debugging • ARP, translate IP address to hardware address. • UDP, provides “best effort” transmission , connectionless
Packets & Encapsulation • Linux support, Ethernet, FDDI, token ring, ATM(Asynchronous Transfer Mode), wireless Ethernet and serial-line-based system. • Packets consist of header and payload • Packet header information contains • Source and destination address • Checksum • Protocol specific information
Link Layer Ethernet framing standard: DIX Ethernet II & IEEE 802.2 LLC SNAP • Linux support Ethernet II • Novell and Microsoft use 802.2 • Ethernet packet with different frame types can not talk to each other. • Speed : 10Mbps,100Mbps,1Gbps, 10Gbps Wireless networking • IEEE 802.11 define framing and signaling for wireless links • Speed: 11 Mbps (802.11b -practical 1-2 Mbps), 54Mbps-802.11a
Maximum Transfer Unit (MTU) • The maximum amount of data that a link-layer packet can carry (See table 13.2 page245) • Problems Fragmentation: The process of splitting the packets for lower router mtu’s
Type of addresses • Unicast : refers to a single host • Multicast : refers to a group of hosts • Broadcast : includes all hosts on the local network
Media Access Control (MAC) • Layer 2 • Size: 6 byte • First 3 byte identify the manufacture of the hardware. • Check http://www.iana.org/assignments/ethernet-numbers • ifconfig -a • The address is fixed , but you can change it in Linux (not good idea!) • Map MAC to IP using ARP
IP address • Layer 3 • Size : 4 byte • Format x.x.x.x, 192.168.1.1 • Mapping address to names: 1-Static /etc/host 2-Domain Name Server (DNS)
IP Classes • Special address: • 127.0.0.1 loopback address (localhost) • private internets: • 10.0.0.0 - 10.255.255.255 • 172.16.0.0 - 172.31.255.255 • 192.168.0.0 - 192.168.255.255
Subnetting and netmask • Subnetting: borrow bit from the host portion to the network portion • Example: Network: 192.168.1.0 With out subnetting we have 254 host Class c , can manipulate with the last 8 bits Required : 28 users 28+2< 25 host 23=8 networks
- All-0 and all-1 host are reserved - Perl script that help with binary arithmetic ftp.ocs.com.au - Palm pilot version www.ajw.com/ipcalc.htm Address range: 192.168.1.1-192.168.1.30, network: 192.168.1.0, broadcast 192.168.1.31 192.168.1.33-192.168.1.62, network: 192.168.1.32 broadcast 192.168.1.63 Subnet mask 11100000 224 or /27
PORTS • Ports specify a particular communication channel between two process • 53 DNS • 80 HTTP • 20,21 FTP
Routing • Routing is the process of directing a packet through hops to reach it’s destination • Tcp/ip routing information takes the form of rules • “to reach network A, send to machine C” • Routing table stored in the kernel • If no entry found for packet and there is no default route specified an icmp message “ network unreachable “ returned to the sender • Use netstat –r to examine machine routing table • netstat –rn to avoid DNS lookup • To add route in Linux Add route –net x.x.x.x netamask y.y.y.y gw • Route to loopback is added at boot time
ICMP Redirect • IP protocol has no error-reporting or error-correcting mechanism • IP protocol lacks a mechanism for host and management queries • ICMP designed to compensate for IP deficiencies • In Linux accept_redirect in the /proc controls the acceptance of ICMP redirects.